diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -42,7 +42,7 @@ | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include "includes.h" | 44 | #include "includes.h" |
45 | RCSID("$OpenBSD: sshd.c,v 1.266 2003/05/24 09:30:40 djm Exp $"); | 45 | RCSID("$OpenBSD: sshd.c,v 1.267 2003/05/29 16:58:45 deraadt Exp $"); |
46 | 46 | ||
47 | #include <openssl/dh.h> | 47 | #include <openssl/dh.h> |
48 | #include <openssl/bn.h> | 48 | #include <openssl/bn.h> |
@@ -564,8 +564,10 @@ privsep_preauth_child(void) | |||
564 | do_setusercontext(pw); | 564 | do_setusercontext(pw); |
565 | #else | 565 | #else |
566 | gidset[0] = pw->pw_gid; | 566 | gidset[0] = pw->pw_gid; |
567 | if (setegid(pw->pw_gid) < 0) | ||
568 | fatal("setegid failed for %u", (u_int)pw->pw_gid); | ||
567 | if (setgid(pw->pw_gid) < 0) | 569 | if (setgid(pw->pw_gid) < 0) |
568 | fatal("setgid failed for %u", (u_int)pw->pw_gid ); | 570 | fatal("setgid failed for %u", (u_int)pw->pw_gid); |
569 | if (setgroups(1, gidset) < 0) | 571 | if (setgroups(1, gidset) < 0) |
570 | fatal("setgroups: %.100s", strerror(errno)); | 572 | fatal("setgroups: %.100s", strerror(errno)); |
571 | permanently_set_uid(pw); | 573 | permanently_set_uid(pw); |