r53: Remove modifyTimestamp from list of our attributes. We just check it for
authorJim McDonough <jmcd@samba.org>
Mon, 5 Apr 2004 14:45:24 +0000 (14:45 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:51:06 +0000 (10:51 -0500)
cache entry time comparisons in password lockout.  Fixes problems where
pdb_ldap tries to delete the operational attribute modifyTimestamp when
deleting a user account.
(This used to be commit 5ebcb9081e435d54c39d4d3a1ef1d7b651ccb53f)

source3/include/smbldap.h
source3/lib/smbldap.c
source3/passdb/pdb_ldap.c

index 68a2c00afe07ec11bdc8d2be0bb733eb05ae6597..2f71f971d92c2389c3285a4016c355f10189d9c4 100644 (file)
@@ -92,7 +92,6 @@
 #define LDAP_ATTR_LOGON_COUNT          36
 #define LDAP_ATTR_MUNGED_DIAL          37
 #define LDAP_ATTR_BAD_PASSWORD_TIME    38
-#define LDAP_ATTR_MOD_TIMESTAMP                39
 
 typedef struct _attrib_map_entry {
        int             attrib;
index 18979e2f76fafd87f375cf3973d665efb8d06b85..f4f0170479f10086b3d846b544d72c697f08344b 100644 (file)
@@ -100,7 +100,6 @@ ATTRIB_MAP_ENTRY attrib_map_v30[] = {
        { LDAP_ATTR_MUNGED_DIAL,        "sambaMungedDial"       },
        { LDAP_ATTR_BAD_PASSWORD_COUNT, "sambaBadPasswordCount" },
        { LDAP_ATTR_BAD_PASSWORD_TIME,  "sambaBadPasswordTime"  },
-       { LDAP_ATTR_MOD_TIMESTAMP,      "modifyTimestamp"       },
        { LDAP_ATTR_LIST_END,           NULL                    }
 };
 
index 689c7010418ed85e7d5df7648d2dd21430304dc7..307d187f66721aad9400f4b60613369a1a97e8b3 100644 (file)
@@ -81,6 +81,8 @@
 #define SAM_ACCOUNT struct sam_passwd
 #endif
 
+#define MODIFY_TIMESTAMP_STRING "modifyTimestamp"
+
 #include "smbldap.h"
 
 struct ldapsam_privates {
@@ -398,11 +400,8 @@ static time_t ldapsam_get_entry_timestamp(
        pstring temp;   
        struct tm tm;
 
-       if (!smbldap_get_single_pstring(
-                   ldap_state->smbldap_state->ldap_struct, entry,
-                   get_userattr_key2string(ldap_state->schema_ver, 
-                                          LDAP_ATTR_MOD_TIMESTAMP), 
-                   temp)) 
+       if (!smbldap_get_single_pstring(ldap_state->smbldap_state->ldap_struct,
+                                       entry, MODIFY_TIMESTAMP_STRING, temp)) 
                return (time_t) 0;
 
        strptime(temp, "%Y%m%d%H%M%SZ", &tm);