]> andersk Git - openssh.git/blobdiff - sshd.c
- (djm) [sshd.c] Drop supplemental groups if started as root
[openssh.git] / sshd.c
diff --git a/sshd.c b/sshd.c
index 9462bf0af185ed78a641543f3aeb947c5f3e9296..3308a8dc9e18912ccd602e53fee3eab2c999883d 100644 (file)
--- 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);
 
This page took 0.064464 seconds and 4 git commands to generate.