diff options
Diffstat (limited to 'meta/packages/dropbear/dropbear/allow-nopw.patch')
-rw-r--r-- | meta/packages/dropbear/dropbear/allow-nopw.patch | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/meta/packages/dropbear/dropbear/allow-nopw.patch b/meta/packages/dropbear/dropbear/allow-nopw.patch index 1a709b8da0..2ae361c63e 100644 --- a/meta/packages/dropbear/dropbear/allow-nopw.patch +++ b/meta/packages/dropbear/dropbear/allow-nopw.patch | |||
@@ -1,33 +1,34 @@ | |||
1 | diff -Nurd dropbear-0.45/svr-auth.c dropbear-0.45.patched/svr-auth.c | 1 | diff --git a/svr-auth.c b/svr-auth.c |
2 | --- dropbear-0.45/svr-auth.c 2005-03-06 20:27:02.000000000 -0800 | 2 | index 5da0aa7..4de4964 100644 |
3 | +++ dropbear-0.45.patched/svr-auth.c 2005-03-08 15:22:43.998592744 -0800 | 3 | --- a/svr-auth.c |
4 | @@ -237,6 +237,7 @@ | 4 | +++ b/svr-auth.c |
5 | @@ -249,6 +249,7 @@ static int checkusername(unsigned char *username, unsigned int userlen) { | ||
5 | } | 6 | } |
6 | 7 | ||
7 | /* check for an empty password */ | 8 | /* check for an empty password */ |
8 | +#ifdef DISALLOW_EMPTY_PW | 9 | +#ifdef DISALLOW_EMPTY_PW |
9 | if (ses.authstate.pw->pw_passwd[0] == '\0') { | 10 | if (ses.authstate.pw_passwd[0] == '\0') { |
10 | TRACE(("leave checkusername: empty pword")) | 11 | TRACE(("leave checkusername: empty pword")) |
11 | dropbear_log(LOG_WARNING, "user '%s' has blank password, rejected", | 12 | dropbear_log(LOG_WARNING, "user '%s' has blank password, rejected", |
12 | @@ -244,7 +245,7 @@ | 13 | @@ -256,6 +257,7 @@ static int checkusername(unsigned char *username, unsigned int userlen) { |
13 | send_msg_userauth_failure(0, 1); | 14 | send_msg_userauth_failure(0, 1); |
14 | return DROPBEAR_FAILURE; | 15 | return DROPBEAR_FAILURE; |
15 | } | 16 | } |
16 | - | ||
17 | +#endif | 17 | +#endif |
18 | TRACE(("shell is %s", ses.authstate.pw->pw_shell)) | ||
19 | 18 | ||
20 | /* check that the shell is set */ | 19 | TRACE(("shell is %s", ses.authstate.pw_shell)) |
21 | diff -Nurd dropbear-0.45/svr-authpasswd.c dropbear-0.45.patched/svr-authpasswd.c | 20 | |
22 | --- dropbear-0.45/svr-authpasswd.c 2005-03-06 20:27:02.000000000 -0800 | 21 | diff --git a/svr-authpasswd.c b/svr-authpasswd.c |
23 | +++ dropbear-0.45.patched/svr-authpasswd.c 2005-03-08 15:22:44.010591023 -0800 | 22 | index 53550a2..7b896bd 100644 |
24 | @@ -64,9 +64,13 @@ | 23 | --- a/svr-authpasswd.c |
24 | +++ b/svr-authpasswd.c | ||
25 | @@ -64,9 +64,13 @@ void svr_auth_password() { | ||
25 | * since the shadow password may differ to that tested | 26 | * since the shadow password may differ to that tested |
26 | * in auth.c */ | 27 | * in auth.c */ |
27 | if (passwdcrypt[0] == '\0') { | 28 | if (passwdcrypt[0] == '\0') { |
28 | +#ifdef DISALLOW_EMPTY_PASSWD | 29 | +#ifdef DISALLOW_EMPTY_PASSWD |
29 | dropbear_log(LOG_WARNING, "user '%s' has blank password, rejected", | 30 | dropbear_log(LOG_WARNING, "user '%s' has blank password, rejected", |
30 | ses.authstate.printableuser); | 31 | ses.authstate.pw_name); |
31 | send_msg_userauth_failure(0, 1); | 32 | send_msg_userauth_failure(0, 1); |
32 | +#else | 33 | +#else |
33 | + send_msg_userauth_success(); | 34 | + send_msg_userauth_success(); |