s3:rpcd_witness.idl: introduce definitions for rpcd_witness_registration.tdb records
authorStefan Metzmacher <metze@samba.org>
Thu, 21 Dec 2023 14:03:05 +0000 (15:03 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 26 Jan 2024 17:00:33 +0000 (17:00 +0000)
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 <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
librpc/wscript_build
source3/librpc/idl/rpcd_witness.idl [new file with mode: 0644]
source3/librpc/idl/wscript_build
source3/librpc/wscript_build

index f7763e1013d5a791608ce674c450c35068e67cc5..ee2ad70857d2ce37e4eca125951bb850eb45ba69 100644 (file)
@@ -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 (file)
index 0000000..a2af152
--- /dev/null
@@ -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
+               );
+}
index d12049b76d678dea9c8ccfc08ae5d63c64e85f19..f46c498379201c606a304a4deebf37b9dceab651 100644 (file)
@@ -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')
index 8ce63f709aa03b01c6e31a12586e50283886a5c8..d228db7a218a62d2ad11ef1d731ab210a3be6120 100644 (file)
@@ -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'