svn rev #24254: trunk/src/plugins/kdb/ldap/libkdb_ldap/

ghudson@MIT.EDU ghudson at MIT.EDU
Tue Aug 24 18:45:38 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=24254
Commit By: ghudson
Log Message:
ticket: 6762

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 at redhat.com.



Changed Files:
U   trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c
Modified: trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c
===================================================================
--- trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c	2010-08-24 21:52:32 UTC (rev 24253)
+++ trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c	2010-08-24 22:45:37 UTC (rev 24254)
@@ -2087,7 +2087,7 @@
             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 @@
             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




More information about the cvs-krb5 mailing list