Add user directive for dropping root privileges

This is equivalent to the -u option.
This commit is contained in:
Miroslav Lichvar
2013-04-26 17:35:58 +02:00
parent f2eb6b165a
commit edda0c60b3
4 changed files with 37 additions and 0 deletions

3
main.c
View File

@@ -394,6 +394,9 @@ int main
SYS_LockMemory();
}
if (!user) {
user = CNF_GetUser();
}
if (user) {
SYS_DropRoot(user);
}