diff options
-rw-r--r-- | source4/libnet/libnet_join.c | 6 | ||||
-rw-r--r-- | source4/secrets.ldif | 4 |
2 files changed, 5 insertions, 5 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); diff --git a/source4/secrets.ldif b/source4/secrets.ldif index 3ea097e8bd..ca816ef718 100644 --- a/source4/secrets.ldif +++ b/source4/secrets.ldif @@ -13,10 +13,10 @@ objectClass: top objectClass: container cn: Primary Domains -dn: CN=${DOMAIN},CN=Primary Domains +dn: flatname=${DOMAIN},CN=Primary Domains objectClass: top objectClass: primaryDomain -cn: ${DOMAIN} +flatname: ${DOMAIN} realm: ${REALM} secret: ${JOINPASS} whenCreated: ${LDAPTIME} |