changeset 205:3924393e2456

merge of 7d53fee744460df7d2297614c9a4a8a6722eb277 and cc783df3845d0779e2407f0a83fbb605c12efa7d
author Matt Johnston <matt@ucc.asn.au>
date Fri, 27 May 2005 16:37:58 +0000
parents 675f7bf3c391 (diff) 65585699d980 (current diff)
children 85cc531f711e
files
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/svr-chansession.c	Tue May 10 17:02:05 2005 +0000
+++ b/svr-chansession.c	Fri May 27 16:37:58 2005 +0000
@@ -862,8 +862,10 @@
 
 		if ((setgid(ses.authstate.pw->pw_gid) < 0) ||
 			(initgroups(ses.authstate.pw->pw_name, 
-						ses.authstate.pw->pw_gid) < 0) ||
-			(setuid(ses.authstate.pw->pw_uid) < 0)) {
+						ses.authstate.pw->pw_gid) < 0)) {
+			dropbear_exit("error changing user group");
+		}
+		if (setuid(ses.authstate.pw->pw_uid) < 0) {
 			dropbear_exit("error changing user");
 		}
 	} else {