]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
drsblobs.idl: add support for ForestTrustInfo with FOREST_TRUST_SCANNER_INFO
authorStefan Metzmacher <metze@samba.org>
Tue, 17 Dec 2024 11:30:56 +0000 (12:30 +0100)
committerStefan Metzmacher <metze@samba.org>
Sat, 8 Feb 2025 18:48:35 +0000 (18:48 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
librpc/idl/drsblobs.idl
source3/rpc_server/lsa/srv_lsa_nt.c

index 002c04f790369890aa331d895da8e4047a4e90d0..12e457544c4efd3e2d04ffe5bfde31c81f884316 100644 (file)
@@ -597,6 +597,15 @@ interface drsblobs {
 
        /* MS-ADTS 7.1.6.9.3 msDS-TrustForestTrustInfo Attribute */
 
+       /* same as lsa_ForestTrustRecordType, but only 8 bit */
+       typedef [enum8bit] enum {
+               FOREST_TRUST_TOP_LEVEL_NAME = LSA_FOREST_TRUST_TOP_LEVEL_NAME,
+               FOREST_TRUST_TOP_LEVEL_NAME_EX = LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX,
+               FOREST_TRUST_DOMAIN_INFO = LSA_FOREST_TRUST_DOMAIN_INFO,
+               FOREST_TRUST_BINARY_DATA = LSA_FOREST_TRUST_BINARY_DATA,
+               FOREST_TRUST_SCANNER_INFO = LSA_FOREST_TRUST_SCANNER_INFO
+       } ForestTrustInfoRecordType;
+
        typedef struct {
                [value(strlen_m(string))] uint32 size;
                [charset(UTF8)] uint8 string[size];
@@ -621,13 +630,6 @@ interface drsblobs {
                [default] ForestTrustDataBinaryData data;
        } ForestTrustData;
 
-       /* same as lsa_ForestTrustRecordType, but only 8 bit */
-       typedef [enum8bit] enum {
-               FOREST_TRUST_TOP_LEVEL_NAME = LSA_FOREST_TRUST_TOP_LEVEL_NAME,
-               FOREST_TRUST_TOP_LEVEL_NAME_EX = LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX,
-               FOREST_TRUST_DOMAIN_INFO = LSA_FOREST_TRUST_DOMAIN_INFO
-       } ForestTrustInfoRecordType;
-
        /* meaning of flags depends on record type and values are
           the same as in lsa.idl, see collision record types */
        typedef [public,gensize,flag(NDR_NOALIGN)] struct {
index 992cf93875ea51debcbf5ff3ac2b0c5a7746e8c8..6d4d861fad9aa59061c7b501e3a7a2e3fde76800 100644 (file)
@@ -4493,7 +4493,7 @@ static NTSTATUS check_ft_info(TALLOC_CTX *mem_ctx,
                exclusion = false;
 
                switch (nrec->type) {
-               case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
+               case FOREST_TRUST_TOP_LEVEL_NAME_EX:
                        /* exclusions do not conflict by definition */
                        break;
 
@@ -4501,11 +4501,21 @@ static NTSTATUS check_ft_info(TALLOC_CTX *mem_ctx,
                        dns_name = nrec->data.name.string;
                        break;
 
-               case LSA_FOREST_TRUST_DOMAIN_INFO:
+               case FOREST_TRUST_DOMAIN_INFO:
                        dns_name = nrec->data.info.dns_name.string;
                        nb_name = nrec->data.info.netbios_name.string;
                        sid = &nrec->data.info.sid;
                        break;
+
+               case FOREST_TRUST_BINARY_DATA:
+                       break;
+
+               case FOREST_TRUST_SCANNER_INFO:
+                       /*
+                        * We don't have a scanner yet,
+                        * so we don't check this here
+                        */
+                       break;
                }
 
                if (!dns_name) continue;