1
0
mirror of https://github.com/clearml/dropbear synced 2025-04-23 15:44:35 +00:00

Seperate out exit errors from setgid()/initgroups(), and errors from setuid(),

to make debugging a bit easier

--HG--
extra : convert_revision : ea1f23ab2f94d0416e0bac38f63c9850396184c4
This commit is contained in:
Matt Johnston 2005-05-27 16:34:57 +00:00
parent eb741b9cc9
commit a8785cf719

View File

@ -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 {