mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
s3-iremotewinspool: check for correct object_uuid in dispatch fn.
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
e6b07d4253
commit
e05c83408f
@ -91,6 +91,25 @@ static NTSTATUS iremotewinspool__op_dispatch_internal(struct dcesrv_call_state *
|
||||
struct pipes_struct *p = NULL;
|
||||
NTSTATUS status = NT_STATUS_OK;
|
||||
bool impersonated = false;
|
||||
bool ok;
|
||||
struct GUID object_uuid;
|
||||
|
||||
ok = dce_call->pkt.pfc_flags & DCERPC_PFC_FLAG_OBJECT_UUID;
|
||||
if (!ok) {
|
||||
dce_call->fault_code = DCERPC_NCA_S_UNSUPPORTED_TYPE;
|
||||
return NT_STATUS_NET_WRITE_FAULT;
|
||||
}
|
||||
|
||||
status = GUID_from_string(IREMOTEWINSPOOL_OBJECT_GUID, &object_uuid);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
dce_call->fault_code = DCERPC_NCA_S_UNSUPPORTED_TYPE;
|
||||
return NT_STATUS_NET_WRITE_FAULT;
|
||||
}
|
||||
|
||||
if (!GUID_equal(&dce_call->pkt.u.request.object.object, &object_uuid)) {
|
||||
dce_call->fault_code = DCERPC_NCA_S_UNSUPPORTED_TYPE;
|
||||
return NT_STATUS_NET_WRITE_FAULT;
|
||||
}
|
||||
|
||||
if (forward_opnum_to_spoolss(opnum)) {
|
||||
return spoolss__op_dispatch(dce_call, mem_ctx, r);
|
||||
|
Loading…
Reference in New Issue
Block a user