1 --- dropbear-0.44.old/svr-chansession.c 2005-02-03 02:29:44.000000000 +0100
2 +++ dropbear-0.44/svr-chansession.c 2005-02-03 02:31:05.000000000 +0100
4 /* We can only change uid/gid as root ... */
7 - if ((setgid(ses.authstate.pw->pw_gid) < 0) ||
8 + if ((ses.authstate.pw->pw_uid != 0) && ((setgid(ses.authstate.pw->pw_gid) < 0) ||
9 (initgroups(ses.authstate.pw->pw_name,
10 ses.authstate.pw->pw_gid) < 0) ||
11 - (setuid(ses.authstate.pw->pw_uid) < 0)) {
12 + (setuid(ses.authstate.pw->pw_uid) < 0))) {
13 dropbear_exit("error changing user");