Changeset 3764

Show
Ignore:
Timestamp:
06/12/08 12:50:08 (6 months ago)
Author:
markus
Message:

reverted the patches somone removed ... and fixed them

Files:

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 +0000 
    2 +++ dropbear.dev/svr-authpubkey.c      2006-06-03 15:03:19.000000000 +0000 
     1--- 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 
    33@@ -176,6 +176,8 @@ 
    44                goto out; 
    55        } 
    66  
    7 +       if (ses.authstate.pw->pw_uid != 0) { 
     7+       if (ses.authstate.pw_uid != 0) { 
    88+ 
    99        /* we don't need to check pw and pw_dir for validity, since 
    1010         * its been done in checkpubkeyperms. */ 
    11         len = strlen(ses.authstate.pw->pw_dir); 
     11        len = strlen(ses.authstate.pw_dir); 
    1212@@ -187,6 +189,9 @@ 
    1313  
     
    2424        } 
    2525  
    26 +       if (ses.authstate.pw->pw_uid != 0) { 
     26+       if (ses.authstate.pw_uid != 0) { 
    2727+ 
    2828        /* 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 @@ 
    54        /* We can only change uid/gid as root ... */ 
    65        if (getuid() == 0) { 
    76  
    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))) { 
    1312                        dropbear_exit("error changing user group"); 
    1413                } 
    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)) { 
    1716                        dropbear_exit("error changing user"); 
    1817                }