Hi,
in case the desired behavior is to allow password change in case of this
feature is enabled and password is weak, please ignore my misunderstanding.
i think myuid !=0 is an unecessary check as it depends on feature
ENABLE_FEATURE_PASSWD_WEAK_CHECK not on myuid,
why is myuid checked here ?, the comment says non-root users are not allowed to
have weak passwords , can you explain ?
it shouldn't matter who the user is as long as the feature is enabled the
password shouldn't be week.
Thanks
Haroon
diff --git a/loginutils/passwd.c b/loginutils/passwd.c
index 59f47fc7b..d37d45311 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)
- && myuid != 0
) {
goto err_ret; /* non-root is not allowed to have weak passwd */
}
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox