1
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-11-25 08:26:18 +00:00
Lakka-LibreELEC/packages/sysutils/busybox/patches/busybox-06-prevent-root-weak-passwd.patch
2019-06-12 03:53:14 +01:00

13 lines
450 B
Diff

diff --git a/loginutils/passwd.c b/loginutils/passwd.c
index 6c643d3..df8859d 100644
--- a/loginutils/passwd.c
+++ b/loginutils/passwd.c
@@ -69,7 +69,6 @@ static char* new_password(const struct passwd *pw, uid_t myuid, const char *algo
goto err_ret;
if (ENABLE_FEATURE_PASSWD_WEAK_CHECK
&& obscure(orig, newp, pw) /* NB: passing NULL orig is ok */
- && myuid != 0
) {
goto err_ret; /* non-root is not allowed to have weak passwd */
}