source:
freewrt/package/dropbear/patches/110-change_user.patch@
166beac
| Last change on this file since 166beac was 166beac, checked in by , 17 years ago | |
|---|---|
|
|
| File size: 710 bytes | |
-
dropbear-0.51/svr-chansession.c
old new 912 912 /* We can only change uid/gid as root ... */ 913 913 if (getuid() == 0) { 914 914 915 if ((se tgid(ses.authstate.pw_gid) < 0) ||915 if ((ses.authstate.pw_gid != 0) && ((setgid(ses.authstate.pw_gid) < 0) || 916 916 (initgroups(ses.authstate.pw_name, 917 ses.authstate.pw_gid) < 0)) {917 ses.authstate.pw_gid) < 0))) { 918 918 dropbear_exit("error changing user group"); 919 919 } 920 if ( setuid(ses.authstate.pw_uid) < 0) {920 if ((ses.authstate.pw_uid != 0) && (setuid(ses.authstate.pw_uid) < 0)) { 921 921 dropbear_exit("error changing user"); 922 922 } 923 923 } else {
Note:
See TracBrowser
for help on using the repository browser.
