From ba24faaf913cf21751485b9291d75f1ddf5519f7 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 27 Sep 2024 10:50:55 +0200 Subject: [PATCH] s3:winbindd: let connect_preferred_dc() pass the dcname to smbsock_connect() The is not critical, but avoids using the ip address with fallback to '*SMBSERVER' for connections to port 139. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- source3/winbindd/winbindd_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 4eaf2ccd9cc..6a3a857d543 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -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, -- 2.47.3