summaryrefslogtreecommitdiff
path: root/libbb/obscure.c
diff options
context:
space:
mode:
author"Vladimir N. Oleynik"2006-01-31 12:36:51 +0000
committer"Vladimir N. Oleynik"2006-01-31 12:36:51 +0000
commit1f17d3287adaa01c8605699e80aaaba3a5a01d65 (patch)
tree084b81121af050e2b81f3a65496bd2f9945711d0 /libbb/obscure.c
parent7600eec7325f0bbce1dcbf08e76c1653bf35b397 (diff)
downloadbusybox-1f17d3287adaa01c8605699e80aaaba3a5a01d65.zip
busybox-1f17d3287adaa01c8605699e80aaaba3a5a01d65.tar.gz
more obscure
Diffstat (limited to 'libbb/obscure.c')
-rw-r--r--libbb/obscure.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libbb/obscure.c b/libbb/obscure.c
index 1837351..8df3e75 100644
--- a/libbb/obscure.c
+++ b/libbb/obscure.c
@@ -162,6 +162,9 @@ password_check(const char *old, const char *newval, const struct passwd *pwdp)
else if (similiar(wrapped, newmono))
msg = "too similiar";
+ else if ( strstr(newval, pwdp->pw_name) )
+ msg = "don't use something like your username as password";
+
else {
safe_strncpy(wrapped + lenwrap, wrapped, lenwrap + 1);
if (strstr(wrapped, newmono))
@@ -186,7 +189,7 @@ obscure_msg(const char *old, const char *newval, const struct passwd *pwdp)
oldlen = strlen(old);
newlen = strlen(newval);
-#if 0 /* why not check the password when set for the first time? --marekm */
+#if 0 /* why not check the password when set for the first time? --marekm */
if (old[0] == '\0')
/* return (1); */
return NULL;