s4:secrets Look for LDAP secret with a name that is indexed
authorAndrew Bartlett <abartlet@samba.org>
Thu, 22 Oct 2009 07:21:50 +0000 (18:21 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 23 Oct 2009 04:41:53 +0000 (15:41 +1100)
This avoids a very common unindexed lookup

source4/param/secrets.h

index 743cf684a97b08084db3bbf1017acac8b108e9fb..caffa50733f9c20d8423889798d6d84cf5d8040b 100644 (file)
@@ -26,7 +26,7 @@
 #define SECRETS_PRIMARY_REALM_FILTER "(&(realm=%s)(objectclass=primaryDomain))"
 #define SECRETS_KRBTGT_SEARCH "(&((|(realm=%s)(flatname=%s))(samAccountName=krbtgt)))"
 #define SECRETS_PRINCIPAL_SEARCH "(&(|(realm=%s)(flatname=%s))(servicePrincipalName=%s))"
-#define SECRETS_LDAP_FILTER "(objectclass=ldapSecret)"
+#define SECRETS_LDAP_FILTER "(&(objectclass=ldapSecret)(cn=SAMDB Credentials))"
 
 /**
  * Use a TDB to store an incrementing random seed.