summaryrefslogtreecommitdiff
path: root/src/process.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-08-15 17:06:31 +0000
committerMike Buland <eichlan@xagasoft.com>2011-08-15 17:06:31 +0000
commitbc9e6678f6b917f67317a2987866bf1787a3e076 (patch)
tree446a22eb59bbb8d27518a6404ae425513e4c0f1f /src/process.h
parentb307b8bb72b660be65a1dc5d8a05a4db32af7e67 (diff)
downloadlibbu++-bc9e6678f6b917f67317a2987866bf1787a3e076.tar.gz
libbu++-bc9e6678f6b917f67317a2987866bf1787a3e076.tar.bz2
libbu++-bc9e6678f6b917f67317a2987866bf1787a3e076.tar.xz
libbu++-bc9e6678f6b917f67317a2987866bf1787a3e076.zip
Process now supports setuid for the child process. Really cool.
Diffstat (limited to '')
-rw-r--r--src/process.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/process.h b/src/process.h
index 4934408..f3d84b1 100644
--- a/src/process.h
+++ b/src/process.h
@@ -33,8 +33,25 @@ namespace Bu
33 }; 33 };
34 34
35 public: 35 public:
36 class Options
37 {
38 public:
39 enum OptFlags
40 {
41 None = 0x00,
42 SetUid = 0x01,
43 };
44
45 Options() : eFlags( None ) {}
46
47 OptFlags eFlags;
48 int iUid;
49 };
50
36 Process( Flags eFlags, const char *sName, char *const argv[] ); 51 Process( Flags eFlags, const char *sName, char *const argv[] );
37 Process( Flags eFlags, const char *sName, const char *argv, ...); 52 Process( Flags eFlags, const char *sName, const char *argv, ...);
53 Process( Flags eFlags, const Options &opt, const char *sName, char *const argv[] );
54 Process( Flags eFlags, const Options &opt, const char *sName, const char *argv, ...);
38 virtual ~Process(); 55 virtual ~Process();
39 56
40 /** 57 /**
@@ -125,6 +142,7 @@ namespace Bu
125 142
126 void gexec( Flags eFlags, const char *sName, char *const argv[] ); 143 void gexec( Flags eFlags, const char *sName, char *const argv[] );
127 void checkClose(); 144 void checkClose();
145 Options opt;
128 }; 146 };
129} 147}
130 148