s3: pass DCE RPC handle type to create_policy_hnd
authorAlexander Bokovoy <ab@samba.org>
Tue, 28 Apr 2020 18:59:46 +0000 (21:59 +0300)
committerJeremy Allison <jra@samba.org>
Tue, 28 Apr 2020 22:55:29 +0000 (22:55 +0000)
commitc7a4578d06427a82ead287f0c5248c1a54cc9336
tree8316b13c7f4b5fe8af37467052d8aa1331087b81
parentdedb4f24af99c8ed5e601bdb30a8ed14de0aae54
s3: pass DCE RPC handle type to create_policy_hnd

Various RPC services expect policy handles of a specific type.

s3 RPC server did not allow to create policy handles with a specific
type while actually requiring that policy handle type itself in some
places.

Make sure we are able to specify the policy on-wire handle type when
creating the policy handle. The changes follow s4 DCE RPC server
implementation.

The original logic to always set on-wire handle type to 0 can be tracked
down to commit fdeea341ed1bae670382e45eb731db1b5838ad21 when we didn't
really know about differences in on-wire handle types.

All but LSA trusted domain RPC calls do not check the on-wire handle
type in s3 RPC server.

Fixes trusted domain operations when Samba RPC client attempts to call
s3 RPC server to perform lsa_lsaRSetForestTrustInformation in FreeIPA.
This fix is a pre-requisite for FreeIPA-FreeIPA forest trust.

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Apr 28 22:55:29 UTC 2020 on sn-devel-184
source3/rpc_server/epmapper/srv_epmapper.c
source3/rpc_server/eventlog/srv_eventlog_nt.c
source3/rpc_server/lsa/srv_lsa_nt.c
source3/rpc_server/mdssvc/srv_mdssvc_nt.c
source3/rpc_server/rpc_handles.c
source3/rpc_server/rpc_pipes.h
source3/rpc_server/samr/srv_samr_nt.c
source3/rpc_server/spoolss/srv_spoolss_nt.c
source3/rpc_server/svcctl/srv_svcctl_nt.c
source3/rpc_server/winreg/srv_winreg_nt.c