s3:winbindd: we only need a an netlogon connection to a rwdc if we're a rodc ourself
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)
If we're a member or RWDC there's no need to require talking to a rwdc,
an rodc will forward the request if required.

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

index cb5bc113528a3bb48cad75df0edb3a889863f124..d396018f4c9f78b2289c0fff65128431546cbb8f 100644 (file)
@@ -3127,7 +3127,7 @@ static NTSTATUS cm_connect_netlogon_transport(struct winbindd_domain *domain,
 
        *cli = NULL;
 
-       result = init_dc_connection_rpc(domain, true);
+       result = init_dc_connection_rpc(domain, domain->rodc);
        if (!NT_STATUS_IS_OK(result)) {
                return result;
        }
@@ -3264,7 +3264,7 @@ NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
 {
        NTSTATUS status;
 
-       status = init_dc_connection_rpc(domain, true);
+       status = init_dc_connection_rpc(domain, domain->rodc);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }