diff options
author | Matt Johnston <matt@ucc.asn.au> | 2005-05-27 16:34:57 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2005-05-27 16:34:57 +0000 |
commit | a8785cf71955edac8e54c09287bfb97ffcf760c4 (patch) | |
tree | a30cf8c589cc4469a6ed8776a4a40b6f8ee95053 /svr-chansession.c | |
parent | eb741b9cc950838f4cc0aa7d9ef4a4e6a14150fd (diff) |
Seperate out exit errors from setgid()/initgroups(), and errors from setuid(),
to make debugging a bit easier
--HG--
extra : convert_revision : ea1f23ab2f94d0416e0bac38f63c9850396184c4
Diffstat (limited to 'svr-chansession.c')
-rw-r--r-- | svr-chansession.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/svr-chansession.c b/svr-chansession.c index 90c82a7..a040a47 100644 --- a/svr-chansession.c +++ b/svr-chansession.c @@ -862,8 +862,10 @@ static void execchild(struct ChanSess *chansess) { 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 { |