diff options
Diffstat (limited to 'nxcomp/Pipe.cpp')
-rw-r--r-- | nxcomp/Pipe.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nxcomp/Pipe.cpp b/nxcomp/Pipe.cpp index 7238d0c73..aacbbaeb3 100644 --- a/nxcomp/Pipe.cpp +++ b/nxcomp/Pipe.cpp @@ -21,6 +21,7 @@ #include <pwd.h> #include <sys/types.h> #include <sys/wait.h> +#include <grp.h> #include "Pipe.h" #include "Misc.h" @@ -234,6 +235,8 @@ FILE *Popen(char * const parameters[], const char *type) // Child. // + struct passwd *pwent = getpwuid(getuid()); + if (pwent) initgroups(pwent->pw_name,getgid()); setgid(getgid()); setuid(getuid()); |