added getuid function
This commit is contained in:
parent
84c94f1c22
commit
bb87afc364
@ -1775,12 +1775,26 @@ g_initgroups(const char* user, int gid)
|
|||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
return initgroups(user ,gid);
|
return initgroups(user, gid);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* does not work in win32 */
|
/* 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
|
int APP_CC
|
||||||
g_setuid(int pid)
|
g_setuid(int pid)
|
||||||
{
|
{
|
||||||
|
@ -207,6 +207,8 @@ g_setgid(int pid);
|
|||||||
int APP_CC
|
int APP_CC
|
||||||
g_initgroups(const char* user, int gid);
|
g_initgroups(const char* user, int gid);
|
||||||
int APP_CC
|
int APP_CC
|
||||||
|
g_getuid(void);
|
||||||
|
int APP_CC
|
||||||
g_setuid(int pid);
|
g_setuid(int pid);
|
||||||
int APP_CC
|
int APP_CC
|
||||||
g_waitchild(void);
|
g_waitchild(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user