summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_join.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index 2a9311b663..f8acac8fb2 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -375,14 +375,14 @@ static NTSTATUS libnet_Join_primary_domain(struct libnet_context *ctx,
/* search for the secret record */
ret = samdb_search(ldb,
mem_ctx, base_dn, &msgs, attrs,
- "(&(cn=%s)(objectclass=primaryDomain))",
+ "(&(flatname=%s)(objectclass=primaryDomain))",
r->generic.in.domain_name);
if (ret == 0) {
- msg->dn = talloc_asprintf(mem_ctx, "cn=%s,%s",
+ msg->dn = talloc_asprintf(mem_ctx, "flatname=%s,%s",
r->generic.in.domain_name,
base_dn);
- samdb_msg_add_string(ldb, mem_ctx, msg, "cn", r->generic.in.domain_name);
+ samdb_msg_add_string(ldb, mem_ctx, msg, "flatname", r->generic.in.domain_name);
samdb_msg_add_string(ldb, mem_ctx, msg, "objectClass", "primaryDomain");
samdb_msg_add_string(ldb, mem_ctx, msg, "secret", r2.generic.out.join_password);