From: Pavel Filipenský Date: Mon, 18 Sep 2023 09:16:39 +0000 (+0200) Subject: s3:winbindd: Call winbind_add_failed_connection_entry() for the correct dc name X-Git-Tag: tevent-0.16.0~161 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=027332cee56472aae4b349ede554fc8a76e6e2c4;p=thirdparty%2Fsamba.git s3:winbindd: Call winbind_add_failed_connection_entry() for the correct dc name We were calling winbind_add_failed_connection_entry() for saf_servername which is NULL. domain->dcname should be used instead. Signed-off-by: Pavel Filipenský Reviewed-by: Ralph Boehme Autobuild-User(master): Pavel Filipensky Autobuild-Date(master): Wed Oct 11 16:42:15 UTC 2023 on atb-devel-224 --- diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 24c68c67ff0..014392fdb5d 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -1480,7 +1480,10 @@ static bool connect_preferred_dc(TALLOC_CTX *mem_ctx, NULL, -1, NULL, -1, fd, NULL, 10); if (!NT_STATUS_IS_OK(status)) { - goto fail; + winbind_add_failed_connection_entry(domain, + domain->dcname, + NT_STATUS_UNSUCCESSFUL); + return false; } return true;