1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3 rpc server: set on-wire handle type explicitly

Since wire_handle.handle_type is uint32_t, we can simply assign uint8_t
handle type to it without using SIVAL() macros. Further unify with s4
RPC server code flow.

Fixes CID 1462616
>>> CID 1462616:    (CONSTANT_EXPRESSION_RESULT)
>>> "(uint32_t)handle_type >> 16" is 0 regardless of the values of its operands. This occurs as a value.
284             SIVAL(&rpc_hnd->wire_handle.handle_type, 0 , handle_type);

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Thu Apr 30 07:09:55 UTC 2020 on sn-devel-184
This commit is contained in:
Alexander Bokovoy 2020-04-29 11:54:07 +03:00
parent 954d877a2e
commit 3be17c891b

View File

@ -281,7 +281,7 @@ static struct dcesrv_handle_old *create_rpc_handle_internal(
pol_hnd_high++;
}
SIVAL(&rpc_hnd->wire_handle.handle_type, 0 , handle_type);
rpc_hnd->wire_handle.handle_type = handle_type;
/* second bit is incrementing */
SIVAL(&rpc_hnd->wire_handle.uuid.time_low, 0 , pol_hnd_low);