diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-12-19 00:33:53 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-12-19 00:33:53 +0000 |
commit | 531fbb137f01096c11f276e5f5b5c17ca4b5d529 (patch) | |
tree | 629383a7e329672fa44dc1c0c3293bc3d6b8ac31 /loginutils/passwd.c | |
parent | 520d2dc5f69862e189366608eb2c4531b94134bf (diff) | |
download | busybox-w32-531fbb137f01096c11f276e5f5b5c17ca4b5d529.tar.gz busybox-w32-531fbb137f01096c11f276e5f5b5c17ca4b5d529.tar.bz2 busybox-w32-531fbb137f01096c11f276e5f5b5c17ca4b5d529.zip |
passwd: add option to check passwords for weakness
git-svn-id: svn://busybox.net/trunk/busybox@17002 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to '')
-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 bcb7f2b26..c825c978f 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) | |||
77 | if (!newp) | 77 | if (!newp) |
78 | goto err_ret; | 78 | goto err_ret; |
79 | newp = xstrdup(newp); /* we are going to bb_askpass() again, so save it */ | 79 | newp = xstrdup(newp); /* we are going to bb_askpass() again, so save it */ |
80 | if (obscure(orig, newp, pw) && myuid) | 80 | if (ENABLE_FEATURE_PASSWD_WEAK_CHECK |
81 | && obscure(orig, newp, pw) && myuid) | ||
81 | goto err_ret; /* non-root is not allowed to have weak passwd */ | 82 | goto err_ret; /* non-root is not allowed to have weak passwd */ |
82 | 83 | ||
83 | cp = bb_askpass(0, "Retype password:"); | 84 | cp = bb_askpass(0, "Retype password:"); |