Fixed a bug in the pid writing function, which couldn't be
authorGiovanni Giacobbi <johnny@silcnet.org>
Wed, 17 Apr 2002 20:15:51 +0000 (20:15 +0000)
committerGiovanni Giacobbi <johnny@silcnet.org>
Wed, 17 Apr 2002 20:15:51 +0000 (20:15 +0000)
written in a root-owned directory.

CHANGES
apps/silcd/silcd.c

diff --git a/CHANGES b/CHANGES
index 8e5c2a43ee79dec1ce5fae958c50d8cec22ea7db..60186ed1777ef0f40efa4776cf50988b8508cb8f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+Wed Apr 17 22:07:59 CEST 2002  Johnny Mnemonic <johnny@themnemonic.org>
+
+       * 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 <priikone@silcnet.org>
 
        * Merged irssi crash fixes on /QUIT, patch from cras.
index 35693a717f1f5421c4b81c6b5baa65754a2af79c..af9d6172b14144ce8e401f53f8a3743089cebe41 100644 (file)
@@ -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);