s4-libnet: Prepare libnet_BecomeDC for samdb_reference_dn() returning an extended DN
authorAndrew Bartlett <abartlet@samba.org>
Tue, 14 Aug 2012 12:54:26 +0000 (22:54 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 14 Aug 2012 13:37:22 +0000 (15:37 +0200)
Remote LDAP servers will not accept an extended DN with other components.

Andrew Bartlett

source4/libnet/libnet_become_dc.c

index 306671b33c361c7fd8efdb4396e1e337061bf170..3e4c7f871cc69eb74bb0c79ca39cbff68dfe061d 100644 (file)
@@ -1089,6 +1089,7 @@ static NTSTATUS becomeDC_ldap1_infrastructure_fsmo(struct libnet_BecomeDC_state
 
        talloc_free(r);
 
+       ldb_dn_remove_extended_components(ntds_dn);
        ret = ldb_search(s->ldap1.ldb, s, &r, ntds_dn, LDB_SCOPE_BASE,
                         guid_attrs, "(objectClass=*)");
        if (ret != LDB_SUCCESS) {