s4-torture: add ndr test for lsa_lsaRQueryForestTrustInformation().
[gd/samba-autobuild/.git] / source4 / torture / ndr / lsa.c
index 0d6d78688248d35d1917cc259784bc06223277be..353fecfc880ccdca83f746fed79cdad07744370e 100644 (file)
@@ -21,6 +21,7 @@
 #include "includes.h"
 #include "torture/ndr/ndr.h"
 #include "librpc/gen_ndr/ndr_lsa.h"
+#include "torture/ndr/proto.h"
 
 static const uint8_t lsarlookupnames_in_data[] = {
   0x00, 0x00, 0x00, 0x00, 0x2a, 0xab, 0xb8, 0x84, 0x36, 0xc6, 0xed, 0x4f,
@@ -428,11 +429,12 @@ static const uint8_t lsarlookupnames_out_data[] = {
 static bool lsarlookupnames_out_check(struct torture_context *tctx, 
                                                                         struct lsa_LookupNames *r)
 {
+       struct lsa_RefDomainList *domains = *(r->out.domains);
        torture_assert(tctx, r->out.domains != NULL, "domains ptr");
-       torture_assert_int_equal(tctx, r->out.domains->count, 1, "domains count");
-       torture_assert_int_equal(tctx, r->out.domains->max_size, 32, "domains size");
-       torture_assert(tctx, r->out.domains->domains != NULL, "domains domains");
-       torture_assert_str_equal(tctx, r->out.domains->domains[0].name.string, "BUILTIN", "domain name");
+       torture_assert_int_equal(tctx, domains->count, 1, "domains count");
+       torture_assert_int_equal(tctx, domains->max_size, 32, "domains size");
+       torture_assert(tctx, domains->domains != NULL, "domains domains");
+       torture_assert_str_equal(tctx, domains->domains[0].name.string, "BUILTIN", "domain name");
        /* FIXME: SID */
        torture_assert(tctx, r->out.count != NULL, "count ptr");
        torture_assert_int_equal(tctx, *r->out.count, 100, "count");
@@ -1014,11 +1016,12 @@ static const uint8_t lsarlookupsids_out_data[] = {
 static bool lsarlookupsids_out_check(struct torture_context *tctx, 
                                                                         struct lsa_LookupSids *r)
 {
-       torture_assert(tctx, r->out.domains != NULL, "domains");
-       torture_assert_int_equal(tctx, r->out.domains->count, 1, "domains count");
-       torture_assert_int_equal(tctx, r->out.domains->max_size, 32, "domains size");
-       torture_assert(tctx, r->out.domains->domains != NULL, "domains domains");
-       torture_assert_str_equal(tctx, r->out.domains->domains[0].name.string, "BUILTIN", "name");
+       struct lsa_RefDomainList *domains = *(r->out.domains);
+       torture_assert(tctx, domains != NULL, "domains");
+       torture_assert_int_equal(tctx, domains->count, 1, "domains count");
+       torture_assert_int_equal(tctx, domains->max_size, 32, "domains size");
+       torture_assert(tctx, domains->domains != NULL, "domains domains");
+       torture_assert_str_equal(tctx, domains->domains[0].name.string, "BUILTIN", "name");
        torture_assert_ntstatus_ok(tctx, r->out.result, "return code");
        return true;
 }
@@ -1403,8 +1406,8 @@ static bool lsarlookupsids2_in_check(struct torture_context *tctx,
        torture_assert_int_equal(tctx, r->in.level, 1, "level");
        torture_assert(tctx, r->in.count != NULL, "count ptr");
        torture_assert_int_equal(tctx, *r->in.count, 7, "count");
-       torture_assert_int_equal(tctx, r->in.unknown1, 0, "unknown 1");
-       torture_assert_int_equal(tctx, r->in.unknown2, 0, "unknown 2");
+       torture_assert_int_equal(tctx, r->in.lookup_options, 0, "unknown 1");
+       torture_assert_int_equal(tctx, r->in.client_revision, 0, "unknown 2");
 
        return true;
 }
@@ -1474,12 +1477,13 @@ static const uint8_t lsarlookupsids2_out_data[] = {
 static bool lsarlookupsids2_out_check(struct torture_context *tctx, 
                                                                         struct lsa_LookupSids2 *r)
 {
+       struct lsa_RefDomainList *domains = *(r->out.domains);
        /* FIXME: Handle */
        torture_assert(tctx, r->out.names != NULL, "names ptr");
        torture_assert(tctx, r->out.domains != NULL, "domains ptr");
-       torture_assert_int_equal(tctx, r->out.domains->count, 4, "domains count");
-       torture_assert_int_equal(tctx, r->out.domains->max_size, 32, "domains size");
-       torture_assert_str_equal(tctx, r->out.domains->domains[0].name.string, "NT AUTHORITY", "trust info name");
+       torture_assert_int_equal(tctx, domains->count, 4, "domains count");
+       torture_assert_int_equal(tctx, domains->max_size, 32, "domains size");
+       torture_assert_str_equal(tctx, domains->domains[0].name.string, "NT AUTHORITY", "trust info name");
        torture_assert_int_equal(tctx, r->out.names->count, 7, "names count");
        torture_assert_str_equal(tctx, r->out.names->names[0].name.string, "Account Operators", "name str 1");
        torture_assert_str_equal(tctx, r->out.names->names[1].name.string, "Administrators", "name str 2");
@@ -1735,8 +1739,8 @@ static bool lsarlookupsids3_in_check(struct torture_context *tctx,
        torture_assert_int_equal(tctx, r->in.level, 1, "level");
        torture_assert(tctx, r->in.count != NULL, "count ptr");
        torture_assert_int_equal(tctx, *r->in.count, 7, "count");
-       torture_assert_int_equal(tctx, r->in.unknown1, 0, "unknown 1");
-       torture_assert_int_equal(tctx, r->in.unknown2, 0, "unknown 2");
+       torture_assert_int_equal(tctx, r->in.lookup_options, 0, "unknown 1");
+       torture_assert_int_equal(tctx, r->in.client_revision, 0, "unknown 2");
 
        return true;
 }
@@ -1749,12 +1753,13 @@ static const uint8_t lsarlookupsids3_out_data[] = {
 static bool lsarlookupsids3_out_check(struct torture_context *tctx, 
                                      struct lsa_LookupSids3 *r)
 {
+       struct lsa_RefDomainList *domains = *(r->out.domains);
        /* FIXME: Handle */
        torture_assert(tctx, r->out.names != NULL, "names ptr");
        torture_assert(tctx, r->out.domains != NULL, "domains ptr");
-       torture_assert_int_equal(tctx, r->out.domains->count, 4, "domains count");
-       torture_assert_int_equal(tctx, r->out.domains->max_size, 32, "domains size");
-       torture_assert_str_equal(tctx, r->out.domains->domains[0].name.string, "NT AUTHORITY", "trust info name");
+       torture_assert_int_equal(tctx, domains->count, 4, "domains count");
+       torture_assert_int_equal(tctx, domains->max_size, 32, "domains size");
+       torture_assert_str_equal(tctx, domains->domains[0].name.string, "NT AUTHORITY", "trust info name");
        torture_assert_int_equal(tctx, r->out.names->count, 7, "names count");
        torture_assert_str_equal(tctx, r->out.names->names[0].name.string, "Account Operators", "name str 1");
        torture_assert_str_equal(tctx, r->out.names->names[1].name.string, "Administrators", "name str 2");
@@ -1977,6 +1982,186 @@ static bool lsarenumerateprivileges_out_check(struct torture_context *tctx,
        return true;
 }
 
+static const uint8_t lsarsetforesttrustsinformation_in_data[] = {
+  0x00, 0x00, 0x00, 0x00, 0x42, 0x3e, 0xd4, 0x20, 0x20, 0xe8, 0xa1, 0x43,
+  0x96, 0x67, 0x8c, 0xd1, 0xb9, 0x48, 0xa0, 0x3d, 0x0e, 0x00, 0x10, 0x00,
+  0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x07, 0x00, 0x00, 0x00, 0x66, 0x00, 0x31, 0x00, 0x2e, 0x00, 0x74, 0x00,
+  0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
+  0x04, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00,
+  0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x02, 0x00,
+  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+  0x66, 0x00, 0x31, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00,
+  0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+  0x14, 0x00, 0x02, 0x00, 0x0e, 0x00, 0x10, 0x00, 0x18, 0x00, 0x02, 0x00,
+  0x04, 0x00, 0x06, 0x00, 0x1c, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
+  0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x15, 0x00, 0x00, 0x00,
+  0x60, 0xcc, 0x85, 0x53, 0x92, 0x64, 0x11, 0x5e, 0x37, 0xa1, 0x11, 0x65,
+  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+  0x66, 0x00, 0x31, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00,
+  0x74, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x02, 0x00, 0x00, 0x00, 0x46, 0x00, 0x31, 0x00, 0x01
+};
+
+static bool lsarsetforesttrustsinformation_in_check(struct torture_context *tctx,
+                                                    struct lsa_lsaRSetForestTrustInformation *r)
+{
+       /* FIXME: Handle */
+       torture_assert_str_equal(tctx, r->in.trusted_domain_name->string, "f1.test", "trusted domain name");
+       torture_assert_int_equal(tctx, r->in.highest_record_type, 2, "highest record type");
+       torture_assert(tctx, r->in.forest_trust_info != NULL, "forest trust info");
+       torture_assert_int_equal(tctx, r->in.forest_trust_info->count, 2, "number fo forest trust records");
+       torture_assert_int_equal(tctx, r->in.forest_trust_info->entries[0]->flags, 0, "first entry flags");
+       torture_assert_int_equal(tctx, r->in.forest_trust_info->entries[0]->type, 0, "first entry type");
+       torture_assert_int_equal(tctx, r->in.forest_trust_info->entries[0]->time, 0, "first entry time");
+       torture_assert_str_equal(tctx, r->in.forest_trust_info->entries[0]->forest_trust_data.top_level_name.string, "f1.test", "first entry data");
+       torture_assert_int_equal(tctx, r->in.forest_trust_info->entries[1]->flags, 0, "second entry flags");
+       torture_assert_int_equal(tctx, r->in.forest_trust_info->entries[1]->type, 2, "second entry type");
+       torture_assert_int_equal(tctx, r->in.forest_trust_info->entries[1]->time, 0, "second entry time");
+       torture_assert_str_equal(tctx, r->in.forest_trust_info->entries[1]->forest_trust_data.domain_info.dns_domain_name.string, "f1.test", "second entry data");
+       torture_assert_str_equal(tctx, r->in.forest_trust_info->entries[1]->forest_trust_data.domain_info.netbios_domain_name.string, "F1", "second entry data");
+       torture_assert_int_equal(tctx, r->in.check_only, 1, "check only");
+
+       torture_assert_ntstatus_ok(tctx, r->out.result, "return code");
+
+       return true;
+}
+
+static const uint8_t lsasettrusteddomaininfobyname_in_data[] = {
+  0x00, 0x00, 0x00, 0x00, 0xe2, 0xbe, 0xb5, 0xfe, 0x4a, 0xe2, 0x25, 0x43,
+  0xaf, 0x37, 0x14, 0x77, 0xa5, 0xd6, 0xd9, 0x31, 0x0e, 0x00, 0x10, 0x00,
+  0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x07, 0x00, 0x00, 0x00, 0x66, 0x00, 0x31, 0x00, 0x2e, 0x00, 0x74, 0x00,
+  0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x00, 0x00,
+  0x0e, 0x00, 0x10, 0x00, 0x04, 0x00, 0x02, 0x00, 0x04, 0x00, 0x06, 0x00,
+  0x08, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00,
+  0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x44, 0x02, 0x00, 0x00, 0x10, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x66, 0x00, 0x31, 0x00,
+  0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x00, 0x00,
+  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+  0x46, 0x00, 0x31, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x05, 0x15, 0x00, 0x00, 0x00, 0x60, 0xcc, 0x85, 0x53,
+  0x92, 0x64, 0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0xe5, 0xeb, 0xce, 0xb9, 0xfa, 0xca, 0x10, 0x69, 0xa6, 0x95, 0x3b, 0x6d,
+  0x6e, 0xca, 0x9e, 0x75, 0x25, 0x1c, 0xfa, 0xd6, 0x68, 0x84, 0xe0, 0x1f,
+  0x35, 0x7e, 0x6e, 0xe8, 0xb7, 0x0a, 0x32, 0x9f, 0xc3, 0x31, 0x35, 0x84,
+  0xa6, 0xc7, 0x5a, 0xa2, 0x0c, 0x8c, 0x07, 0x6a, 0x66, 0xd8, 0x58, 0xb1,
+  0x4c, 0xb9, 0xbc, 0x46
+};
+
+static bool lsasettrusteddomaininfobyname_in_check(struct torture_context *tctx,
+                                                   struct lsa_SetTrustedDomainInfoByName *r)
+{
+       /* FIXME: Handle */
+       torture_assert_str_equal(tctx, r->in.trusted_domain->string, "f1.test", "trusted domain");
+       torture_assert_int_equal(tctx, r->in.level, LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL, "level");
+       torture_assert(tctx, r->in.info != NULL, "trust info");
+       torture_assert_str_equal(tctx, r->in.info->full_info_internal.info_ex.domain_name.string, "f1.test", "domain name");
+       torture_assert_str_equal(tctx, r->in.info->full_info_internal.info_ex.netbios_name.string, "F1", "netbios name");
+       torture_assert(tctx, r->in.info->full_info_internal.info_ex.sid != NULL, "domain sid ptr");
+       torture_assert_sid_equal(tctx, r->in.info->full_info_internal.info_ex.sid, dom_sid_parse_talloc(tctx, "S-1-5-21-1401277536-1578198162-1695654199"), "domain sid");
+       torture_assert_int_equal(tctx, r->in.info->full_info_internal.info_ex.trust_direction, 3, "trust direction");
+       torture_assert_int_equal(tctx, r->in.info->full_info_internal.info_ex.trust_type, LSA_TRUST_TYPE_UPLEVEL, "trust type");
+       torture_assert_int_equal(tctx, r->in.info->full_info_internal.info_ex.trust_attributes, 8, "trust attributes");
+       torture_assert_int_equal(tctx, r->in.info->full_info_internal.posix_offset.posix_offset, 0, "posix offset");
+       torture_assert_int_equal(tctx, r->in.info->full_info_internal.auth_info.auth_blob.size, 580, "auth blob size");
+
+       torture_assert_ntstatus_ok(tctx, r->out.result, "return code");
+
+       return true;
+}
+
+static const uint8_t lsa_lsaRQueryForestTrustInformation_in_data[] = {
+       0x00, 0x00, 0x00, 0x00, 0x40, 0xfd, 0xa1, 0xb8, 0x04, 0x3a, 0xa2, 0x46,
+       0xb1, 0x45, 0x5c, 0xaa, 0xf7, 0x54, 0x13, 0x9a, 0x16, 0x00, 0x16, 0x00,
+       0x00, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x0b, 0x00, 0x00, 0x00, 0x61, 0x00, 0x64, 0x00, 0x32, 0x00, 0x30, 0x00,
+       0x30, 0x00, 0x38, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00,
+       0x74, 0x00, 0x02, 0x00
+};
+
+static bool lsa_lsaRQueryForestTrustInformation_in_check(struct torture_context *tctx,
+                                                        struct lsa_lsaRQueryForestTrustInformation *r)
+{
+       return true;
+}
+
+static const uint8_t lsa_lsaRQueryForestTrustInformation_out_data[] = {
+       0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00,
+       0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x10, 0x00, 0x02, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xd1, 0x06, 0xc6,
+       0xb9, 0xba, 0xcf, 0x01, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x18, 0x00,
+       0x0c, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x0b, 0x00, 0x00, 0x00, 0x61, 0x00, 0x64, 0x00, 0x32, 0x00, 0x30, 0x00,
+       0x30, 0x00, 0x38, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00,
+       0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+       0xbe, 0xd1, 0x06, 0xc6, 0xb9, 0xba, 0xcf, 0x01, 0x02, 0x00, 0x00, 0x00,
+       0x14, 0x00, 0x02, 0x00, 0x16, 0x00, 0x18, 0x00, 0x18, 0x00, 0x02, 0x00,
+       0x0c, 0x00, 0x0e, 0x00, 0x1c, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
+       0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x15, 0x00, 0x00, 0x00,
+       0x51, 0xd1, 0xbb, 0x42, 0xa8, 0x23, 0x83, 0xb1, 0x31, 0x59, 0xf1, 0x8d,
+       0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
+       0x61, 0x00, 0x64, 0x00, 0x32, 0x00, 0x30, 0x00, 0x30, 0x00, 0x38, 0x00,
+       0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x00, 0x00,
+       0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+       0x41, 0x00, 0x44, 0x00, 0x32, 0x00, 0x30, 0x00, 0x30, 0x00, 0x38, 0x00,
+       0x00, 0x00, 0x00, 0x00
+};
+
+static bool lsa_lsaRQueryForestTrustInformation_out_check(struct torture_context *tctx,
+                                                         struct lsa_lsaRQueryForestTrustInformation *r)
+{
+       return true;
+}
+
 struct torture_suite *ndr_lsa_suite(TALLOC_CTX *ctx)
 {
        struct torture_suite *suite = torture_suite_create(ctx, "lsa");
@@ -2032,6 +2217,12 @@ struct torture_suite *ndr_lsa_suite(TALLOC_CTX *ctx)
        torture_suite_add_ndr_pull_fn_test(suite, lsa_EnumPrivs, lsarenumerateprivileges_in_data, NDR_IN, lsarenumerateprivileges_in_check);
        torture_suite_add_ndr_pull_fn_test(suite, lsa_EnumPrivs, lsarenumerateprivileges_out_data, NDR_OUT, lsarenumerateprivileges_out_check);
 
+       torture_suite_add_ndr_pull_fn_test(suite, lsa_lsaRSetForestTrustInformation, lsarsetforesttrustsinformation_in_data, NDR_IN, lsarsetforesttrustsinformation_in_check);
+
+       torture_suite_add_ndr_pull_fn_test(suite, lsa_SetTrustedDomainInfoByName, lsasettrusteddomaininfobyname_in_data, NDR_IN, lsasettrusteddomaininfobyname_in_check);
+
+       torture_suite_add_ndr_pull_fn_test(suite, lsa_lsaRQueryForestTrustInformation, lsa_lsaRQueryForestTrustInformation_in_data, NDR_IN, lsa_lsaRQueryForestTrustInformation_in_check);
+       torture_suite_add_ndr_pull_fn_test(suite, lsa_lsaRQueryForestTrustInformation, lsa_lsaRQueryForestTrustInformation_out_data, NDR_OUT, lsa_lsaRQueryForestTrustInformation_out_check);
+
        return suite;
 }
-