summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2009-10-30 21:50:41 +0100
committerBjörn Jacke <bj@sernet.de>2009-10-31 00:48:20 +0100
commit72cec4a03145e11d299a5b679bb4a7ed6818032b (patch)
treed530f3375e2d9279d7156a85b54b2932a5544160
parentd1ad143a707b36b3aafcbb498554b73d2013f6e8 (diff)
downloadsamba-72cec4a03145e11d299a5b679bb4a7ed6818032b.tar.gz
samba-72cec4a03145e11d299a5b679bb4a7ed6818032b.tar.bz2
samba-72cec4a03145e11d299a5b679bb4a7ed6818032b.zip
ѕ3:ldap: search for account policies in objectclass sambaDomain, not *
-rw-r--r--source3/passdb/pdb_ldap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index c464a88f38..54cb03de85 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -3864,6 +3864,7 @@ static NTSTATUS ldapsam_get_account_policy_from_ldap(struct pdb_methods *methods
int count;
int rc;
char **vals = NULL;
+ char *filter;
const char *policy_attr = NULL;
struct ldapsam_privates *ldap_state =
@@ -3887,8 +3888,12 @@ static NTSTATUS ldapsam_get_account_policy_from_ldap(struct pdb_methods *methods
attrs[0] = policy_attr;
attrs[1] = NULL;
+ filter = talloc_asprintf(NULL, "(objectClass=%s)", LDAP_OBJ_DOMINFO);
+ if (filter == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
rc = smbldap_search(ldap_state->smbldap_state, ldap_state->domain_dn,
- LDAP_SCOPE_BASE, "(objectclass=*)", attrs, 0,
+ LDAP_SCOPE_BASE, filter, attrs, 0,
&result);
if (rc != LDAP_SUCCESS) {