1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

s3:rpc_server: Check function code according to MS-NRPC

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15465
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Noel Power <noel.power@suse.com>
This commit is contained in:
Jo Sutton 2024-05-28 15:10:51 +12:00 committed by Noel Power
parent 0418b9fa92
commit 8adbdbe50f

View File

@ -368,6 +368,12 @@ WERROR _netr_LogonControl2Ex(struct pipes_struct *p,
r->out.query->info1 = info1;
break;
case 2:
if (r->in.function_code != NETLOGON_CONTROL_REDISCOVER &&
r->in.function_code != NETLOGON_CONTROL_TC_QUERY &&
r->in.function_code != NETLOGON_CONTROL_TC_VERIFY)
{
return WERR_INVALID_PARAMETER;
}
info2 = talloc_zero(p->mem_ctx, struct netr_NETLOGON_INFO_2);
W_ERROR_HAVE_NO_MEMORY(info2);