added getuid function

This commit is contained in:
jsorg71 2008-05-08 01:39:54 +00:00
parent 84c94f1c22
commit bb87afc364
2 changed files with 17 additions and 1 deletions

View File

@ -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)
{

View File

@ -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);