From 568b60188d2e056df49091d653fdf55448ac7a31 Mon Sep 17 00:00:00 2001 From: Giovanni Giacobbi Date: Wed, 17 Apr 2002 20:15:51 +0000 Subject: [PATCH] Fixed a bug in the pid writing function, which couldn't be written in a root-owned directory. --- CHANGES | 5 +++++ apps/silcd/silcd.c | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 8e5c2a43..60186ed1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +Wed Apr 17 22:07:59 CEST 2002 Johnny Mnemonic + + * Fixed a bug in the pid writing function, which couldn't be + written in a root-owned directory. + Tue Apr 16 18:29:02 CEST 2002 Pekka Riikonen * Merged irssi crash fixes on /QUIT, patch from cras. diff --git a/apps/silcd/silcd.c b/apps/silcd/silcd.c index 35693a71..af9d6172 100644 --- a/apps/silcd/silcd.c +++ b/apps/silcd/silcd.c @@ -402,11 +402,6 @@ int main(int argc, char **argv) silc_schedule_signal_register(silcd->schedule, SIGTERM, stop_server, NULL); silc_schedule_signal_register(silcd->schedule, SIGINT, stop_server, NULL); - /* Drop root if we are not in debug mode, so you don't need to bother about - file writing permissions and so on */ - if (!silc_debug) - silc_server_drop_privs(silcd); - if (!foreground) { /* Before running the server, fork to background. */ silc_server_daemonise(silcd); @@ -420,6 +415,11 @@ int main(int argc, char **argv) } } + /* Drop root if we are not in debug mode, so you don't need to bother about + file writing permissions and so on */ + if (!silc_debug) + silc_server_drop_privs(silcd); + /* Run the server. When this returns the server has been stopped and we will exit. */ silc_server_run(silcd); -- 2.24.0