From a25443dbebbe63da502fb2f36908eac9ac7605b9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 19 Mar 2005 08:11:49 +0000 Subject: r5900: Use flatname to specify the netbios domain name (matches what win2k3 uses for trusted domain records) in the secrets join records. Andrew Bartlett (This used to be commit a6c502832c4ef471bd423b795f210abf3bb96ca5) --- source4/libnet/libnet_join.c | 6 +++--- 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} -- cgit