s4:pyrpc: add py_dcerpc_ndr_pointer_deref/wrap() infrastructure
authorStefan Metzmacher <metze@samba.org>
Thu, 29 Nov 2018 11:41:34 +0000 (12:41 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 12 Jan 2019 02:13:41 +0000 (03:13 +0100)
commit8bd0f4405a3545437a9b52adff775696b542e1bf
treeacec8660bb1e1c13c97011d5feb5a47af802315d
parentae467704f3fe6794f1f4e31b1d5c4fd3f1a14053
s4:pyrpc: add py_dcerpc_ndr_pointer_deref/wrap() infrastructure

Some idl files use more than one layer of unique pointers. e.g.

    NTSTATUS lsa_GetUserName(
            [in,unique] [string,charset(UTF16)] uint16 *system_name,
            [in,out,ref] lsa_String **account_name,
            [in,out,unique] lsa_String **authority_name
            );

In order to specify *io.in.authority_name = NULL,
we need to wrap the pointer value (lsa_String or None)
into an base.ndr_pointer() object.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/librpc/rpc/pyrpc.c
source4/librpc/rpc/pyrpc_util.c
source4/librpc/rpc/pyrpc_util.h