From 35b0a0bf241a15eebf9296834e91505f22385991 Mon Sep 17 00:00:00 2001 From: vodz Date: Tue, 31 Jan 2006 12:36:51 +0000 Subject: more obscure git-svn-id: svn://busybox.net/trunk/busybox@13758 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- libbb/obscure.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libbb') diff --git a/libbb/obscure.c b/libbb/obscure.c index 18373510f..8df3e7504 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; -- cgit v1.2.3-55-g6feb