The branch, master has been updated via 027332cee56 s3:winbindd: Call winbind_add_failed_connection_entry() for the correct dc name via 928ce91eb7b s3:winbindd: Skip check_negative_conn_cache() if saf_servername == NULL from 10a4a977baf gitlab-ci: run samba-codecheck on ubuntu22.04
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 027332cee56472aae4b349ede554fc8a76e6e2c4 Author: Pavel Filipenský <pfilipen...@samba.org> Date: Mon Sep 18 11:16:39 2023 +0200 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ý <pfilipen...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Pavel Filipensky <pfilipen...@samba.org> Autobuild-Date(master): Wed Oct 11 16:42:15 UTC 2023 on atb-devel-224 commit 928ce91eb7baf96fff1c35f60d02600302f69566 Author: Pavel Filipenský <pfilipen...@samba.org> Date: Mon Sep 18 11:15:21 2023 +0200 s3:winbindd: Skip check_negative_conn_cache() if saf_servername == NULL saf_servername can be NULL even after calling saf_fetch(). Avoid calling check_negative_conn_cache() like it was before commit 0fcf0012 Signed-off-by: Pavel Filipenský <pfilipen...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> ----------------------------------------------------------------------- Summary of changes: source3/winbindd/winbindd_cm.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 13ab6754fd3..014392fdb5d 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -1426,9 +1426,12 @@ static bool connect_preferred_dc(TALLOC_CTX *mem_ctx, * Check the negative connection cache before talking to it. It going * down may have triggered the reconnection. */ - status = check_negative_conn_cache(domain->name, saf_servername); - if (!NT_STATUS_IS_OK(status)) { - saf_servername = NULL; + if (saf_servername != NULL) { + status = check_negative_conn_cache(domain->name, + saf_servername); + if (!NT_STATUS_IS_OK(status)) { + saf_servername = NULL; + } } if (saf_servername != NULL) { @@ -1477,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; -- Samba Shared Repository