if (string_checker(new_p, pw->pw_name)) {
return "similar to username";
}
+#ifndef __BIONIC__
/* no gecos as-is, as sub-string, reversed, capitalized, doubled */
if (pw->pw_gecos[0] && string_checker(new_p, pw->pw_gecos)) {
return "similar to gecos";
}
+#endif
/* hostname as-is, as sub-string, reversed, capitalized, doubled */
hostname = safe_gethostname();
i = string_checker(new_p, hostname);
}
size = CONFIG_PASSWORD_MINLEN + 2*CATEGORIES;
- for (i = 0; i <= LAST_CAT; i <<= 1)
+ for (i = 1; i <= LAST_CAT; i <<= 1)
if (mixed & i)
size -= 2;
if (length < size)