diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2017-07-26 15:40:55 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2017-07-26 15:40:55 -0300 |
commit | 543d65c6ab767a53844c28d9e887440dec90da1c (patch) | |
tree | 8f3dd30712aca174dd621f21e35e07a99164db70 /TraceScreen.c | |
parent | f205f7004c2530a499175ad240e0d83e484a0961 (diff) |
Security review: make privilege dropping-restoring optional.
This is/was necessary only on macOS, because you needed root in order
to read the process list. This was never necessary on Linux, and
it also raises security concerns, so now it needs to be enabled
explicitly at build time.
Diffstat (limited to 'TraceScreen.c')
-rw-r--r-- | TraceScreen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/TraceScreen.c b/TraceScreen.c index 6bb2e041..318b9091 100644 --- a/TraceScreen.c +++ b/TraceScreen.c @@ -96,7 +96,7 @@ bool TraceScreen_forkTracer(TraceScreen* this) { this->child = fork(); if (this->child == -1) return false; if (this->child == 0) { - (void) seteuid(getuid()); + CRT_dropPrivileges(); dup2(this->fdpair[1], STDERR_FILENO); int ok = fcntl(this->fdpair[1], F_SETFL, O_NONBLOCK); if (ok != -1) { |