diff options
author | jsorg71 <jsorg71> | 2008-05-08 01:39:54 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2008-05-08 01:39:54 +0000 |
commit | bb87afc3647ccb3dd75c1dfeb5d79899c10e479d (patch) | |
tree | f67acfe28985bdfbb25bc8fb42f37ef7cdb7d679 | |
parent | 84c94f1c22fd648a23d7fd4930cf3bfac619f03d (diff) | |
download | xrdp-proprietary-bb87afc3647ccb3dd75c1dfeb5d79899c10e479d.tar.gz xrdp-proprietary-bb87afc3647ccb3dd75c1dfeb5d79899c10e479d.zip |
added getuid function
-rw-r--r-- | common/os_calls.c | 16 | ||||
-rw-r--r-- | common/os_calls.h | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/common/os_calls.c b/common/os_calls.c index 9b587c8d..a4104249 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -1775,12 +1775,26 @@ g_initgroups(const char* user, int gid) #if defined(_WIN32) return 0; #else - return initgroups(user ,gid); + return initgroups(user, gid); #endif } /*****************************************************************************/ /* does not work in win32 */ +/* returns user id */ +int APP_CC +g_getuid(void) +{ +#if defined(_WIN32) + return 0; +#else + return getuid(); +#endif +} + +/*****************************************************************************/ +/* does not work in win32 */ +/* On success, zero is returned. On error, -1 is returned */ int APP_CC g_setuid(int pid) { diff --git a/common/os_calls.h b/common/os_calls.h index 73dde4b2..c9707cac 100644 --- a/common/os_calls.h +++ b/common/os_calls.h @@ -207,6 +207,8 @@ g_setgid(int pid); int APP_CC g_initgroups(const char* user, int gid); int APP_CC +g_getuid(void); +int APP_CC g_setuid(int pid); int APP_CC g_waitchild(void); |