]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/auth: return RESOURCE_REQUIREMENTS_CHANGED is the proposed flags changed
authorStefan Metzmacher <metze@samba.org>
Thu, 7 Nov 2024 16:32:07 +0000 (17:32 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 5 Dec 2024 16:46:37 +0000 (16:46 +0000)
This will be important when we add support for netr_ServerAuthenticateKerberos().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
libcli/auth/netlogon_creds_cli.c

index cfce9743741be28e12e61da24215ddc533d2f2ff..2ac5eefc6e7b8690cb2e2cf1138e6b75be80bbe6 100644 (file)
@@ -666,6 +666,12 @@ static void netlogon_creds_cli_fetch_parser(TDB_DATA key, TDB_DATA data,
                NDR_PRINT_DEBUG(netlogon_creds_CredentialState, state->creds);
        }
 
+       if (state->proposed_flags != state->creds->client_requested_flags) {
+               TALLOC_FREE(state->creds);
+               state->status = NT_STATUS_RESOURCE_REQUIREMENTS_CHANGED;
+               return;
+       }
+
        downgraded = netlogon_creds_cli_downgraded(
                        state->creds->negotiate_flags,
                        state->proposed_flags,