diff options
author | Greg Hudson <ghudson@mit.edu> | 2010-08-24 22:45:37 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2010-08-24 22:45:37 +0000 |
commit | e3e6d42416491dfdcb9707b7399079972b6ed05b (patch) | |
tree | 24990c079874dbbf216d996d7199f1994bdc0c81 | |
parent | c187732f09e477d9a611ad18bfa1739befb86074 (diff) | |
download | krb5-e3e6d42416491dfdcb9707b7399079972b6ed05b.zip krb5-e3e6d42416491dfdcb9707b7399079972b6ed05b.tar.gz krb5-e3e6d42416491dfdcb9707b7399079972b6ed05b.tar.bz2 |
In the LDAP KDB module's populate_krb5_db_entry, fix the checks for
the KDB_PRINC_EXPIRE_TIME_ATTR and KDB_PWD_EXPIRE_TIME_ATTR flags so
that they properly succeed when the flags are set. Bug report from
Rob Crittenden, patch from nalin@redhat.com.
ticket: 6762
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24254 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c index 1f3e60e..e9d5019 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c @@ -2087,7 +2087,7 @@ populate_krb5_db_entry(krb5_context context, krb5_ldap_context *ldap_context, goto cleanup; if (attr_present == TRUE) { - if ((mask & KDB_PRINC_EXPIRE_TIME_ATTR) == 1) { + if (mask & KDB_PRINC_EXPIRE_TIME_ATTR) { if (expiretime < entry->expiration) entry->expiration = expiretime; } else { @@ -2127,7 +2127,7 @@ populate_krb5_db_entry(krb5_context context, krb5_ldap_context *ldap_context, if ((st=krb5_dbe_lookup_last_pwd_change(context, entry, &last_pw_changed)) != 0) goto cleanup; - if ((mask & KDB_PWD_EXPIRE_TIME_ATTR) == 1) { + if (mask & KDB_PWD_EXPIRE_TIME_ATTR) { if ((last_pw_changed + pw_max_life) < entry->pw_expiration) entry->pw_expiration = last_pw_changed + pw_max_life; } else |