From: Ralph Boehme Date: Thu, 3 Jul 2025 10:50:53 +0000 (+0200) Subject: libads: check for if DCs are in paused state when processing CLDAP replies X-Git-Tag: samba-4.22.4~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02080bdbf6929c3e06092a49b7bf31e65b90d972;p=thirdparty%2Fsamba.git libads: check for if DCs are in paused state when processing CLDAP replies BUG: https://bugzilla.samba.org/show_bug.cgi?id=14981 Signed-off-by: Ralph Boehme Reviewed-by: Guenther Deschner (cherry picked from commit d3000d7df09de724694aa0682b9750b8c7767514) --- diff --git a/source3/libads/netlogon_ping.c b/source3/libads/netlogon_ping.c index c94af8fbc57..22f5a56b395 100644 --- a/source3/libads/netlogon_ping.c +++ b/source3/libads/netlogon_ping.c @@ -787,23 +787,30 @@ static void netlogon_pings_done(struct tevent_req *subreq) state->num_received += 1; if (NT_STATUS_IS_OK(status)) { + enum netlogon_command cmd; uint32_t ret_flags; - bool ok; + bool ok = true; switch (response->ntver) { case NETLOGON_NT_VERSION_5EX: ret_flags = response->data.nt5_ex.server_type; + cmd = response->data.nt5_ex.command; + ok &= !(cmd == LOGON_SAM_LOGON_PAUSE_RESPONSE || + cmd == LOGON_SAM_LOGON_PAUSE_RESPONSE_EX); break; case NETLOGON_NT_VERSION_5: ret_flags = response->data.nt5.server_type; + cmd = response->data.nt5.command; + ok &= !(cmd == LOGON_SAM_LOGON_PAUSE_RESPONSE || + cmd == LOGON_SAM_LOGON_PAUSE_RESPONSE_EX); break; default: ret_flags = 0; break; } - ok = check_cldap_reply_required_flags(ret_flags, - state->required_flags); + ok &= check_cldap_reply_required_flags(ret_flags, + state->required_flags); if (ok) { state->responses[i] = talloc_move(state->responses, &response);