diff options
author | Damien Miller <djm@mindrot.org> | 2004-03-22 09:29:57 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2004-03-22 09:29:57 +1100 |
commit | bfba3542614fb900384f957c908a34d125e81d78 (patch) | |
tree | 23b2cc1c99b3267c7add474fb291e65f9df3efb5 | |
parent | 4fefe24c0181ebce9ff4b83b3d25f1a3b1c5d2f8 (diff) |
- (djm) [sshd.c] Drop supplemental groups if started as root
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sshd.c | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,6 @@ | |||
1 | 20040315 | ||
2 | - (djm) [sshd.c] Drop supplemental groups if started as root | ||
3 | |||
1 | 20040311 | 4 | 20040311 |
2 | - (djm) [configure.ac] Add standard license to configure.ac; ok ben, dtucker | 5 | - (djm) [configure.ac] Add standard license to configure.ac; ok ben, dtucker |
3 | 6 | ||
@@ -898,4 +901,4 @@ | |||
898 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 901 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
899 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 902 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
900 | 903 | ||
901 | $Id: ChangeLog,v 1.3288 2004/03/11 03:20:10 djm Exp $ | 904 | $Id: ChangeLog,v 1.3289 2004/03/21 22:29:57 djm Exp $ |
@@ -831,6 +831,9 @@ main(int ac, char **av) | |||
831 | av = saved_argv; | 831 | av = saved_argv; |
832 | #endif | 832 | #endif |
833 | 833 | ||
834 | if (geteuid() == 0 && setgroups(0, NULL) == -1) | ||
835 | debug("setgroups(): %.200s", strerror(errno)); | ||
836 | |||
834 | /* Initialize configuration options to their default values. */ | 837 | /* Initialize configuration options to their default values. */ |
835 | initialize_server_options(&options); | 838 | initialize_server_options(&options); |
836 | 839 | ||