sys: move getpwnam() call to main.c

Pass uid/gid instead of user name to the root dropping function.
This commit is contained in:
Miroslav Lichvar
2015-08-10 15:53:36 +02:00
parent 236576c124
commit 6402350c83
6 changed files with 20 additions and 22 deletions

4
sys.h
View File

@@ -35,8 +35,8 @@ extern void SYS_Initialise(void);
/* Called at the end of the run to do final clean-up */
extern void SYS_Finalise(void);
/* Drop root privileges to the specified user */
extern void SYS_DropRoot(char *user);
/* Drop root privileges to the specified user and group */
extern void SYS_DropRoot(uid_t uid, gid_t gid);
extern void SYS_SetScheduler(int SchedPriority);
extern void SYS_LockMemory(void);