From 82a8366fc067e584102374c8198d6556d5f41ffb Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Mon, 29 Oct 2012 20:30:48 -0700 Subject: [PATCH] added getgid to os_calls --- common/os_calls.c | 13 +++++++++++++ common/os_calls.h | 2 ++ 2 files changed, 15 insertions(+) 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 @@ -2413,6 +2413,19 @@ g_getuid(void) #endif } +/*****************************************************************************/ +/* 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 */ 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);