From fd4b027511b18615e215b66183f95b54bcab683e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 19 Jul 2023 18:00:31 +0200 Subject: [PATCH] s4:rpc_server/netlogon: implement netr_LogonGetCapabilities query_level=2 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15425 Signed-off-by: Stefan Metzmacher Reviewed-by: Douglas Bagnall --- source4/rpc_server/netlogon/dcerpc_netlogon.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index 01cc3611155..f0b01297f96 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -2410,12 +2410,7 @@ static NTSTATUS dcesrv_netr_LogonGetCapabilities(struct dcesrv_call_state *dce_c case 1: break; case 2: - /* - * Until we know the details behind KB5028166 - * just return DCERPC_NCA_S_FAULT_INVALID_TAG - * like an unpatched Windows Server. - */ - FALL_THROUGH; + break; default: /* * There would not be a way to marshall the @@ -2441,7 +2436,15 @@ static NTSTATUS dcesrv_netr_LogonGetCapabilities(struct dcesrv_call_state *dce_c } NT_STATUS_NOT_OK_RETURN(status); - r->out.capabilities->server_capabilities = creds->negotiate_flags; + switch (r->in.query_level) { + case 1: + r->out.capabilities->server_capabilities = creds->negotiate_flags; + break; + case 2: + r->out.capabilities->requested_flags = + creds->ex->client_requested_flags; + break; + } return NT_STATUS_OK; }