From 72cec4a03145e11d299a5b679bb4a7ed6818032b Mon Sep 17 00:00:00 2001 From: Björn Jacke Date: Fri, 30 Oct 2009 21:50:41 +0100 Subject: ѕ3:ldap: search for account policies in objectclass sambaDomain, not * MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source3/passdb/pdb_ldap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source3/passdb') 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) { -- cgit