# HG changeset patch # User Matt Johnston # Date 1117211697 0 # Node ID 675f7bf3c3918effb426a9ba83a1d1b033a0cc5c # Parent ca6a7c7a925c8790ee059eadbf952dc3e20fd4e4 Seperate out exit errors from setgid()/initgroups(), and errors from setuid(), to make debugging a bit easier diff -r ca6a7c7a925c -r 675f7bf3c391 svr-chansession.c --- a/svr-chansession.c Mon May 09 09:31:49 2005 +0000 +++ b/svr-chansession.c Fri May 27 16:34:57 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 {