Update to EFL 1.0-beta release
[qi-bootmenu-system.git] / sources / patches / dropbear-allow-login-with-empty-password.patch
blob3f3e8b167f1becc8d973de95fe9b28f961485f13
1 Index: dropbear-0.51/svr-auth.c
2 ===================================================================
3 --- dropbear-0.51.orig/svr-auth.c
4 +++ dropbear-0.51/svr-auth.c
5 @@ -270,7 +270,7 @@ static int checkusername(unsigned char *
6 send_msg_userauth_failure(0, 1);
7 return DROPBEAR_FAILURE;
10 +#ifdef DISALLOW_EMPTY_PW
11 /* check for an empty password */
12 if (ses.authstate.pw_passwd[0] == '\0') {
13 TRACE(("leave checkusername: empty pword"))
14 @@ -279,7 +279,7 @@ static int checkusername(unsigned char *
15 send_msg_userauth_failure(0, 1);
16 return DROPBEAR_FAILURE;
19 +#endif
20 TRACE(("shell is %s", ses.authstate.pw_shell))
22 /* check that the shell is set */
23 Index: dropbear-0.51/svr-authpasswd.c
24 ===================================================================
25 --- dropbear-0.51.orig/svr-authpasswd.c
26 +++ dropbear-0.51/svr-authpasswd.c
27 @@ -64,9 +64,13 @@ void svr_auth_password() {
28 * since the shadow password may differ to that tested
29 * in auth.c */
30 if (passwdcrypt[0] == '\0') {
31 +#ifdef DISALLOW_EMPTY_PW
32 dropbear_log(LOG_WARNING, "user '%s' has blank password, rejected",
33 ses.authstate.pw_name);
34 send_msg_userauth_failure(0, 1);
35 +#else
36 + send_msg_userauth_success();
37 +#endif
38 return;