Skip to content

Commit

Permalink
Do not clear out groups on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
dmikushin committed Jan 31, 2020
1 parent 36f0bb4 commit 6851aa6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sshd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1903,6 +1903,7 @@ main(int ac, char **av)
if (test_flag)
exit(0);

#ifndef __ANDROID__
/*
* Clear out any supplemental groups we may have inherited. This
* prevents inadvertent creation of files with bad modes (in the
Expand All @@ -1912,6 +1913,7 @@ main(int ac, char **av)
*/
if (setgroups(0, NULL) < 0)
debug("setgroups() failed: %.200s", strerror(errno));
#endif

if (rexec_flag) {
if (rexec_argc < 0)
Expand Down

0 comments on commit 6851aa6

Please sign in to comment.