]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbindd: let connect_preferred_dc() pass the dcname to smbsock_connect()
authorStefan Metzmacher <metze@samba.org>
Fri, 27 Sep 2024 08:50:55 +0000 (10:50 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 1 Oct 2024 09:53:32 +0000 (09:53 +0000)
The is not critical, but avoids using the ip address with
fallback to '*SMBSERVER' for connections to port 139.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/winbindd_cm.c

index 4eaf2ccd9cc16d06f7bc4f121a4538bdc31d8b56..6a3a857d5435668ef803730816ebc84d6599200a 100644 (file)
@@ -1499,7 +1499,7 @@ static bool connect_preferred_dc(TALLOC_CTX *mem_ctx,
        }
 
        status = smbsock_connect(&domain->dcaddr, 0,
-                                NULL, -1, NULL, -1,
+                                domain->dcname, -1, NULL, -1,
                                 fd, NULL, 10);
        if (!NT_STATUS_IS_OK(status)) {
                winbind_add_failed_connection_entry(domain,