summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2012-10-29 20:30:48 -0700
committerJay Sorg <jay.sorg@gmail.com>2012-10-29 20:30:48 -0700
commit82a8366fc067e584102374c8198d6556d5f41ffb (patch)
tree0d1da83d68c25d41c07a3c4b6e2eaf592bc2ebda
parent6e25a5e60011ceddd995bb82c896839de126a6b7 (diff)
downloadxrdp-proprietary-82a8366fc067e584102374c8198d6556d5f41ffb.tar.gz
xrdp-proprietary-82a8366fc067e584102374c8198d6556d5f41ffb.zip
added getgid to os_calls
-rw-r--r--common/os_calls.c13
-rw-r--r--common/os_calls.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/common/os_calls.c b/common/os_calls.c
index 602d6c0f..c8044cba 100644
--- a/common/os_calls.c
+++ b/common/os_calls.c
@@ -2415,6 +2415,19 @@ g_getuid(void)
/*****************************************************************************/
/* does not work in win32 */
+/* returns user id */
+int APP_CC
+g_getgid(void)
+{
+#if defined(_WIN32)
+ return 0;
+#else
+ return getgid();
+#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 4bbd09de..7ecc4699 100644
--- a/common/os_calls.h
+++ b/common/os_calls.h
@@ -240,6 +240,8 @@ g_initgroups(const char* user, int gid);
int APP_CC
g_getuid(void);
int APP_CC
+g_getgid(void);
+int APP_CC
g_setuid(int pid);
int APP_CC
g_waitchild(void);