summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2004-03-22 09:29:57 +1100
committerDamien Miller <djm@mindrot.org>2004-03-22 09:29:57 +1100
commitbfba3542614fb900384f957c908a34d125e81d78 (patch)
tree23b2cc1c99b3267c7add474fb291e65f9df3efb5
parent4fefe24c0181ebce9ff4b83b3d25f1a3b1c5d2f8 (diff)
- (djm) [sshd.c] Drop supplemental groups if started as root
-rw-r--r--ChangeLog5
-rw-r--r--sshd.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2505cb0e..b44befe3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+20040315
+ - (djm) [sshd.c] Drop supplemental groups if started as root
+
20040311
- (djm) [configure.ac] Add standard license to configure.ac; ok ben, dtucker
@@ -898,4 +901,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.3288 2004/03/11 03:20:10 djm Exp $
+$Id: ChangeLog,v 1.3289 2004/03/21 22:29:57 djm Exp $
diff --git a/sshd.c b/sshd.c
index 9462bf0a..3308a8dc 100644
--- a/sshd.c
+++ b/sshd.c
@@ -831,6 +831,9 @@ main(int ac, char **av)
av = saved_argv;
#endif
+ if (geteuid() == 0 && setgroups(0, NULL) == -1)
+ debug("setgroups(): %.200s", strerror(errno));
+
/* Initialize configuration options to their default values. */
initialize_server_options(&options);