From: Kp Date: Sun, 13 Jul 2008 16:47:07 +0000 (-0500) Subject: Server: always drop privileges, even in foreground mode. X-Git-Tag: silc.server.1.1.12~6 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=b2d306dde2ce3eae11b4729eca5f3242b2109861 Server: always drop privileges, even in foreground mode. Foreground mode is often used as a debugging aid for live configurations, so the server may be started with root privileges to let it bind to its native port. Since the server already has the ability to drop root privileges, use that ability to make foreground mode a little safer. --- diff --git a/apps/silcd/silcd.c b/apps/silcd/silcd.c index 19ba9193..d367328c 100644 --- a/apps/silcd/silcd.c +++ b/apps/silcd/silcd.c @@ -745,8 +745,8 @@ int main(int argc, char **argv) silc_file_writefile(pidfile, buf, strlen(buf)); } - silc_server_drop_privs(silcd); } + silc_server_drop_privs(silcd); /* Run the server. When this returns the server has been stopped and we will exit. */