- (djm) [sshd.c] Drop supplemental groups if started as root

This commit is contained in:
Damien Miller 2004-03-22 09:29:57 +11:00
parent 4fefe24c01
commit bfba354261
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,6 @@
20040315
- (djm) [sshd.c] Drop supplemental groups if started as root
20040311 20040311
- (djm) [configure.ac] Add standard license to configure.ac; ok ben, dtucker - (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) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu - (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 $

3
sshd.c
View File

@ -831,6 +831,9 @@ main(int ac, char **av)
av = saved_argv; av = saved_argv;
#endif #endif
if (geteuid() == 0 && setgroups(0, NULL) == -1)
debug("setgroups(): %.200s", strerror(errno));
/* Initialize configuration options to their default values. */ /* Initialize configuration options to their default values. */
initialize_server_options(&options); initialize_server_options(&options);