aboutsummaryrefslogtreecommitdiffstats
path: root/src/usernetctl.c
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2007-04-19 19:51:39 +0000
committerBill Nottingham <notting@redhat.com>2007-04-19 19:51:39 +0000
commit7d04379d25f3fcc68ad57c89195d918f9ae29ec0 (patch)
treef1f58d4df9b310908ee92522e0b5e6df3467c630 /src/usernetctl.c
parent9c4fa8b56d0239b24522b2530de6ce52087bcfb4 (diff)
downloadinitscripts-7d04379d25f3fcc68ad57c89195d918f9ae29ec0.tar
initscripts-7d04379d25f3fcc68ad57c89195d918f9ae29ec0.tar.gz
initscripts-7d04379d25f3fcc68ad57c89195d918f9ae29ec0.tar.bz2
initscripts-7d04379d25f3fcc68ad57c89195d918f9ae29ec0.tar.xz
initscripts-7d04379d25f3fcc68ad57c89195d918f9ae29ec0.zip
drop user gid (#229372)
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));