diff options
Diffstat (limited to 'meta/recipes-core/tinylogin/tinylogin-1.4/glibc_crypt_fix.patch')
-rw-r--r-- | meta/recipes-core/tinylogin/tinylogin-1.4/glibc_crypt_fix.patch | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/meta/recipes-core/tinylogin/tinylogin-1.4/glibc_crypt_fix.patch b/meta/recipes-core/tinylogin/tinylogin-1.4/glibc_crypt_fix.patch deleted file mode 100644 index 0a24656d09..0000000000 --- a/meta/recipes-core/tinylogin/tinylogin-1.4/glibc_crypt_fix.patch +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | |||
2 | staring from glibc 2.17 the crypt() function will error out and return | ||
3 | NULL if the seed or "correct" is invalid. The failure case for this is | ||
4 | an unknown user which tinylogin assigns '!' for the password. crypt() | ||
5 | now expects a minimum of 2 valid characters. If we get a NULL return | ||
6 | value from the crypt, assume we fail and return 0. | ||
7 | |||
8 | Upstream-Status: Inappropriate [tinylogin depercated] | ||
9 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
10 | |||
11 | Index: tinylogin-1.4/libbb/correct_password.c | ||
12 | =================================================================== | ||
13 | --- tinylogin-1.4.orig/libbb/correct_password.c | ||
14 | +++ tinylogin-1.4/libbb/correct_password.c | ||
15 | @@ -74,5 +74,8 @@ int correct_password ( const struct pass | ||
16 | } | ||
17 | encrypted = crypt ( unencrypted, correct ); | ||
18 | memset ( unencrypted, 0, xstrlen ( unencrypted )); | ||
19 | + if ( !encrypted ) | ||
20 | + return 0; | ||
21 | + | ||
22 | return ( strcmp ( encrypted, correct ) == 0 ) ? 1 : 0; | ||
23 | } | ||