s3: pass DCE RPC handle type to create_policy_hnd
commit24e21906a339488d84a740783eb1d47e15ffc195
authorAlexander Bokovoy <ab@samba.org>
Tue, 28 Apr 2020 18:59:46 +0000 (28 21:59 +0300)
committerKarolin Seeger <kseeger@samba.org>
Mon, 4 May 2020 11:35:51 +0000 (4 11:35 +0000)
treecafc266f51f1a5c2237f7674ac393a5a8171bb75
parent08c012642f710c9005d2d89d5e5d3d89deb6d8e1
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

(cherry picked from commit c7a4578d06427a82ead287f0c5248c1a54cc9336)

Autobuild-User(v4-11-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-11-test): Mon May  4 11:35:51 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