Skip to content
Snippets Groups Projects
Commit a8785cf7 authored by Matt Johnston's avatar Matt Johnston
Browse files

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

to make debugging a bit easier

--HG--
extra : convert_revision : ea1f23ab2f94d0416e0bac38f63c9850396184c4
parent eb741b9c
No related merge requests found
......@@ -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 {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment