diff options
author | Greg Hudson <ghudson@mit.edu> | 2010-07-26 22:16:56 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2010-07-26 22:16:56 +0000 |
commit | 04067d729bfc7b648b643e883b4228e3b8ac5119 (patch) | |
tree | 8cebb167d05d2f37f4c5a33ca46ca37dd3fda29a /src/lib/kadm5/srv | |
parent | 9cf3a5e8210379a909a1c3142cf856e2f453761f (diff) | |
download | krb5-04067d729bfc7b648b643e883b4228e3b8ac5119.zip krb5-04067d729bfc7b648b643e883b4228e3b8ac5119.tar.gz krb5-04067d729bfc7b648b643e883b4228e3b8ac5119.tar.bz2 |
In the plugins2 branch, untabify new files which accidentally used
tabs in indentation.
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24214 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/kadm5/srv')
-rw-r--r-- | src/lib/kadm5/srv/pwqual.c | 26 | ||||
-rw-r--r-- | src/lib/kadm5/srv/pwqual_dict.c | 8 | ||||
-rw-r--r-- | src/lib/kadm5/srv/pwqual_policy.c | 30 |
3 files changed, 32 insertions, 32 deletions
diff --git a/src/lib/kadm5/srv/pwqual.c b/src/lib/kadm5/srv/pwqual.c index faece8e..c40f74f 100644 --- a/src/lib/kadm5/srv/pwqual.c +++ b/src/lib/kadm5/srv/pwqual.c @@ -47,26 +47,26 @@ k5_pwqual_load(krb5_context context, pwqual_handle **handles) ret = k5_plugin_load_all(context, PLUGIN_INTERFACE_PWQUAL, &modules); if (ret != 0) - goto cleanup; + goto cleanup; /* Allocate a large enough list of handles. */ for (count = 0; modules[count] != NULL; count++); list = k5alloc((count + 1) * sizeof(*list), &ret); if (list == NULL) - goto cleanup; + goto cleanup; /* For each module, allocate a handle and initialize its vtable. Skip * modules which don't successfully initialize. */ count = 0; for (mod = modules; *mod != NULL; mod++) { - handle = k5alloc(sizeof(*handle), &ret); - if (handle == NULL) - goto cleanup; - ret = (*mod)(context, 1, 1, (krb5_plugin_vtable)&handle->vt); - if (ret == 0) - list[count++] = handle; - else - free(handle); + handle = k5alloc(sizeof(*handle), &ret); + if (handle == NULL) + goto cleanup; + ret = (*mod)(context, 1, 1, (krb5_plugin_vtable)&handle->vt); + if (ret == 0) + list[count++] = handle; + else + free(handle); } *handles = list; @@ -91,7 +91,7 @@ k5_pwqual_open(krb5_context context, pwqual_handle handle, const char *dict_file) { if (handle->data != NULL) - return EINVAL; + return EINVAL; if (handle->vt.open == NULL) return 0; return handle->vt.open(context, dict_file, &handle->data); @@ -99,8 +99,8 @@ k5_pwqual_open(krb5_context context, pwqual_handle handle, krb5_error_code k5_pwqual_check(krb5_context context, pwqual_handle handle, - const char *password, kadm5_policy_ent_t policy, - krb5_principal princ) + const char *password, kadm5_policy_ent_t policy, + krb5_principal princ) { return handle->vt.check(context, handle->data, password, policy, princ); } diff --git a/src/lib/kadm5/srv/pwqual_dict.c b/src/lib/kadm5/srv/pwqual_dict.c index 7fb05b4..360b063 100644 --- a/src/lib/kadm5/srv/pwqual_dict.c +++ b/src/lib/kadm5/srv/pwqual_dict.c @@ -212,11 +212,11 @@ dict_check(krb5_context context, krb5_pwqual_moddata data, n = krb5_princ_size(handle->context, princ); cp = krb5_princ_realm(handle->context, princ)->data; if (strcasecmp(cp, password) == 0) - return KADM5_PASS_Q_DICT; + return KADM5_PASS_Q_DICT; for (i = 0; i < n; i++) { - cp = krb5_princ_component(handle->context, princ, i)->data; - if (strcasecmp(cp, password) == 0) - return KADM5_PASS_Q_DICT; + cp = krb5_princ_component(handle->context, princ, i)->data; + if (strcasecmp(cp, password) == 0) + return KADM5_PASS_Q_DICT; } return 0; } diff --git a/src/lib/kadm5/srv/pwqual_policy.c b/src/lib/kadm5/srv/pwqual_policy.c index 4bd8808..33e9b1a 100644 --- a/src/lib/kadm5/srv/pwqual_policy.c +++ b/src/lib/kadm5/srv/pwqual_policy.c @@ -37,33 +37,33 @@ /* Implement the password quality check module. */ static krb5_error_code policy_check(krb5_context context, krb5_pwqual_moddata data, - const char *password, kadm5_policy_ent_t policy, - krb5_principal princ) + const char *password, kadm5_policy_ent_t policy, + krb5_principal princ) { int nupper = 0, nlower = 0, ndigit = 0, npunct = 0, nspec = 0; const char *s; unsigned char c; if (policy == NULL) - return (*password == '\0') ? KADM5_PASS_Q_TOOSHORT : 0; + return (*password == '\0') ? KADM5_PASS_Q_TOOSHORT : 0; if(strlen(password) < (size_t)policy->pw_min_length) - return KADM5_PASS_Q_TOOSHORT; + return KADM5_PASS_Q_TOOSHORT; s = password; while ((c = (unsigned char)*s++)) { - if (islower(c)) - nlower = 1; - else if (isupper(c)) - nupper = 1; - else if (isdigit(c)) - ndigit = 1; - else if (ispunct(c)) - npunct = 1; - else - nspec = 1; + if (islower(c)) + nlower = 1; + else if (isupper(c)) + nupper = 1; + else if (isdigit(c)) + ndigit = 1; + else if (ispunct(c)) + npunct = 1; + else + nspec = 1; } if ((nupper + nlower + ndigit + npunct + nspec) < policy->pw_min_classes) - return KADM5_PASS_Q_CLASS; + return KADM5_PASS_Q_CLASS; return 0; } |