From b2d306dde2ce3eae11b4729eca5f3242b2109861 Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 13 Jul 2008 11:47:07 -0500 Subject: [PATCH] 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. --- apps/silcd/silcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. */ -- 2.24.0