summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/process.cpp4
-rw-r--r--src/process.h4
2 files changed, 7 insertions, 1 deletions
diff --git a/src/process.cpp b/src/process.cpp
index b3f2801..e6b9f3d 100644
--- a/src/process.cpp
+++ b/src/process.cpp
@@ -154,6 +154,10 @@ void Bu::Process::gexec( Flags eFlags, const char *sName, char *const argv[] )
154 ::close( iaStdErr[0] ); 154 ::close( iaStdErr[0] );
155 dup2( iaStdErr[1], 2 ); 155 dup2( iaStdErr[1], 2 );
156 } 156 }
157 if( (opt.eFlags&Options::SetGid) )
158 {
159 setgid( opt.iGid );
160 }
157 if( (opt.eFlags&Options::SetUid) ) 161 if( (opt.eFlags&Options::SetUid) )
158 { 162 {
159 setuid( opt.iUid ); 163 setuid( opt.iUid );
diff --git a/src/process.h b/src/process.h
index f3d84b1..6295b49 100644
--- a/src/process.h
+++ b/src/process.h
@@ -40,12 +40,14 @@ namespace Bu
40 { 40 {
41 None = 0x00, 41 None = 0x00,
42 SetUid = 0x01, 42 SetUid = 0x01,
43 SetGid = 0x02,
43 }; 44 };
44 45
45 Options() : eFlags( None ) {} 46 Options() : eFlags( None ) {}
46 47
47 OptFlags eFlags; 48 int eFlags;
48 int iUid; 49 int iUid;
50 int iGid;
49 }; 51 };
50 52
51 Process( Flags eFlags, const char *sName, char *const argv[] ); 53 Process( Flags eFlags, const char *sName, char *const argv[] );