summaryrefslogtreecommitdiffstats
path: root/common/os_calls.c
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2008-05-08 01:39:54 +0000
committerjsorg71 <jsorg71>2008-05-08 01:39:54 +0000
commitbb87afc3647ccb3dd75c1dfeb5d79899c10e479d (patch)
treef67acfe28985bdfbb25bc8fb42f37ef7cdb7d679 /common/os_calls.c
parent84c94f1c22fd648a23d7fd4930cf3bfac619f03d (diff)
downloadxrdp-proprietary-bb87afc3647ccb3dd75c1dfeb5d79899c10e479d.tar.gz
xrdp-proprietary-bb87afc3647ccb3dd75c1dfeb5d79899c10e479d.zip
added getuid function
Diffstat (limited to 'common/os_calls.c')
-rw-r--r--common/os_calls.c16
1 files changed, 15 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)
{