FS-8195 Compatibility with Solaris 11 process privileges

Now the daemon manages its privileges correctly, so that -rp, -u,
-g and -lp can be supported, also in a Solaris zone.

Also fixed a problem that switch_log_printf() was used before the
logger was initialized, so the messages were sent to nowhere.
This commit is contained in:
Stanislav Sinyagin
2015-09-22 09:01:07 +00:00
parent 2184af8ea6
commit 9461ed1335
4 changed files with 108 additions and 21 deletions
+4
View File
@@ -1089,6 +1089,10 @@ int main(int argc, char *argv[])
reincarnate_protect(reincarnate_reexec ? argv : NULL);
#endif
if (switch_core_set_process_privileges() < 0) {
return 255;
}
switch (priority) {
case 2:
set_realtime_priority();