source:
freewrt/package/dropbear/patches/110-change_user.patch@
428f140
| Last change on this file since 428f140 was 475ad56, checked in by , 20 years ago | |
|---|---|
|
|
| File size: 811 bytes | |
-
svr-chansession.c
diff -urN dropbear.old/svr-chansession.c dropbear.dev/svr-chansession.c
old new 860 860 /* We can only change uid/gid as root ... */ 861 861 if (getuid() == 0) { 862 862 863 if ((se tgid(ses.authstate.pw->pw_gid) < 0) ||863 if ((ses.authstate.pw->pw_gid != 0) && ((setgid(ses.authstate.pw->pw_gid) < 0) || 864 864 (initgroups(ses.authstate.pw->pw_name, 865 ses.authstate.pw->pw_gid) < 0)) {865 ses.authstate.pw->pw_gid) < 0))) { 866 866 dropbear_exit("error changing user group"); 867 867 } 868 if ( setuid(ses.authstate.pw->pw_uid) < 0) {868 if ((ses.authstate.pw->pw_uid != 0) && (setuid(ses.authstate.pw->pw_uid) < 0)) { 869 869 dropbear_exit("error changing user"); 870 870 } 871 871 } else {
Note:
See TracBrowser
for help on using the repository browser.
