From 17c04b9f129833b44dbf041693cc2b8ef31ab42a Mon Sep 17 00:00:00 2001 From: Dpeta <69427753+Dpeta@users.noreply.github.com> Date: Mon, 30 Jan 2023 19:43:09 +0100 Subject: [PATCH] Move seccomp and no_new_privs into one block. --- pesterchum.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pesterchum.py b/pesterchum.py index 0f75626..983342a 100755 --- a/pesterchum.py +++ b/pesterchum.py @@ -1387,9 +1387,6 @@ class PesterWindow(MovingWindow): # Silly guy prevention pt. 2 # We really shouldn't run as root. self.root_check() - # Set no_new_privs bit on Linux. - if ostools.isLinux(): - self.set_no_new_privs() # karxi: For the record, these are set via commandline arguments. By # default, they aren't usable any other way - you can't set them via @@ -1699,8 +1696,11 @@ class PesterWindow(MovingWindow): self.sincerecv = 0 # Time since last recv self.lastCheckPing = None - # Activate seccomp on Linux if enabled + # Linux user-space API if ostools.isLinux(): + # Set no_new_privs bit. + self.set_no_new_privs() + # Activate seccomp. self.seccomp(options) def seccomp(self, options):