s3:winbindd: make sure we try to use NCACN_IP_TCP in cm_connect_netlogon
authorStefan Metzmacher <metze@samba.org>
Tue, 16 Dec 2014 23:17:52 +0000 (23:17 +0000)
committerStefan Metzmacher <metze@samba.org>
Fri, 19 Dec 2014 12:15:13 +0000 (13:15 +0100)
We need to call init_dc_connection_rpc() before we can decide if we want to try
NCACN_IP_TCP.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/winbindd/winbindd_cm.c

index 4b01348c8f8dba4c2ffd63ec49e3002fd4b40da9..cb5bc113528a3bb48cad75df0edb3a889863f124 100644 (file)
@@ -3264,6 +3264,11 @@ NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
 {
        NTSTATUS status;
 
+       status = init_dc_connection_rpc(domain, true);
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
        if (domain->active_directory && domain->can_do_ncacn_ip_tcp) {
                status = cm_connect_netlogon_transport(domain, NCACN_IP_TCP, cli);
                if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED) ||