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:
parent
eb741b9cc9
commit
a8785cf719
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user