This password types should not be permitted:
a) pure numbers: birthdates, social security number, license plate, phone numbers;
b) words and all letters only passwords (uppercase, lowercase or mixed)
This password types should not be permitted:
a) pure numbers: birthdates, social security number, license plate, phone numbers;
b) words and all letters only passwords (uppercase, lowercase or mixed)
or adjacent letters on your keyboard;
c) username, real name, company name or (e-mail?) address
in any form (as-is, reversed, capitalized, doubled, etc.).
(we can check only against username, gecos and hostname)
or adjacent letters on your keyboard;
c) username, real name, company name or (e-mail?) address
in any form (as-is, reversed, capitalized, doubled, etc.).
(we can check only against username, gecos and hostname)
(e.g. replace the letter O with number 0)
such as "M1cr0$0ft" or "P@ssw0rd" (CAVEAT: we cannot check for them
without the use of a dictionary).
(e.g. replace the letter O with number 0)
such as "M1cr0$0ft" or "P@ssw0rd" (CAVEAT: we cannot check for them
without the use of a dictionary).
static int string_checker_helper(const char *p1, const char *p2) __attribute__ ((__pure__));
static int string_checker_helper(const char *p1, const char *p2)
static int string_checker_helper(const char *p1, const char *p2) __attribute__ ((__pure__));
static int string_checker_helper(const char *p1, const char *p2)
/* 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 (old_p && old_p[0] != '\0') {
/* check vs. old password */
if (string_checker(new_p, old_p)) {
if (old_p && old_p[0] != '\0') {
/* check vs. old password */
if (string_checker(new_p, old_p)) {