diff options
Diffstat (limited to 'meta/recipes-core/dropbear/dropbear/allow-nopw.patch')
-rw-r--r-- | meta/recipes-core/dropbear/dropbear/allow-nopw.patch | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/recipes-core/dropbear/dropbear/allow-nopw.patch b/meta/recipes-core/dropbear/dropbear/allow-nopw.patch index add69cdfc8..3909ef26e7 100644 --- a/meta/recipes-core/dropbear/dropbear/allow-nopw.patch +++ b/meta/recipes-core/dropbear/dropbear/allow-nopw.patch | |||
@@ -1,18 +1,18 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | 1 | Upstream-Status: Inappropriate [embedded specific] |
2 | 2 | ||
3 | diff --git a/svr-auth.c b/svr-auth.c | 3 | diff --git a/svr-auth.c b/svr-auth.c |
4 | index 5da0aa7..4de4964 100644 | 4 | index 87e3c5e..3e78c1a 100644 |
5 | --- a/svr-auth.c | 5 | --- a/svr-auth.c |
6 | +++ b/svr-auth.c | 6 | +++ b/svr-auth.c |
7 | @@ -249,6 +249,7 @@ static int checkusername(unsigned char *username, unsigned int userlen) { | 7 | @@ -250,6 +250,7 @@ static int checkusername(unsigned char *username, unsigned int userlen) { |
8 | } | 8 | } |
9 | 9 | ||
10 | /* check for an empty password */ | 10 | /* check for an empty password */ |
11 | +#ifdef DISALLOW_EMPTY_PW | 11 | +#ifdef DISALLOW_EMPTY_PW |
12 | if (ses.authstate.pw_passwd[0] == '\0') { | 12 | if (ses.authstate.pw_passwd[0] == '\0') { |
13 | TRACE(("leave checkusername: empty pword")) | 13 | TRACE(("leave checkusername: empty pword")) |
14 | dropbear_log(LOG_WARNING, "user '%s' has blank password, rejected", | 14 | dropbear_log(LOG_WARNING, "User '%s' has blank password, rejected", |
15 | @@ -256,6 +257,7 @@ static int checkusername(unsigned char *username, unsigned int userlen) { | 15 | @@ -257,6 +258,7 @@ static int checkusername(unsigned char *username, unsigned int userlen) { |
16 | send_msg_userauth_failure(0, 1); | 16 | send_msg_userauth_failure(0, 1); |
17 | return DROPBEAR_FAILURE; | 17 | return DROPBEAR_FAILURE; |
18 | } | 18 | } |
@@ -21,7 +21,7 @@ index 5da0aa7..4de4964 100644 | |||
21 | TRACE(("shell is %s", ses.authstate.pw_shell)) | 21 | TRACE(("shell is %s", ses.authstate.pw_shell)) |
22 | 22 | ||
23 | diff --git a/svr-authpasswd.c b/svr-authpasswd.c | 23 | diff --git a/svr-authpasswd.c b/svr-authpasswd.c |
24 | index 53550a2..7b896bd 100644 | 24 | index a29fd63..6a3c7e9 100644 |
25 | --- a/svr-authpasswd.c | 25 | --- a/svr-authpasswd.c |
26 | +++ b/svr-authpasswd.c | 26 | +++ b/svr-authpasswd.c |
27 | @@ -64,9 +64,13 @@ void svr_auth_password() { | 27 | @@ -64,9 +64,13 @@ void svr_auth_password() { |
@@ -29,11 +29,11 @@ index 53550a2..7b896bd 100644 | |||
29 | * in auth.c */ | 29 | * in auth.c */ |
30 | if (passwdcrypt[0] == '\0') { | 30 | if (passwdcrypt[0] == '\0') { |
31 | +#ifdef DISALLOW_EMPTY_PASSWD | 31 | +#ifdef DISALLOW_EMPTY_PASSWD |
32 | dropbear_log(LOG_WARNING, "user '%s' has blank password, rejected", | 32 | dropbear_log(LOG_WARNING, "User '%s' has blank password, rejected", |
33 | ses.authstate.pw_name); | 33 | ses.authstate.pw_name); |
34 | send_msg_userauth_failure(0, 1); | 34 | send_msg_userauth_failure(0, 1); |
35 | +#else | 35 | +#else |
36 | + send_msg_userauth_success(); | 36 | + send_msg_userauth_success(); |
37 | +#endif | 37 | +#endif |
38 | return; | 38 | return; |
39 | } | 39 | } |