Don't use 'dn', this attribute does not exist with the LDAP backend,
authorAndrew Bartlett <abartlet@samba.org>
Thu, 13 Mar 2008 05:35:53 +0000 (16:35 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 13 Mar 2008 05:35:53 +0000 (16:35 +1100)
or in AD.

Andrew Bartlett
(This used to be commit a3e1f2830679a56366f0080115de504cdb0144f7)

source4/dsdb/samdb/cracknames.c

index 93da46d5bdde30f9f1a2da3395eb31ea3ca68e15..b9333e451bade34a437f63b53f749673cb0977d0 100644 (file)
@@ -329,7 +329,7 @@ static WERROR DsCrackNameUPN(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,
        result_filter = talloc_asprintf(mem_ctx, "(&(objectClass=user)(samAccountName=%s))", 
                                        ldb_binary_encode_string(mem_ctx, unparsed_name_short));
 
-       domain_filter = talloc_asprintf(mem_ctx, "(dn=%s)", ldb_dn_get_linearized(domain_res->msgs[0]->dn));
+       domain_filter = talloc_asprintf(mem_ctx, "(distinguishedName=%s)", ldb_dn_get_linearized(domain_res->msgs[0]->dn));
 
        if (!result_filter || !domain_filter) {
                free(unparsed_name_short);