From 7d04379d25f3fcc68ad57c89195d918f9ae29ec0 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 19 Apr 2007 19:51:39 +0000 Subject: drop user gid (#229372) --- src/usernetctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/usernetctl.c b/src/usernetctl.c index aa77c8a5..be69c022 100644 --- a/src/usernetctl.c +++ b/src/usernetctl.c @@ -230,6 +230,8 @@ main(int argc, char ** argv) { /* pppd wants the real uid to be the same as the effective (god only knows why when it works fine setuid out of the box) */ setuid(geteuid()); + /* Drop user gid (for temp files, SELinux) */ + setgid(0); execle(cmd, cmd, ifaceConfig, NULL, safeEnviron); fprintf(stderr, "exec of %s failed: %s\n", cmd, strerror(errno)); -- cgit v1.2.1