int size = CONFIG_PASSWORD_MINLEN + 8;
const char *p;
char hostname[255];
/* size */
if (!new_p || (length = strlen(new_p)) < CONFIG_PASSWORD_MINLEN)
int size = CONFIG_PASSWORD_MINLEN + 8;
const char *p;
char hostname[255];
/* size */
if (!new_p || (length = strlen(new_p)) < CONFIG_PASSWORD_MINLEN)
/* no username as-is, as sub-string, reversed, capitalized, doubled */
if (string_checker(new_p, pw->pw_name)) {
return "similar to username";
}
/* no gecos as-is, as sub-string, reversed, capitalized, doubled */
/* no username as-is, as sub-string, reversed, capitalized, doubled */
if (string_checker(new_p, pw->pw_name)) {
return "similar to username";
}
/* no gecos as-is, as sub-string, reversed, capitalized, doubled */
return "similar to gecos";
}
/* hostname as-is, as sub-string, reversed, capitalized, doubled */
return "similar to gecos";
}
/* hostname as-is, as sub-string, reversed, capitalized, doubled */
- if ((msg = obscure_msg(old, newval, pwdp))) {
- printf("Bad password: %s.\n", msg);
- /* If user is root warn only */
- return (getuid())? 1 : 0;
+ msg = obscure_msg(old, newval, pw);
+ if (msg) {
+ printf("Bad password: %s\n", msg);
+ return 1;