]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/dropbear/dropbear/allow-nopw.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / dropbear / dropbear / allow-nopw.patch
1 diff -Nurd dropbear-0.45/svr-auth.c dropbear-0.45.patched/svr-auth.c
2 --- dropbear-0.45/svr-auth.c    2005-03-06 20:27:02.000000000 -0800
3 +++ dropbear-0.45.patched/svr-auth.c    2005-03-08 15:22:43.998592744 -0800
4 @@ -237,6 +237,7 @@
5         }
6  
7         /* check for an empty password */
8 +#ifdef DISALLOW_EMPTY_PW
9         if (ses.authstate.pw->pw_passwd[0] == '\0') {
10                 TRACE(("leave checkusername: empty pword"))
11                 dropbear_log(LOG_WARNING, "user '%s' has blank password, rejected",
12 @@ -244,7 +245,7 @@
13                 send_msg_userauth_failure(0, 1);
14                 return DROPBEAR_FAILURE;
15         }
16 -
17 +#endif
18         TRACE(("shell is %s", ses.authstate.pw->pw_shell))
19  
20         /* check that the shell is set */
21 diff -Nurd dropbear-0.45/svr-authpasswd.c dropbear-0.45.patched/svr-authpasswd.c
22 --- dropbear-0.45/svr-authpasswd.c      2005-03-06 20:27:02.000000000 -0800
23 +++ dropbear-0.45.patched/svr-authpasswd.c      2005-03-08 15:22:44.010591023 -0800
24 @@ -64,9 +64,13 @@
25          * since the shadow password may differ to that tested
26          * in auth.c */
27         if (passwdcrypt[0] == '\0') {
28 +#ifdef DISALLOW_EMPTY_PASSWD
29                 dropbear_log(LOG_WARNING, "user '%s' has blank password, rejected",
30                                 ses.authstate.printableuser);
31                 send_msg_userauth_failure(0, 1);
32 +#else
33 +               send_msg_userauth_success();
34 +#endif
35                 return;
36         }
37