Merge pull request #2300 from chewitt/busybox

busybox: prevent weak root passwords
This commit is contained in:
Radostan Riedel 2017-12-08 08:56:21 +01:00 committed by GitHub
commit 8fcf7b5cb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,10 @@
--- a/loginutils/passwd.c
+++ b/loginutils/passwd.c
@@ -72,7 +72,6 @@ static char* new_password(const struct p
newp = xstrdup(newp); /* we are going to bb_ask_stdin() again, so save it */
if (ENABLE_FEATURE_PASSWD_WEAK_CHECK
&& obscure(orig, newp, pw)
- && myuid != 0
) {
goto err_ret; /* non-root is not allowed to have weak passwd */
}