aboutsummaryrefslogtreecommitdiffstats
path: root/src/usernetctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/usernetctl.c')
-rw-r--r--src/usernetctl.c2
1 files changed, 2 insertions, 0 deletions
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));