diff options
author | Tomas Mraz <tmraz@redhat.com> | 2011-11-07 11:58:40 +0100 |
---|---|---|
committer | Tomas Mraz <tmraz@redhat.com> | 2011-11-07 11:58:40 +0100 |
commit | f4ad1872ba740e5f8eacf2ed28a92355355329b8 (patch) | |
tree | 3d6150fd212d7e7271449c8e8ca1a940ba7fda23 /src | |
parent | 7159734e66540e66c2baeceec2bb1f39a54c1533 (diff) | |
download | libpwquality-f4ad1872ba740e5f8eacf2ed28a92355355329b8.tar.gz |
Drop the difignore setting, it makes no sense.
Diffstat (limited to 'src')
-rw-r--r-- | src/pam_pwquality.c | 2 | ||||
-rw-r--r-- | src/pwqprivate.h | 15 | ||||
-rw-r--r-- | src/pwquality.h | 1 | ||||
-rw-r--r-- | src/settings.c | 8 |
4 files changed, 8 insertions, 18 deletions
diff --git a/src/pam_pwquality.c b/src/pam_pwquality.c index fb6a6e3..4319602 100644 --- a/src/pam_pwquality.c +++ b/src/pam_pwquality.c @@ -79,6 +79,8 @@ _pam_parse (pam_handle_t *pamh, struct module_options *opt, opt->retry_times = strtol(*argv+6, &ep, 10); if (!ep || (opt->retry_times < 1)) opt->retry_times = CO_RETRY_TIMES; + } else if (!strncmp(*argv, "difignore=", 10)) { + /* ignored for compatibility with pam_cracklib */ } else if (!strncmp(*argv, "reject_username", 15)) { /* ignored for compatibility with pam_cracklib */ } else if (!strncmp(*argv, "authtok_type", 12)) { diff --git a/src/pwqprivate.h b/src/pwqprivate.h index 500c4e6..51e79e6 100644 --- a/src/pwqprivate.h +++ b/src/pwqprivate.h @@ -14,16 +14,14 @@ struct pwquality_settings { int diff_ok; - int diff_ignore; - int min_length; - int dig_credit; - int up_credit; - int low_credit; - int oth_credit; + int min_length; + int dig_credit; + int up_credit; + int low_credit; + int oth_credit; int min_class; - int max_repeat; + int max_repeat; char *dict_path; - }; struct setting_mapping { @@ -33,7 +31,6 @@ struct setting_mapping { }; #define PWQ_DEFAULT_DIFF_OK 5 -#define PWQ_DEFAULT_DIFF_IGNORE 23 #define PWQ_DEFAULT_MIN_LENGTH 9 #define PWQ_DEFAULT_DIG_CREDIT 1 #define PWQ_DEFAULT_UP_CREDIT 1 diff --git a/src/pwquality.h b/src/pwquality.h index f7fd8d5..e9e9b28 100644 --- a/src/pwquality.h +++ b/src/pwquality.h @@ -11,7 +11,6 @@ #define PWQUALITY_H #define PWQ_SETTING_DIFF_OK 1 -#define PWQ_SETTING_DIFF_IGNORE 2 #define PWQ_SETTING_MIN_LENGTH 3 #define PWQ_SETTING_DIG_CREDIT 4 #define PWQ_SETTING_UP_CREDIT 5 diff --git a/src/settings.c b/src/settings.c index 329e3d1..dec35eb 100644 --- a/src/settings.c +++ b/src/settings.c @@ -27,7 +27,6 @@ pwquality_default_settings(void) return NULL; pwq->diff_ok = PWQ_DEFAULT_DIFF_OK; - pwq->diff_ignore = PWQ_DEFAULT_DIFF_IGNORE; pwq->min_length = PWQ_DEFAULT_MIN_LENGTH; pwq->dig_credit = PWQ_DEFAULT_DIG_CREDIT; pwq->up_credit = PWQ_DEFAULT_UP_CREDIT; @@ -51,7 +50,6 @@ pwquality_free_settings(pwquality_settings_t *pwq) static const struct setting_mapping s_map[] = { { "difok", PWQ_SETTING_DIFF_OK, PWQ_TYPE_INT}, - { "difignore", PWQ_SETTING_DIFF_IGNORE, PWQ_TYPE_INT}, { "minlen", PWQ_SETTING_MIN_LENGTH, PWQ_TYPE_INT}, { "dcredit", PWQ_SETTING_DIG_CREDIT, PWQ_TYPE_INT}, { "ucredit", PWQ_SETTING_UP_CREDIT, PWQ_TYPE_INT}, @@ -209,9 +207,6 @@ pwquality_set_int_value(pwquality_settings_t *pwq, int setting, int value) case PWQ_SETTING_DIFF_OK: pwq->diff_ok = value; break; - case PWQ_SETTING_DIFF_IGNORE: - pwq->diff_ignore = value; - break; case PWQ_SETTING_MIN_LENGTH: if (value < PWQ_BASE_MIN_LENGTH) value = PWQ_BASE_MIN_LENGTH; @@ -278,9 +273,6 @@ pwquality_get_int_value(pwquality_settings_t *pwq, int setting, int *value) case PWQ_SETTING_DIFF_OK: *value = pwq->diff_ok; break; - case PWQ_SETTING_DIFF_IGNORE: - *value = pwq->diff_ignore; - break; case PWQ_SETTING_MIN_LENGTH: *value = pwq->min_length; break; |