[openssh-commits] [openssh] 02/04: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Jun 25 09:53:22 AEST 2015


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 7ed01a96a1911d8b4a9ef4f3d064e1923bfad7e3
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Wed Jun 24 01:49:19 2015 +0000

    upstream commit
    
    Revert previous commit.  We still want to call setgroups
     in the case where there are zero groups to remove any that we might otherwise
     inherit (as pointed out by grawity at gmail.com) and since the 2nd argument
     to setgroups is always a static global it's always valid to dereference in
     this case.  ok deraadt@ djm@
    
    Upstream-ID: 895b5ac560a10befc6b82afa778641315725fd01
---
 uidswap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/uidswap.c b/uidswap.c
index 36fe9c8..0702e1d 100644
--- a/uidswap.c
+++ b/uidswap.c
@@ -187,8 +187,7 @@ restore_uid(void)
 	setgid(getgid());
 #endif /* SAVED_IDS_WORK_WITH_SETEUID */
 
-	if (saved_egroupslen > 0 &&
-	    setgroups(saved_egroupslen, saved_egroups) < 0)
+	if (setgroups(saved_egroupslen, saved_egroups) < 0)
 		fatal("setgroups: %.100s", strerror(errno));
 	temporarily_use_uid_effective = 0;
 }

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list