From a9829ce6cf3a8ca745bbf8ceceb1566d2dc17dce Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 21 Dec 2023 15:03:05 +0100 Subject: [PATCH] s3:rpcd_witness.idl: introduce definitions for rpcd_witness_registration.tdb records MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit A rpcd_witness_registration.tdb will be added shortly in order to implement useful 'net witness [list,client-move,...]' commands in the end. Signed-off-by: Stefan Metzmacher Reviewed-by: Günther Deschner --- librpc/wscript_build | 2 +- source3/librpc/idl/rpcd_witness.idl | 41 +++++++++++++++++++++++++++++ source3/librpc/idl/wscript_build | 1 + source3/librpc/wscript_build | 5 ++++ 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 source3/librpc/idl/rpcd_witness.idl diff --git a/librpc/wscript_build b/librpc/wscript_build index f7763e1013d..ee2ad70857d 100644 --- a/librpc/wscript_build +++ b/librpc/wscript_build @@ -646,7 +646,7 @@ bld.SAMBA_LIBRARY('ndr-samba', deps='''NDR_DRSBLOBS NDR_DRSUAPI NDR_IDMAP NDR_NTLMSSP NDR_NEGOEX NDR_SCHANNEL NDR_MGMT NDR_DNSSERVER NDR_EPMAPPER NDR_XATTR NDR_UNIXINFO NDR_NAMED_PIPE_AUTH NDR_NTPRINTING NDR_FSRVP NDR_WITNESS NDR_MDSSVC NDR_OPEN_FILES NDR_SMBXSRV - NDR_SMB3POSIX + NDR_SMB3POSIX NDR_RPCD_WITNESS NDR_KRB5CCACHE NDR_WSP NDR_GKDI NDR_GMSA''', private_library=True, grouping_library=True diff --git a/source3/librpc/idl/rpcd_witness.idl b/source3/librpc/idl/rpcd_witness.idl new file mode 100644 index 00000000000..a2af152e596 --- /dev/null +++ b/source3/librpc/idl/rpcd_witness.idl @@ -0,0 +1,41 @@ +#include "idl_types.h" + +import "misc.idl"; +import "server_id.idl"; +import "security.idl"; +import "witness.idl"; + +[ + uuid("d320d080-a007-11ee-9cb4-37fa942d84d2"), + version(0.0), + pointer_default(unique), + helpstring("rpcd_witness structures") +] +interface rpcd_witness +{ + /* + * This the content of records stored in + * rpcd_witness_registration.tdb. + */ + typedef [public] struct { + witness_version version; + [string,charset(UTF8)] char net_name[]; + [string,charset(UTF8)] char *share_name; + [string,charset(UTF8)] char ip_address[]; + [string,charset(UTF8)] char client_computer_name[]; + witness_RegisterEx_flags flags; + uint32 timeout; + policy_handle context_handle; + server_id server_id; + [charset(UTF8),string] char account_name[]; + [charset(UTF8),string] char domain_name[]; + dom_sid account_sid; + [charset(UTF8),string] char local_address[]; + [charset(UTF8),string] char remote_address[]; + NTTIME registration_time; + } rpcd_witness_registration; + + void rpcd_witness_registration_decode( + [in] rpcd_witness_registration reg + ); +} diff --git a/source3/librpc/idl/wscript_build b/source3/librpc/idl/wscript_build index d12049b76d6..f46c4983792 100644 --- a/source3/librpc/idl/wscript_build +++ b/source3/librpc/idl/wscript_build @@ -9,6 +9,7 @@ bld.SAMBA_PIDL_LIST('PIDL', perfcount.idl secrets.idl smbXsrv.idl leases_db.idl + rpcd_witness.idl ''', options='--includedir=%s --header --ndr-parser --client --python' % topinclude, output_dir='../gen_ndr') diff --git a/source3/librpc/wscript_build b/source3/librpc/wscript_build index 8ce63f709aa..d228db7a218 100644 --- a/source3/librpc/wscript_build +++ b/source3/librpc/wscript_build @@ -31,6 +31,11 @@ bld.SAMBA3_SUBSYSTEM('NDR_LEASES_DB', public_deps='ndr NDR_SMB2_LEASE_STRUCT NDR_FILE_ID' ) +bld.SAMBA3_SUBSYSTEM('NDR_RPCD_WITNESS', + source='gen_ndr/ndr_rpcd_witness.c', + public_deps='ndr NDR_SERVER_ID NDR_SECURITY NDR_WITNESS' + ) + bld.SAMBA3_SUBSYSTEM('NDR_SECRETS', source='gen_ndr/ndr_secrets.c', public_deps='ndr NDR_SAMR NDR_LSA NDR_NETLOGON NDR_SECURITY' -- 2.47.3