distribution/packages/sysutils/busybox/patches/busybox-06-prevent-root-weak-passwd.patch
2022-02-05 09:23:32 -05:00

12 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 */
}