diff options
author | Denis Vlasenko | 2006-12-19 00:33:53 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-12-19 00:33:53 +0000 |
commit | 8eb3b391ad9999a3c01c6a90939e443729edb5f6 (patch) | |
tree | 629383a7e329672fa44dc1c0c3293bc3d6b8ac31 /loginutils/passwd.c | |
parent | 249fabf1a3ce08273d6bef2adbcd0910cc4dcb4a (diff) | |
download | busybox-8eb3b391ad9999a3c01c6a90939e443729edb5f6.zip busybox-8eb3b391ad9999a3c01c6a90939e443729edb5f6.tar.gz |
passwd: add option to check passwords for weakness
Diffstat (limited to 'loginutils/passwd.c')
-rw-r--r-- | loginutils/passwd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/loginutils/passwd.c b/loginutils/passwd.c index bcb7f2b..c825c97 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c @@ -77,7 +77,8 @@ static char* new_password(const struct passwd *pw, uid_t myuid, int algo) if (!newp) goto err_ret; newp = xstrdup(newp); /* we are going to bb_askpass() again, so save it */ - if (obscure(orig, newp, pw) && myuid) + if (ENABLE_FEATURE_PASSWD_WEAK_CHECK + && obscure(orig, newp, pw) && myuid) goto err_ret; /* non-root is not allowed to have weak passwd */ cp = bb_askpass(0, "Retype password:"); |