Changeset 3764
- Timestamp:
- 06/12/08 12:50:08 (6 months ago)
- Files:
-
- branches/freewrt_1_0/package/dropbear/patches/100-pubkey_path.patch (copied) (copied from branches/freewrt_1_0/package/dropbear/patches/100-pubkey_path.patch) (2 diffs)
- branches/freewrt_1_0/package/dropbear/patches/110-change_user.patch (copied) (copied from branches/freewrt_1_0/package/dropbear/patches/110-change_user.patch) (1 diff)
- branches/freewrt_1_0/package/dropbear/patches/130-ssh_ignore_o_and_x_args.patch (copied) (copied from branches/freewrt_1_0/package/dropbear/patches/130-ssh_ignore_o_and_x_args.patch)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/freewrt_1_0/package/dropbear/patches/100-pubkey_path.patch
r29 r3764 1 --- dropbear .old/svr-authpubkey.c.orig 2006-06-03 14:54:43.000000000 +00002 +++ dropbear .dev/svr-authpubkey.c 2006-06-03 15:03:19.000000000 +00001 --- dropbear-0.51/svr-authpubkey.c.orig 2008-06-12 10:35:41.000000000 +0200 2 +++ dropbear-0.51/svr-authpubkey.c 2008-06-12 10:36:32.000000000 +0200 3 3 @@ -176,6 +176,8 @@ 4 4 goto out; 5 5 } 6 6 7 + if (ses.authstate.pw ->pw_uid != 0) {7 + if (ses.authstate.pw_uid != 0) { 8 8 + 9 9 /* we don't need to check pw and pw_dir for validity, since 10 10 * its been done in checkpubkeyperms. */ 11 len = strlen(ses.authstate.pw ->pw_dir);11 len = strlen(ses.authstate.pw_dir); 12 12 @@ -187,6 +189,9 @@ 13 13 … … 24 24 } 25 25 26 + if (ses.authstate.pw ->pw_uid != 0) {26 + if (ses.authstate.pw_uid != 0) { 27 27 + 28 28 /* allocate max required pathname storage, branches/freewrt_1_0/package/dropbear/patches/110-change_user.patch
r1 r3764 1 diff -urN dropbear.old/svr-chansession.c dropbear.dev/svr-chansession.c 2 --- dropbear.old/svr-chansession.c 2005-12-09 06:42:33.000000000 +0100 3 +++ dropbear.dev/svr-chansession.c 2005-12-12 01:42:38.982034750 +0100 4 @@ -860,12 +860,12 @@ 1 --- dropbear-0.51/svr-chansession.c.orig 2008-06-12 09:58:01.000000000 +0200 2 +++ dropbear-0.51/svr-chansession.c 2008-06-12 10:04:16.000000000 +0200 3 @@ -912,12 +912,12 @@ 5 4 /* We can only change uid/gid as root ... */ 6 5 if (getuid() == 0) { 7 6 8 - if ((setgid(ses.authstate.pw ->pw_gid) < 0) ||9 + if ((ses.authstate.pw ->pw_gid != 0) && ((setgid(ses.authstate.pw->pw_gid) < 0) ||10 (initgroups(ses.authstate.pw ->pw_name,11 - ses.authstate.pw ->pw_gid) < 0)) {12 + ses.authstate.pw ->pw_gid) < 0))) {7 - if ((setgid(ses.authstate.pw_gid) < 0) || 8 + if ((ses.authstate.pw_gid != 0) && ((setgid(ses.authstate.pw_gid) < 0) || 9 (initgroups(ses.authstate.pw_name, 10 - ses.authstate.pw_gid) < 0)) { 11 + ses.authstate.pw_gid) < 0))) { 13 12 dropbear_exit("error changing user group"); 14 13 } 15 - if (setuid(ses.authstate.pw ->pw_uid) < 0) {16 + if ((ses.authstate.pw ->pw_uid != 0) && (setuid(ses.authstate.pw->pw_uid) < 0)) {14 - if (setuid(ses.authstate.pw_uid) < 0) { 15 + if ((ses.authstate.pw_uid != 0) && (setuid(ses.authstate.pw_uid) < 0)) { 17 16 dropbear_exit("error changing user"); 18 17 }


