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

CHANGES
apps/silcd/silcd.c

diff --git a/CHANGES b/CHANGES
index d7d67dc11e8bc85218cf6e053eebaf9ae7cab0b5..316fbf2ed5c4b3c8d53794bd99e6877974ce9e9a 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 09:34:40 EEST 2002  Pekka Riikonen <priikone@silcnet.org>
 
        * Defined that channel message to unknown Channel ID must
index 8915ab1bac18f2c164ab88f36c4f9584d27da07e..bb8dc0d44d14b67f3ea8274b25053504e0700f7a 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);