LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_lsa.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 7420 10060 73.8 %
Date: 2021-09-23 10:06:22 Functions: 387 528 73.3 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_lsa.h"
       5             : 
       6             : #include "librpc/gen_ndr/ndr_misc.h"
       7             : #include "librpc/gen_ndr/ndr_security.h"
       8     1576816 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_String(struct ndr_push *ndr, int ndr_flags, const struct lsa_String *r)
       9             : {
      10     1576816 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      11     1576816 :         if (ndr_flags & NDR_SCALARS) {
      12      798899 :                 NDR_CHECK(ndr_push_align(ndr, 5));
      13      798899 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
      14      798899 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
      15      798899 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
      16      798899 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
      17             :         }
      18     1576816 :         if (ndr_flags & NDR_BUFFERS) {
      19      798899 :                 if (r->string) {
      20      763707 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
      21      763707 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      22      763707 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
      23      763707 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2 * strlen_m(r->string) / 2, sizeof(uint16_t), CH_UTF16));
      24             :                 }
      25             :         }
      26     1493454 :         return NDR_ERR_SUCCESS;
      27             : }
      28             : 
      29     2005311 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_String(struct ndr_pull *ndr, int ndr_flags, struct lsa_String *r)
      30             : {
      31             :         uint32_t _ptr_string;
      32     2005311 :         uint32_t size_string_1 = 0;
      33     2005311 :         uint32_t length_string_1 = 0;
      34     2005311 :         TALLOC_CTX *_mem_save_string_0 = NULL;
      35     2005311 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      36     2005311 :         if (ndr_flags & NDR_SCALARS) {
      37     1012774 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
      38     1012774 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
      39     1012774 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
      40     1012774 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
      41     1012774 :                 if (_ptr_string) {
      42      977540 :                         NDR_PULL_ALLOC(ndr, r->string);
      43             :                 } else {
      44       35234 :                         r->string = NULL;
      45             :                 }
      46     1012774 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
      47             :         }
      48     2005311 :         if (ndr_flags & NDR_BUFFERS) {
      49     1012774 :                 if (r->string) {
      50      977540 :                         _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
      51      977540 :                         NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
      52      977540 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
      53      977540 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
      54      977540 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->string, &size_string_1));
      55      977540 :                         NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->string, &length_string_1));
      56      977540 :                         if (length_string_1 > size_string_1) {
      57           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_string_1, length_string_1);
      58             :                         }
      59      977540 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, length_string_1, sizeof(uint16_t), CH_UTF16));
      60      977540 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
      61             :                 }
      62     1012774 :                 if (r->string) {
      63      977540 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->string, r->size / 2));
      64             :                 }
      65     1012774 :                 if (r->string) {
      66      977540 :                         NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->string, r->length / 2));
      67             :                 }
      68             :         }
      69     1925414 :         return NDR_ERR_SUCCESS;
      70             : }
      71             : 
      72           0 : static void ndr_print_flags_lsa_String(struct ndr_print *ndr, const char *name, int unused, const struct lsa_String *r)
      73             : {
      74           0 :         ndr_print_lsa_String(ndr, name, r);
      75           0 : }
      76             : 
      77       39869 : _PUBLIC_ void ndr_print_lsa_String(struct ndr_print *ndr, const char *name, const struct lsa_String *r)
      78             : {
      79       39869 :         ndr_print_struct(ndr, name, "lsa_String");
      80       39869 :         if (r == NULL) { ndr_print_null(ndr); return; }
      81       39869 :         ndr->depth++;
      82       39869 :         ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
      83       39869 :         ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->size);
      84       39869 :         ndr_print_ptr(ndr, "string", r->string);
      85       39869 :         ndr->depth++;
      86       39869 :         if (r->string) {
      87       39195 :                 ndr_print_string(ndr, "string", r->string);
      88             :         }
      89       39869 :         ndr->depth--;
      90       39869 :         ndr->depth--;
      91             : }
      92             : 
      93      398909 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_StringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_StringLarge *r)
      94             : {
      95      398909 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      96      398909 :         if (ndr_flags & NDR_SCALARS) {
      97      199724 :                 NDR_CHECK(ndr_push_align(ndr, 5));
      98      199724 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
      99      199724 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m_term(r->string)));
     100      199724 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
     101      199724 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     102             :         }
     103      398909 :         if (ndr_flags & NDR_BUFFERS) {
     104      199724 :                 if (r->string) {
     105      197088 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 2 * strlen_m_term(r->string) / 2));
     106      197088 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     107      197088 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
     108      197088 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2 * strlen_m(r->string) / 2, sizeof(uint16_t), CH_UTF16));
     109             :                 }
     110             :         }
     111      382743 :         return NDR_ERR_SUCCESS;
     112             : }
     113             : 
     114      548836 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_StringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_StringLarge *r)
     115             : {
     116             :         uint32_t _ptr_string;
     117      548836 :         uint32_t size_string_1 = 0;
     118      548836 :         uint32_t length_string_1 = 0;
     119      548836 :         TALLOC_CTX *_mem_save_string_0 = NULL;
     120      548836 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     121      548836 :         if (ndr_flags & NDR_SCALARS) {
     122      274668 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     123      274668 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
     124      274668 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
     125      274668 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
     126      274668 :                 if (_ptr_string) {
     127      272376 :                         NDR_PULL_ALLOC(ndr, r->string);
     128             :                 } else {
     129        2292 :                         r->string = NULL;
     130             :                 }
     131      274668 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     132             :         }
     133      548836 :         if (ndr_flags & NDR_BUFFERS) {
     134      274668 :                 if (r->string) {
     135      272376 :                         _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
     136      272376 :                         NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
     137      272376 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
     138      272376 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
     139      272376 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->string, &size_string_1));
     140      272376 :                         NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->string, &length_string_1));
     141      272376 :                         if (length_string_1 > size_string_1) {
     142           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_string_1, length_string_1);
     143             :                         }
     144      272376 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, length_string_1, sizeof(uint16_t), CH_UTF16));
     145      272376 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
     146             :                 }
     147      274668 :                 if (r->string) {
     148      272376 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->string, r->size / 2));
     149             :                 }
     150      274668 :                 if (r->string) {
     151      272376 :                         NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->string, r->length / 2));
     152             :                 }
     153             :         }
     154      533322 :         return NDR_ERR_SUCCESS;
     155             : }
     156             : 
     157           0 : static void ndr_print_flags_lsa_StringLarge(struct ndr_print *ndr, const char *name, int unused, const struct lsa_StringLarge *r)
     158             : {
     159           0 :         ndr_print_lsa_StringLarge(ndr, name, r);
     160           0 : }
     161             : 
     162       13574 : _PUBLIC_ void ndr_print_lsa_StringLarge(struct ndr_print *ndr, const char *name, const struct lsa_StringLarge *r)
     163             : {
     164       13574 :         ndr_print_struct(ndr, name, "lsa_StringLarge");
     165       13574 :         if (r == NULL) { ndr_print_null(ndr); return; }
     166       13574 :         ndr->depth++;
     167       13574 :         ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
     168       13574 :         ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->string):r->size);
     169       13574 :         ndr_print_ptr(ndr, "string", r->string);
     170       13574 :         ndr->depth++;
     171       13574 :         if (r->string) {
     172       12614 :                 ndr_print_string(ndr, "string", r->string);
     173             :         }
     174       13574 :         ndr->depth--;
     175       13574 :         ndr->depth--;
     176             : }
     177             : 
     178        1449 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_Strings(struct ndr_push *ndr, int ndr_flags, const struct lsa_Strings *r)
     179             : {
     180             :         uint32_t cntr_names_1;
     181        1449 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     182        1449 :         if (ndr_flags & NDR_SCALARS) {
     183        1449 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     184        1449 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
     185        1449 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
     186        1449 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     187             :         }
     188        1449 :         if (ndr_flags & NDR_BUFFERS) {
     189        1449 :                 if (r->names) {
     190        1445 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
     191        3649 :                         for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
     192        2204 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
     193             :                         }
     194        3649 :                         for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
     195        2204 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
     196             :                         }
     197             :                 }
     198             :         }
     199        1449 :         return NDR_ERR_SUCCESS;
     200             : }
     201             : 
     202        2005 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Strings(struct ndr_pull *ndr, int ndr_flags, struct lsa_Strings *r)
     203             : {
     204             :         uint32_t _ptr_names;
     205        2005 :         uint32_t size_names_1 = 0;
     206             :         uint32_t cntr_names_1;
     207        2005 :         TALLOC_CTX *_mem_save_names_0 = NULL;
     208        2005 :         TALLOC_CTX *_mem_save_names_1 = NULL;
     209        2005 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     210        2005 :         if (ndr_flags & NDR_SCALARS) {
     211        2005 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     212        2005 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
     213        2005 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
     214        2005 :                 if (_ptr_names) {
     215        1999 :                         NDR_PULL_ALLOC(ndr, r->names);
     216             :                 } else {
     217           6 :                         r->names = NULL;
     218             :                 }
     219        2005 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     220             :         }
     221        2005 :         if (ndr_flags & NDR_BUFFERS) {
     222        2005 :                 if (r->names) {
     223        1999 :                         _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
     224        1999 :                         NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
     225        1999 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
     226        1999 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->names, &size_names_1));
     227        1999 :                         NDR_PULL_ALLOC_N(ndr, r->names, size_names_1);
     228        1999 :                         _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
     229        1999 :                         NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
     230        3999 :                         for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
     231        2000 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
     232             :                         }
     233        3999 :                         for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
     234        2000 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
     235             :                         }
     236        1999 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
     237        1999 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
     238             :                 }
     239        2005 :                 if (r->names) {
     240        1999 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
     241             :                 }
     242        2483 :                 for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
     243             :                 }
     244             :         }
     245        2005 :         return NDR_ERR_SUCCESS;
     246             : }
     247             : 
     248           0 : static void ndr_print_flags_lsa_Strings(struct ndr_print *ndr, const char *name, int unused, const struct lsa_Strings *r)
     249             : {
     250           0 :         ndr_print_lsa_Strings(ndr, name, r);
     251           0 : }
     252             : 
     253          58 : _PUBLIC_ void ndr_print_lsa_Strings(struct ndr_print *ndr, const char *name, const struct lsa_Strings *r)
     254             : {
     255             :         uint32_t cntr_names_1;
     256          58 :         ndr_print_struct(ndr, name, "lsa_Strings");
     257          58 :         if (r == NULL) { ndr_print_null(ndr); return; }
     258          58 :         ndr->depth++;
     259          58 :         ndr_print_uint32(ndr, "count", r->count);
     260          58 :         ndr_print_ptr(ndr, "names", r->names);
     261          58 :         ndr->depth++;
     262          58 :         if (r->names) {
     263          58 :                 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
     264          58 :                 ndr->depth++;
     265         116 :                 for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
     266          58 :                         ndr_print_lsa_String(ndr, "names", &r->names[cntr_names_1]);
     267             :                 }
     268          58 :                 ndr->depth--;
     269             :         }
     270          58 :         ndr->depth--;
     271          58 :         ndr->depth--;
     272             : }
     273             : 
     274         122 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiString(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiString *r)
     275             : {
     276         122 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     277         122 :         if (ndr_flags & NDR_SCALARS) {
     278         122 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     279         122 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
     280         122 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
     281         122 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
     282         122 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     283             :         }
     284         122 :         if (ndr_flags & NDR_BUFFERS) {
     285         122 :                 if (r->string) {
     286         122 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m(r->string)));
     287         122 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     288         122 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m(r->string)));
     289         122 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, strlen_m(r->string), sizeof(uint8_t), CH_DOS));
     290             :                 }
     291             :         }
     292         122 :         return NDR_ERR_SUCCESS;
     293             : }
     294             : 
     295         118 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiString(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiString *r)
     296             : {
     297             :         uint32_t _ptr_string;
     298         118 :         uint32_t size_string_1 = 0;
     299         118 :         uint32_t length_string_1 = 0;
     300         118 :         TALLOC_CTX *_mem_save_string_0 = NULL;
     301         118 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     302         118 :         if (ndr_flags & NDR_SCALARS) {
     303         118 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     304         118 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
     305         118 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
     306         118 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
     307         118 :                 if (_ptr_string) {
     308         118 :                         NDR_PULL_ALLOC(ndr, r->string);
     309             :                 } else {
     310           0 :                         r->string = NULL;
     311             :                 }
     312         118 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     313             :         }
     314         118 :         if (ndr_flags & NDR_BUFFERS) {
     315         118 :                 if (r->string) {
     316         118 :                         _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
     317         118 :                         NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
     318         118 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
     319         118 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
     320         118 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->string, &size_string_1));
     321         118 :                         NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->string, &length_string_1));
     322         118 :                         if (length_string_1 > size_string_1) {
     323           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_string_1, length_string_1);
     324             :                         }
     325         118 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, length_string_1, sizeof(uint8_t), CH_DOS));
     326         118 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
     327             :                 }
     328         118 :                 if (r->string) {
     329         118 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->string, r->size));
     330             :                 }
     331         118 :                 if (r->string) {
     332         118 :                         NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->string, r->length));
     333             :                 }
     334             :         }
     335         118 :         return NDR_ERR_SUCCESS;
     336             : }
     337             : 
     338           0 : static void ndr_print_flags_lsa_AsciiString(struct ndr_print *ndr, const char *name, int unused, const struct lsa_AsciiString *r)
     339             : {
     340           0 :         ndr_print_lsa_AsciiString(ndr, name, r);
     341           0 : }
     342             : 
     343           0 : _PUBLIC_ void ndr_print_lsa_AsciiString(struct ndr_print *ndr, const char *name, const struct lsa_AsciiString *r)
     344             : {
     345           0 :         ndr_print_struct(ndr, name, "lsa_AsciiString");
     346           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     347           0 :         ndr->depth++;
     348           0 :         ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->length);
     349           0 :         ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->size);
     350           0 :         ndr_print_ptr(ndr, "string", r->string);
     351           0 :         ndr->depth++;
     352           0 :         if (r->string) {
     353           0 :                 ndr_print_string(ndr, "string", r->string);
     354             :         }
     355           0 :         ndr->depth--;
     356           0 :         ndr->depth--;
     357             : }
     358             : 
     359        2154 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiStringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiStringLarge *r)
     360             : {
     361        2154 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     362        2154 :         if (ndr_flags & NDR_SCALARS) {
     363        1077 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     364        1077 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
     365        1077 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->string)));
     366        1077 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
     367        1077 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     368             :         }
     369        2154 :         if (ndr_flags & NDR_BUFFERS) {
     370        1077 :                 if (r->string) {
     371        1077 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m_term(r->string)));
     372        1077 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     373        1077 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m(r->string)));
     374        1077 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, strlen_m(r->string), sizeof(uint8_t), CH_DOS));
     375             :                 }
     376             :         }
     377        2154 :         return NDR_ERR_SUCCESS;
     378             : }
     379             : 
     380        2154 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiStringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiStringLarge *r)
     381             : {
     382             :         uint32_t _ptr_string;
     383        2154 :         uint32_t size_string_1 = 0;
     384        2154 :         uint32_t length_string_1 = 0;
     385        2154 :         TALLOC_CTX *_mem_save_string_0 = NULL;
     386        2154 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     387        2154 :         if (ndr_flags & NDR_SCALARS) {
     388        1077 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     389        1077 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
     390        1077 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
     391        1077 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
     392        1077 :                 if (_ptr_string) {
     393        1077 :                         NDR_PULL_ALLOC(ndr, r->string);
     394             :                 } else {
     395           0 :                         r->string = NULL;
     396             :                 }
     397        1077 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     398             :         }
     399        2154 :         if (ndr_flags & NDR_BUFFERS) {
     400        1077 :                 if (r->string) {
     401        1077 :                         _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
     402        1077 :                         NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
     403        1077 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
     404        1077 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
     405        1077 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->string, &size_string_1));
     406        1077 :                         NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->string, &length_string_1));
     407        1077 :                         if (length_string_1 > size_string_1) {
     408           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_string_1, length_string_1);
     409             :                         }
     410        1077 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, length_string_1, sizeof(uint8_t), CH_DOS));
     411        1077 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
     412             :                 }
     413        1077 :                 if (r->string) {
     414        1077 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->string, r->size));
     415             :                 }
     416        1077 :                 if (r->string) {
     417        1077 :                         NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->string, r->length));
     418             :                 }
     419             :         }
     420        2154 :         return NDR_ERR_SUCCESS;
     421             : }
     422             : 
     423           0 : static void ndr_print_flags_lsa_AsciiStringLarge(struct ndr_print *ndr, const char *name, int unused, const struct lsa_AsciiStringLarge *r)
     424             : {
     425           0 :         ndr_print_lsa_AsciiStringLarge(ndr, name, r);
     426           0 : }
     427             : 
     428           0 : _PUBLIC_ void ndr_print_lsa_AsciiStringLarge(struct ndr_print *ndr, const char *name, const struct lsa_AsciiStringLarge *r)
     429             : {
     430           0 :         ndr_print_struct(ndr, name, "lsa_AsciiStringLarge");
     431           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     432           0 :         ndr->depth++;
     433           0 :         ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->length);
     434           0 :         ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->string):r->size);
     435           0 :         ndr_print_ptr(ndr, "string", r->string);
     436           0 :         ndr->depth++;
     437           0 :         if (r->string) {
     438           0 :                 ndr_print_string(ndr, "string", r->string);
     439             :         }
     440           0 :         ndr->depth--;
     441           0 :         ndr->depth--;
     442             : }
     443             : 
     444       40730 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_BinaryString(struct ndr_push *ndr, int ndr_flags, const struct lsa_BinaryString *r)
     445             : {
     446             :         uint32_t cntr_array_1;
     447       40730 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     448       40730 :         if (ndr_flags & NDR_SCALARS) {
     449       20365 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     450       20365 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
     451       20365 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
     452       20365 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
     453       20365 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     454             :         }
     455       40730 :         if (ndr_flags & NDR_BUFFERS) {
     456       20365 :                 if (r->array) {
     457        1771 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size / 2));
     458        1771 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     459        1771 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length / 2));
     460       12988 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->length / 2); cntr_array_1++) {
     461       11217 :                                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->array[cntr_array_1]));
     462             :                         }
     463             :                 }
     464             :         }
     465       39650 :         return NDR_ERR_SUCCESS;
     466             : }
     467             : 
     468       42422 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_BinaryString(struct ndr_pull *ndr, int ndr_flags, struct lsa_BinaryString *r)
     469             : {
     470             :         uint32_t _ptr_array;
     471       42422 :         uint32_t size_array_1 = 0;
     472       42422 :         uint32_t length_array_1 = 0;
     473             :         uint32_t cntr_array_1;
     474       42422 :         TALLOC_CTX *_mem_save_array_0 = NULL;
     475       42422 :         TALLOC_CTX *_mem_save_array_1 = NULL;
     476       42422 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     477       42422 :         if (ndr_flags & NDR_SCALARS) {
     478       21211 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     479       21211 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
     480       21211 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
     481       21211 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
     482       21211 :                 if (_ptr_array) {
     483        2097 :                         NDR_PULL_ALLOC(ndr, r->array);
     484             :                 } else {
     485       19114 :                         r->array = NULL;
     486             :                 }
     487       21211 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     488             :         }
     489       42422 :         if (ndr_flags & NDR_BUFFERS) {
     490       21211 :                 if (r->array) {
     491        2097 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
     492        2097 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
     493        2097 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
     494        2097 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->array));
     495        2097 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
     496        2097 :                         NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->array, &length_array_1));
     497        2097 :                         if (length_array_1 > size_array_1) {
     498           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_array_1, length_array_1);
     499             :                         }
     500        2097 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
     501        2097 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
     502        2097 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
     503       13314 :                         for (cntr_array_1 = 0; cntr_array_1 < (length_array_1); cntr_array_1++) {
     504       11217 :                                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
     505             :                         }
     506        2097 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
     507        2097 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
     508             :                 }
     509       21211 :                 if (r->array) {
     510        2097 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->array, r->size / 2));
     511             :                 }
     512       21211 :                 if (r->array) {
     513        2097 :                         NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->array, r->length / 2));
     514             :                 }
     515             :         }
     516       41342 :         return NDR_ERR_SUCCESS;
     517             : }
     518             : 
     519           0 : static void ndr_print_flags_lsa_BinaryString(struct ndr_print *ndr, const char *name, int unused, const struct lsa_BinaryString *r)
     520             : {
     521           0 :         ndr_print_lsa_BinaryString(ndr, name, r);
     522           0 : }
     523             : 
     524         258 : _PUBLIC_ void ndr_print_lsa_BinaryString(struct ndr_print *ndr, const char *name, const struct lsa_BinaryString *r)
     525             : {
     526             :         uint32_t cntr_array_1;
     527         258 :         ndr_print_struct(ndr, name, "lsa_BinaryString");
     528         258 :         if (r == NULL) { ndr_print_null(ndr); return; }
     529         258 :         ndr->depth++;
     530         258 :         ndr_print_uint16(ndr, "length", r->length);
     531         258 :         ndr_print_uint16(ndr, "size", r->size);
     532         258 :         ndr_print_ptr(ndr, "array", r->array);
     533         258 :         ndr->depth++;
     534         258 :         if (r->array) {
     535           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->length / 2);
     536           0 :                 ndr->depth++;
     537           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->length / 2); cntr_array_1++) {
     538           0 :                         ndr_print_uint16(ndr, "array", r->array[cntr_array_1]);
     539             :                 }
     540           0 :                 ndr->depth--;
     541             :         }
     542         258 :         ndr->depth--;
     543         258 :         ndr->depth--;
     544             : }
     545             : 
     546         969 : static enum ndr_err_code ndr_push_lsa_LUID(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUID *r)
     547             : {
     548         969 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     549         969 :         if (ndr_flags & NDR_SCALARS) {
     550         969 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     551         969 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->low));
     552         969 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->high));
     553         969 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     554             :         }
     555         969 :         if (ndr_flags & NDR_BUFFERS) {
     556             :         }
     557         969 :         return NDR_ERR_SUCCESS;
     558             : }
     559             : 
     560         946 : static enum ndr_err_code ndr_pull_lsa_LUID(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUID *r)
     561             : {
     562         946 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     563         946 :         if (ndr_flags & NDR_SCALARS) {
     564         946 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     565         946 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->low));
     566         946 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->high));
     567         946 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     568             :         }
     569         888 :         if (ndr_flags & NDR_BUFFERS) {
     570             :         }
     571         946 :         return NDR_ERR_SUCCESS;
     572             : }
     573             : 
     574         222 : _PUBLIC_ void ndr_print_lsa_LUID(struct ndr_print *ndr, const char *name, const struct lsa_LUID *r)
     575             : {
     576         222 :         ndr_print_struct(ndr, name, "lsa_LUID");
     577         222 :         if (r == NULL) { ndr_print_null(ndr); return; }
     578         222 :         ndr->depth++;
     579         222 :         ndr_print_uint32(ndr, "low", r->low);
     580         222 :         ndr_print_uint32(ndr, "high", r->high);
     581         222 :         ndr->depth--;
     582             : }
     583             : 
     584         386 : static enum ndr_err_code ndr_push_lsa_PrivEntry(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivEntry *r)
     585             : {
     586         386 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     587         386 :         if (ndr_flags & NDR_SCALARS) {
     588         193 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     589         193 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
     590         193 :                 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
     591         193 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     592             :         }
     593         386 :         if (ndr_flags & NDR_BUFFERS) {
     594         193 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
     595             :         }
     596         386 :         return NDR_ERR_SUCCESS;
     597             : }
     598             : 
     599         452 : static enum ndr_err_code ndr_pull_lsa_PrivEntry(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivEntry *r)
     600             : {
     601         452 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     602         452 :         if (ndr_flags & NDR_SCALARS) {
     603         226 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     604         226 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
     605         226 :                 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
     606         226 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     607             :         }
     608         452 :         if (ndr_flags & NDR_BUFFERS) {
     609         226 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
     610             :         }
     611         336 :         return NDR_ERR_SUCCESS;
     612             : }
     613             : 
     614         108 : _PUBLIC_ void ndr_print_lsa_PrivEntry(struct ndr_print *ndr, const char *name, const struct lsa_PrivEntry *r)
     615             : {
     616         108 :         ndr_print_struct(ndr, name, "lsa_PrivEntry");
     617         108 :         if (r == NULL) { ndr_print_null(ndr); return; }
     618         108 :         ndr->depth++;
     619         108 :         ndr_print_lsa_StringLarge(ndr, "name", &r->name);
     620         108 :         ndr_print_lsa_LUID(ndr, "luid", &r->luid);
     621         108 :         ndr->depth--;
     622             : }
     623             : 
     624           9 : static enum ndr_err_code ndr_push_lsa_PrivArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivArray *r)
     625             : {
     626             :         uint32_t cntr_privs_1;
     627           9 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     628           9 :         if (ndr_flags & NDR_SCALARS) {
     629           9 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     630           9 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
     631           9 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->privs));
     632           9 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     633             :         }
     634           9 :         if (ndr_flags & NDR_BUFFERS) {
     635           9 :                 if (r->privs) {
     636           9 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
     637         202 :                         for (cntr_privs_1 = 0; cntr_privs_1 < (r->count); cntr_privs_1++) {
     638         193 :                                 NDR_CHECK(ndr_push_lsa_PrivEntry(ndr, NDR_SCALARS, &r->privs[cntr_privs_1]));
     639             :                         }
     640         202 :                         for (cntr_privs_1 = 0; cntr_privs_1 < (r->count); cntr_privs_1++) {
     641         193 :                                 NDR_CHECK(ndr_push_lsa_PrivEntry(ndr, NDR_BUFFERS, &r->privs[cntr_privs_1]));
     642             :                         }
     643             :                 }
     644             :         }
     645           9 :         return NDR_ERR_SUCCESS;
     646             : }
     647             : 
     648          10 : static enum ndr_err_code ndr_pull_lsa_PrivArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivArray *r)
     649             : {
     650             :         uint32_t _ptr_privs;
     651          10 :         uint32_t size_privs_1 = 0;
     652             :         uint32_t cntr_privs_1;
     653          10 :         TALLOC_CTX *_mem_save_privs_0 = NULL;
     654          10 :         TALLOC_CTX *_mem_save_privs_1 = NULL;
     655          10 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     656          10 :         if (ndr_flags & NDR_SCALARS) {
     657          10 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     658          10 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
     659          10 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
     660          10 :                 if (_ptr_privs) {
     661          10 :                         NDR_PULL_ALLOC(ndr, r->privs);
     662             :                 } else {
     663           0 :                         r->privs = NULL;
     664             :                 }
     665          10 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     666             :         }
     667          10 :         if (ndr_flags & NDR_BUFFERS) {
     668          10 :                 if (r->privs) {
     669          10 :                         _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
     670          10 :                         NDR_PULL_SET_MEM_CTX(ndr, r->privs, 0);
     671          10 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->privs));
     672          10 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->privs, &size_privs_1));
     673          10 :                         NDR_PULL_ALLOC_N(ndr, r->privs, size_privs_1);
     674          10 :                         _mem_save_privs_1 = NDR_PULL_GET_MEM_CTX(ndr);
     675          10 :                         NDR_PULL_SET_MEM_CTX(ndr, r->privs, 0);
     676         236 :                         for (cntr_privs_1 = 0; cntr_privs_1 < (size_privs_1); cntr_privs_1++) {
     677         226 :                                 NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr, NDR_SCALARS, &r->privs[cntr_privs_1]));
     678             :                         }
     679         234 :                         for (cntr_privs_1 = 0; cntr_privs_1 < (size_privs_1); cntr_privs_1++) {
     680         226 :                                 NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr, NDR_BUFFERS, &r->privs[cntr_privs_1]));
     681             :                         }
     682          10 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_1, 0);
     683          10 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0);
     684             :                 }
     685          10 :                 if (r->privs) {
     686          10 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->privs, r->count));
     687             :                 }
     688          35 :                 for (cntr_privs_1 = 0; cntr_privs_1 < (size_privs_1); cntr_privs_1++) {
     689             :                 }
     690             :         }
     691           8 :         return NDR_ERR_SUCCESS;
     692             : }
     693             : 
     694           4 : _PUBLIC_ void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, const struct lsa_PrivArray *r)
     695             : {
     696             :         uint32_t cntr_privs_1;
     697           4 :         ndr_print_struct(ndr, name, "lsa_PrivArray");
     698           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
     699           4 :         ndr->depth++;
     700           4 :         ndr_print_uint32(ndr, "count", r->count);
     701           4 :         ndr_print_ptr(ndr, "privs", r->privs);
     702           4 :         ndr->depth++;
     703           4 :         if (r->privs) {
     704           4 :                 ndr->print(ndr, "%s: ARRAY(%d)", "privs", (int)r->count);
     705           4 :                 ndr->depth++;
     706         112 :                 for (cntr_privs_1 = 0; cntr_privs_1 < (r->count); cntr_privs_1++) {
     707         108 :                         ndr_print_lsa_PrivEntry(ndr, "privs", &r->privs[cntr_privs_1]);
     708             :                 }
     709           4 :                 ndr->depth--;
     710             :         }
     711           4 :         ndr->depth--;
     712           4 :         ndr->depth--;
     713             : }
     714             : 
     715       11081 : static enum ndr_err_code ndr_push_lsa_QosInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_QosInfo *r)
     716             : {
     717       11081 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     718       11081 :         if (ndr_flags & NDR_SCALARS) {
     719       11081 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     720       11081 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->len));
     721       11081 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->impersonation_level));
     722       11081 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->context_mode));
     723       11081 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->effective_only));
     724       11081 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     725             :         }
     726       10961 :         if (ndr_flags & NDR_BUFFERS) {
     727             :         }
     728       11081 :         return NDR_ERR_SUCCESS;
     729             : }
     730             : 
     731       10456 : static enum ndr_err_code ndr_pull_lsa_QosInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_QosInfo *r)
     732             : {
     733       10456 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     734       10456 :         if (ndr_flags & NDR_SCALARS) {
     735       10456 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     736       10456 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->len));
     737       10456 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->impersonation_level));
     738       10456 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->context_mode));
     739       10456 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->effective_only));
     740       10456 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     741             :         }
     742       10333 :         if (ndr_flags & NDR_BUFFERS) {
     743             :         }
     744       10456 :         return NDR_ERR_SUCCESS;
     745             : }
     746             : 
     747           4 : _PUBLIC_ void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, const struct lsa_QosInfo *r)
     748             : {
     749           4 :         ndr_print_struct(ndr, name, "lsa_QosInfo");
     750           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
     751           4 :         ndr->depth++;
     752           4 :         ndr_print_uint3264(ndr, "len", r->len);
     753           4 :         ndr_print_uint16(ndr, "impersonation_level", r->impersonation_level);
     754           4 :         ndr_print_uint8(ndr, "context_mode", r->context_mode);
     755           4 :         ndr_print_uint8(ndr, "effective_only", r->effective_only);
     756           4 :         ndr->depth--;
     757             : }
     758             : 
     759       12104 : static enum ndr_err_code ndr_push_lsa_ObjectAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_ObjectAttribute *r)
     760             : {
     761       12104 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     762       12104 :         if (ndr_flags & NDR_SCALARS) {
     763       12104 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     764       12104 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->len));
     765       12104 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->root_dir));
     766       12104 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_name));
     767       12104 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attributes));
     768       12104 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sec_desc));
     769       12104 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sec_qos));
     770       12104 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     771             :         }
     772       12104 :         if (ndr_flags & NDR_BUFFERS) {
     773       12104 :                 if (r->root_dir) {
     774           0 :                         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->root_dir));
     775             :                 }
     776       12104 :                 if (r->object_name) {
     777           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_name, CH_UTF16)));
     778           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     779           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_name, CH_UTF16)));
     780           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_name, ndr_charset_length(r->object_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
     781             :                 }
     782       12104 :                 if (r->sec_desc) {
     783           0 :                         NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->sec_desc));
     784             :                 }
     785       12104 :                 if (r->sec_qos) {
     786       11081 :                         NDR_CHECK(ndr_push_lsa_QosInfo(ndr, NDR_SCALARS, r->sec_qos));
     787             :                 }
     788             :         }
     789       11984 :         return NDR_ERR_SUCCESS;
     790             : }
     791             : 
     792       11342 : static enum ndr_err_code ndr_pull_lsa_ObjectAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_ObjectAttribute *r)
     793             : {
     794             :         uint32_t _ptr_root_dir;
     795       11342 :         TALLOC_CTX *_mem_save_root_dir_0 = NULL;
     796             :         uint32_t _ptr_object_name;
     797       11342 :         uint32_t size_object_name_1 = 0;
     798       11342 :         uint32_t length_object_name_1 = 0;
     799       11342 :         TALLOC_CTX *_mem_save_object_name_0 = NULL;
     800             :         uint32_t _ptr_sec_desc;
     801       11342 :         TALLOC_CTX *_mem_save_sec_desc_0 = NULL;
     802             :         uint32_t _ptr_sec_qos;
     803       11342 :         TALLOC_CTX *_mem_save_sec_qos_0 = NULL;
     804       11342 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     805       11342 :         if (ndr_flags & NDR_SCALARS) {
     806       11342 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     807       11342 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->len));
     808       11342 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_root_dir));
     809       11342 :                 if (_ptr_root_dir) {
     810           0 :                         NDR_PULL_ALLOC(ndr, r->root_dir);
     811             :                 } else {
     812       11342 :                         r->root_dir = NULL;
     813             :                 }
     814       11342 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_name));
     815       11342 :                 if (_ptr_object_name) {
     816           0 :                         NDR_PULL_ALLOC(ndr, r->object_name);
     817             :                 } else {
     818       11342 :                         r->object_name = NULL;
     819             :                 }
     820       11342 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attributes));
     821       11342 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sec_desc));
     822       11342 :                 if (_ptr_sec_desc) {
     823           0 :                         NDR_PULL_ALLOC(ndr, r->sec_desc);
     824             :                 } else {
     825       11342 :                         r->sec_desc = NULL;
     826             :                 }
     827       11342 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sec_qos));
     828       11342 :                 if (_ptr_sec_qos) {
     829       10456 :                         NDR_PULL_ALLOC(ndr, r->sec_qos);
     830             :                 } else {
     831         886 :                         r->sec_qos = NULL;
     832             :                 }
     833       11342 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     834             :         }
     835       11342 :         if (ndr_flags & NDR_BUFFERS) {
     836       11342 :                 if (r->root_dir) {
     837           0 :                         _mem_save_root_dir_0 = NDR_PULL_GET_MEM_CTX(ndr);
     838           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->root_dir, 0);
     839           0 :                         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->root_dir));
     840           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_root_dir_0, 0);
     841             :                 }
     842       11342 :                 if (r->object_name) {
     843           0 :                         _mem_save_object_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
     844           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->object_name, 0);
     845           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->object_name));
     846           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->object_name));
     847           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->object_name, &size_object_name_1));
     848           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->object_name, &length_object_name_1));
     849           0 :                         if (length_object_name_1 > size_object_name_1) {
     850           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_object_name_1, length_object_name_1);
     851             :                         }
     852           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_object_name_1, sizeof(uint16_t)));
     853           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_name, length_object_name_1, sizeof(uint16_t), CH_UTF16));
     854           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_name_0, 0);
     855             :                 }
     856       11342 :                 if (r->sec_desc) {
     857           0 :                         _mem_save_sec_desc_0 = NDR_PULL_GET_MEM_CTX(ndr);
     858           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sec_desc, 0);
     859           0 :                         NDR_CHECK(ndr_pull_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->sec_desc));
     860           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_desc_0, 0);
     861             :                 }
     862       11342 :                 if (r->sec_qos) {
     863       10456 :                         _mem_save_sec_qos_0 = NDR_PULL_GET_MEM_CTX(ndr);
     864       10456 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sec_qos, 0);
     865       10456 :                         NDR_CHECK(ndr_pull_lsa_QosInfo(ndr, NDR_SCALARS, r->sec_qos));
     866       10456 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_qos_0, 0);
     867             :                 }
     868             :         }
     869       11219 :         return NDR_ERR_SUCCESS;
     870             : }
     871             : 
     872           6 : _PUBLIC_ void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *name, const struct lsa_ObjectAttribute *r)
     873             : {
     874           6 :         ndr_print_struct(ndr, name, "lsa_ObjectAttribute");
     875           6 :         if (r == NULL) { ndr_print_null(ndr); return; }
     876           6 :         ndr->depth++;
     877           6 :         ndr_print_uint3264(ndr, "len", r->len);
     878           6 :         ndr_print_ptr(ndr, "root_dir", r->root_dir);
     879           6 :         ndr->depth++;
     880           6 :         if (r->root_dir) {
     881           0 :                 ndr_print_uint8(ndr, "root_dir", *r->root_dir);
     882             :         }
     883           6 :         ndr->depth--;
     884           6 :         ndr_print_ptr(ndr, "object_name", r->object_name);
     885           6 :         ndr->depth++;
     886           6 :         if (r->object_name) {
     887           0 :                 ndr_print_string(ndr, "object_name", r->object_name);
     888             :         }
     889           6 :         ndr->depth--;
     890           6 :         ndr_print_uint32(ndr, "attributes", r->attributes);
     891           6 :         ndr_print_ptr(ndr, "sec_desc", r->sec_desc);
     892           6 :         ndr->depth++;
     893           6 :         if (r->sec_desc) {
     894           0 :                 ndr_print_security_descriptor(ndr, "sec_desc", r->sec_desc);
     895             :         }
     896           6 :         ndr->depth--;
     897           6 :         ndr_print_ptr(ndr, "sec_qos", r->sec_qos);
     898           6 :         ndr->depth++;
     899           6 :         if (r->sec_qos) {
     900           4 :                 ndr_print_lsa_QosInfo(ndr, "sec_qos", r->sec_qos);
     901             :         }
     902           6 :         ndr->depth--;
     903           6 :         ndr->depth--;
     904             : }
     905             : 
     906       12104 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_PolicyAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
     907             : {
     908       12104 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
     909       12104 :         return NDR_ERR_SUCCESS;
     910             : }
     911             : 
     912       11342 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_PolicyAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
     913             : {
     914             :         uint32_t v;
     915       11342 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     916       11342 :         *r = v;
     917       11342 :         return NDR_ERR_SUCCESS;
     918             : }
     919             : 
     920           6 : _PUBLIC_ void ndr_print_lsa_PolicyAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
     921             : {
     922           6 :         ndr_print_uint32(ndr, name, r);
     923           6 :         ndr->depth++;
     924           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_VIEW_LOCAL_INFORMATION", LSA_POLICY_VIEW_LOCAL_INFORMATION, r);
     925           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_VIEW_AUDIT_INFORMATION", LSA_POLICY_VIEW_AUDIT_INFORMATION, r);
     926           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_GET_PRIVATE_INFORMATION", LSA_POLICY_GET_PRIVATE_INFORMATION, r);
     927           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_TRUST_ADMIN", LSA_POLICY_TRUST_ADMIN, r);
     928           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_ACCOUNT", LSA_POLICY_CREATE_ACCOUNT, r);
     929           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_SECRET", LSA_POLICY_CREATE_SECRET, r);
     930           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_PRIVILEGE", LSA_POLICY_CREATE_PRIVILEGE, r);
     931           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS", LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS, r);
     932           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SET_AUDIT_REQUIREMENTS", LSA_POLICY_SET_AUDIT_REQUIREMENTS, r);
     933           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_AUDIT_LOG_ADMIN", LSA_POLICY_AUDIT_LOG_ADMIN, r);
     934           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SERVER_ADMIN", LSA_POLICY_SERVER_ADMIN, r);
     935           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_LOOKUP_NAMES", LSA_POLICY_LOOKUP_NAMES, r);
     936           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_NOTIFICATION", LSA_POLICY_NOTIFICATION, r);
     937           6 :         ndr->depth--;
     938           6 : }
     939             : 
     940         140 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_AccountAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
     941             : {
     942         140 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
     943         140 :         return NDR_ERR_SUCCESS;
     944             : }
     945             : 
     946         136 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AccountAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
     947             : {
     948             :         uint32_t v;
     949         136 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     950         136 :         *r = v;
     951         136 :         return NDR_ERR_SUCCESS;
     952             : }
     953             : 
     954          14 : _PUBLIC_ void ndr_print_lsa_AccountAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
     955             : {
     956          14 :         ndr_print_uint32(ndr, name, r);
     957          14 :         ndr->depth++;
     958          14 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_VIEW", LSA_ACCOUNT_VIEW, r);
     959          14 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_PRIVILEGES", LSA_ACCOUNT_ADJUST_PRIVILEGES, r);
     960          14 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_QUOTAS", LSA_ACCOUNT_ADJUST_QUOTAS, r);
     961          14 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS", LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS, r);
     962          14 :         ndr->depth--;
     963          14 : }
     964             : 
     965        2458 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_SecretAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
     966             : {
     967        2458 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
     968        2458 :         return NDR_ERR_SUCCESS;
     969             : }
     970             : 
     971        1870 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SecretAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
     972             : {
     973             :         uint32_t v;
     974        1870 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     975        1870 :         *r = v;
     976        1870 :         return NDR_ERR_SUCCESS;
     977             : }
     978             : 
     979           4 : _PUBLIC_ void ndr_print_lsa_SecretAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
     980             : {
     981           4 :         ndr_print_uint32(ndr, name, r);
     982           4 :         ndr->depth++;
     983           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_SECRET_SET_VALUE", LSA_SECRET_SET_VALUE, r);
     984           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_SECRET_QUERY_VALUE", LSA_SECRET_QUERY_VALUE, r);
     985           4 :         ndr->depth--;
     986           4 : }
     987             : 
     988         459 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustedAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
     989             : {
     990         459 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
     991         459 :         return NDR_ERR_SUCCESS;
     992             : }
     993             : 
     994         461 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustedAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
     995             : {
     996             :         uint32_t v;
     997         461 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     998         461 :         *r = v;
     999         461 :         return NDR_ERR_SUCCESS;
    1000             : }
    1001             : 
    1002           2 : _PUBLIC_ void ndr_print_lsa_TrustedAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
    1003             : {
    1004           2 :         ndr_print_uint32(ndr, name, r);
    1005           2 :         ndr->depth++;
    1006           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_DOMAIN_NAME", LSA_TRUSTED_QUERY_DOMAIN_NAME, r);
    1007           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_CONTROLLERS", LSA_TRUSTED_QUERY_CONTROLLERS, r);
    1008           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_SET_CONTROLLERS", LSA_TRUSTED_SET_CONTROLLERS, r);
    1009           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_POSIX", LSA_TRUSTED_QUERY_POSIX, r);
    1010           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_SET_POSIX", LSA_TRUSTED_SET_POSIX, r);
    1011           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_SET_AUTH", LSA_TRUSTED_SET_AUTH, r);
    1012           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_AUTH", LSA_TRUSTED_QUERY_AUTH, r);
    1013           2 :         ndr->depth--;
    1014           2 : }
    1015             : 
    1016          42 : static enum ndr_err_code ndr_push_lsa_AuditLogInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditLogInfo *r)
    1017             : {
    1018          42 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1019          42 :         if (ndr_flags & NDR_SCALARS) {
    1020          42 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    1021          42 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->percent_full));
    1022          42 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximum_log_size));
    1023          42 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->retention_time));
    1024          42 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_in_progress));
    1025          42 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->time_to_shutdown));
    1026          42 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->next_audit_record));
    1027          42 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    1028             :         }
    1029          42 :         if (ndr_flags & NDR_BUFFERS) {
    1030             :         }
    1031          42 :         return NDR_ERR_SUCCESS;
    1032             : }
    1033             : 
    1034          36 : static enum ndr_err_code ndr_pull_lsa_AuditLogInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditLogInfo *r)
    1035             : {
    1036          36 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1037          36 :         if (ndr_flags & NDR_SCALARS) {
    1038          36 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    1039          36 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->percent_full));
    1040          36 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximum_log_size));
    1041          36 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->retention_time));
    1042          36 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_in_progress));
    1043          36 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->time_to_shutdown));
    1044          36 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->next_audit_record));
    1045          36 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    1046             :         }
    1047          36 :         if (ndr_flags & NDR_BUFFERS) {
    1048             :         }
    1049          36 :         return NDR_ERR_SUCCESS;
    1050             : }
    1051             : 
    1052          16 : _PUBLIC_ void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditLogInfo *r)
    1053             : {
    1054          16 :         ndr_print_struct(ndr, name, "lsa_AuditLogInfo");
    1055          16 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1056          16 :         ndr->depth++;
    1057          16 :         ndr_print_uint32(ndr, "percent_full", r->percent_full);
    1058          16 :         ndr_print_uint32(ndr, "maximum_log_size", r->maximum_log_size);
    1059          16 :         ndr_print_hyper(ndr, "retention_time", r->retention_time);
    1060          16 :         ndr_print_uint8(ndr, "shutdown_in_progress", r->shutdown_in_progress);
    1061          16 :         ndr_print_hyper(ndr, "time_to_shutdown", r->time_to_shutdown);
    1062          16 :         ndr_print_uint32(ndr, "next_audit_record", r->next_audit_record);
    1063          16 :         ndr->depth--;
    1064             : }
    1065             : 
    1066           0 : static enum ndr_err_code ndr_push_lsa_PolicyAuditPolicy(struct ndr_push *ndr, int ndr_flags, enum lsa_PolicyAuditPolicy r)
    1067             : {
    1068           0 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    1069           0 :         return NDR_ERR_SUCCESS;
    1070             : }
    1071             : 
    1072          14 : static enum ndr_err_code ndr_pull_lsa_PolicyAuditPolicy(struct ndr_pull *ndr, int ndr_flags, enum lsa_PolicyAuditPolicy *r)
    1073             : {
    1074             :         uint32_t v;
    1075          14 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    1076          14 :         *r = v;
    1077          14 :         return NDR_ERR_SUCCESS;
    1078             : }
    1079             : 
    1080           0 : _PUBLIC_ void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print *ndr, const char *name, enum lsa_PolicyAuditPolicy r)
    1081             : {
    1082           0 :         const char *val = NULL;
    1083             : 
    1084           0 :         switch (r) {
    1085           0 :                 case LSA_AUDIT_POLICY_NONE: val = "LSA_AUDIT_POLICY_NONE"; break;
    1086           0 :                 case LSA_AUDIT_POLICY_SUCCESS: val = "LSA_AUDIT_POLICY_SUCCESS"; break;
    1087           0 :                 case LSA_AUDIT_POLICY_FAILURE: val = "LSA_AUDIT_POLICY_FAILURE"; break;
    1088           0 :                 case LSA_AUDIT_POLICY_ALL: val = "LSA_AUDIT_POLICY_ALL"; break;
    1089           0 :                 case LSA_AUDIT_POLICY_CLEAR: val = "LSA_AUDIT_POLICY_CLEAR"; break;
    1090             :         }
    1091           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1092           0 : }
    1093             : 
    1094          84 : static enum ndr_err_code ndr_push_lsa_AuditEventsInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditEventsInfo *r)
    1095             : {
    1096             :         uint32_t cntr_settings_1;
    1097          84 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1098          84 :         if (ndr_flags & NDR_SCALARS) {
    1099          42 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1100          42 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditing_mode));
    1101          42 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->settings));
    1102          42 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    1103          42 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1104             :         }
    1105          84 :         if (ndr_flags & NDR_BUFFERS) {
    1106          42 :                 if (r->settings) {
    1107           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    1108           0 :                         for (cntr_settings_1 = 0; cntr_settings_1 < (r->count); cntr_settings_1++) {
    1109           0 :                                 NDR_CHECK(ndr_push_lsa_PolicyAuditPolicy(ndr, NDR_SCALARS, r->settings[cntr_settings_1]));
    1110             :                         }
    1111             :                 }
    1112             :         }
    1113          84 :         return NDR_ERR_SUCCESS;
    1114             : }
    1115             : 
    1116          72 : static enum ndr_err_code ndr_pull_lsa_AuditEventsInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditEventsInfo *r)
    1117             : {
    1118             :         uint32_t _ptr_settings;
    1119          72 :         uint32_t size_settings_1 = 0;
    1120             :         uint32_t cntr_settings_1;
    1121          72 :         TALLOC_CTX *_mem_save_settings_0 = NULL;
    1122          72 :         TALLOC_CTX *_mem_save_settings_1 = NULL;
    1123          72 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1124          72 :         if (ndr_flags & NDR_SCALARS) {
    1125          36 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1126          36 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditing_mode));
    1127          36 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_settings));
    1128          36 :                 if (_ptr_settings) {
    1129           2 :                         NDR_PULL_ALLOC(ndr, r->settings);
    1130             :                 } else {
    1131          34 :                         r->settings = NULL;
    1132             :                 }
    1133          36 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    1134          36 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1135             :         }
    1136          72 :         if (ndr_flags & NDR_BUFFERS) {
    1137          36 :                 if (r->settings) {
    1138           2 :                         _mem_save_settings_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1139           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->settings, 0);
    1140           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->settings));
    1141           2 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->settings, &size_settings_1));
    1142           2 :                         NDR_PULL_ALLOC_N(ndr, r->settings, size_settings_1);
    1143           2 :                         _mem_save_settings_1 = NDR_PULL_GET_MEM_CTX(ndr);
    1144           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->settings, 0);
    1145          16 :                         for (cntr_settings_1 = 0; cntr_settings_1 < (size_settings_1); cntr_settings_1++) {
    1146          14 :                                 NDR_CHECK(ndr_pull_lsa_PolicyAuditPolicy(ndr, NDR_SCALARS, &r->settings[cntr_settings_1]));
    1147             :                         }
    1148           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_settings_1, 0);
    1149           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_settings_0, 0);
    1150             :                 }
    1151          36 :                 if (r->settings) {
    1152           2 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->settings, r->count));
    1153             :                 }
    1154             :         }
    1155          72 :         return NDR_ERR_SUCCESS;
    1156             : }
    1157             : 
    1158          16 : _PUBLIC_ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditEventsInfo *r)
    1159             : {
    1160             :         uint32_t cntr_settings_1;
    1161          16 :         ndr_print_struct(ndr, name, "lsa_AuditEventsInfo");
    1162          16 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1163          16 :         ndr->depth++;
    1164          16 :         ndr_print_uint32(ndr, "auditing_mode", r->auditing_mode);
    1165          16 :         ndr_print_ptr(ndr, "settings", r->settings);
    1166          16 :         ndr->depth++;
    1167          16 :         if (r->settings) {
    1168           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "settings", (int)r->count);
    1169           0 :                 ndr->depth++;
    1170           0 :                 for (cntr_settings_1 = 0; cntr_settings_1 < (r->count); cntr_settings_1++) {
    1171           0 :                         ndr_print_lsa_PolicyAuditPolicy(ndr, "settings", r->settings[cntr_settings_1]);
    1172             :                 }
    1173           0 :                 ndr->depth--;
    1174             :         }
    1175          16 :         ndr->depth--;
    1176          16 :         ndr_print_uint32(ndr, "count", r->count);
    1177          16 :         ndr->depth--;
    1178             : }
    1179             : 
    1180       32292 : static enum ndr_err_code ndr_push_lsa_DomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfo *r)
    1181             : {
    1182       32292 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1183       32292 :         if (ndr_flags & NDR_SCALARS) {
    1184       16170 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1185       16170 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
    1186       16170 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    1187       16170 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1188             :         }
    1189       32292 :         if (ndr_flags & NDR_BUFFERS) {
    1190       16170 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
    1191       16170 :                 if (r->sid) {
    1192       16170 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    1193             :                 }
    1194             :         }
    1195       31784 :         return NDR_ERR_SUCCESS;
    1196             : }
    1197             : 
    1198       26948 : static enum ndr_err_code ndr_pull_lsa_DomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfo *r)
    1199             : {
    1200             :         uint32_t _ptr_sid;
    1201       26948 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    1202       26948 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1203       26948 :         if (ndr_flags & NDR_SCALARS) {
    1204       13499 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1205       13499 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
    1206       13499 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    1207       13499 :                 if (_ptr_sid) {
    1208       13497 :                         NDR_PULL_ALLOC(ndr, r->sid);
    1209             :                 } else {
    1210           2 :                         r->sid = NULL;
    1211             :                 }
    1212       13499 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1213             :         }
    1214       26948 :         if (ndr_flags & NDR_BUFFERS) {
    1215       13499 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
    1216       13499 :                 if (r->sid) {
    1217       13497 :                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1218       13497 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    1219       13497 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    1220       13497 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    1221             :                 }
    1222             :         }
    1223       26470 :         return NDR_ERR_SUCCESS;
    1224             : }
    1225             : 
    1226        1234 : _PUBLIC_ void ndr_print_lsa_DomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfo *r)
    1227             : {
    1228        1234 :         ndr_print_struct(ndr, name, "lsa_DomainInfo");
    1229        1234 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1230        1234 :         ndr->depth++;
    1231        1234 :         ndr_print_lsa_StringLarge(ndr, "name", &r->name);
    1232        1234 :         ndr_print_ptr(ndr, "sid", r->sid);
    1233        1234 :         ndr->depth++;
    1234        1234 :         if (r->sid) {
    1235        1234 :                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    1236             :         }
    1237        1234 :         ndr->depth--;
    1238        1234 :         ndr->depth--;
    1239             : }
    1240             : 
    1241          84 : static enum ndr_err_code ndr_push_lsa_PDAccountInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_PDAccountInfo *r)
    1242             : {
    1243          84 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1244          84 :         if (ndr_flags & NDR_SCALARS) {
    1245          42 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1246          42 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
    1247          42 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1248             :         }
    1249          84 :         if (ndr_flags & NDR_BUFFERS) {
    1250          42 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
    1251             :         }
    1252          84 :         return NDR_ERR_SUCCESS;
    1253             : }
    1254             : 
    1255          72 : static enum ndr_err_code ndr_pull_lsa_PDAccountInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_PDAccountInfo *r)
    1256             : {
    1257          72 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1258          72 :         if (ndr_flags & NDR_SCALARS) {
    1259          36 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1260          36 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
    1261          36 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1262             :         }
    1263          72 :         if (ndr_flags & NDR_BUFFERS) {
    1264          36 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
    1265             :         }
    1266          72 :         return NDR_ERR_SUCCESS;
    1267             : }
    1268             : 
    1269          16 : _PUBLIC_ void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *name, const struct lsa_PDAccountInfo *r)
    1270             : {
    1271          16 :         ndr_print_struct(ndr, name, "lsa_PDAccountInfo");
    1272          16 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1273          16 :         ndr->depth++;
    1274          16 :         ndr_print_lsa_String(ndr, "name", &r->name);
    1275          16 :         ndr->depth--;
    1276             : }
    1277             : 
    1278          42 : static enum ndr_err_code ndr_push_lsa_Role(struct ndr_push *ndr, int ndr_flags, enum lsa_Role r)
    1279             : {
    1280          42 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    1281          42 :         return NDR_ERR_SUCCESS;
    1282             : }
    1283             : 
    1284          36 : static enum ndr_err_code ndr_pull_lsa_Role(struct ndr_pull *ndr, int ndr_flags, enum lsa_Role *r)
    1285             : {
    1286             :         uint32_t v;
    1287          36 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    1288          36 :         *r = v;
    1289          36 :         return NDR_ERR_SUCCESS;
    1290             : }
    1291             : 
    1292          16 : _PUBLIC_ void ndr_print_lsa_Role(struct ndr_print *ndr, const char *name, enum lsa_Role r)
    1293             : {
    1294          16 :         const char *val = NULL;
    1295             : 
    1296          16 :         switch (r) {
    1297           0 :                 case LSA_ROLE_BACKUP: val = "LSA_ROLE_BACKUP"; break;
    1298          16 :                 case LSA_ROLE_PRIMARY: val = "LSA_ROLE_PRIMARY"; break;
    1299             :         }
    1300          16 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1301          16 : }
    1302             : 
    1303          42 : static enum ndr_err_code ndr_push_lsa_ServerRole(struct ndr_push *ndr, int ndr_flags, const struct lsa_ServerRole *r)
    1304             : {
    1305          42 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1306          42 :         if (ndr_flags & NDR_SCALARS) {
    1307          42 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    1308          42 :                 NDR_CHECK(ndr_push_lsa_Role(ndr, NDR_SCALARS, r->role));
    1309          42 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    1310             :         }
    1311          42 :         if (ndr_flags & NDR_BUFFERS) {
    1312             :         }
    1313          42 :         return NDR_ERR_SUCCESS;
    1314             : }
    1315             : 
    1316          36 : static enum ndr_err_code ndr_pull_lsa_ServerRole(struct ndr_pull *ndr, int ndr_flags, struct lsa_ServerRole *r)
    1317             : {
    1318          36 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1319          36 :         if (ndr_flags & NDR_SCALARS) {
    1320          36 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    1321          36 :                 NDR_CHECK(ndr_pull_lsa_Role(ndr, NDR_SCALARS, &r->role));
    1322          36 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    1323             :         }
    1324          36 :         if (ndr_flags & NDR_BUFFERS) {
    1325             :         }
    1326          36 :         return NDR_ERR_SUCCESS;
    1327             : }
    1328             : 
    1329          16 : _PUBLIC_ void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, const struct lsa_ServerRole *r)
    1330             : {
    1331          16 :         ndr_print_struct(ndr, name, "lsa_ServerRole");
    1332          16 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1333          16 :         ndr->depth++;
    1334          16 :         ndr_print_lsa_Role(ndr, "role", r->role);
    1335          16 :         ndr->depth--;
    1336             : }
    1337             : 
    1338          84 : static enum ndr_err_code ndr_push_lsa_ReplicaSourceInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ReplicaSourceInfo *r)
    1339             : {
    1340          84 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1341          84 :         if (ndr_flags & NDR_SCALARS) {
    1342          42 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1343          42 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->source));
    1344          42 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account));
    1345          42 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1346             :         }
    1347          84 :         if (ndr_flags & NDR_BUFFERS) {
    1348          42 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->source));
    1349          42 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account));
    1350             :         }
    1351          84 :         return NDR_ERR_SUCCESS;
    1352             : }
    1353             : 
    1354          72 : static enum ndr_err_code ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ReplicaSourceInfo *r)
    1355             : {
    1356          72 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1357          72 :         if (ndr_flags & NDR_SCALARS) {
    1358          36 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1359          36 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->source));
    1360          36 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account));
    1361          36 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1362             :         }
    1363          72 :         if (ndr_flags & NDR_BUFFERS) {
    1364          36 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->source));
    1365          36 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account));
    1366             :         }
    1367          72 :         return NDR_ERR_SUCCESS;
    1368             : }
    1369             : 
    1370          16 : _PUBLIC_ void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print *ndr, const char *name, const struct lsa_ReplicaSourceInfo *r)
    1371             : {
    1372          16 :         ndr_print_struct(ndr, name, "lsa_ReplicaSourceInfo");
    1373          16 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1374          16 :         ndr->depth++;
    1375          16 :         ndr_print_lsa_String(ndr, "source", &r->source);
    1376          16 :         ndr_print_lsa_String(ndr, "account", &r->account);
    1377          16 :         ndr->depth--;
    1378             : }
    1379             : 
    1380          42 : static enum ndr_err_code ndr_push_lsa_DefaultQuotaInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DefaultQuotaInfo *r)
    1381             : {
    1382          42 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1383          42 :         if (ndr_flags & NDR_SCALARS) {
    1384          42 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    1385          42 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->paged_pool));
    1386          42 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->non_paged_pool));
    1387          42 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->min_wss));
    1388          42 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_wss));
    1389          42 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagefile));
    1390          42 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown));
    1391          42 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    1392             :         }
    1393          42 :         if (ndr_flags & NDR_BUFFERS) {
    1394             :         }
    1395          42 :         return NDR_ERR_SUCCESS;
    1396             : }
    1397             : 
    1398          36 : static enum ndr_err_code ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DefaultQuotaInfo *r)
    1399             : {
    1400          36 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1401          36 :         if (ndr_flags & NDR_SCALARS) {
    1402          36 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    1403          36 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->paged_pool));
    1404          36 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->non_paged_pool));
    1405          36 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->min_wss));
    1406          36 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_wss));
    1407          36 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagefile));
    1408          36 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown));
    1409          36 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    1410             :         }
    1411          36 :         if (ndr_flags & NDR_BUFFERS) {
    1412             :         }
    1413          36 :         return NDR_ERR_SUCCESS;
    1414             : }
    1415             : 
    1416          16 : _PUBLIC_ void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print *ndr, const char *name, const struct lsa_DefaultQuotaInfo *r)
    1417             : {
    1418          16 :         ndr_print_struct(ndr, name, "lsa_DefaultQuotaInfo");
    1419          16 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1420          16 :         ndr->depth++;
    1421          16 :         ndr_print_uint32(ndr, "paged_pool", r->paged_pool);
    1422          16 :         ndr_print_uint32(ndr, "non_paged_pool", r->non_paged_pool);
    1423          16 :         ndr_print_uint32(ndr, "min_wss", r->min_wss);
    1424          16 :         ndr_print_uint32(ndr, "max_wss", r->max_wss);
    1425          16 :         ndr_print_uint32(ndr, "pagefile", r->pagefile);
    1426          16 :         ndr_print_hyper(ndr, "unknown", r->unknown);
    1427          16 :         ndr->depth--;
    1428             : }
    1429             : 
    1430           0 : static enum ndr_err_code ndr_push_lsa_ModificationInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ModificationInfo *r)
    1431             : {
    1432           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1433           0 :         if (ndr_flags & NDR_SCALARS) {
    1434           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    1435           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->modified_id));
    1436           0 :                 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->db_create_time));
    1437           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    1438             :         }
    1439           0 :         if (ndr_flags & NDR_BUFFERS) {
    1440             :         }
    1441           0 :         return NDR_ERR_SUCCESS;
    1442             : }
    1443             : 
    1444           0 : static enum ndr_err_code ndr_pull_lsa_ModificationInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ModificationInfo *r)
    1445             : {
    1446           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1447           0 :         if (ndr_flags & NDR_SCALARS) {
    1448           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    1449           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->modified_id));
    1450           0 :                 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->db_create_time));
    1451           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    1452             :         }
    1453           0 :         if (ndr_flags & NDR_BUFFERS) {
    1454             :         }
    1455           0 :         return NDR_ERR_SUCCESS;
    1456             : }
    1457             : 
    1458           0 : _PUBLIC_ void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *name, const struct lsa_ModificationInfo *r)
    1459             : {
    1460           0 :         ndr_print_struct(ndr, name, "lsa_ModificationInfo");
    1461           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1462           0 :         ndr->depth++;
    1463           0 :         ndr_print_hyper(ndr, "modified_id", r->modified_id);
    1464           0 :         ndr_print_NTTIME_hyper(ndr, "db_create_time", r->db_create_time);
    1465           0 :         ndr->depth--;
    1466             : }
    1467             : 
    1468           0 : static enum ndr_err_code ndr_push_lsa_AuditFullSetInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullSetInfo *r)
    1469             : {
    1470           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1471           0 :         if (ndr_flags & NDR_SCALARS) {
    1472           0 :                 NDR_CHECK(ndr_push_align(ndr, 1));
    1473           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full));
    1474           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    1475             :         }
    1476           0 :         if (ndr_flags & NDR_BUFFERS) {
    1477             :         }
    1478           0 :         return NDR_ERR_SUCCESS;
    1479             : }
    1480             : 
    1481           0 : static enum ndr_err_code ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullSetInfo *r)
    1482             : {
    1483           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1484           0 :         if (ndr_flags & NDR_SCALARS) {
    1485           0 :                 NDR_CHECK(ndr_pull_align(ndr, 1));
    1486           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full));
    1487           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    1488             :         }
    1489           0 :         if (ndr_flags & NDR_BUFFERS) {
    1490             :         }
    1491           0 :         return NDR_ERR_SUCCESS;
    1492             : }
    1493             : 
    1494           0 : _PUBLIC_ void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullSetInfo *r)
    1495             : {
    1496           0 :         ndr_print_struct(ndr, name, "lsa_AuditFullSetInfo");
    1497           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1498           0 :         ndr->depth++;
    1499           0 :         ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full);
    1500           0 :         ndr->depth--;
    1501             : }
    1502             : 
    1503           0 : static enum ndr_err_code ndr_push_lsa_AuditFullQueryInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullQueryInfo *r)
    1504             : {
    1505           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1506           0 :         if (ndr_flags & NDR_SCALARS) {
    1507           0 :                 NDR_CHECK(ndr_push_align(ndr, 1));
    1508           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full));
    1509           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->log_is_full));
    1510           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    1511             :         }
    1512           0 :         if (ndr_flags & NDR_BUFFERS) {
    1513             :         }
    1514           0 :         return NDR_ERR_SUCCESS;
    1515             : }
    1516             : 
    1517           0 : static enum ndr_err_code ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullQueryInfo *r)
    1518             : {
    1519           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1520           0 :         if (ndr_flags & NDR_SCALARS) {
    1521           0 :                 NDR_CHECK(ndr_pull_align(ndr, 1));
    1522           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full));
    1523           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->log_is_full));
    1524           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    1525             :         }
    1526           0 :         if (ndr_flags & NDR_BUFFERS) {
    1527             :         }
    1528           0 :         return NDR_ERR_SUCCESS;
    1529             : }
    1530             : 
    1531           0 : _PUBLIC_ void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullQueryInfo *r)
    1532             : {
    1533           0 :         ndr_print_struct(ndr, name, "lsa_AuditFullQueryInfo");
    1534           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1535           0 :         ndr->depth++;
    1536           0 :         ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full);
    1537           0 :         ndr_print_uint8(ndr, "log_is_full", r->log_is_full);
    1538           0 :         ndr->depth--;
    1539             : }
    1540             : 
    1541        2488 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_DnsDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DnsDomainInfo *r)
    1542             : {
    1543        2488 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1544        2488 :         if (ndr_flags & NDR_SCALARS) {
    1545        1244 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1546        1244 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
    1547        1244 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain));
    1548        1244 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forest));
    1549        1244 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
    1550        1244 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    1551        1244 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1552             :         }
    1553        2488 :         if (ndr_flags & NDR_BUFFERS) {
    1554        1244 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
    1555        1244 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain));
    1556        1244 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forest));
    1557        1244 :                 if (r->sid) {
    1558        1244 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    1559             :                 }
    1560             :         }
    1561        2268 :         return NDR_ERR_SUCCESS;
    1562             : }
    1563             : 
    1564        7984 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_DnsDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DnsDomainInfo *r)
    1565             : {
    1566             :         uint32_t _ptr_sid;
    1567        7984 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    1568        7984 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1569        7984 :         if (ndr_flags & NDR_SCALARS) {
    1570        3992 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1571        3992 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
    1572        3992 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain));
    1573        3992 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forest));
    1574        3992 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
    1575        3992 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    1576        3992 :                 if (_ptr_sid) {
    1577        3988 :                         NDR_PULL_ALLOC(ndr, r->sid);
    1578             :                 } else {
    1579           4 :                         r->sid = NULL;
    1580             :                 }
    1581        3992 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1582             :         }
    1583        7984 :         if (ndr_flags & NDR_BUFFERS) {
    1584        3992 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
    1585        3992 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain));
    1586        3992 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forest));
    1587        3992 :                 if (r->sid) {
    1588        3988 :                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1589        3988 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    1590        3988 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    1591        3988 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    1592             :                 }
    1593             :         }
    1594        7800 :         return NDR_ERR_SUCCESS;
    1595             : }
    1596             : 
    1597           0 : static void ndr_print_flags_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *name, int unused, const struct lsa_DnsDomainInfo *r)
    1598             : {
    1599           0 :         ndr_print_lsa_DnsDomainInfo(ndr, name, r);
    1600           0 : }
    1601             : 
    1602         370 : _PUBLIC_ void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DnsDomainInfo *r)
    1603             : {
    1604         370 :         ndr_print_struct(ndr, name, "lsa_DnsDomainInfo");
    1605         370 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1606         370 :         ndr->depth++;
    1607         370 :         ndr_print_lsa_StringLarge(ndr, "name", &r->name);
    1608         370 :         ndr_print_lsa_StringLarge(ndr, "dns_domain", &r->dns_domain);
    1609         370 :         ndr_print_lsa_StringLarge(ndr, "dns_forest", &r->dns_forest);
    1610         370 :         ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
    1611         370 :         ndr_print_ptr(ndr, "sid", r->sid);
    1612         370 :         ndr->depth++;
    1613         370 :         if (r->sid) {
    1614         370 :                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    1615             :         }
    1616         370 :         ndr->depth--;
    1617         370 :         ndr->depth--;
    1618             : }
    1619             : 
    1620        2943 : static enum ndr_err_code ndr_push_lsa_PolicyInfo(struct ndr_push *ndr, int ndr_flags, enum lsa_PolicyInfo r)
    1621             : {
    1622        3125 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
    1623        2943 :         return NDR_ERR_SUCCESS;
    1624             : }
    1625             : 
    1626        2767 : static enum ndr_err_code ndr_pull_lsa_PolicyInfo(struct ndr_pull *ndr, int ndr_flags, enum lsa_PolicyInfo *r)
    1627             : {
    1628             :         uint16_t v;
    1629        2949 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
    1630        2949 :         *r = v;
    1631        2767 :         return NDR_ERR_SUCCESS;
    1632             : }
    1633             : 
    1634           2 : _PUBLIC_ void ndr_print_lsa_PolicyInfo(struct ndr_print *ndr, const char *name, enum lsa_PolicyInfo r)
    1635             : {
    1636           2 :         const char *val = NULL;
    1637             : 
    1638           2 :         switch (r) {
    1639           0 :                 case LSA_POLICY_INFO_AUDIT_LOG: val = "LSA_POLICY_INFO_AUDIT_LOG"; break;
    1640           0 :                 case LSA_POLICY_INFO_AUDIT_EVENTS: val = "LSA_POLICY_INFO_AUDIT_EVENTS"; break;
    1641           0 :                 case LSA_POLICY_INFO_DOMAIN: val = "LSA_POLICY_INFO_DOMAIN"; break;
    1642           0 :                 case LSA_POLICY_INFO_PD: val = "LSA_POLICY_INFO_PD"; break;
    1643           2 :                 case LSA_POLICY_INFO_ACCOUNT_DOMAIN: val = "LSA_POLICY_INFO_ACCOUNT_DOMAIN"; break;
    1644           0 :                 case LSA_POLICY_INFO_ROLE: val = "LSA_POLICY_INFO_ROLE"; break;
    1645           0 :                 case LSA_POLICY_INFO_REPLICA: val = "LSA_POLICY_INFO_REPLICA"; break;
    1646           0 :                 case LSA_POLICY_INFO_QUOTA: val = "LSA_POLICY_INFO_QUOTA"; break;
    1647           0 :                 case LSA_POLICY_INFO_MOD: val = "LSA_POLICY_INFO_MOD"; break;
    1648           0 :                 case LSA_POLICY_INFO_AUDIT_FULL_SET: val = "LSA_POLICY_INFO_AUDIT_FULL_SET"; break;
    1649           0 :                 case LSA_POLICY_INFO_AUDIT_FULL_QUERY: val = "LSA_POLICY_INFO_AUDIT_FULL_QUERY"; break;
    1650           0 :                 case LSA_POLICY_INFO_DNS: val = "LSA_POLICY_INFO_DNS"; break;
    1651           0 :                 case LSA_POLICY_INFO_DNS_INT: val = "LSA_POLICY_INFO_DNS_INT"; break;
    1652           0 :                 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: val = "LSA_POLICY_INFO_L_ACCOUNT_DOMAIN"; break;
    1653             :         }
    1654           2 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1655           2 : }
    1656             : 
    1657        3144 : static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, int ndr_flags, const union lsa_PolicyInformation *r)
    1658             : {
    1659             :         uint32_t level;
    1660        3144 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1661        3144 :         if (ndr_flags & NDR_SCALARS) {
    1662             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1663        3144 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1664        3144 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    1665        3144 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
    1666        3144 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    1667        3144 :                 switch (level) {
    1668          42 :                         case LSA_POLICY_INFO_AUDIT_LOG: {
    1669          42 :                                 NDR_CHECK(ndr_push_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log));
    1670          42 :                         break; }
    1671             : 
    1672          42 :                         case LSA_POLICY_INFO_AUDIT_EVENTS: {
    1673          42 :                                 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr, NDR_SCALARS, &r->audit_events));
    1674          42 :                         break; }
    1675             : 
    1676         888 :                         case LSA_POLICY_INFO_DOMAIN: {
    1677         888 :                                 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain));
    1678         780 :                         break; }
    1679             : 
    1680          42 :                         case LSA_POLICY_INFO_PD: {
    1681          42 :                                 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd));
    1682          42 :                         break; }
    1683             : 
    1684         799 :                         case LSA_POLICY_INFO_ACCOUNT_DOMAIN: {
    1685         799 :                                 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain));
    1686         799 :                         break; }
    1687             : 
    1688          42 :                         case LSA_POLICY_INFO_ROLE: {
    1689          42 :                                 NDR_CHECK(ndr_push_lsa_ServerRole(ndr, NDR_SCALARS, &r->role));
    1690          42 :                         break; }
    1691             : 
    1692          42 :                         case LSA_POLICY_INFO_REPLICA: {
    1693          42 :                                 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica));
    1694          42 :                         break; }
    1695             : 
    1696          42 :                         case LSA_POLICY_INFO_QUOTA: {
    1697          42 :                                 NDR_CHECK(ndr_push_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota));
    1698          42 :                         break; }
    1699             : 
    1700           0 :                         case LSA_POLICY_INFO_MOD: {
    1701           0 :                                 NDR_CHECK(ndr_push_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->mod));
    1702           0 :                         break; }
    1703             : 
    1704           0 :                         case LSA_POLICY_INFO_AUDIT_FULL_SET: {
    1705           0 :                                 NDR_CHECK(ndr_push_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset));
    1706           0 :                         break; }
    1707             : 
    1708           0 :                         case LSA_POLICY_INFO_AUDIT_FULL_QUERY: {
    1709           0 :                                 NDR_CHECK(ndr_push_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery));
    1710           0 :                         break; }
    1711             : 
    1712        1121 :                         case LSA_POLICY_INFO_DNS: {
    1713        1121 :                                 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
    1714        1011 :                         break; }
    1715             : 
    1716          42 :                         case LSA_POLICY_INFO_DNS_INT: {
    1717          42 :                                 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
    1718          42 :                         break; }
    1719             : 
    1720          42 :                         case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: {
    1721          42 :                                 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->l_account_domain));
    1722          42 :                         break; }
    1723             : 
    1724           0 :                         default:
    1725           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    1726             :                 }
    1727           0 :         }
    1728        3144 :         if (ndr_flags & NDR_BUFFERS) {
    1729        3144 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1730             :                         /* We didn't get it above, and the token is not needed after this. */
    1731           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1732             :                 }
    1733        3144 :                 switch (level) {
    1734          42 :                         case LSA_POLICY_INFO_AUDIT_LOG:
    1735          42 :                         break;
    1736             : 
    1737          42 :                         case LSA_POLICY_INFO_AUDIT_EVENTS:
    1738          42 :                                 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr, NDR_BUFFERS, &r->audit_events));
    1739          42 :                         break;
    1740             : 
    1741         888 :                         case LSA_POLICY_INFO_DOMAIN:
    1742         888 :                                 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domain));
    1743         780 :                         break;
    1744             : 
    1745          42 :                         case LSA_POLICY_INFO_PD:
    1746          42 :                                 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr, NDR_BUFFERS, &r->pd));
    1747          42 :                         break;
    1748             : 
    1749         799 :                         case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
    1750         799 :                                 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->account_domain));
    1751         799 :                         break;
    1752             : 
    1753          42 :                         case LSA_POLICY_INFO_ROLE:
    1754          42 :                         break;
    1755             : 
    1756          42 :                         case LSA_POLICY_INFO_REPLICA:
    1757          42 :                                 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr, NDR_BUFFERS, &r->replica));
    1758          42 :                         break;
    1759             : 
    1760          42 :                         case LSA_POLICY_INFO_QUOTA:
    1761          42 :                         break;
    1762             : 
    1763           0 :                         case LSA_POLICY_INFO_MOD:
    1764           0 :                         break;
    1765             : 
    1766           0 :                         case LSA_POLICY_INFO_AUDIT_FULL_SET:
    1767           0 :                         break;
    1768             : 
    1769           0 :                         case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
    1770           0 :                         break;
    1771             : 
    1772        1121 :                         case LSA_POLICY_INFO_DNS:
    1773        1121 :                                 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
    1774        1011 :                         break;
    1775             : 
    1776          42 :                         case LSA_POLICY_INFO_DNS_INT:
    1777          42 :                                 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
    1778          42 :                         break;
    1779             : 
    1780          42 :                         case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
    1781          42 :                                 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->l_account_domain));
    1782          42 :                         break;
    1783             : 
    1784           0 :                         default:
    1785           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    1786             :                 }
    1787           0 :         }
    1788        2926 :         return NDR_ERR_SUCCESS;
    1789             : }
    1790             : 
    1791        2947 : static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, int ndr_flags, union lsa_PolicyInformation *r)
    1792             : {
    1793             :         uint32_t level;
    1794             :         uint16_t _level;
    1795        2947 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1796        2947 :         if (ndr_flags & NDR_SCALARS) {
    1797             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1798        2947 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1799        2947 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    1800        2947 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
    1801        2947 :                 if (_level != level) {
    1802           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    1803             :                 }
    1804        2947 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    1805        2947 :                 switch (level) {
    1806          36 :                         case LSA_POLICY_INFO_AUDIT_LOG: {
    1807          36 :                                 NDR_CHECK(ndr_pull_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log));
    1808          36 :                         break; }
    1809             : 
    1810          36 :                         case LSA_POLICY_INFO_AUDIT_EVENTS: {
    1811          36 :                                 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr, NDR_SCALARS, &r->audit_events));
    1812          36 :                         break; }
    1813             : 
    1814         773 :                         case LSA_POLICY_INFO_DOMAIN: {
    1815         773 :                                 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain));
    1816         683 :                         break; }
    1817             : 
    1818          36 :                         case LSA_POLICY_INFO_PD: {
    1819          36 :                                 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd));
    1820          36 :                         break; }
    1821             : 
    1822         922 :                         case LSA_POLICY_INFO_ACCOUNT_DOMAIN: {
    1823         922 :                                 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain));
    1824         922 :                         break; }
    1825             : 
    1826          36 :                         case LSA_POLICY_INFO_ROLE: {
    1827          36 :                                 NDR_CHECK(ndr_pull_lsa_ServerRole(ndr, NDR_SCALARS, &r->role));
    1828          36 :                         break; }
    1829             : 
    1830          36 :                         case LSA_POLICY_INFO_REPLICA: {
    1831          36 :                                 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica));
    1832          36 :                         break; }
    1833             : 
    1834          36 :                         case LSA_POLICY_INFO_QUOTA: {
    1835          36 :                                 NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota));
    1836          36 :                         break; }
    1837             : 
    1838           0 :                         case LSA_POLICY_INFO_MOD: {
    1839           0 :                                 NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->mod));
    1840           0 :                         break; }
    1841             : 
    1842           0 :                         case LSA_POLICY_INFO_AUDIT_FULL_SET: {
    1843           0 :                                 NDR_CHECK(ndr_pull_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset));
    1844           0 :                         break; }
    1845             : 
    1846           0 :                         case LSA_POLICY_INFO_AUDIT_FULL_QUERY: {
    1847           0 :                                 NDR_CHECK(ndr_pull_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery));
    1848           0 :                         break; }
    1849             : 
    1850         964 :                         case LSA_POLICY_INFO_DNS: {
    1851         964 :                                 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
    1852         872 :                         break; }
    1853             : 
    1854          36 :                         case LSA_POLICY_INFO_DNS_INT: {
    1855          36 :                                 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
    1856          36 :                         break; }
    1857             : 
    1858          36 :                         case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: {
    1859          36 :                                 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->l_account_domain));
    1860          36 :                         break; }
    1861             : 
    1862           0 :                         default:
    1863           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    1864             :                 }
    1865           0 :         }
    1866        2947 :         if (ndr_flags & NDR_BUFFERS) {
    1867        2947 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1868             :                         /* We didn't get it above, and the token is not needed after this. */
    1869           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1870             :                 }
    1871        2947 :                 switch (level) {
    1872          36 :                         case LSA_POLICY_INFO_AUDIT_LOG:
    1873          36 :                         break;
    1874             : 
    1875          36 :                         case LSA_POLICY_INFO_AUDIT_EVENTS:
    1876          36 :                                 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr, NDR_BUFFERS, &r->audit_events));
    1877          36 :                         break;
    1878             : 
    1879         773 :                         case LSA_POLICY_INFO_DOMAIN:
    1880         773 :                                 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domain));
    1881         683 :                         break;
    1882             : 
    1883          36 :                         case LSA_POLICY_INFO_PD:
    1884          36 :                                 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_BUFFERS, &r->pd));
    1885          36 :                         break;
    1886             : 
    1887         922 :                         case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
    1888         922 :                                 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->account_domain));
    1889         922 :                         break;
    1890             : 
    1891          36 :                         case LSA_POLICY_INFO_ROLE:
    1892          36 :                         break;
    1893             : 
    1894          36 :                         case LSA_POLICY_INFO_REPLICA:
    1895          36 :                                 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_BUFFERS, &r->replica));
    1896          36 :                         break;
    1897             : 
    1898          36 :                         case LSA_POLICY_INFO_QUOTA:
    1899          36 :                         break;
    1900             : 
    1901           0 :                         case LSA_POLICY_INFO_MOD:
    1902           0 :                         break;
    1903             : 
    1904           0 :                         case LSA_POLICY_INFO_AUDIT_FULL_SET:
    1905           0 :                         break;
    1906             : 
    1907           0 :                         case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
    1908           0 :                         break;
    1909             : 
    1910         964 :                         case LSA_POLICY_INFO_DNS:
    1911         964 :                                 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
    1912         872 :                         break;
    1913             : 
    1914          36 :                         case LSA_POLICY_INFO_DNS_INT:
    1915          36 :                                 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
    1916          36 :                         break;
    1917             : 
    1918          36 :                         case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
    1919          36 :                                 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->l_account_domain));
    1920          36 :                         break;
    1921             : 
    1922           0 :                         default:
    1923           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    1924             :                 }
    1925           0 :         }
    1926        2765 :         return NDR_ERR_SUCCESS;
    1927             : }
    1928             : 
    1929         680 : _PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char *name, const union lsa_PolicyInformation *r)
    1930             : {
    1931             :         uint32_t level;
    1932         680 :         level = ndr_print_steal_switch_value(ndr, r);
    1933         680 :         ndr_print_union(ndr, name, level, "lsa_PolicyInformation");
    1934         680 :         switch (level) {
    1935          16 :                 case LSA_POLICY_INFO_AUDIT_LOG:
    1936          16 :                         ndr_print_lsa_AuditLogInfo(ndr, "audit_log", &r->audit_log);
    1937          16 :                 break;
    1938             : 
    1939          16 :                 case LSA_POLICY_INFO_AUDIT_EVENTS:
    1940          16 :                         ndr_print_lsa_AuditEventsInfo(ndr, "audit_events", &r->audit_events);
    1941          16 :                 break;
    1942             : 
    1943         268 :                 case LSA_POLICY_INFO_DOMAIN:
    1944         268 :                         ndr_print_lsa_DomainInfo(ndr, "domain", &r->domain);
    1945         268 :                 break;
    1946             : 
    1947          16 :                 case LSA_POLICY_INFO_PD:
    1948          16 :                         ndr_print_lsa_PDAccountInfo(ndr, "pd", &r->pd);
    1949          16 :                 break;
    1950             : 
    1951          18 :                 case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
    1952          18 :                         ndr_print_lsa_DomainInfo(ndr, "account_domain", &r->account_domain);
    1953          18 :                 break;
    1954             : 
    1955          16 :                 case LSA_POLICY_INFO_ROLE:
    1956          16 :                         ndr_print_lsa_ServerRole(ndr, "role", &r->role);
    1957          16 :                 break;
    1958             : 
    1959          16 :                 case LSA_POLICY_INFO_REPLICA:
    1960          16 :                         ndr_print_lsa_ReplicaSourceInfo(ndr, "replica", &r->replica);
    1961          16 :                 break;
    1962             : 
    1963          16 :                 case LSA_POLICY_INFO_QUOTA:
    1964          16 :                         ndr_print_lsa_DefaultQuotaInfo(ndr, "quota", &r->quota);
    1965          16 :                 break;
    1966             : 
    1967           0 :                 case LSA_POLICY_INFO_MOD:
    1968           0 :                         ndr_print_lsa_ModificationInfo(ndr, "mod", &r->mod);
    1969           0 :                 break;
    1970             : 
    1971           0 :                 case LSA_POLICY_INFO_AUDIT_FULL_SET:
    1972           0 :                         ndr_print_lsa_AuditFullSetInfo(ndr, "auditfullset", &r->auditfullset);
    1973           0 :                 break;
    1974             : 
    1975           0 :                 case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
    1976           0 :                         ndr_print_lsa_AuditFullQueryInfo(ndr, "auditfullquery", &r->auditfullquery);
    1977           0 :                 break;
    1978             : 
    1979         266 :                 case LSA_POLICY_INFO_DNS:
    1980         266 :                         ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
    1981         266 :                 break;
    1982             : 
    1983          16 :                 case LSA_POLICY_INFO_DNS_INT:
    1984          16 :                         ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
    1985          16 :                 break;
    1986             : 
    1987          16 :                 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
    1988          16 :                         ndr_print_lsa_DomainInfo(ndr, "l_account_domain", &r->l_account_domain);
    1989          16 :                 break;
    1990             : 
    1991           0 :                 default:
    1992           0 :                         ndr_print_bad_level(ndr, name, level);
    1993             :         }
    1994         680 : }
    1995             : 
    1996       98000 : static enum ndr_err_code ndr_push_lsa_SidPtr(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidPtr *r)
    1997             : {
    1998       98000 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1999       98000 :         if (ndr_flags & NDR_SCALARS) {
    2000       49000 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2001       49000 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    2002       49000 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2003             :         }
    2004       98000 :         if (ndr_flags & NDR_BUFFERS) {
    2005       49000 :                 if (r->sid) {
    2006       49000 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    2007             :                 }
    2008             :         }
    2009       86000 :         return NDR_ERR_SUCCESS;
    2010             : }
    2011             : 
    2012       92916 : static enum ndr_err_code ndr_pull_lsa_SidPtr(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidPtr *r)
    2013             : {
    2014             :         uint32_t _ptr_sid;
    2015       92916 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    2016       92916 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2017       92916 :         if (ndr_flags & NDR_SCALARS) {
    2018       46458 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2019       46458 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    2020       46458 :                 if (_ptr_sid) {
    2021       46458 :                         NDR_PULL_ALLOC(ndr, r->sid);
    2022             :                 } else {
    2023           0 :                         r->sid = NULL;
    2024             :                 }
    2025       46458 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2026             :         }
    2027       92916 :         if (ndr_flags & NDR_BUFFERS) {
    2028       46458 :                 if (r->sid) {
    2029       46458 :                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2030       46458 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    2031       46458 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    2032       46458 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    2033             :                 }
    2034             :         }
    2035       80432 :         return NDR_ERR_SUCCESS;
    2036             : }
    2037             : 
    2038         318 : _PUBLIC_ void ndr_print_lsa_SidPtr(struct ndr_print *ndr, const char *name, const struct lsa_SidPtr *r)
    2039             : {
    2040         318 :         ndr_print_struct(ndr, name, "lsa_SidPtr");
    2041         318 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2042         318 :         ndr->depth++;
    2043         318 :         ndr_print_ptr(ndr, "sid", r->sid);
    2044         318 :         ndr->depth++;
    2045         318 :         if (r->sid) {
    2046         318 :                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    2047             :         }
    2048         318 :         ndr->depth--;
    2049         318 :         ndr->depth--;
    2050             : }
    2051             : 
    2052       10760 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidArray *r)
    2053             : {
    2054             :         uint32_t cntr_sids_1;
    2055       10760 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2056       10760 :         if (ndr_flags & NDR_SCALARS) {
    2057       10760 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2058       10760 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
    2059       10760 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
    2060       10760 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2061             :         }
    2062       10760 :         if (ndr_flags & NDR_BUFFERS) {
    2063       10760 :                 if (r->sids) {
    2064        9698 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_sids));
    2065       58638 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->num_sids); cntr_sids_1++) {
    2066       49000 :                                 NDR_CHECK(ndr_push_lsa_SidPtr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    2067             :                         }
    2068       58638 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->num_sids); cntr_sids_1++) {
    2069       49000 :                                 NDR_CHECK(ndr_push_lsa_SidPtr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
    2070             :                         }
    2071             :                 }
    2072             :         }
    2073       10700 :         return NDR_ERR_SUCCESS;
    2074             : }
    2075             : 
    2076       10271 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidArray *r)
    2077             : {
    2078             :         uint32_t _ptr_sids;
    2079       10271 :         uint32_t size_sids_1 = 0;
    2080             :         uint32_t cntr_sids_1;
    2081       10271 :         TALLOC_CTX *_mem_save_sids_0 = NULL;
    2082       10271 :         TALLOC_CTX *_mem_save_sids_1 = NULL;
    2083       10271 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2084       10271 :         if (ndr_flags & NDR_SCALARS) {
    2085       10271 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2086       10271 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
    2087       10271 :                 if (r->num_sids > 20480) {
    2088           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    2089             :                 }
    2090       10271 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
    2091       10271 :                 if (_ptr_sids) {
    2092        8614 :                         NDR_PULL_ALLOC(ndr, r->sids);
    2093             :                 } else {
    2094        1657 :                         r->sids = NULL;
    2095             :                 }
    2096       10271 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2097             :         }
    2098       10271 :         if (ndr_flags & NDR_BUFFERS) {
    2099       10271 :                 if (r->sids) {
    2100        8614 :                         _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2101        8614 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    2102        8614 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
    2103        8614 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
    2104        8614 :                         NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
    2105        8614 :                         _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
    2106        8614 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    2107       55072 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    2108       46458 :                                 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    2109             :                         }
    2110       55004 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    2111       46458 :                                 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
    2112             :                         }
    2113        8614 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
    2114        8614 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
    2115             :                 }
    2116       10271 :                 if (r->sids) {
    2117        8614 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
    2118             :                 }
    2119       18713 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    2120             :                 }
    2121             :         }
    2122       10203 :         return NDR_ERR_SUCCESS;
    2123             : }
    2124             : 
    2125           0 : static void ndr_print_flags_lsa_SidArray(struct ndr_print *ndr, const char *name, int unused, const struct lsa_SidArray *r)
    2126             : {
    2127           0 :         ndr_print_lsa_SidArray(ndr, name, r);
    2128           0 : }
    2129             : 
    2130          62 : _PUBLIC_ void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, const struct lsa_SidArray *r)
    2131             : {
    2132             :         uint32_t cntr_sids_1;
    2133          62 :         ndr_print_struct(ndr, name, "lsa_SidArray");
    2134          62 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2135          62 :         ndr->depth++;
    2136          62 :         ndr_print_uint32(ndr, "num_sids", r->num_sids);
    2137          62 :         ndr_print_ptr(ndr, "sids", r->sids);
    2138          62 :         ndr->depth++;
    2139          62 :         if (r->sids) {
    2140          52 :                 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->num_sids);
    2141          52 :                 ndr->depth++;
    2142         370 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (r->num_sids); cntr_sids_1++) {
    2143         318 :                         ndr_print_lsa_SidPtr(ndr, "sids", &r->sids[cntr_sids_1]);
    2144             :                 }
    2145          52 :                 ndr->depth--;
    2146             :         }
    2147          62 :         ndr->depth--;
    2148          62 :         ndr->depth--;
    2149             : }
    2150             : 
    2151         110 : static enum ndr_err_code ndr_push_lsa_DomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainList *r)
    2152             : {
    2153             :         uint32_t cntr_domains_1;
    2154         110 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2155         110 :         if (ndr_flags & NDR_SCALARS) {
    2156         110 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2157         110 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    2158         110 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
    2159         110 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2160             :         }
    2161         110 :         if (ndr_flags & NDR_BUFFERS) {
    2162         110 :                 if (r->domains) {
    2163          60 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    2164         255 :                         for (cntr_domains_1 = 0; cntr_domains_1 < (r->count); cntr_domains_1++) {
    2165         195 :                                 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
    2166             :                         }
    2167         255 :                         for (cntr_domains_1 = 0; cntr_domains_1 < (r->count); cntr_domains_1++) {
    2168         195 :                                 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
    2169             :                         }
    2170             :                 }
    2171             :         }
    2172         105 :         return NDR_ERR_SUCCESS;
    2173             : }
    2174             : 
    2175          88 : static enum ndr_err_code ndr_pull_lsa_DomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainList *r)
    2176             : {
    2177             :         uint32_t _ptr_domains;
    2178          88 :         uint32_t size_domains_1 = 0;
    2179             :         uint32_t cntr_domains_1;
    2180          88 :         TALLOC_CTX *_mem_save_domains_0 = NULL;
    2181          88 :         TALLOC_CTX *_mem_save_domains_1 = NULL;
    2182          88 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2183          88 :         if (ndr_flags & NDR_SCALARS) {
    2184          88 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2185          88 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    2186          88 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
    2187          88 :                 if (_ptr_domains) {
    2188          48 :                         NDR_PULL_ALLOC(ndr, r->domains);
    2189             :                 } else {
    2190          40 :                         r->domains = NULL;
    2191             :                 }
    2192          88 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2193             :         }
    2194          88 :         if (ndr_flags & NDR_BUFFERS) {
    2195          88 :                 if (r->domains) {
    2196          48 :                         _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2197          48 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
    2198          48 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
    2199          48 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->domains, &size_domains_1));
    2200          48 :                         NDR_PULL_ALLOC_N(ndr, r->domains, size_domains_1);
    2201          48 :                         _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
    2202          48 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
    2203         204 :                         for (cntr_domains_1 = 0; cntr_domains_1 < (size_domains_1); cntr_domains_1++) {
    2204         156 :                                 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
    2205             :                         }
    2206         204 :                         for (cntr_domains_1 = 0; cntr_domains_1 < (size_domains_1); cntr_domains_1++) {
    2207         156 :                                 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
    2208             :                         }
    2209          48 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
    2210          48 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
    2211             :                 }
    2212          88 :                 if (r->domains) {
    2213          48 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
    2214             :                 }
    2215          88 :                 for (cntr_domains_1 = 0; cntr_domains_1 < (size_domains_1); cntr_domains_1++) {
    2216             :                 }
    2217             :         }
    2218          84 :         return NDR_ERR_SUCCESS;
    2219             : }
    2220             : 
    2221          44 : _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, const struct lsa_DomainList *r)
    2222             : {
    2223             :         uint32_t cntr_domains_1;
    2224          44 :         ndr_print_struct(ndr, name, "lsa_DomainList");
    2225          44 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2226          44 :         ndr->depth++;
    2227          44 :         ndr_print_uint32(ndr, "count", r->count);
    2228          44 :         ndr_print_ptr(ndr, "domains", r->domains);
    2229          44 :         ndr->depth++;
    2230          44 :         if (r->domains) {
    2231          24 :                 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
    2232          24 :                 ndr->depth++;
    2233         102 :                 for (cntr_domains_1 = 0; cntr_domains_1 < (r->count); cntr_domains_1++) {
    2234          78 :                         ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
    2235             :                 }
    2236          24 :                 ndr->depth--;
    2237             :         }
    2238          44 :         ndr->depth--;
    2239          44 :         ndr->depth--;
    2240             : }
    2241             : 
    2242      160470 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidType(struct ndr_push *ndr, int ndr_flags, enum lsa_SidType r)
    2243             : {
    2244      160470 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
    2245      160470 :         return NDR_ERR_SUCCESS;
    2246             : }
    2247             : 
    2248      227798 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidType(struct ndr_pull *ndr, int ndr_flags, enum lsa_SidType *r)
    2249             : {
    2250             :         uint16_t v;
    2251      227798 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
    2252      227798 :         *r = v;
    2253      227798 :         return NDR_ERR_SUCCESS;
    2254             : }
    2255             : 
    2256       31832 : _PUBLIC_ void ndr_print_lsa_SidType(struct ndr_print *ndr, const char *name, enum lsa_SidType r)
    2257             : {
    2258       31832 :         const char *val = NULL;
    2259             : 
    2260       31832 :         switch (r) {
    2261           0 :                 case SID_NAME_USE_NONE: val = "SID_NAME_USE_NONE"; break;
    2262         380 :                 case SID_NAME_USER: val = "SID_NAME_USER"; break;
    2263           2 :                 case SID_NAME_DOM_GRP: val = "SID_NAME_DOM_GRP"; break;
    2264         138 :                 case SID_NAME_DOMAIN: val = "SID_NAME_DOMAIN"; break;
    2265       31274 :                 case SID_NAME_ALIAS: val = "SID_NAME_ALIAS"; break;
    2266          34 :                 case SID_NAME_WKN_GRP: val = "SID_NAME_WKN_GRP"; break;
    2267           0 :                 case SID_NAME_DELETED: val = "SID_NAME_DELETED"; break;
    2268           0 :                 case SID_NAME_INVALID: val = "SID_NAME_INVALID"; break;
    2269           4 :                 case SID_NAME_UNKNOWN: val = "SID_NAME_UNKNOWN"; break;
    2270           0 :                 case SID_NAME_COMPUTER: val = "SID_NAME_COMPUTER"; break;
    2271           0 :                 case SID_NAME_LABEL: val = "SID_NAME_LABEL"; break;
    2272             :         }
    2273       31832 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    2274       31832 : }
    2275             : 
    2276        5190 : static enum ndr_err_code ndr_push_lsa_TranslatedSid(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid *r)
    2277             : {
    2278        5190 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2279        5190 :         if (ndr_flags & NDR_SCALARS) {
    2280        5190 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2281        5190 :                 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
    2282        5190 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    2283        5190 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
    2284        5190 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2285             :         }
    2286        5190 :         if (ndr_flags & NDR_BUFFERS) {
    2287             :         }
    2288        5190 :         return NDR_ERR_SUCCESS;
    2289             : }
    2290             : 
    2291        4941 : static enum ndr_err_code ndr_pull_lsa_TranslatedSid(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid *r)
    2292             : {
    2293        4941 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2294        4941 :         if (ndr_flags & NDR_SCALARS) {
    2295        4941 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2296        4941 :                 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
    2297        4941 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    2298        4941 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
    2299        4941 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2300             :         }
    2301        4741 :         if (ndr_flags & NDR_BUFFERS) {
    2302             :         }
    2303        4941 :         return NDR_ERR_SUCCESS;
    2304             : }
    2305             : 
    2306        1536 : _PUBLIC_ void ndr_print_lsa_TranslatedSid(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid *r)
    2307             : {
    2308        1536 :         ndr_print_struct(ndr, name, "lsa_TranslatedSid");
    2309        1536 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2310        1536 :         ndr->depth++;
    2311        1536 :         ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
    2312        1536 :         ndr_print_uint32(ndr, "rid", r->rid);
    2313        1536 :         ndr_print_uint32(ndr, "sid_index", r->sid_index);
    2314        1536 :         ndr->depth--;
    2315             : }
    2316             : 
    2317        3710 : static enum ndr_err_code ndr_push_lsa_TransSidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray *r)
    2318             : {
    2319             :         uint32_t cntr_sids_1;
    2320        3710 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2321        3710 :         if (ndr_flags & NDR_SCALARS) {
    2322        3710 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2323        3710 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    2324        3710 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
    2325        3710 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2326             :         }
    2327        3710 :         if (ndr_flags & NDR_BUFFERS) {
    2328        3710 :                 if (r->sids) {
    2329        1874 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    2330        7064 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->count); cntr_sids_1++) {
    2331        5190 :                                 NDR_CHECK(ndr_push_lsa_TranslatedSid(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    2332             :                         }
    2333             :                 }
    2334             :         }
    2335        3710 :         return NDR_ERR_SUCCESS;
    2336             : }
    2337             : 
    2338        3655 : static enum ndr_err_code ndr_pull_lsa_TransSidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray *r)
    2339             : {
    2340             :         uint32_t _ptr_sids;
    2341        3655 :         uint32_t size_sids_1 = 0;
    2342             :         uint32_t cntr_sids_1;
    2343        3655 :         TALLOC_CTX *_mem_save_sids_0 = NULL;
    2344        3655 :         TALLOC_CTX *_mem_save_sids_1 = NULL;
    2345        3655 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2346        3655 :         if (ndr_flags & NDR_SCALARS) {
    2347        3655 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2348        3655 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    2349        3655 :                 if (r->count > 1000) {
    2350           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    2351             :                 }
    2352        3655 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
    2353        3655 :                 if (_ptr_sids) {
    2354        1838 :                         NDR_PULL_ALLOC(ndr, r->sids);
    2355             :                 } else {
    2356        1817 :                         r->sids = NULL;
    2357             :                 }
    2358        3655 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2359             :         }
    2360        3655 :         if (ndr_flags & NDR_BUFFERS) {
    2361        3655 :                 if (r->sids) {
    2362        1838 :                         _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2363        1838 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    2364        1838 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
    2365        1838 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
    2366        1838 :                         NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
    2367        1838 :                         _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
    2368        1838 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    2369        6779 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    2370        4941 :                                 NDR_CHECK(ndr_pull_lsa_TranslatedSid(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    2371             :                         }
    2372        1838 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
    2373        1838 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
    2374             :                 }
    2375        3655 :                 if (r->sids) {
    2376        1838 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->sids, r->count));
    2377             :                 }
    2378             :         }
    2379        3651 :         return NDR_ERR_SUCCESS;
    2380             : }
    2381             : 
    2382         122 : _PUBLIC_ void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray *r)
    2383             : {
    2384             :         uint32_t cntr_sids_1;
    2385         122 :         ndr_print_struct(ndr, name, "lsa_TransSidArray");
    2386         122 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2387         122 :         ndr->depth++;
    2388         122 :         ndr_print_uint32(ndr, "count", r->count);
    2389         122 :         ndr_print_ptr(ndr, "sids", r->sids);
    2390         122 :         ndr->depth++;
    2391         122 :         if (r->sids) {
    2392         120 :                 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
    2393         120 :                 ndr->depth++;
    2394        1656 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (r->count); cntr_sids_1++) {
    2395        1536 :                         ndr_print_lsa_TranslatedSid(ndr, "sids", &r->sids[cntr_sids_1]);
    2396             :                 }
    2397         120 :                 ndr->depth--;
    2398             :         }
    2399         122 :         ndr->depth--;
    2400         122 :         ndr->depth--;
    2401             : }
    2402             : 
    2403       14645 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_RefDomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_RefDomainList *r)
    2404             : {
    2405             :         uint32_t cntr_domains_1;
    2406       14645 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2407       14645 :         if (ndr_flags & NDR_SCALARS) {
    2408       14645 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2409       14645 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    2410       14645 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
    2411       14645 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_size));
    2412       14645 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2413             :         }
    2414       14645 :         if (ndr_flags & NDR_BUFFERS) {
    2415       14645 :                 if (r->domains) {
    2416       14188 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    2417       28240 :                         for (cntr_domains_1 = 0; cntr_domains_1 < (r->count); cntr_domains_1++) {
    2418       14198 :                                 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
    2419             :                         }
    2420       28240 :                         for (cntr_domains_1 = 0; cntr_domains_1 < (r->count); cntr_domains_1++) {
    2421       14198 :                                 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
    2422             :                         }
    2423             :                 }
    2424             :         }
    2425       14427 :         return NDR_ERR_SUCCESS;
    2426             : }
    2427             : 
    2428       11926 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_RefDomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_RefDomainList *r)
    2429             : {
    2430             :         uint32_t _ptr_domains;
    2431       11926 :         uint32_t size_domains_1 = 0;
    2432             :         uint32_t cntr_domains_1;
    2433       11926 :         TALLOC_CTX *_mem_save_domains_0 = NULL;
    2434       11926 :         TALLOC_CTX *_mem_save_domains_1 = NULL;
    2435       11926 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2436       11926 :         if (ndr_flags & NDR_SCALARS) {
    2437       11926 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2438       11926 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    2439       11926 :                 if (r->count > 1000) {
    2440           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    2441             :                 }
    2442       11926 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
    2443       11926 :                 if (_ptr_domains) {
    2444       11534 :                         NDR_PULL_ALLOC(ndr, r->domains);
    2445             :                 } else {
    2446         392 :                         r->domains = NULL;
    2447             :                 }
    2448       11926 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_size));
    2449       11926 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2450             :         }
    2451       11926 :         if (ndr_flags & NDR_BUFFERS) {
    2452       11926 :                 if (r->domains) {
    2453       11534 :                         _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2454       11534 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
    2455       11534 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
    2456       11534 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->domains, &size_domains_1));
    2457       11534 :                         NDR_PULL_ALLOC_N(ndr, r->domains, size_domains_1);
    2458       11534 :                         _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
    2459       11534 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
    2460       23096 :                         for (cntr_domains_1 = 0; cntr_domains_1 < (size_domains_1); cntr_domains_1++) {
    2461       11562 :                                 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
    2462             :                         }
    2463       22966 :                         for (cntr_domains_1 = 0; cntr_domains_1 < (size_domains_1); cntr_domains_1++) {
    2464       11562 :                                 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
    2465             :                         }
    2466       11534 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
    2467       11534 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
    2468             :                 }
    2469       11926 :                 if (r->domains) {
    2470       11534 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
    2471             :                 }
    2472       12500 :                 for (cntr_domains_1 = 0; cntr_domains_1 < (size_domains_1); cntr_domains_1++) {
    2473             :                 }
    2474             :         }
    2475       11736 :         return NDR_ERR_SUCCESS;
    2476             : }
    2477             : 
    2478           0 : static void ndr_print_flags_lsa_RefDomainList(struct ndr_print *ndr, const char *name, int unused, const struct lsa_RefDomainList *r)
    2479             : {
    2480           0 :         ndr_print_lsa_RefDomainList(ndr, name, r);
    2481           0 : }
    2482             : 
    2483         982 : _PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *name, const struct lsa_RefDomainList *r)
    2484             : {
    2485             :         uint32_t cntr_domains_1;
    2486         982 :         ndr_print_struct(ndr, name, "lsa_RefDomainList");
    2487         982 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2488         982 :         ndr->depth++;
    2489         982 :         ndr_print_uint32(ndr, "count", r->count);
    2490         982 :         ndr_print_ptr(ndr, "domains", r->domains);
    2491         982 :         ndr->depth++;
    2492         982 :         if (r->domains) {
    2493         834 :                 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
    2494         834 :                 ndr->depth++;
    2495        1686 :                 for (cntr_domains_1 = 0; cntr_domains_1 < (r->count); cntr_domains_1++) {
    2496         852 :                         ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
    2497             :                 }
    2498         834 :                 ndr->depth--;
    2499             :         }
    2500         982 :         ndr->depth--;
    2501         982 :         ndr_print_uint32(ndr, "max_size", r->max_size);
    2502         982 :         ndr->depth--;
    2503             : }
    2504             : 
    2505       11271 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNamesLevel(struct ndr_push *ndr, int ndr_flags, enum lsa_LookupNamesLevel r)
    2506             : {
    2507       11271 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
    2508       11271 :         return NDR_ERR_SUCCESS;
    2509             : }
    2510             : 
    2511       10360 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNamesLevel(struct ndr_pull *ndr, int ndr_flags, enum lsa_LookupNamesLevel *r)
    2512             : {
    2513             :         uint16_t v;
    2514       10360 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
    2515       10360 :         *r = v;
    2516       10360 :         return NDR_ERR_SUCCESS;
    2517             : }
    2518             : 
    2519          12 : _PUBLIC_ void ndr_print_lsa_LookupNamesLevel(struct ndr_print *ndr, const char *name, enum lsa_LookupNamesLevel r)
    2520             : {
    2521          12 :         const char *val = NULL;
    2522             : 
    2523          12 :         switch (r) {
    2524          12 :                 case LSA_LOOKUP_NAMES_ALL: val = "LSA_LOOKUP_NAMES_ALL"; break;
    2525           0 :                 case LSA_LOOKUP_NAMES_DOMAINS_ONLY: val = "LSA_LOOKUP_NAMES_DOMAINS_ONLY"; break;
    2526           0 :                 case LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY: val = "LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY"; break;
    2527           0 :                 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY: val = "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY"; break;
    2528           0 :                 case LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY: val = "LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY"; break;
    2529           0 :                 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2: val = "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2"; break;
    2530           0 :                 case LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC: val = "LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC"; break;
    2531             :         }
    2532          12 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    2533          12 : }
    2534             : 
    2535       18728 : static enum ndr_err_code ndr_push_lsa_TranslatedName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName *r)
    2536             : {
    2537       18728 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2538       18728 :         if (ndr_flags & NDR_SCALARS) {
    2539        9364 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2540        9364 :                 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
    2541        9364 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
    2542        9364 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
    2543        9364 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2544             :         }
    2545       18728 :         if (ndr_flags & NDR_BUFFERS) {
    2546        9364 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
    2547             :         }
    2548       18728 :         return NDR_ERR_SUCCESS;
    2549             : }
    2550             : 
    2551       22336 : static enum ndr_err_code ndr_pull_lsa_TranslatedName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName *r)
    2552             : {
    2553       22336 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2554       22336 :         if (ndr_flags & NDR_SCALARS) {
    2555       11168 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2556       11168 :                 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
    2557       11168 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
    2558       11168 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
    2559       11168 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2560             :         }
    2561       22336 :         if (ndr_flags & NDR_BUFFERS) {
    2562       11168 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
    2563             :         }
    2564       21936 :         return NDR_ERR_SUCCESS;
    2565             : }
    2566             : 
    2567        1414 : _PUBLIC_ void ndr_print_lsa_TranslatedName(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName *r)
    2568             : {
    2569        1414 :         ndr_print_struct(ndr, name, "lsa_TranslatedName");
    2570        1414 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2571        1414 :         ndr->depth++;
    2572        1414 :         ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
    2573        1414 :         ndr_print_lsa_String(ndr, "name", &r->name);
    2574        1414 :         ndr_print_uint32(ndr, "sid_index", r->sid_index);
    2575        1414 :         ndr->depth--;
    2576             : }
    2577             : 
    2578       15361 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_TransNameArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray *r)
    2579             : {
    2580             :         uint32_t cntr_names_1;
    2581       15361 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2582       15361 :         if (ndr_flags & NDR_SCALARS) {
    2583       15361 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2584       15361 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    2585       15361 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
    2586       15361 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2587             :         }
    2588       15361 :         if (ndr_flags & NDR_BUFFERS) {
    2589       15361 :                 if (r->names) {
    2590        7140 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    2591       16504 :                         for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    2592        9364 :                                 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
    2593             :                         }
    2594       16504 :                         for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    2595        9364 :                                 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
    2596             :                         }
    2597             :                 }
    2598             :         }
    2599       15361 :         return NDR_ERR_SUCCESS;
    2600             : }
    2601             : 
    2602       15870 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TransNameArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray *r)
    2603             : {
    2604             :         uint32_t _ptr_names;
    2605       15870 :         uint32_t size_names_1 = 0;
    2606             :         uint32_t cntr_names_1;
    2607       15870 :         TALLOC_CTX *_mem_save_names_0 = NULL;
    2608       15870 :         TALLOC_CTX *_mem_save_names_1 = NULL;
    2609       15870 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2610       15870 :         if (ndr_flags & NDR_SCALARS) {
    2611       15870 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2612       15870 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    2613       15870 :                 if (r->count > 20480) {
    2614           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    2615             :                 }
    2616       15870 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
    2617       15870 :                 if (_ptr_names) {
    2618        8934 :                         NDR_PULL_ALLOC(ndr, r->names);
    2619             :                 } else {
    2620        6936 :                         r->names = NULL;
    2621             :                 }
    2622       15870 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2623             :         }
    2624       15870 :         if (ndr_flags & NDR_BUFFERS) {
    2625       15870 :                 if (r->names) {
    2626        8934 :                         _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2627        8934 :                         NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
    2628        8934 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
    2629        8934 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->names, &size_names_1));
    2630        8934 :                         NDR_PULL_ALLOC_N(ndr, r->names, size_names_1);
    2631        8934 :                         _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
    2632        8934 :                         NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
    2633       20102 :                         for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    2634       11168 :                                 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
    2635             :                         }
    2636       20100 :                         for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    2637       11168 :                                 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
    2638             :                         }
    2639        8934 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
    2640        8934 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
    2641             :                 }
    2642       15870 :                 if (r->names) {
    2643        8934 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
    2644             :                 }
    2645       16680 :                 for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    2646             :                 }
    2647             :         }
    2648       15866 :         return NDR_ERR_SUCCESS;
    2649             : }
    2650             : 
    2651           0 : static void ndr_print_flags_lsa_TransNameArray(struct ndr_print *ndr, const char *name, int unused, const struct lsa_TransNameArray *r)
    2652             : {
    2653           0 :         ndr_print_lsa_TransNameArray(ndr, name, r);
    2654           0 : }
    2655             : 
    2656         416 : _PUBLIC_ void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray *r)
    2657             : {
    2658             :         uint32_t cntr_names_1;
    2659         416 :         ndr_print_struct(ndr, name, "lsa_TransNameArray");
    2660         416 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2661         416 :         ndr->depth++;
    2662         416 :         ndr_print_uint32(ndr, "count", r->count);
    2663         416 :         ndr_print_ptr(ndr, "names", r->names);
    2664         416 :         ndr->depth++;
    2665         416 :         if (r->names) {
    2666         414 :                 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
    2667         414 :                 ndr->depth++;
    2668        1828 :                 for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    2669        1414 :                         ndr_print_lsa_TranslatedName(ndr, "names", &r->names[cntr_names_1]);
    2670             :                 }
    2671         414 :                 ndr->depth--;
    2672             :         }
    2673         416 :         ndr->depth--;
    2674         416 :         ndr->depth--;
    2675             : }
    2676             : 
    2677         338 : static enum ndr_err_code ndr_push_lsa_LUIDAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUIDAttribute *r)
    2678             : {
    2679         338 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2680         338 :         if (ndr_flags & NDR_SCALARS) {
    2681         338 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2682         338 :                 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
    2683         338 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attribute));
    2684         338 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2685             :         }
    2686         338 :         if (ndr_flags & NDR_BUFFERS) {
    2687             :         }
    2688         338 :         return NDR_ERR_SUCCESS;
    2689             : }
    2690             : 
    2691         306 : static enum ndr_err_code ndr_pull_lsa_LUIDAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUIDAttribute *r)
    2692             : {
    2693         306 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2694         306 :         if (ndr_flags & NDR_SCALARS) {
    2695         306 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2696         306 :                 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
    2697         306 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attribute));
    2698         306 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2699             :         }
    2700         306 :         if (ndr_flags & NDR_BUFFERS) {
    2701             :         }
    2702         306 :         return NDR_ERR_SUCCESS;
    2703             : }
    2704             : 
    2705          64 : _PUBLIC_ void ndr_print_lsa_LUIDAttribute(struct ndr_print *ndr, const char *name, const struct lsa_LUIDAttribute *r)
    2706             : {
    2707          64 :         ndr_print_struct(ndr, name, "lsa_LUIDAttribute");
    2708          64 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2709          64 :         ndr->depth++;
    2710          64 :         ndr_print_lsa_LUID(ndr, "luid", &r->luid);
    2711          64 :         ndr_print_uint32(ndr, "attribute", r->attribute);
    2712          64 :         ndr->depth--;
    2713             : }
    2714             : 
    2715         118 : static enum ndr_err_code ndr_push_lsa_PrivilegeSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivilegeSet *r)
    2716             : {
    2717             :         uint32_t cntr_set_0;
    2718         118 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2719         118 :         if (ndr_flags & NDR_SCALARS) {
    2720         118 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    2721         118 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2722         118 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    2723         118 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
    2724         456 :                 for (cntr_set_0 = 0; cntr_set_0 < (r->count); cntr_set_0++) {
    2725         338 :                         NDR_CHECK(ndr_push_lsa_LUIDAttribute(ndr, NDR_SCALARS, &r->set[cntr_set_0]));
    2726             :                 }
    2727         118 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2728             :         }
    2729         118 :         if (ndr_flags & NDR_BUFFERS) {
    2730             :         }
    2731         118 :         return NDR_ERR_SUCCESS;
    2732             : }
    2733             : 
    2734         112 : static enum ndr_err_code ndr_pull_lsa_PrivilegeSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivilegeSet *r)
    2735             : {
    2736         112 :         uint32_t size_set_0 = 0;
    2737             :         uint32_t cntr_set_0;
    2738         112 :         TALLOC_CTX *_mem_save_set_0 = NULL;
    2739         112 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2740         112 :         if (ndr_flags & NDR_SCALARS) {
    2741         112 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->set));
    2742         112 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2743         112 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    2744         112 :                 if (r->count > 1000) {
    2745           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    2746             :                 }
    2747         112 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
    2748         112 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->set, &size_set_0));
    2749         112 :                 NDR_PULL_ALLOC_N(ndr, r->set, size_set_0);
    2750         112 :                 _mem_save_set_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2751         112 :                 NDR_PULL_SET_MEM_CTX(ndr, r->set, 0);
    2752         418 :                 for (cntr_set_0 = 0; cntr_set_0 < (size_set_0); cntr_set_0++) {
    2753         306 :                         NDR_CHECK(ndr_pull_lsa_LUIDAttribute(ndr, NDR_SCALARS, &r->set[cntr_set_0]));
    2754             :                 }
    2755         112 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_set_0, 0);
    2756         112 :                 if (r->set) {
    2757         112 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->set, r->count));
    2758             :                 }
    2759         112 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2760             :         }
    2761         112 :         if (ndr_flags & NDR_BUFFERS) {
    2762             :         }
    2763         112 :         return NDR_ERR_SUCCESS;
    2764             : }
    2765             : 
    2766          12 : _PUBLIC_ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name, const struct lsa_PrivilegeSet *r)
    2767             : {
    2768             :         uint32_t cntr_set_0;
    2769          12 :         ndr_print_struct(ndr, name, "lsa_PrivilegeSet");
    2770          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2771          12 :         ndr->depth++;
    2772          12 :         ndr_print_uint32(ndr, "count", r->count);
    2773          12 :         ndr_print_uint32(ndr, "unknown", r->unknown);
    2774          12 :         ndr->print(ndr, "%s: ARRAY(%d)", "set", (int)r->count);
    2775          12 :         ndr->depth++;
    2776          76 :         for (cntr_set_0 = 0; cntr_set_0 < (r->count); cntr_set_0++) {
    2777          64 :                 ndr_print_lsa_LUIDAttribute(ndr, "set", &r->set[cntr_set_0]);
    2778             :         }
    2779          12 :         ndr->depth--;
    2780          12 :         ndr->depth--;
    2781             : }
    2782             : 
    2783        4710 : static enum ndr_err_code ndr_push_lsa_DATA_BUF(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF *r)
    2784             : {
    2785             :         {
    2786        4710 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2787        4710 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2788        4710 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2789        4710 :                 if (ndr_flags & NDR_SCALARS) {
    2790        4710 :                         NDR_CHECK(ndr_push_align(ndr, 5));
    2791        4710 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
    2792        4710 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size));
    2793        4710 :                         NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
    2794        4710 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2795             :                 }
    2796        4710 :                 if (ndr_flags & NDR_BUFFERS) {
    2797        4710 :                         if (r->data) {
    2798        4710 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size));
    2799        4710 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    2800        4710 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
    2801        4710 :                                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
    2802             :                         }
    2803             :                 }
    2804        4710 :                 ndr->flags = _flags_save_STRUCT;
    2805             :         }
    2806        4710 :         return NDR_ERR_SUCCESS;
    2807             : }
    2808             : 
    2809        4298 : static enum ndr_err_code ndr_pull_lsa_DATA_BUF(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF *r)
    2810             : {
    2811             :         uint32_t _ptr_data;
    2812        4298 :         uint32_t size_data_1 = 0;
    2813        4298 :         uint32_t length_data_1 = 0;
    2814        4298 :         TALLOC_CTX *_mem_save_data_0 = NULL;
    2815             :         {
    2816        4298 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2817        4298 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2818        4298 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2819        4298 :                 if (ndr_flags & NDR_SCALARS) {
    2820        4298 :                         NDR_CHECK(ndr_pull_align(ndr, 5));
    2821        4298 :                         NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->length));
    2822        4298 :                         NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->size));
    2823        4298 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
    2824        4298 :                         if (_ptr_data) {
    2825        4298 :                                 NDR_PULL_ALLOC(ndr, r->data);
    2826             :                         } else {
    2827           0 :                                 r->data = NULL;
    2828             :                         }
    2829        4298 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2830             :                 }
    2831        4298 :                 if (ndr_flags & NDR_BUFFERS) {
    2832        4298 :                         if (r->data) {
    2833        4298 :                                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2834        4298 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
    2835        4298 :                                 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
    2836        4298 :                                 NDR_CHECK(ndr_pull_array_length(ndr, &r->data));
    2837        4298 :                                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
    2838        4298 :                                 NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->data, &length_data_1));
    2839        4298 :                                 if (length_data_1 > size_data_1) {
    2840           0 :                                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_data_1, length_data_1);
    2841             :                                 }
    2842        4298 :                                 NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
    2843        4298 :                                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, length_data_1));
    2844        4298 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
    2845             :                         }
    2846        4298 :                         if (r->data) {
    2847        4298 :                                 NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->size));
    2848             :                         }
    2849        4298 :                         if (r->data) {
    2850        4298 :                                 NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->data, r->length));
    2851             :                         }
    2852             :                 }
    2853        4298 :                 ndr->flags = _flags_save_STRUCT;
    2854             :         }
    2855        4298 :         return NDR_ERR_SUCCESS;
    2856             : }
    2857             : 
    2858          68 : _PUBLIC_ void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF *r)
    2859             : {
    2860          68 :         ndr_print_struct(ndr, name, "lsa_DATA_BUF");
    2861          68 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2862             :         {
    2863          68 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2864          68 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2865          68 :                 ndr->depth++;
    2866          68 :                 ndr_print_uint3264(ndr, "length", r->length);
    2867          68 :                 ndr_print_uint3264(ndr, "size", r->size);
    2868          68 :                 ndr_print_ptr(ndr, "data", r->data);
    2869          68 :                 ndr->depth++;
    2870          68 :                 if (r->data) {
    2871          68 :                         ndr_print_array_uint8(ndr, "data", r->data, r->length);
    2872             :                 }
    2873          68 :                 ndr->depth--;
    2874          68 :                 ndr->depth--;
    2875          68 :                 ndr->flags = _flags_save_STRUCT;
    2876             :         }
    2877             : }
    2878             : 
    2879         534 : static enum ndr_err_code ndr_push_lsa_DATA_BUF2(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF2 *r)
    2880             : {
    2881             :         {
    2882         534 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2883         534 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2884         534 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2885         534 :                 if (ndr_flags & NDR_SCALARS) {
    2886         267 :                         NDR_CHECK(ndr_push_align(ndr, 5));
    2887         267 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
    2888         267 :                         NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
    2889         267 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2890             :                 }
    2891         534 :                 if (ndr_flags & NDR_BUFFERS) {
    2892         267 :                         if (r->data) {
    2893         267 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size));
    2894         267 :                                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->size));
    2895             :                         }
    2896             :                 }
    2897         534 :                 ndr->flags = _flags_save_STRUCT;
    2898             :         }
    2899         534 :         return NDR_ERR_SUCCESS;
    2900             : }
    2901             : 
    2902         538 : static enum ndr_err_code ndr_pull_lsa_DATA_BUF2(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF2 *r)
    2903             : {
    2904             :         uint32_t _ptr_data;
    2905         538 :         uint32_t size_data_1 = 0;
    2906         538 :         TALLOC_CTX *_mem_save_data_0 = NULL;
    2907             :         {
    2908         538 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2909         538 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2910         538 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2911         538 :                 if (ndr_flags & NDR_SCALARS) {
    2912         269 :                         NDR_CHECK(ndr_pull_align(ndr, 5));
    2913         269 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
    2914         269 :                         if (r->size > 65536) {
    2915           0 :                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    2916             :                         }
    2917         269 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
    2918         269 :                         if (_ptr_data) {
    2919         269 :                                 NDR_PULL_ALLOC(ndr, r->data);
    2920             :                         } else {
    2921           0 :                                 r->data = NULL;
    2922             :                         }
    2923         269 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2924             :                 }
    2925         538 :                 if (ndr_flags & NDR_BUFFERS) {
    2926         269 :                         if (r->data) {
    2927         269 :                                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2928         269 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
    2929         269 :                                 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
    2930         269 :                                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
    2931         269 :                                 NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
    2932         269 :                                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
    2933         269 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
    2934             :                         }
    2935         269 :                         if (r->data) {
    2936         269 :                                 NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->size));
    2937             :                         }
    2938             :                 }
    2939         538 :                 ndr->flags = _flags_save_STRUCT;
    2940             :         }
    2941         538 :         return NDR_ERR_SUCCESS;
    2942             : }
    2943             : 
    2944           2 : _PUBLIC_ void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF2 *r)
    2945             : {
    2946           2 :         ndr_print_struct(ndr, name, "lsa_DATA_BUF2");
    2947           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2948             :         {
    2949           2 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2950           2 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2951           2 :                 ndr->depth++;
    2952           2 :                 ndr_print_uint32(ndr, "size", r->size);
    2953           2 :                 ndr_print_ptr(ndr, "data", r->data);
    2954           2 :                 ndr->depth++;
    2955           2 :                 if (r->data) {
    2956           2 :                         ndr_print_array_uint8(ndr, "data", r->data, r->size);
    2957             :                 }
    2958           2 :                 ndr->depth--;
    2959           2 :                 ndr->depth--;
    2960           2 :                 ndr->flags = _flags_save_STRUCT;
    2961             :         }
    2962             : }
    2963             : 
    2964       12675 : static enum ndr_err_code ndr_push_lsa_TrustDomInfoEnum(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum r)
    2965             : {
    2966       12675 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
    2967       12675 :         return NDR_ERR_SUCCESS;
    2968             : }
    2969             : 
    2970        7964 : static enum ndr_err_code ndr_pull_lsa_TrustDomInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum *r)
    2971             : {
    2972             :         uint16_t v;
    2973        7966 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
    2974        7966 :         *r = v;
    2975        7964 :         return NDR_ERR_SUCCESS;
    2976             : }
    2977             : 
    2978           2 : _PUBLIC_ void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *name, enum lsa_TrustDomInfoEnum r)
    2979             : {
    2980           2 :         const char *val = NULL;
    2981             : 
    2982           2 :         switch (r) {
    2983           0 :                 case LSA_TRUSTED_DOMAIN_INFO_NAME: val = "LSA_TRUSTED_DOMAIN_INFO_NAME"; break;
    2984           0 :                 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: val = "LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS"; break;
    2985           0 :                 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: val = "LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET"; break;
    2986           0 :                 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: val = "LSA_TRUSTED_DOMAIN_INFO_PASSWORD"; break;
    2987           0 :                 case LSA_TRUSTED_DOMAIN_INFO_BASIC: val = "LSA_TRUSTED_DOMAIN_INFO_BASIC"; break;
    2988           0 :                 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX"; break;
    2989           0 :                 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO"; break;
    2990           0 :                 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO"; break;
    2991           0 :                 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL"; break;
    2992           2 :                 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL"; break;
    2993           0 :                 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL"; break;
    2994           0 :                 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL"; break;
    2995           0 :                 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: val = "LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES"; break;
    2996             :         }
    2997           2 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    2998           2 : }
    2999             : 
    3000        2883 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustDirection(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    3001             : {
    3002        2883 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    3003        2883 :         return NDR_ERR_SUCCESS;
    3004             : }
    3005             : 
    3006        2301 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustDirection(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    3007             : {
    3008             :         uint32_t v;
    3009        2301 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    3010        2301 :         *r = v;
    3011        2301 :         return NDR_ERR_SUCCESS;
    3012             : }
    3013             : 
    3014        1024 : _PUBLIC_ void ndr_print_lsa_TrustDirection(struct ndr_print *ndr, const char *name, uint32_t r)
    3015             : {
    3016        1024 :         ndr_print_uint32(ndr, name, r);
    3017        1024 :         ndr->depth++;
    3018        1024 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_DIRECTION_INBOUND", LSA_TRUST_DIRECTION_INBOUND, r);
    3019        1024 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_DIRECTION_OUTBOUND", LSA_TRUST_DIRECTION_OUTBOUND, r);
    3020        1024 :         ndr->depth--;
    3021        1024 : }
    3022             : 
    3023        3270 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustType r)
    3024             : {
    3025        3270 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    3026        3270 :         return NDR_ERR_SUCCESS;
    3027             : }
    3028             : 
    3029        5547 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustType *r)
    3030             : {
    3031             :         uint32_t v;
    3032        5547 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    3033        5547 :         *r = v;
    3034        5547 :         return NDR_ERR_SUCCESS;
    3035             : }
    3036             : 
    3037        1216 : _PUBLIC_ void ndr_print_lsa_TrustType(struct ndr_print *ndr, const char *name, enum lsa_TrustType r)
    3038             : {
    3039        1216 :         const char *val = NULL;
    3040             : 
    3041        1216 :         switch (r) {
    3042         530 :                 case LSA_TRUST_TYPE_DOWNLEVEL: val = "LSA_TRUST_TYPE_DOWNLEVEL"; break;
    3043         518 :                 case LSA_TRUST_TYPE_UPLEVEL: val = "LSA_TRUST_TYPE_UPLEVEL"; break;
    3044         168 :                 case LSA_TRUST_TYPE_MIT: val = "LSA_TRUST_TYPE_MIT"; break;
    3045           0 :                 case LSA_TRUST_TYPE_DCE: val = "LSA_TRUST_TYPE_DCE"; break;
    3046             :         }
    3047        1216 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    3048        1216 : }
    3049             : 
    3050        3270 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    3051             : {
    3052        3270 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    3053        3270 :         return NDR_ERR_SUCCESS;
    3054             : }
    3055             : 
    3056        5547 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    3057             : {
    3058             :         uint32_t v;
    3059        5547 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    3060        5547 :         *r = v;
    3061        5547 :         return NDR_ERR_SUCCESS;
    3062             : }
    3063             : 
    3064        1216 : _PUBLIC_ void ndr_print_lsa_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r)
    3065             : {
    3066        1216 :         ndr_print_uint32(ndr, name, r);
    3067        1216 :         ndr->depth++;
    3068        1216 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE", LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE, r);
    3069        1216 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY", LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY, r);
    3070        1216 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN", LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN, r);
    3071        1216 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE", LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE, r);
    3072        1216 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION", LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION, r);
    3073        1216 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_WITHIN_FOREST", LSA_TRUST_ATTRIBUTE_WITHIN_FOREST, r);
    3074        1216 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL", LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL, r);
    3075        1216 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION", LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION, r);
    3076        1216 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION_NO_TGT_DELEGATION", LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION_NO_TGT_DELEGATION, r);
    3077        1216 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_PIM_TRUST", LSA_TRUST_ATTRIBUTE_PIM_TRUST, r);
    3078        1216 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION_ENABLE_TGT_DELEGATION", LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION_ENABLE_TGT_DELEGATION, r);
    3079        1216 :         ndr->depth--;
    3080        1216 : }
    3081             : 
    3082        1458 : static enum ndr_err_code ndr_push_lsa_TrustDomainInfoName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoName *r)
    3083             : {
    3084        1458 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3085        1458 :         if (ndr_flags & NDR_SCALARS) {
    3086         729 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3087         729 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
    3088         729 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3089             :         }
    3090        1458 :         if (ndr_flags & NDR_BUFFERS) {
    3091         729 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
    3092             :         }
    3093        1458 :         return NDR_ERR_SUCCESS;
    3094             : }
    3095             : 
    3096        1168 : static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoName *r)
    3097             : {
    3098        1168 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3099        1168 :         if (ndr_flags & NDR_SCALARS) {
    3100         584 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3101         584 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
    3102         584 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3103             :         }
    3104        1168 :         if (ndr_flags & NDR_BUFFERS) {
    3105         584 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
    3106             :         }
    3107        1168 :         return NDR_ERR_SUCCESS;
    3108             : }
    3109             : 
    3110         290 : _PUBLIC_ void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoName *r)
    3111             : {
    3112         290 :         ndr_print_struct(ndr, name, "lsa_TrustDomainInfoName");
    3113         290 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3114         290 :         ndr->depth++;
    3115         290 :         ndr_print_lsa_StringLarge(ndr, "netbios_name", &r->netbios_name);
    3116         290 :         ndr->depth--;
    3117             : }
    3118             : 
    3119           0 : static enum ndr_err_code ndr_push_lsa_TrustDomainInfoControllers(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoControllers *r)
    3120             : {
    3121             :         uint32_t cntr_netbios_names_1;
    3122           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3123           0 :         if (ndr_flags & NDR_SCALARS) {
    3124           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3125           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries));
    3126           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_names));
    3127           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3128             :         }
    3129           0 :         if (ndr_flags & NDR_BUFFERS) {
    3130           0 :                 if (r->netbios_names) {
    3131           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->entries));
    3132           0 :                         for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < (r->entries); cntr_netbios_names_1++) {
    3133           0 :                                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_names[cntr_netbios_names_1]));
    3134             :                         }
    3135           0 :                         for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < (r->entries); cntr_netbios_names_1++) {
    3136           0 :                                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_names[cntr_netbios_names_1]));
    3137             :                         }
    3138             :                 }
    3139             :         }
    3140           0 :         return NDR_ERR_SUCCESS;
    3141             : }
    3142             : 
    3143           0 : static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoControllers(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoControllers *r)
    3144             : {
    3145             :         uint32_t _ptr_netbios_names;
    3146           0 :         uint32_t size_netbios_names_1 = 0;
    3147             :         uint32_t cntr_netbios_names_1;
    3148           0 :         TALLOC_CTX *_mem_save_netbios_names_0 = NULL;
    3149           0 :         TALLOC_CTX *_mem_save_netbios_names_1 = NULL;
    3150           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3151           0 :         if (ndr_flags & NDR_SCALARS) {
    3152           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3153           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->entries));
    3154           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_names));
    3155           0 :                 if (_ptr_netbios_names) {
    3156           0 :                         NDR_PULL_ALLOC(ndr, r->netbios_names);
    3157             :                 } else {
    3158           0 :                         r->netbios_names = NULL;
    3159             :                 }
    3160           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3161             :         }
    3162           0 :         if (ndr_flags & NDR_BUFFERS) {
    3163           0 :                 if (r->netbios_names) {
    3164           0 :                         _mem_save_netbios_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3165           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->netbios_names, 0);
    3166           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_names));
    3167           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->netbios_names, &size_netbios_names_1));
    3168           0 :                         NDR_PULL_ALLOC_N(ndr, r->netbios_names, size_netbios_names_1);
    3169           0 :                         _mem_save_netbios_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3170           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->netbios_names, 0);
    3171           0 :                         for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < (size_netbios_names_1); cntr_netbios_names_1++) {
    3172           0 :                                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_names[cntr_netbios_names_1]));
    3173             :                         }
    3174           0 :                         for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < (size_netbios_names_1); cntr_netbios_names_1++) {
    3175           0 :                                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_names[cntr_netbios_names_1]));
    3176             :                         }
    3177           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_names_1, 0);
    3178           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_names_0, 0);
    3179             :                 }
    3180           0 :                 if (r->netbios_names) {
    3181           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->netbios_names, r->entries));
    3182             :                 }
    3183           0 :                 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < (size_netbios_names_1); cntr_netbios_names_1++) {
    3184             :                 }
    3185             :         }
    3186           0 :         return NDR_ERR_SUCCESS;
    3187             : }
    3188             : 
    3189           0 : _PUBLIC_ void ndr_print_lsa_TrustDomainInfoControllers(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoControllers *r)
    3190             : {
    3191             :         uint32_t cntr_netbios_names_1;
    3192           0 :         ndr_print_struct(ndr, name, "lsa_TrustDomainInfoControllers");
    3193           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3194           0 :         ndr->depth++;
    3195           0 :         ndr_print_uint32(ndr, "entries", r->entries);
    3196           0 :         ndr_print_ptr(ndr, "netbios_names", r->netbios_names);
    3197           0 :         ndr->depth++;
    3198           0 :         if (r->netbios_names) {
    3199           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "netbios_names", (int)r->entries);
    3200           0 :                 ndr->depth++;
    3201           0 :                 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < (r->entries); cntr_netbios_names_1++) {
    3202           0 :                         ndr_print_lsa_StringLarge(ndr, "netbios_names", &r->netbios_names[cntr_netbios_names_1]);
    3203             :                 }
    3204           0 :                 ndr->depth--;
    3205             :         }
    3206           0 :         ndr->depth--;
    3207           0 :         ndr->depth--;
    3208             : }
    3209             : 
    3210        2211 : static enum ndr_err_code ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPosixOffset *r)
    3211             : {
    3212        2211 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3213        2211 :         if (ndr_flags & NDR_SCALARS) {
    3214        2211 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    3215        2211 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->posix_offset));
    3216        2211 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    3217             :         }
    3218        2211 :         if (ndr_flags & NDR_BUFFERS) {
    3219             :         }
    3220        2211 :         return NDR_ERR_SUCCESS;
    3221             : }
    3222             : 
    3223        1778 : static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoPosixOffset(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPosixOffset *r)
    3224             : {
    3225        1778 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3226        1778 :         if (ndr_flags & NDR_SCALARS) {
    3227        1778 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    3228        1778 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->posix_offset));
    3229        1778 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    3230             :         }
    3231        1776 :         if (ndr_flags & NDR_BUFFERS) {
    3232             :         }
    3233        1778 :         return NDR_ERR_SUCCESS;
    3234             : }
    3235             : 
    3236         872 : _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPosixOffset *r)
    3237             : {
    3238         872 :         ndr_print_struct(ndr, name, "lsa_TrustDomainInfoPosixOffset");
    3239         872 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3240         872 :         ndr->depth++;
    3241         872 :         ndr_print_uint32(ndr, "posix_offset", r->posix_offset);
    3242         872 :         ndr->depth--;
    3243             : }
    3244             : 
    3245           0 : static enum ndr_err_code ndr_push_lsa_TrustDomainInfoPassword(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPassword *r)
    3246             : {
    3247           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3248           0 :         if (ndr_flags & NDR_SCALARS) {
    3249           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3250           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
    3251           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->old_password));
    3252           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3253             :         }
    3254           0 :         if (ndr_flags & NDR_BUFFERS) {
    3255           0 :                 if (r->password) {
    3256           0 :                         NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
    3257             :                 }
    3258           0 :                 if (r->old_password) {
    3259           0 :                         NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->old_password));
    3260             :                 }
    3261             :         }
    3262           0 :         return NDR_ERR_SUCCESS;
    3263             : }
    3264             : 
    3265           0 : static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoPassword(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPassword *r)
    3266             : {
    3267             :         uint32_t _ptr_password;
    3268           0 :         TALLOC_CTX *_mem_save_password_0 = NULL;
    3269             :         uint32_t _ptr_old_password;
    3270           0 :         TALLOC_CTX *_mem_save_old_password_0 = NULL;
    3271           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3272           0 :         if (ndr_flags & NDR_SCALARS) {
    3273           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3274           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
    3275           0 :                 if (_ptr_password) {
    3276           0 :                         NDR_PULL_ALLOC(ndr, r->password);
    3277             :                 } else {
    3278           0 :                         r->password = NULL;
    3279             :                 }
    3280           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_password));
    3281           0 :                 if (_ptr_old_password) {
    3282           0 :                         NDR_PULL_ALLOC(ndr, r->old_password);
    3283             :                 } else {
    3284           0 :                         r->old_password = NULL;
    3285             :                 }
    3286           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3287             :         }
    3288           0 :         if (ndr_flags & NDR_BUFFERS) {
    3289           0 :                 if (r->password) {
    3290           0 :                         _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3291           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
    3292           0 :                         NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
    3293           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
    3294             :                 }
    3295           0 :                 if (r->old_password) {
    3296           0 :                         _mem_save_old_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3297           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->old_password, 0);
    3298           0 :                         NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->old_password));
    3299           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_password_0, 0);
    3300             :                 }
    3301             :         }
    3302           0 :         return NDR_ERR_SUCCESS;
    3303             : }
    3304             : 
    3305           0 : _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPassword *r)
    3306             : {
    3307           0 :         ndr_print_struct(ndr, name, "lsa_TrustDomainInfoPassword");
    3308           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3309           0 :         ndr->depth++;
    3310           0 :         ndr_print_ptr(ndr, "password", r->password);
    3311           0 :         ndr->depth++;
    3312           0 :         if (r->password) {
    3313           0 :                 ndr_print_lsa_DATA_BUF(ndr, "password", r->password);
    3314             :         }
    3315           0 :         ndr->depth--;
    3316           0 :         ndr_print_ptr(ndr, "old_password", r->old_password);
    3317           0 :         ndr->depth++;
    3318           0 :         if (r->old_password) {
    3319           0 :                 ndr_print_lsa_DATA_BUF(ndr, "old_password", r->old_password);
    3320             :         }
    3321           0 :         ndr->depth--;
    3322           0 :         ndr->depth--;
    3323             : }
    3324             : 
    3325           0 : static enum ndr_err_code ndr_push_lsa_TrustDomainInfoBasic(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBasic *r)
    3326             : {
    3327           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3328           0 :         if (ndr_flags & NDR_SCALARS) {
    3329           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3330           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->netbios_name));
    3331           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    3332           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3333             :         }
    3334           0 :         if (ndr_flags & NDR_BUFFERS) {
    3335           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->netbios_name));
    3336           0 :                 if (r->sid) {
    3337           0 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    3338             :                 }
    3339             :         }
    3340           0 :         return NDR_ERR_SUCCESS;
    3341             : }
    3342             : 
    3343           0 : static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoBasic(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBasic *r)
    3344             : {
    3345             :         uint32_t _ptr_sid;
    3346           0 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    3347           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3348           0 :         if (ndr_flags & NDR_SCALARS) {
    3349           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3350           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->netbios_name));
    3351           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    3352           0 :                 if (_ptr_sid) {
    3353           0 :                         NDR_PULL_ALLOC(ndr, r->sid);
    3354             :                 } else {
    3355           0 :                         r->sid = NULL;
    3356             :                 }
    3357           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3358             :         }
    3359           0 :         if (ndr_flags & NDR_BUFFERS) {
    3360           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->netbios_name));
    3361           0 :                 if (r->sid) {
    3362           0 :                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3363           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    3364           0 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    3365           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    3366             :                 }
    3367             :         }
    3368           0 :         return NDR_ERR_SUCCESS;
    3369             : }
    3370             : 
    3371           0 : _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBasic *r)
    3372             : {
    3373           0 :         ndr_print_struct(ndr, name, "lsa_TrustDomainInfoBasic");
    3374           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3375           0 :         ndr->depth++;
    3376           0 :         ndr_print_lsa_String(ndr, "netbios_name", &r->netbios_name);
    3377           0 :         ndr_print_ptr(ndr, "sid", r->sid);
    3378           0 :         ndr->depth++;
    3379           0 :         if (r->sid) {
    3380           0 :                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    3381             :         }
    3382           0 :         ndr->depth--;
    3383           0 :         ndr->depth--;
    3384             : }
    3385             : 
    3386        5643 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx *r)
    3387             : {
    3388        5643 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3389        5643 :         if (ndr_flags & NDR_SCALARS) {
    3390        2883 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3391        2883 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain_name));
    3392        2883 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
    3393        2883 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    3394        2883 :                 NDR_CHECK(ndr_push_lsa_TrustDirection(ndr, NDR_SCALARS, r->trust_direction));
    3395        2883 :                 NDR_CHECK(ndr_push_lsa_TrustType(ndr, NDR_SCALARS, r->trust_type));
    3396        2883 :                 NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes));
    3397        2883 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3398             :         }
    3399        5643 :         if (ndr_flags & NDR_BUFFERS) {
    3400        2883 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name));
    3401        2883 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
    3402        2883 :                 if (r->sid) {
    3403        2883 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    3404             :                 }
    3405             :         }
    3406        5643 :         return NDR_ERR_SUCCESS;
    3407             : }
    3408             : 
    3409        4479 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx *r)
    3410             : {
    3411             :         uint32_t _ptr_sid;
    3412        4479 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    3413        4479 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3414        4479 :         if (ndr_flags & NDR_SCALARS) {
    3415        2301 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3416        2301 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain_name));
    3417        2301 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
    3418        2301 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    3419        2301 :                 if (_ptr_sid) {
    3420        2301 :                         NDR_PULL_ALLOC(ndr, r->sid);
    3421             :                 } else {
    3422           0 :                         r->sid = NULL;
    3423             :                 }
    3424        2301 :                 NDR_CHECK(ndr_pull_lsa_TrustDirection(ndr, NDR_SCALARS, &r->trust_direction));
    3425        2301 :                 NDR_CHECK(ndr_pull_lsa_TrustType(ndr, NDR_SCALARS, &r->trust_type));
    3426        2301 :                 NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes));
    3427        2301 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3428             :         }
    3429        4479 :         if (ndr_flags & NDR_BUFFERS) {
    3430        2301 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name));
    3431        2301 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
    3432        2301 :                 if (r->sid) {
    3433        2301 :                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3434        2301 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    3435        2301 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    3436        2301 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    3437             :                 }
    3438             :         }
    3439        4475 :         return NDR_ERR_SUCCESS;
    3440             : }
    3441             : 
    3442           0 : static void ndr_print_flags_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const char *name, int unused, const struct lsa_TrustDomainInfoInfoEx *r)
    3443             : {
    3444           0 :         ndr_print_lsa_TrustDomainInfoInfoEx(ndr, name, r);
    3445           0 : }
    3446             : 
    3447        1024 : _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx *r)
    3448             : {
    3449        1024 :         ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoEx");
    3450        1024 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3451        1024 :         ndr->depth++;
    3452        1024 :         ndr_print_lsa_StringLarge(ndr, "domain_name", &r->domain_name);
    3453        1024 :         ndr_print_lsa_StringLarge(ndr, "netbios_name", &r->netbios_name);
    3454        1024 :         ndr_print_ptr(ndr, "sid", r->sid);
    3455        1024 :         ndr->depth++;
    3456        1024 :         if (r->sid) {
    3457        1024 :                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    3458             :         }
    3459        1024 :         ndr->depth--;
    3460        1024 :         ndr_print_lsa_TrustDirection(ndr, "trust_direction", r->trust_direction);
    3461        1024 :         ndr_print_lsa_TrustType(ndr, "trust_type", r->trust_type);
    3462        1024 :         ndr_print_lsa_TrustAttributes(ndr, "trust_attributes", r->trust_attributes);
    3463        1024 :         ndr->depth--;
    3464             : }
    3465             : 
    3466        5093 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAuthType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustAuthType r)
    3467             : {
    3468        5093 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    3469        5093 :         return NDR_ERR_SUCCESS;
    3470             : }
    3471             : 
    3472        4941 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustAuthType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustAuthType *r)
    3473             : {
    3474             :         uint32_t v;
    3475        4941 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    3476        4941 :         *r = v;
    3477        4941 :         return NDR_ERR_SUCCESS;
    3478             : }
    3479             : 
    3480          12 : _PUBLIC_ void ndr_print_lsa_TrustAuthType(struct ndr_print *ndr, const char *name, enum lsa_TrustAuthType r)
    3481             : {
    3482          12 :         const char *val = NULL;
    3483             : 
    3484          12 :         switch (r) {
    3485           0 :                 case TRUST_AUTH_TYPE_NONE: val = "TRUST_AUTH_TYPE_NONE"; break;
    3486           0 :                 case TRUST_AUTH_TYPE_NT4OWF: val = "TRUST_AUTH_TYPE_NT4OWF"; break;
    3487          12 :                 case TRUST_AUTH_TYPE_CLEAR: val = "TRUST_AUTH_TYPE_CLEAR"; break;
    3488           0 :                 case TRUST_AUTH_TYPE_VERSION: val = "TRUST_AUTH_TYPE_VERSION"; break;
    3489             :         }
    3490          12 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    3491          12 : }
    3492             : 
    3493         192 : static enum ndr_err_code ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBuffer *r)
    3494             : {
    3495         192 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3496         192 :         if (ndr_flags & NDR_SCALARS) {
    3497         192 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    3498         192 :                 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->last_update_time));
    3499         192 :                 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
    3500         192 :                 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data));
    3501         192 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    3502             :         }
    3503         192 :         if (ndr_flags & NDR_BUFFERS) {
    3504         192 :                 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data));
    3505             :         }
    3506         192 :         return NDR_ERR_SUCCESS;
    3507             : }
    3508             : 
    3509         192 : static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBuffer *r)
    3510             : {
    3511         192 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3512         192 :         if (ndr_flags & NDR_SCALARS) {
    3513         192 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    3514         192 :                 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->last_update_time));
    3515         192 :                 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
    3516         192 :                 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data));
    3517         192 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    3518             :         }
    3519         192 :         if (ndr_flags & NDR_BUFFERS) {
    3520         192 :                 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data));
    3521             :         }
    3522         192 :         return NDR_ERR_SUCCESS;
    3523             : }
    3524             : 
    3525           0 : _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBuffer *r)
    3526             : {
    3527           0 :         ndr_print_struct(ndr, name, "lsa_TrustDomainInfoBuffer");
    3528           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3529           0 :         ndr->depth++;
    3530           0 :         ndr_print_NTTIME_hyper(ndr, "last_update_time", r->last_update_time);
    3531           0 :         ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
    3532           0 :         ndr_print_lsa_DATA_BUF2(ndr, "data", &r->data);
    3533           0 :         ndr->depth--;
    3534             : }
    3535             : 
    3536        3012 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustDomainInfoAuthInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfo *r)
    3537             : {
    3538        3012 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3539        3012 :         if (ndr_flags & NDR_SCALARS) {
    3540        1530 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3541        1530 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->incoming_count));
    3542        1530 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->incoming_current_auth_info));
    3543        1530 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->incoming_previous_auth_info));
    3544        1530 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->outgoing_count));
    3545        1530 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->outgoing_current_auth_info));
    3546        1530 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->outgoing_previous_auth_info));
    3547        1530 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3548             :         }
    3549        3012 :         if (ndr_flags & NDR_BUFFERS) {
    3550        1530 :                 if (r->incoming_current_auth_info) {
    3551          48 :                         NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_current_auth_info));
    3552             :                 }
    3553        1530 :                 if (r->incoming_previous_auth_info) {
    3554          48 :                         NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_previous_auth_info));
    3555             :                 }
    3556        1530 :                 if (r->outgoing_current_auth_info) {
    3557          48 :                         NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_current_auth_info));
    3558             :                 }
    3559        1530 :                 if (r->outgoing_previous_auth_info) {
    3560          48 :                         NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_previous_auth_info));
    3561             :                 }
    3562             :         }
    3563        3012 :         return NDR_ERR_SUCCESS;
    3564             : }
    3565             : 
    3566        2432 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustDomainInfoAuthInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfo *r)
    3567             : {
    3568             :         uint32_t _ptr_incoming_current_auth_info;
    3569        2432 :         TALLOC_CTX *_mem_save_incoming_current_auth_info_0 = NULL;
    3570             :         uint32_t _ptr_incoming_previous_auth_info;
    3571        2432 :         TALLOC_CTX *_mem_save_incoming_previous_auth_info_0 = NULL;
    3572             :         uint32_t _ptr_outgoing_current_auth_info;
    3573        2432 :         TALLOC_CTX *_mem_save_outgoing_current_auth_info_0 = NULL;
    3574             :         uint32_t _ptr_outgoing_previous_auth_info;
    3575        2432 :         TALLOC_CTX *_mem_save_outgoing_previous_auth_info_0 = NULL;
    3576        2432 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3577        2432 :         if (ndr_flags & NDR_SCALARS) {
    3578        1240 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3579        1240 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->incoming_count));
    3580        1240 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_incoming_current_auth_info));
    3581        1240 :                 if (_ptr_incoming_current_auth_info) {
    3582          48 :                         NDR_PULL_ALLOC(ndr, r->incoming_current_auth_info);
    3583             :                 } else {
    3584        1192 :                         r->incoming_current_auth_info = NULL;
    3585             :                 }
    3586        1240 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_incoming_previous_auth_info));
    3587        1240 :                 if (_ptr_incoming_previous_auth_info) {
    3588          48 :                         NDR_PULL_ALLOC(ndr, r->incoming_previous_auth_info);
    3589             :                 } else {
    3590        1192 :                         r->incoming_previous_auth_info = NULL;
    3591             :                 }
    3592        1240 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->outgoing_count));
    3593        1240 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_outgoing_current_auth_info));
    3594        1240 :                 if (_ptr_outgoing_current_auth_info) {
    3595          48 :                         NDR_PULL_ALLOC(ndr, r->outgoing_current_auth_info);
    3596             :                 } else {
    3597        1192 :                         r->outgoing_current_auth_info = NULL;
    3598             :                 }
    3599        1240 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_outgoing_previous_auth_info));
    3600        1240 :                 if (_ptr_outgoing_previous_auth_info) {
    3601          48 :                         NDR_PULL_ALLOC(ndr, r->outgoing_previous_auth_info);
    3602             :                 } else {
    3603        1192 :                         r->outgoing_previous_auth_info = NULL;
    3604             :                 }
    3605        1240 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3606             :         }
    3607        2432 :         if (ndr_flags & NDR_BUFFERS) {
    3608        1240 :                 if (r->incoming_current_auth_info) {
    3609          48 :                         _mem_save_incoming_current_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3610          48 :                         NDR_PULL_SET_MEM_CTX(ndr, r->incoming_current_auth_info, 0);
    3611          48 :                         NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_current_auth_info));
    3612          48 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_incoming_current_auth_info_0, 0);
    3613             :                 }
    3614        1240 :                 if (r->incoming_previous_auth_info) {
    3615          48 :                         _mem_save_incoming_previous_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3616          48 :                         NDR_PULL_SET_MEM_CTX(ndr, r->incoming_previous_auth_info, 0);
    3617          48 :                         NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_previous_auth_info));
    3618          48 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_incoming_previous_auth_info_0, 0);
    3619             :                 }
    3620        1240 :                 if (r->outgoing_current_auth_info) {
    3621          48 :                         _mem_save_outgoing_current_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3622          48 :                         NDR_PULL_SET_MEM_CTX(ndr, r->outgoing_current_auth_info, 0);
    3623          48 :                         NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_current_auth_info));
    3624          48 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_outgoing_current_auth_info_0, 0);
    3625             :                 }
    3626        1240 :                 if (r->outgoing_previous_auth_info) {
    3627          48 :                         _mem_save_outgoing_previous_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3628          48 :                         NDR_PULL_SET_MEM_CTX(ndr, r->outgoing_previous_auth_info, 0);
    3629          48 :                         NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_previous_auth_info));
    3630          48 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_outgoing_previous_auth_info_0, 0);
    3631             :                 }
    3632             :         }
    3633        2432 :         return NDR_ERR_SUCCESS;
    3634             : }
    3635             : 
    3636           0 : static void ndr_print_flags_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const char *name, int unused, const struct lsa_TrustDomainInfoAuthInfo *r)
    3637             : {
    3638           0 :         ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, name, r);
    3639           0 : }
    3640             : 
    3641         580 : _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfo *r)
    3642             : {
    3643         580 :         ndr_print_struct(ndr, name, "lsa_TrustDomainInfoAuthInfo");
    3644         580 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3645         580 :         ndr->depth++;
    3646         580 :         ndr_print_uint32(ndr, "incoming_count", r->incoming_count);
    3647         580 :         ndr_print_ptr(ndr, "incoming_current_auth_info", r->incoming_current_auth_info);
    3648         580 :         ndr->depth++;
    3649         580 :         if (r->incoming_current_auth_info) {
    3650           0 :                 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "incoming_current_auth_info", r->incoming_current_auth_info);
    3651             :         }
    3652         580 :         ndr->depth--;
    3653         580 :         ndr_print_ptr(ndr, "incoming_previous_auth_info", r->incoming_previous_auth_info);
    3654         580 :         ndr->depth++;
    3655         580 :         if (r->incoming_previous_auth_info) {
    3656           0 :                 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "incoming_previous_auth_info", r->incoming_previous_auth_info);
    3657             :         }
    3658         580 :         ndr->depth--;
    3659         580 :         ndr_print_uint32(ndr, "outgoing_count", r->outgoing_count);
    3660         580 :         ndr_print_ptr(ndr, "outgoing_current_auth_info", r->outgoing_current_auth_info);
    3661         580 :         ndr->depth++;
    3662         580 :         if (r->outgoing_current_auth_info) {
    3663           0 :                 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "outgoing_current_auth_info", r->outgoing_current_auth_info);
    3664             :         }
    3665         580 :         ndr->depth--;
    3666         580 :         ndr_print_ptr(ndr, "outgoing_previous_auth_info", r->outgoing_previous_auth_info);
    3667         580 :         ndr->depth++;
    3668         580 :         if (r->outgoing_previous_auth_info) {
    3669           0 :                 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "outgoing_previous_auth_info", r->outgoing_previous_auth_info);
    3670             :         }
    3671         580 :         ndr->depth--;
    3672         580 :         ndr->depth--;
    3673             : }
    3674             : 
    3675        1506 : static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo *r)
    3676             : {
    3677        1506 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3678        1506 :         if (ndr_flags & NDR_SCALARS) {
    3679         753 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3680         753 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
    3681         753 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
    3682         753 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
    3683         753 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3684             :         }
    3685        1506 :         if (ndr_flags & NDR_BUFFERS) {
    3686         753 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
    3687         753 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
    3688             :         }
    3689        1506 :         return NDR_ERR_SUCCESS;
    3690             : }
    3691             : 
    3692        1216 : static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo *r)
    3693             : {
    3694        1216 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3695        1216 :         if (ndr_flags & NDR_SCALARS) {
    3696         608 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3697         608 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
    3698         608 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
    3699         608 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
    3700         608 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3701             :         }
    3702        1216 :         if (ndr_flags & NDR_BUFFERS) {
    3703         608 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
    3704         608 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
    3705             :         }
    3706        1216 :         return NDR_ERR_SUCCESS;
    3707             : }
    3708             : 
    3709         290 : _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo *r)
    3710             : {
    3711         290 :         ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfo");
    3712         290 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3713         290 :         ndr->depth++;
    3714         290 :         ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
    3715         290 :         ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
    3716         290 :         ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
    3717         290 :         ndr->depth--;
    3718             : }
    3719             : 
    3720          75 : static enum ndr_err_code ndr_push_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfoInternal *r)
    3721             : {
    3722          75 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3723          75 :         if (ndr_flags & NDR_SCALARS) {
    3724          75 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3725          75 :                 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob));
    3726          75 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3727             :         }
    3728          75 :         if (ndr_flags & NDR_BUFFERS) {
    3729          75 :                 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob));
    3730             :         }
    3731          75 :         return NDR_ERR_SUCCESS;
    3732             : }
    3733             : 
    3734          79 : static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfoInternal *r)
    3735             : {
    3736          79 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3737          79 :         if (ndr_flags & NDR_SCALARS) {
    3738          77 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3739          77 :                 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob));
    3740          77 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3741             :         }
    3742          79 :         if (ndr_flags & NDR_BUFFERS) {
    3743          77 :                 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob));
    3744             :         }
    3745          75 :         return NDR_ERR_SUCCESS;
    3746             : }
    3747             : 
    3748           2 : _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfoInternal *r)
    3749             : {
    3750           2 :         ndr_print_struct(ndr, name, "lsa_TrustDomainInfoAuthInfoInternal");
    3751           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3752           2 :         ndr->depth++;
    3753           2 :         ndr_print_lsa_DATA_BUF2(ndr, "auth_blob", &r->auth_blob);
    3754           2 :         ndr->depth--;
    3755             : }
    3756             : 
    3757           0 : static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfoInternal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfoInternal *r)
    3758             : {
    3759           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3760           0 :         if (ndr_flags & NDR_SCALARS) {
    3761           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3762           0 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
    3763           0 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
    3764           0 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info));
    3765           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3766             :         }
    3767           0 :         if (ndr_flags & NDR_BUFFERS) {
    3768           0 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
    3769           0 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info));
    3770             :         }
    3771           0 :         return NDR_ERR_SUCCESS;
    3772             : }
    3773             : 
    3774           4 : static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfoInternal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfoInternal *r)
    3775             : {
    3776           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3777           4 :         if (ndr_flags & NDR_SCALARS) {
    3778           2 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3779           2 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
    3780           2 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
    3781           2 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info));
    3782           2 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3783             :         }
    3784           4 :         if (ndr_flags & NDR_BUFFERS) {
    3785           2 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
    3786           2 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info));
    3787             :         }
    3788           0 :         return NDR_ERR_SUCCESS;
    3789             : }
    3790             : 
    3791           2 : _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfoInternal *r)
    3792             : {
    3793           2 :         ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfoInternal");
    3794           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3795           2 :         ndr->depth++;
    3796           2 :         ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
    3797           2 :         ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
    3798           2 :         ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", &r->auth_info);
    3799           2 :         ndr->depth--;
    3800             : }
    3801             : 
    3802        1458 : static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx2Internal *r)
    3803             : {
    3804        1458 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3805        1458 :         if (ndr_flags & NDR_SCALARS) {
    3806         729 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3807         729 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
    3808         729 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->forest_trust_length));
    3809         729 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest_trust_data));
    3810         729 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3811             :         }
    3812        1458 :         if (ndr_flags & NDR_BUFFERS) {
    3813         729 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
    3814         729 :                 if (r->forest_trust_data) {
    3815           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->forest_trust_length));
    3816           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->forest_trust_data, r->forest_trust_length));
    3817             :                 }
    3818             :         }
    3819        1458 :         return NDR_ERR_SUCCESS;
    3820             : }
    3821             : 
    3822        1168 : static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx2Internal *r)
    3823             : {
    3824             :         uint32_t _ptr_forest_trust_data;
    3825        1168 :         uint32_t size_forest_trust_data_1 = 0;
    3826        1168 :         TALLOC_CTX *_mem_save_forest_trust_data_0 = NULL;
    3827        1168 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3828        1168 :         if (ndr_flags & NDR_SCALARS) {
    3829         584 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3830         584 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
    3831         584 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->forest_trust_length));
    3832         584 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_data));
    3833         584 :                 if (_ptr_forest_trust_data) {
    3834           0 :                         NDR_PULL_ALLOC(ndr, r->forest_trust_data);
    3835             :                 } else {
    3836         584 :                         r->forest_trust_data = NULL;
    3837             :                 }
    3838         584 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3839             :         }
    3840        1168 :         if (ndr_flags & NDR_BUFFERS) {
    3841         584 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
    3842         584 :                 if (r->forest_trust_data) {
    3843           0 :                         _mem_save_forest_trust_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3844           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->forest_trust_data, 0);
    3845           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->forest_trust_data));
    3846           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->forest_trust_data, &size_forest_trust_data_1));
    3847           0 :                         NDR_PULL_ALLOC_N(ndr, r->forest_trust_data, size_forest_trust_data_1);
    3848           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->forest_trust_data, size_forest_trust_data_1));
    3849           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_data_0, 0);
    3850             :                 }
    3851         584 :                 if (r->forest_trust_data) {
    3852           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->forest_trust_data, r->forest_trust_length));
    3853             :                 }
    3854             :         }
    3855        1168 :         return NDR_ERR_SUCCESS;
    3856             : }
    3857             : 
    3858         290 : _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx2Internal *r)
    3859             : {
    3860         290 :         ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoEx2Internal");
    3861         290 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3862         290 :         ndr->depth++;
    3863         290 :         ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
    3864         290 :         ndr_print_uint32(ndr, "forest_trust_length", r->forest_trust_length);
    3865         290 :         ndr_print_ptr(ndr, "forest_trust_data", r->forest_trust_data);
    3866         290 :         ndr->depth++;
    3867         290 :         if (r->forest_trust_data) {
    3868           0 :                 ndr_print_array_uint8(ndr, "forest_trust_data", r->forest_trust_data, r->forest_trust_length);
    3869             :         }
    3870         290 :         ndr->depth--;
    3871         290 :         ndr->depth--;
    3872             : }
    3873             : 
    3874        1458 : static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo2Internal *r)
    3875             : {
    3876        1458 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3877        1458 :         if (ndr_flags & NDR_SCALARS) {
    3878         729 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3879         729 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info));
    3880         729 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
    3881         729 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
    3882         729 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3883             :         }
    3884        1458 :         if (ndr_flags & NDR_BUFFERS) {
    3885         729 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info));
    3886         729 :                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
    3887             :         }
    3888        1458 :         return NDR_ERR_SUCCESS;
    3889             : }
    3890             : 
    3891        1168 : static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo2Internal *r)
    3892             : {
    3893        1168 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3894        1168 :         if (ndr_flags & NDR_SCALARS) {
    3895         584 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3896         584 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info));
    3897         584 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
    3898         584 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
    3899         584 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3900             :         }
    3901        1168 :         if (ndr_flags & NDR_BUFFERS) {
    3902         584 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info));
    3903         584 :                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
    3904             :         }
    3905        1168 :         return NDR_ERR_SUCCESS;
    3906             : }
    3907             : 
    3908         290 : _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo2Internal *r)
    3909             : {
    3910         290 :         ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfo2Internal");
    3911         290 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3912         290 :         ndr->depth++;
    3913         290 :         ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr, "info", &r->info);
    3914         290 :         ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
    3915         290 :         ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
    3916         290 :         ndr->depth--;
    3917             : }
    3918             : 
    3919         761 : static enum ndr_err_code ndr_push_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoSupportedEncTypes *r)
    3920             : {
    3921         761 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3922         761 :         if (ndr_flags & NDR_SCALARS) {
    3923         761 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    3924         761 :                 NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->enc_types));
    3925         761 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    3926             :         }
    3927         761 :         if (ndr_flags & NDR_BUFFERS) {
    3928             :         }
    3929         761 :         return NDR_ERR_SUCCESS;
    3930             : }
    3931             : 
    3932         616 : static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoSupportedEncTypes *r)
    3933             : {
    3934         616 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3935         616 :         if (ndr_flags & NDR_SCALARS) {
    3936         616 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    3937         616 :                 NDR_CHECK(ndr_pull_kerb_EncTypes(ndr, NDR_SCALARS, &r->enc_types));
    3938         616 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    3939             :         }
    3940         616 :         if (ndr_flags & NDR_BUFFERS) {
    3941             :         }
    3942         616 :         return NDR_ERR_SUCCESS;
    3943             : }
    3944             : 
    3945         290 : _PUBLIC_ void ndr_print_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoSupportedEncTypes *r)
    3946             : {
    3947         290 :         ndr_print_struct(ndr, name, "lsa_TrustDomainInfoSupportedEncTypes");
    3948         290 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3949         290 :         ndr->depth++;
    3950         290 :         ndr_print_kerb_EncTypes(ndr, "enc_types", r->enc_types);
    3951         290 :         ndr->depth--;
    3952             : }
    3953             : 
    3954        4784 : static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, int ndr_flags, const union lsa_TrustedDomainInfo *r)
    3955             : {
    3956             :         uint32_t level;
    3957        4784 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3958        4784 :         if (ndr_flags & NDR_SCALARS) {
    3959             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    3960        4784 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3961        4784 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    3962        4784 :                 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, level));
    3963        4784 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    3964        4784 :                 switch (level) {
    3965         729 :                         case LSA_TRUSTED_DOMAIN_INFO_NAME: {
    3966         729 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name));
    3967         729 :                         break; }
    3968             : 
    3969           0 :                         case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: {
    3970           0 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr, NDR_SCALARS, &r->controllers));
    3971           0 :                         break; }
    3972             : 
    3973         729 :                         case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: {
    3974         729 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
    3975         729 :                         break; }
    3976             : 
    3977           0 :                         case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: {
    3978           0 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr, NDR_SCALARS, &r->password));
    3979           0 :                         break; }
    3980             : 
    3981           0 :                         case LSA_TRUSTED_DOMAIN_INFO_BASIC: {
    3982           0 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr, NDR_SCALARS, &r->info_basic));
    3983           0 :                         break; }
    3984             : 
    3985        1083 :                         case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: {
    3986        1083 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
    3987        1083 :                         break; }
    3988             : 
    3989           0 :                         case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: {
    3990           0 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
    3991           0 :                         break; }
    3992             : 
    3993         753 :                         case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: {
    3994         753 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info));
    3995         753 :                         break; }
    3996             : 
    3997           0 :                         case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: {
    3998           0 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info_internal));
    3999           0 :                         break; }
    4000             : 
    4001           0 :                         case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: {
    4002           0 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_SCALARS, &r->full_info_internal));
    4003           0 :                         break; }
    4004             : 
    4005           0 :                         case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: {
    4006           0 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info_ex2_internal));
    4007           0 :                         break; }
    4008             : 
    4009         729 :                         case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: {
    4010         729 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal));
    4011         729 :                         break; }
    4012             : 
    4013         761 :                         case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: {
    4014         761 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types));
    4015         761 :                         break; }
    4016             : 
    4017           0 :                         default:
    4018           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    4019             :                 }
    4020           0 :         }
    4021        4784 :         if (ndr_flags & NDR_BUFFERS) {
    4022        4784 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4023             :                         /* We didn't get it above, and the token is not needed after this. */
    4024           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4025             :                 }
    4026        4784 :                 switch (level) {
    4027         729 :                         case LSA_TRUSTED_DOMAIN_INFO_NAME:
    4028         729 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name));
    4029         729 :                         break;
    4030             : 
    4031           0 :                         case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
    4032           0 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr, NDR_BUFFERS, &r->controllers));
    4033           0 :                         break;
    4034             : 
    4035         729 :                         case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
    4036         729 :                         break;
    4037             : 
    4038           0 :                         case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
    4039           0 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr, NDR_BUFFERS, &r->password));
    4040           0 :                         break;
    4041             : 
    4042           0 :                         case LSA_TRUSTED_DOMAIN_INFO_BASIC:
    4043           0 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr, NDR_BUFFERS, &r->info_basic));
    4044           0 :                         break;
    4045             : 
    4046        1083 :                         case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
    4047        1083 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
    4048        1083 :                         break;
    4049             : 
    4050           0 :                         case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
    4051           0 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
    4052           0 :                         break;
    4053             : 
    4054         753 :                         case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
    4055         753 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info));
    4056         753 :                         break;
    4057             : 
    4058           0 :                         case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
    4059           0 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info_internal));
    4060           0 :                         break;
    4061             : 
    4062           0 :                         case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
    4063           0 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_BUFFERS, &r->full_info_internal));
    4064           0 :                         break;
    4065             : 
    4066           0 :                         case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
    4067           0 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info_ex2_internal));
    4068           0 :                         break;
    4069             : 
    4070         729 :                         case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
    4071         729 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal));
    4072         729 :                         break;
    4073             : 
    4074         761 :                         case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES:
    4075         761 :                         break;
    4076             : 
    4077           0 :                         default:
    4078           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    4079             :                 }
    4080           0 :         }
    4081        4784 :         return NDR_ERR_SUCCESS;
    4082             : }
    4083             : 
    4084        3806 : static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, int ndr_flags, union lsa_TrustedDomainInfo *r)
    4085             : {
    4086             :         uint32_t level;
    4087             :         uint16_t _level;
    4088        3806 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4089        3806 :         if (ndr_flags & NDR_SCALARS) {
    4090             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4091        3806 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4092        3806 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4093        3806 :                 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
    4094        3806 :                 if (_level != level) {
    4095           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    4096             :                 }
    4097        3806 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4098        3806 :                 switch (level) {
    4099         584 :                         case LSA_TRUSTED_DOMAIN_INFO_NAME: {
    4100         584 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name));
    4101         584 :                         break; }
    4102             : 
    4103           0 :                         case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: {
    4104           0 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr, NDR_SCALARS, &r->controllers));
    4105           0 :                         break; }
    4106             : 
    4107         584 :                         case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: {
    4108         584 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
    4109         584 :                         break; }
    4110             : 
    4111           0 :                         case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: {
    4112           0 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr, NDR_SCALARS, &r->password));
    4113           0 :                         break; }
    4114             : 
    4115           0 :                         case LSA_TRUSTED_DOMAIN_INFO_BASIC: {
    4116           0 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr, NDR_SCALARS, &r->info_basic));
    4117           0 :                         break; }
    4118             : 
    4119         828 :                         case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: {
    4120         828 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
    4121         828 :                         break; }
    4122             : 
    4123           0 :                         case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: {
    4124           0 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
    4125           0 :                         break; }
    4126             : 
    4127         608 :                         case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: {
    4128         608 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info));
    4129         608 :                         break; }
    4130             : 
    4131           0 :                         case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: {
    4132           0 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info_internal));
    4133           0 :                         break; }
    4134             : 
    4135           2 :                         case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: {
    4136           2 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_SCALARS, &r->full_info_internal));
    4137           0 :                         break; }
    4138             : 
    4139           0 :                         case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: {
    4140           0 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info_ex2_internal));
    4141           0 :                         break; }
    4142             : 
    4143         584 :                         case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: {
    4144         584 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal));
    4145         584 :                         break; }
    4146             : 
    4147         616 :                         case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: {
    4148         616 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types));
    4149         616 :                         break; }
    4150             : 
    4151           0 :                         default:
    4152           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    4153             :                 }
    4154           0 :         }
    4155        3806 :         if (ndr_flags & NDR_BUFFERS) {
    4156        3806 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4157             :                         /* We didn't get it above, and the token is not needed after this. */
    4158           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4159             :                 }
    4160        3806 :                 switch (level) {
    4161         584 :                         case LSA_TRUSTED_DOMAIN_INFO_NAME:
    4162         584 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name));
    4163         584 :                         break;
    4164             : 
    4165           0 :                         case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
    4166           0 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr, NDR_BUFFERS, &r->controllers));
    4167           0 :                         break;
    4168             : 
    4169         584 :                         case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
    4170         584 :                         break;
    4171             : 
    4172           0 :                         case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
    4173           0 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr, NDR_BUFFERS, &r->password));
    4174           0 :                         break;
    4175             : 
    4176           0 :                         case LSA_TRUSTED_DOMAIN_INFO_BASIC:
    4177           0 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr, NDR_BUFFERS, &r->info_basic));
    4178           0 :                         break;
    4179             : 
    4180         828 :                         case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
    4181         828 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
    4182         828 :                         break;
    4183             : 
    4184           0 :                         case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
    4185           0 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
    4186           0 :                         break;
    4187             : 
    4188         608 :                         case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
    4189         608 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info));
    4190         608 :                         break;
    4191             : 
    4192           0 :                         case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
    4193           0 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info_internal));
    4194           0 :                         break;
    4195             : 
    4196           2 :                         case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
    4197           2 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_BUFFERS, &r->full_info_internal));
    4198           0 :                         break;
    4199             : 
    4200           0 :                         case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
    4201           0 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info_ex2_internal));
    4202           0 :                         break;
    4203             : 
    4204         584 :                         case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
    4205         584 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal));
    4206         584 :                         break;
    4207             : 
    4208         616 :                         case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES:
    4209         616 :                         break;
    4210             : 
    4211           0 :                         default:
    4212           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    4213             :                 }
    4214           0 :         }
    4215        3804 :         return NDR_ERR_SUCCESS;
    4216             : }
    4217             : 
    4218        1816 : _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char *name, const union lsa_TrustedDomainInfo *r)
    4219             : {
    4220             :         uint32_t level;
    4221        1816 :         level = ndr_print_steal_switch_value(ndr, r);
    4222        1816 :         ndr_print_union(ndr, name, level, "lsa_TrustedDomainInfo");
    4223        1816 :         switch (level) {
    4224         290 :                 case LSA_TRUSTED_DOMAIN_INFO_NAME:
    4225         290 :                         ndr_print_lsa_TrustDomainInfoName(ndr, "name", &r->name);
    4226         290 :                 break;
    4227             : 
    4228           0 :                 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
    4229           0 :                         ndr_print_lsa_TrustDomainInfoControllers(ndr, "controllers", &r->controllers);
    4230           0 :                 break;
    4231             : 
    4232         290 :                 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
    4233         290 :                         ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
    4234         290 :                 break;
    4235             : 
    4236           0 :                 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
    4237           0 :                         ndr_print_lsa_TrustDomainInfoPassword(ndr, "password", &r->password);
    4238           0 :                 break;
    4239             : 
    4240           0 :                 case LSA_TRUSTED_DOMAIN_INFO_BASIC:
    4241           0 :                         ndr_print_lsa_TrustDomainInfoBasic(ndr, "info_basic", &r->info_basic);
    4242           0 :                 break;
    4243             : 
    4244         364 :                 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
    4245         364 :                         ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
    4246         364 :                 break;
    4247             : 
    4248           0 :                 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
    4249           0 :                         ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
    4250           0 :                 break;
    4251             : 
    4252         290 :                 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
    4253         290 :                         ndr_print_lsa_TrustDomainInfoFullInfo(ndr, "full_info", &r->full_info);
    4254         290 :                 break;
    4255             : 
    4256           0 :                 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
    4257           0 :                         ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info_internal", &r->auth_info_internal);
    4258           0 :                 break;
    4259             : 
    4260           2 :                 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
    4261           2 :                         ndr_print_lsa_TrustDomainInfoFullInfoInternal(ndr, "full_info_internal", &r->full_info_internal);
    4262           2 :                 break;
    4263             : 
    4264           0 :                 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
    4265           0 :                         ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr, "info_ex2_internal", &r->info_ex2_internal);
    4266           0 :                 break;
    4267             : 
    4268         290 :                 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
    4269         290 :                         ndr_print_lsa_TrustDomainInfoFullInfo2Internal(ndr, "full_info2_internal", &r->full_info2_internal);
    4270         290 :                 break;
    4271             : 
    4272         290 :                 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES:
    4273         290 :                         ndr_print_lsa_TrustDomainInfoSupportedEncTypes(ndr, "enc_types", &r->enc_types);
    4274         290 :                 break;
    4275             : 
    4276           0 :                 default:
    4277           0 :                         ndr_print_bad_level(ndr, name, level);
    4278             :         }
    4279        1816 : }
    4280             : 
    4281        3188 : static enum ndr_err_code ndr_push_lsa_DATA_BUF_PTR(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF_PTR *r)
    4282             : {
    4283        3188 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4284        3188 :         if (ndr_flags & NDR_SCALARS) {
    4285        3188 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4286        3188 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->buf));
    4287        3188 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4288             :         }
    4289        3188 :         if (ndr_flags & NDR_BUFFERS) {
    4290        3188 :                 if (r->buf) {
    4291        1374 :                         NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->buf));
    4292             :                 }
    4293             :         }
    4294        3188 :         return NDR_ERR_SUCCESS;
    4295             : }
    4296             : 
    4297        3152 : static enum ndr_err_code ndr_pull_lsa_DATA_BUF_PTR(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF_PTR *r)
    4298             : {
    4299             :         uint32_t _ptr_buf;
    4300        3152 :         TALLOC_CTX *_mem_save_buf_0 = NULL;
    4301        3152 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4302        3152 :         if (ndr_flags & NDR_SCALARS) {
    4303        3152 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4304        3152 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buf));
    4305        3152 :                 if (_ptr_buf) {
    4306        1744 :                         NDR_PULL_ALLOC(ndr, r->buf);
    4307             :                 } else {
    4308        1408 :                         r->buf = NULL;
    4309             :                 }
    4310        3152 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4311             :         }
    4312        3152 :         if (ndr_flags & NDR_BUFFERS) {
    4313        3152 :                 if (r->buf) {
    4314        1744 :                         _mem_save_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4315        1744 :                         NDR_PULL_SET_MEM_CTX(ndr, r->buf, 0);
    4316        1744 :                         NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->buf));
    4317        1744 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buf_0, 0);
    4318             :                 }
    4319             :         }
    4320        3148 :         return NDR_ERR_SUCCESS;
    4321             : }
    4322             : 
    4323          84 : _PUBLIC_ void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF_PTR *r)
    4324             : {
    4325          84 :         ndr_print_struct(ndr, name, "lsa_DATA_BUF_PTR");
    4326          84 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4327          84 :         ndr->depth++;
    4328          84 :         ndr_print_ptr(ndr, "buf", r->buf);
    4329          84 :         ndr->depth++;
    4330          84 :         if (r->buf) {
    4331          66 :                 ndr_print_lsa_DATA_BUF(ndr, "buf", r->buf);
    4332             :         }
    4333          84 :         ndr->depth--;
    4334          84 :         ndr->depth--;
    4335             : }
    4336             : 
    4337         214 : static enum ndr_err_code ndr_push_lsa_RightSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_RightSet *r)
    4338             : {
    4339             :         uint32_t cntr_names_1;
    4340         214 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4341         214 :         if (ndr_flags & NDR_SCALARS) {
    4342         214 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4343         214 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    4344         214 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
    4345         214 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4346             :         }
    4347         214 :         if (ndr_flags & NDR_BUFFERS) {
    4348         214 :                 if (r->names) {
    4349         126 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    4350         826 :                         for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    4351         700 :                                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
    4352             :                         }
    4353         826 :                         for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    4354         700 :                                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
    4355             :                         }
    4356             :                 }
    4357             :         }
    4358         214 :         return NDR_ERR_SUCCESS;
    4359             : }
    4360             : 
    4361         241 : static enum ndr_err_code ndr_pull_lsa_RightSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_RightSet *r)
    4362             : {
    4363             :         uint32_t _ptr_names;
    4364         241 :         uint32_t size_names_1 = 0;
    4365             :         uint32_t cntr_names_1;
    4366         241 :         TALLOC_CTX *_mem_save_names_0 = NULL;
    4367         241 :         TALLOC_CTX *_mem_save_names_1 = NULL;
    4368         241 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4369         241 :         if (ndr_flags & NDR_SCALARS) {
    4370         241 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4371         241 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    4372         241 :                 if (r->count > 256) {
    4373           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    4374             :                 }
    4375         241 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
    4376         241 :                 if (_ptr_names) {
    4377         119 :                         NDR_PULL_ALLOC(ndr, r->names);
    4378             :                 } else {
    4379         122 :                         r->names = NULL;
    4380             :                 }
    4381         241 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4382             :         }
    4383         241 :         if (ndr_flags & NDR_BUFFERS) {
    4384         241 :                 if (r->names) {
    4385         119 :                         _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4386         119 :                         NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
    4387         119 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
    4388         119 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->names, &size_names_1));
    4389         119 :                         NDR_PULL_ALLOC_N(ndr, r->names, size_names_1);
    4390         119 :                         _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
    4391         119 :                         NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
    4392         778 :                         for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    4393         659 :                                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
    4394             :                         }
    4395         778 :                         for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    4396         659 :                                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
    4397             :                         }
    4398         119 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
    4399         119 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
    4400             :                 }
    4401         241 :                 if (r->names) {
    4402         119 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
    4403             :                 }
    4404         432 :                 for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    4405             :                 }
    4406             :         }
    4407         241 :         return NDR_ERR_SUCCESS;
    4408             : }
    4409             : 
    4410          12 : _PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, const struct lsa_RightSet *r)
    4411             : {
    4412             :         uint32_t cntr_names_1;
    4413          12 :         ndr_print_struct(ndr, name, "lsa_RightSet");
    4414          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4415          12 :         ndr->depth++;
    4416          12 :         ndr_print_uint32(ndr, "count", r->count);
    4417          12 :         ndr_print_ptr(ndr, "names", r->names);
    4418          12 :         ndr->depth++;
    4419          12 :         if (r->names) {
    4420          12 :                 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
    4421          12 :                 ndr->depth++;
    4422          92 :                 for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    4423          80 :                         ndr_print_lsa_StringLarge(ndr, "names", &r->names[cntr_names_1]);
    4424             :                 }
    4425          12 :                 ndr->depth--;
    4426             :         }
    4427          12 :         ndr->depth--;
    4428          12 :         ndr->depth--;
    4429             : }
    4430             : 
    4431          70 : static enum ndr_err_code ndr_push_lsa_DomainListEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainListEx *r)
    4432             : {
    4433             :         uint32_t cntr_domains_1;
    4434          70 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4435          70 :         if (ndr_flags & NDR_SCALARS) {
    4436          70 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4437          70 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    4438          70 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
    4439          70 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4440             :         }
    4441          70 :         if (ndr_flags & NDR_BUFFERS) {
    4442          70 :                 if (r->domains) {
    4443          60 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    4444         255 :                         for (cntr_domains_1 = 0; cntr_domains_1 < (r->count); cntr_domains_1++) {
    4445         195 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
    4446             :                         }
    4447         255 :                         for (cntr_domains_1 = 0; cntr_domains_1 < (r->count); cntr_domains_1++) {
    4448         195 :                                 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
    4449             :                         }
    4450             :                 }
    4451             :         }
    4452          70 :         return NDR_ERR_SUCCESS;
    4453             : }
    4454             : 
    4455          56 : static enum ndr_err_code ndr_pull_lsa_DomainListEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainListEx *r)
    4456             : {
    4457             :         uint32_t _ptr_domains;
    4458          56 :         uint32_t size_domains_1 = 0;
    4459             :         uint32_t cntr_domains_1;
    4460          56 :         TALLOC_CTX *_mem_save_domains_0 = NULL;
    4461          56 :         TALLOC_CTX *_mem_save_domains_1 = NULL;
    4462          56 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4463          56 :         if (ndr_flags & NDR_SCALARS) {
    4464          56 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4465          56 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    4466          56 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
    4467          56 :                 if (_ptr_domains) {
    4468          48 :                         NDR_PULL_ALLOC(ndr, r->domains);
    4469             :                 } else {
    4470           8 :                         r->domains = NULL;
    4471             :                 }
    4472          56 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4473             :         }
    4474          56 :         if (ndr_flags & NDR_BUFFERS) {
    4475          56 :                 if (r->domains) {
    4476          48 :                         _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4477          48 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
    4478          48 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
    4479          48 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->domains, &size_domains_1));
    4480          48 :                         NDR_PULL_ALLOC_N(ndr, r->domains, size_domains_1);
    4481          48 :                         _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
    4482          48 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
    4483         204 :                         for (cntr_domains_1 = 0; cntr_domains_1 < (size_domains_1); cntr_domains_1++) {
    4484         156 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
    4485             :                         }
    4486         204 :                         for (cntr_domains_1 = 0; cntr_domains_1 < (size_domains_1); cntr_domains_1++) {
    4487         156 :                                 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
    4488             :                         }
    4489          48 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
    4490          48 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
    4491             :                 }
    4492          56 :                 if (r->domains) {
    4493          48 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
    4494             :                 }
    4495          56 :                 for (cntr_domains_1 = 0; cntr_domains_1 < (size_domains_1); cntr_domains_1++) {
    4496             :                 }
    4497             :         }
    4498          56 :         return NDR_ERR_SUCCESS;
    4499             : }
    4500             : 
    4501          28 : _PUBLIC_ void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name, const struct lsa_DomainListEx *r)
    4502             : {
    4503             :         uint32_t cntr_domains_1;
    4504          28 :         ndr_print_struct(ndr, name, "lsa_DomainListEx");
    4505          28 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4506          28 :         ndr->depth++;
    4507          28 :         ndr_print_uint32(ndr, "count", r->count);
    4508          28 :         ndr_print_ptr(ndr, "domains", r->domains);
    4509          28 :         ndr->depth++;
    4510          28 :         if (r->domains) {
    4511          24 :                 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
    4512          24 :                 ndr->depth++;
    4513         102 :                 for (cntr_domains_1 = 0; cntr_domains_1 < (r->count); cntr_domains_1++) {
    4514          78 :                         ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "domains", &r->domains[cntr_domains_1]);
    4515             :                 }
    4516          24 :                 ndr->depth--;
    4517             :         }
    4518          28 :         ndr->depth--;
    4519          28 :         ndr->depth--;
    4520             : }
    4521             : 
    4522          20 : static enum ndr_err_code ndr_push_lsa_krbAuthenticationOptions(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    4523             : {
    4524          20 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    4525          20 :         return NDR_ERR_SUCCESS;
    4526             : }
    4527             : 
    4528          16 : static enum ndr_err_code ndr_pull_lsa_krbAuthenticationOptions(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    4529             : {
    4530             :         uint32_t v;
    4531          16 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    4532          16 :         *r = v;
    4533          16 :         return NDR_ERR_SUCCESS;
    4534             : }
    4535             : 
    4536           8 : _PUBLIC_ void ndr_print_lsa_krbAuthenticationOptions(struct ndr_print *ndr, const char *name, uint32_t r)
    4537             : {
    4538           8 :         ndr_print_uint32(ndr, name, r);
    4539           8 :         ndr->depth++;
    4540           8 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_KERBEROS_VALIDATE_CLIENT", LSA_POLICY_KERBEROS_VALIDATE_CLIENT, r);
    4541           8 :         ndr->depth--;
    4542           8 : }
    4543             : 
    4544          20 : static enum ndr_err_code ndr_push_lsa_DomainInfoKerberos(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoKerberos *r)
    4545             : {
    4546          20 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4547          20 :         if (ndr_flags & NDR_SCALARS) {
    4548          20 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    4549          20 :                 NDR_CHECK(ndr_push_lsa_krbAuthenticationOptions(ndr, NDR_SCALARS, r->authentication_options));
    4550          20 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->service_tkt_lifetime));
    4551          20 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->user_tkt_lifetime));
    4552          20 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->user_tkt_renewaltime));
    4553          20 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->clock_skew));
    4554          20 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->reserved));
    4555          20 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    4556             :         }
    4557          20 :         if (ndr_flags & NDR_BUFFERS) {
    4558             :         }
    4559          20 :         return NDR_ERR_SUCCESS;
    4560             : }
    4561             : 
    4562          16 : static enum ndr_err_code ndr_pull_lsa_DomainInfoKerberos(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoKerberos *r)
    4563             : {
    4564          16 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4565          16 :         if (ndr_flags & NDR_SCALARS) {
    4566          16 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    4567          16 :                 NDR_CHECK(ndr_pull_lsa_krbAuthenticationOptions(ndr, NDR_SCALARS, &r->authentication_options));
    4568          16 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->service_tkt_lifetime));
    4569          16 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->user_tkt_lifetime));
    4570          16 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->user_tkt_renewaltime));
    4571          16 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->clock_skew));
    4572          16 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->reserved));
    4573          16 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    4574             :         }
    4575          16 :         if (ndr_flags & NDR_BUFFERS) {
    4576             :         }
    4577          16 :         return NDR_ERR_SUCCESS;
    4578             : }
    4579             : 
    4580           8 : _PUBLIC_ void ndr_print_lsa_DomainInfoKerberos(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoKerberos *r)
    4581             : {
    4582           8 :         ndr_print_struct(ndr, name, "lsa_DomainInfoKerberos");
    4583           8 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4584           8 :         ndr->depth++;
    4585           8 :         ndr_print_lsa_krbAuthenticationOptions(ndr, "authentication_options", r->authentication_options);
    4586           8 :         ndr_print_hyper(ndr, "service_tkt_lifetime", r->service_tkt_lifetime);
    4587           8 :         ndr_print_hyper(ndr, "user_tkt_lifetime", r->user_tkt_lifetime);
    4588           8 :         ndr_print_hyper(ndr, "user_tkt_renewaltime", r->user_tkt_renewaltime);
    4589           8 :         ndr_print_hyper(ndr, "clock_skew", r->clock_skew);
    4590           8 :         ndr_print_hyper(ndr, "reserved", r->reserved);
    4591           8 :         ndr->depth--;
    4592             : }
    4593             : 
    4594           0 : static enum ndr_err_code ndr_push_lsa_DomainInfoEfs(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoEfs *r)
    4595             : {
    4596           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4597           0 :         if (ndr_flags & NDR_SCALARS) {
    4598           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4599           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->blob_size));
    4600           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->efs_blob));
    4601           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4602             :         }
    4603           0 :         if (ndr_flags & NDR_BUFFERS) {
    4604           0 :                 if (r->efs_blob) {
    4605           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->blob_size));
    4606           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->efs_blob, r->blob_size));
    4607             :                 }
    4608             :         }
    4609           0 :         return NDR_ERR_SUCCESS;
    4610             : }
    4611             : 
    4612           0 : static enum ndr_err_code ndr_pull_lsa_DomainInfoEfs(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoEfs *r)
    4613             : {
    4614             :         uint32_t _ptr_efs_blob;
    4615           0 :         uint32_t size_efs_blob_1 = 0;
    4616           0 :         TALLOC_CTX *_mem_save_efs_blob_0 = NULL;
    4617           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4618           0 :         if (ndr_flags & NDR_SCALARS) {
    4619           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4620           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blob_size));
    4621           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_efs_blob));
    4622           0 :                 if (_ptr_efs_blob) {
    4623           0 :                         NDR_PULL_ALLOC(ndr, r->efs_blob);
    4624             :                 } else {
    4625           0 :                         r->efs_blob = NULL;
    4626             :                 }
    4627           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4628             :         }
    4629           0 :         if (ndr_flags & NDR_BUFFERS) {
    4630           0 :                 if (r->efs_blob) {
    4631           0 :                         _mem_save_efs_blob_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4632           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->efs_blob, 0);
    4633           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->efs_blob));
    4634           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->efs_blob, &size_efs_blob_1));
    4635           0 :                         NDR_PULL_ALLOC_N(ndr, r->efs_blob, size_efs_blob_1);
    4636           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->efs_blob, size_efs_blob_1));
    4637           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_efs_blob_0, 0);
    4638             :                 }
    4639           0 :                 if (r->efs_blob) {
    4640           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->efs_blob, r->blob_size));
    4641             :                 }
    4642             :         }
    4643           0 :         return NDR_ERR_SUCCESS;
    4644             : }
    4645             : 
    4646           0 : _PUBLIC_ void ndr_print_lsa_DomainInfoEfs(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoEfs *r)
    4647             : {
    4648           0 :         ndr_print_struct(ndr, name, "lsa_DomainInfoEfs");
    4649           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4650           0 :         ndr->depth++;
    4651           0 :         ndr_print_uint32(ndr, "blob_size", r->blob_size);
    4652           0 :         ndr_print_ptr(ndr, "efs_blob", r->efs_blob);
    4653           0 :         ndr->depth++;
    4654           0 :         if (r->efs_blob) {
    4655           0 :                 ndr_print_array_uint8(ndr, "efs_blob", r->efs_blob, r->blob_size);
    4656             :         }
    4657           0 :         ndr->depth--;
    4658           0 :         ndr->depth--;
    4659             : }
    4660             : 
    4661          20 : static enum ndr_err_code ndr_push_lsa_DomainInformationPolicy(struct ndr_push *ndr, int ndr_flags, const union lsa_DomainInformationPolicy *r)
    4662             : {
    4663             :         uint32_t level;
    4664          20 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4665          20 :         if (ndr_flags & NDR_SCALARS) {
    4666             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4667          20 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4668          20 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    4669          20 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
    4670          20 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    4671          20 :                 switch (level) {
    4672           0 :                         case LSA_DOMAIN_INFO_POLICY_EFS: {
    4673           0 :                                 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info));
    4674           0 :                         break; }
    4675             : 
    4676          20 :                         case LSA_DOMAIN_INFO_POLICY_KERBEROS: {
    4677          20 :                                 NDR_CHECK(ndr_push_lsa_DomainInfoKerberos(ndr, NDR_SCALARS, &r->kerberos_info));
    4678          20 :                         break; }
    4679             : 
    4680           0 :                         default:
    4681           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    4682             :                 }
    4683           0 :         }
    4684          20 :         if (ndr_flags & NDR_BUFFERS) {
    4685          20 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4686             :                         /* We didn't get it above, and the token is not needed after this. */
    4687           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4688             :                 }
    4689          20 :                 switch (level) {
    4690           0 :                         case LSA_DOMAIN_INFO_POLICY_EFS:
    4691           0 :                                 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr, NDR_BUFFERS, &r->efs_info));
    4692           0 :                         break;
    4693             : 
    4694          20 :                         case LSA_DOMAIN_INFO_POLICY_KERBEROS:
    4695          20 :                         break;
    4696             : 
    4697           0 :                         default:
    4698           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    4699             :                 }
    4700           0 :         }
    4701          20 :         return NDR_ERR_SUCCESS;
    4702             : }
    4703             : 
    4704          16 : static enum ndr_err_code ndr_pull_lsa_DomainInformationPolicy(struct ndr_pull *ndr, int ndr_flags, union lsa_DomainInformationPolicy *r)
    4705             : {
    4706             :         uint32_t level;
    4707             :         uint16_t _level;
    4708          16 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4709          16 :         if (ndr_flags & NDR_SCALARS) {
    4710             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4711          16 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4712          16 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    4713          16 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
    4714          16 :                 if (_level != level) {
    4715           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    4716             :                 }
    4717          16 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    4718          16 :                 switch (level) {
    4719           0 :                         case LSA_DOMAIN_INFO_POLICY_EFS: {
    4720           0 :                                 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info));
    4721           0 :                         break; }
    4722             : 
    4723          16 :                         case LSA_DOMAIN_INFO_POLICY_KERBEROS: {
    4724          16 :                                 NDR_CHECK(ndr_pull_lsa_DomainInfoKerberos(ndr, NDR_SCALARS, &r->kerberos_info));
    4725          16 :                         break; }
    4726             : 
    4727           0 :                         default:
    4728           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    4729             :                 }
    4730           0 :         }
    4731          16 :         if (ndr_flags & NDR_BUFFERS) {
    4732          16 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4733             :                         /* We didn't get it above, and the token is not needed after this. */
    4734           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4735             :                 }
    4736          16 :                 switch (level) {
    4737           0 :                         case LSA_DOMAIN_INFO_POLICY_EFS:
    4738           0 :                                 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr, NDR_BUFFERS, &r->efs_info));
    4739           0 :                         break;
    4740             : 
    4741          16 :                         case LSA_DOMAIN_INFO_POLICY_KERBEROS:
    4742          16 :                         break;
    4743             : 
    4744           0 :                         default:
    4745           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    4746             :                 }
    4747           0 :         }
    4748          16 :         return NDR_ERR_SUCCESS;
    4749             : }
    4750             : 
    4751           8 : _PUBLIC_ void ndr_print_lsa_DomainInformationPolicy(struct ndr_print *ndr, const char *name, const union lsa_DomainInformationPolicy *r)
    4752             : {
    4753             :         uint32_t level;
    4754           8 :         level = ndr_print_steal_switch_value(ndr, r);
    4755           8 :         ndr_print_union(ndr, name, level, "lsa_DomainInformationPolicy");
    4756           8 :         switch (level) {
    4757           0 :                 case LSA_DOMAIN_INFO_POLICY_EFS:
    4758           0 :                         ndr_print_lsa_DomainInfoEfs(ndr, "efs_info", &r->efs_info);
    4759           0 :                 break;
    4760             : 
    4761           8 :                 case LSA_DOMAIN_INFO_POLICY_KERBEROS:
    4762           8 :                         ndr_print_lsa_DomainInfoKerberos(ndr, "kerberos_info", &r->kerberos_info);
    4763           8 :                 break;
    4764             : 
    4765           0 :                 default:
    4766           0 :                         ndr_print_bad_level(ndr, name, level);
    4767             :         }
    4768           8 : }
    4769             : 
    4770       80272 : static enum ndr_err_code ndr_push_lsa_TranslatedName2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName2 *r)
    4771             : {
    4772       80272 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4773       80272 :         if (ndr_flags & NDR_SCALARS) {
    4774       40136 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4775       40136 :                 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
    4776       40136 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
    4777       40136 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
    4778       40136 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
    4779       40136 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4780             :         }
    4781       80272 :         if (ndr_flags & NDR_BUFFERS) {
    4782       40136 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
    4783             :         }
    4784       65872 :         return NDR_ERR_SUCCESS;
    4785             : }
    4786             : 
    4787       69784 : static enum ndr_err_code ndr_pull_lsa_TranslatedName2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName2 *r)
    4788             : {
    4789       69784 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4790       69784 :         if (ndr_flags & NDR_SCALARS) {
    4791       34892 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4792       34892 :                 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
    4793       34892 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
    4794       34892 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
    4795       34892 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
    4796       34892 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4797             :         }
    4798       69784 :         if (ndr_flags & NDR_BUFFERS) {
    4799       34892 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
    4800             :         }
    4801       57756 :         return NDR_ERR_SUCCESS;
    4802             : }
    4803             : 
    4804       14426 : _PUBLIC_ void ndr_print_lsa_TranslatedName2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName2 *r)
    4805             : {
    4806       14426 :         ndr_print_struct(ndr, name, "lsa_TranslatedName2");
    4807       14426 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4808       14426 :         ndr->depth++;
    4809       14426 :         ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
    4810       14426 :         ndr_print_lsa_String(ndr, "name", &r->name);
    4811       14426 :         ndr_print_uint32(ndr, "sid_index", r->sid_index);
    4812       14426 :         ndr_print_uint32(ndr, "unknown", r->unknown);
    4813       14426 :         ndr->depth--;
    4814             : }
    4815             : 
    4816        1035 : static enum ndr_err_code ndr_push_lsa_TransNameArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray2 *r)
    4817             : {
    4818             :         uint32_t cntr_names_1;
    4819        1035 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4820        1035 :         if (ndr_flags & NDR_SCALARS) {
    4821        1035 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4822        1035 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    4823        1035 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
    4824        1035 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4825             :         }
    4826        1035 :         if (ndr_flags & NDR_BUFFERS) {
    4827        1035 :                 if (r->names) {
    4828         632 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    4829       40696 :                         for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    4830       40136 :                                 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
    4831             :                         }
    4832       40696 :                         for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    4833       40136 :                                 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
    4834             :                         }
    4835             :                 }
    4836             :         }
    4837         903 :         return NDR_ERR_SUCCESS;
    4838             : }
    4839             : 
    4840         964 : static enum ndr_err_code ndr_pull_lsa_TransNameArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray2 *r)
    4841             : {
    4842             :         uint32_t _ptr_names;
    4843         964 :         uint32_t size_names_1 = 0;
    4844             :         uint32_t cntr_names_1;
    4845         964 :         TALLOC_CTX *_mem_save_names_0 = NULL;
    4846         964 :         TALLOC_CTX *_mem_save_names_1 = NULL;
    4847         964 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4848         964 :         if (ndr_flags & NDR_SCALARS) {
    4849         964 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4850         964 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    4851         964 :                 if (r->count > 1000) {
    4852           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    4853             :                 }
    4854         964 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
    4855         964 :                 if (_ptr_names) {
    4856         388 :                         NDR_PULL_ALLOC(ndr, r->names);
    4857             :                 } else {
    4858         576 :                         r->names = NULL;
    4859             :                 }
    4860         964 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4861             :         }
    4862         964 :         if (ndr_flags & NDR_BUFFERS) {
    4863         964 :                 if (r->names) {
    4864         388 :                         _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4865         388 :                         NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
    4866         388 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
    4867         388 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->names, &size_names_1));
    4868         388 :                         NDR_PULL_ALLOC_N(ndr, r->names, size_names_1);
    4869         388 :                         _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
    4870         388 :                         NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
    4871       35280 :                         for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    4872       34892 :                                 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
    4873             :                         }
    4874       35218 :                         for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    4875       34892 :                                 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
    4876             :                         }
    4877         388 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
    4878         388 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
    4879             :                 }
    4880         964 :                 if (r->names) {
    4881         388 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
    4882             :                 }
    4883        6979 :                 for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    4884             :                 }
    4885             :         }
    4886         838 :         return NDR_ERR_SUCCESS;
    4887             : }
    4888             : 
    4889         152 : _PUBLIC_ void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray2 *r)
    4890             : {
    4891             :         uint32_t cntr_names_1;
    4892         152 :         ndr_print_struct(ndr, name, "lsa_TransNameArray2");
    4893         152 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4894         152 :         ndr->depth++;
    4895         152 :         ndr_print_uint32(ndr, "count", r->count);
    4896         152 :         ndr_print_ptr(ndr, "names", r->names);
    4897         152 :         ndr->depth++;
    4898         152 :         if (r->names) {
    4899         148 :                 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
    4900         148 :                 ndr->depth++;
    4901       14574 :                 for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    4902       14426 :                         ndr_print_lsa_TranslatedName2(ndr, "names", &r->names[cntr_names_1]);
    4903             :                 }
    4904         148 :                 ndr->depth--;
    4905             :         }
    4906         152 :         ndr->depth--;
    4907         152 :         ndr->depth--;
    4908             : }
    4909             : 
    4910        1034 : static enum ndr_err_code ndr_push_lsa_LookupOptions(struct ndr_push *ndr, int ndr_flags, enum lsa_LookupOptions r)
    4911             : {
    4912        1214 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    4913        1034 :         return NDR_ERR_SUCCESS;
    4914             : }
    4915             : 
    4916        1419 : static enum ndr_err_code ndr_pull_lsa_LookupOptions(struct ndr_pull *ndr, int ndr_flags, enum lsa_LookupOptions *r)
    4917             : {
    4918             :         uint32_t v;
    4919        1607 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    4920        1607 :         *r = v;
    4921        1419 :         return NDR_ERR_SUCCESS;
    4922             : }
    4923             : 
    4924           8 : _PUBLIC_ void ndr_print_lsa_LookupOptions(struct ndr_print *ndr, const char *name, enum lsa_LookupOptions r)
    4925             : {
    4926           8 :         const char *val = NULL;
    4927             : 
    4928           8 :         switch (r) {
    4929           8 :                 case LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES: val = "LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES"; break;
    4930           0 :                 case LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL: val = "LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL"; break;
    4931             :         }
    4932           8 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    4933           8 : }
    4934             : 
    4935        1034 : static enum ndr_err_code ndr_push_lsa_ClientRevision(struct ndr_push *ndr, int ndr_flags, enum lsa_ClientRevision r)
    4936             : {
    4937        1214 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    4938        1034 :         return NDR_ERR_SUCCESS;
    4939             : }
    4940             : 
    4941        1419 : static enum ndr_err_code ndr_pull_lsa_ClientRevision(struct ndr_pull *ndr, int ndr_flags, enum lsa_ClientRevision *r)
    4942             : {
    4943             :         uint32_t v;
    4944        1607 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    4945        1607 :         *r = v;
    4946        1419 :         return NDR_ERR_SUCCESS;
    4947             : }
    4948             : 
    4949           8 : _PUBLIC_ void ndr_print_lsa_ClientRevision(struct ndr_print *ndr, const char *name, enum lsa_ClientRevision r)
    4950             : {
    4951           8 :         const char *val = NULL;
    4952             : 
    4953           8 :         switch (r) {
    4954           0 :                 case LSA_CLIENT_REVISION_1: val = "LSA_CLIENT_REVISION_1"; break;
    4955           0 :                 case LSA_CLIENT_REVISION_2: val = "LSA_CLIENT_REVISION_2"; break;
    4956             :         }
    4957           8 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    4958           8 : }
    4959             : 
    4960          63 : static enum ndr_err_code ndr_push_lsa_TranslatedSid2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid2 *r)
    4961             : {
    4962          63 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4963          63 :         if (ndr_flags & NDR_SCALARS) {
    4964          63 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    4965          63 :                 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
    4966          63 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    4967          63 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
    4968          63 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
    4969          63 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    4970             :         }
    4971          63 :         if (ndr_flags & NDR_BUFFERS) {
    4972             :         }
    4973          63 :         return NDR_ERR_SUCCESS;
    4974             : }
    4975             : 
    4976          70 : static enum ndr_err_code ndr_pull_lsa_TranslatedSid2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid2 *r)
    4977             : {
    4978          70 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4979          70 :         if (ndr_flags & NDR_SCALARS) {
    4980          70 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    4981          70 :                 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
    4982          70 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    4983          70 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
    4984          70 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
    4985          70 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    4986             :         }
    4987          56 :         if (ndr_flags & NDR_BUFFERS) {
    4988             :         }
    4989          70 :         return NDR_ERR_SUCCESS;
    4990             : }
    4991             : 
    4992          28 : _PUBLIC_ void ndr_print_lsa_TranslatedSid2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid2 *r)
    4993             : {
    4994          28 :         ndr_print_struct(ndr, name, "lsa_TranslatedSid2");
    4995          28 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4996          28 :         ndr->depth++;
    4997          28 :         ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
    4998          28 :         ndr_print_uint32(ndr, "rid", r->rid);
    4999          28 :         ndr_print_uint32(ndr, "sid_index", r->sid_index);
    5000          28 :         ndr_print_uint32(ndr, "unknown", r->unknown);
    5001          28 :         ndr->depth--;
    5002             : }
    5003             : 
    5004          34 : static enum ndr_err_code ndr_push_lsa_TransSidArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray2 *r)
    5005             : {
    5006             :         uint32_t cntr_sids_1;
    5007          34 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5008          34 :         if (ndr_flags & NDR_SCALARS) {
    5009          34 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5010          34 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    5011          34 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
    5012          34 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5013             :         }
    5014          34 :         if (ndr_flags & NDR_BUFFERS) {
    5015          34 :                 if (r->sids) {
    5016          18 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    5017          81 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->count); cntr_sids_1++) {
    5018          63 :                                 NDR_CHECK(ndr_push_lsa_TranslatedSid2(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    5019             :                         }
    5020             :                 }
    5021             :         }
    5022          34 :         return NDR_ERR_SUCCESS;
    5023             : }
    5024             : 
    5025          36 : static enum ndr_err_code ndr_pull_lsa_TransSidArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray2 *r)
    5026             : {
    5027             :         uint32_t _ptr_sids;
    5028          36 :         uint32_t size_sids_1 = 0;
    5029             :         uint32_t cntr_sids_1;
    5030          36 :         TALLOC_CTX *_mem_save_sids_0 = NULL;
    5031          36 :         TALLOC_CTX *_mem_save_sids_1 = NULL;
    5032          36 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5033          36 :         if (ndr_flags & NDR_SCALARS) {
    5034          36 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5035          36 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    5036          36 :                 if (r->count > 1000) {
    5037           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    5038             :                 }
    5039          36 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
    5040          36 :                 if (_ptr_sids) {
    5041          18 :                         NDR_PULL_ALLOC(ndr, r->sids);
    5042             :                 } else {
    5043          18 :                         r->sids = NULL;
    5044             :                 }
    5045          36 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5046             :         }
    5047          36 :         if (ndr_flags & NDR_BUFFERS) {
    5048          36 :                 if (r->sids) {
    5049          18 :                         _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5050          18 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    5051          18 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
    5052          18 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
    5053          18 :                         NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
    5054          18 :                         _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5055          18 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    5056          88 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    5057          70 :                                 NDR_CHECK(ndr_pull_lsa_TranslatedSid2(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    5058             :                         }
    5059          18 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
    5060          18 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
    5061             :                 }
    5062          36 :                 if (r->sids) {
    5063          18 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->sids, r->count));
    5064             :                 }
    5065             :         }
    5066          32 :         return NDR_ERR_SUCCESS;
    5067             : }
    5068             : 
    5069           8 : _PUBLIC_ void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray2 *r)
    5070             : {
    5071             :         uint32_t cntr_sids_1;
    5072           8 :         ndr_print_struct(ndr, name, "lsa_TransSidArray2");
    5073           8 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5074           8 :         ndr->depth++;
    5075           8 :         ndr_print_uint32(ndr, "count", r->count);
    5076           8 :         ndr_print_ptr(ndr, "sids", r->sids);
    5077           8 :         ndr->depth++;
    5078           8 :         if (r->sids) {
    5079           6 :                 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
    5080           6 :                 ndr->depth++;
    5081          34 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (r->count); cntr_sids_1++) {
    5082          28 :                         ndr_print_lsa_TranslatedSid2(ndr, "sids", &r->sids[cntr_sids_1]);
    5083             :                 }
    5084           6 :                 ndr->depth--;
    5085             :         }
    5086           8 :         ndr->depth--;
    5087           8 :         ndr->depth--;
    5088             : }
    5089             : 
    5090       80318 : static enum ndr_err_code ndr_push_lsa_TranslatedSid3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid3 *r)
    5091             : {
    5092       80318 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5093       80318 :         if (ndr_flags & NDR_SCALARS) {
    5094       40159 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5095       40159 :                 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
    5096       40159 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    5097       40159 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
    5098       40159 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
    5099       40159 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5100             :         }
    5101       80318 :         if (ndr_flags & NDR_BUFFERS) {
    5102       40159 :                 if (r->sid) {
    5103       40119 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5104             :                 }
    5105             :         }
    5106       65918 :         return NDR_ERR_SUCCESS;
    5107             : }
    5108             : 
    5109       69820 : static enum ndr_err_code ndr_pull_lsa_TranslatedSid3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid3 *r)
    5110             : {
    5111             :         uint32_t _ptr_sid;
    5112       69820 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    5113       69820 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5114       69820 :         if (ndr_flags & NDR_SCALARS) {
    5115       34910 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5116       34910 :                 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
    5117       34910 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    5118       34910 :                 if (_ptr_sid) {
    5119       34910 :                         NDR_PULL_ALLOC(ndr, r->sid);
    5120             :                 } else {
    5121           0 :                         r->sid = NULL;
    5122             :                 }
    5123       34910 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
    5124       34910 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
    5125       34910 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5126             :         }
    5127       69820 :         if (ndr_flags & NDR_BUFFERS) {
    5128       34910 :                 if (r->sid) {
    5129       34910 :                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5130       34910 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    5131       34910 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5132       34910 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    5133             :                 }
    5134             :         }
    5135       57792 :         return NDR_ERR_SUCCESS;
    5136             : }
    5137             : 
    5138       14428 : _PUBLIC_ void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid3 *r)
    5139             : {
    5140       14428 :         ndr_print_struct(ndr, name, "lsa_TranslatedSid3");
    5141       14428 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5142       14428 :         ndr->depth++;
    5143       14428 :         ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
    5144       14428 :         ndr_print_ptr(ndr, "sid", r->sid);
    5145       14428 :         ndr->depth++;
    5146       14428 :         if (r->sid) {
    5147       14428 :                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    5148             :         }
    5149       14428 :         ndr->depth--;
    5150       14428 :         ndr_print_uint32(ndr, "sid_index", r->sid_index);
    5151       14428 :         ndr_print_uint32(ndr, "flags", r->flags);
    5152       14428 :         ndr->depth--;
    5153             : }
    5154             : 
    5155        1907 : static enum ndr_err_code ndr_push_lsa_TransSidArray3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray3 *r)
    5156             : {
    5157             :         uint32_t cntr_sids_1;
    5158        1907 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5159        1907 :         if (ndr_flags & NDR_SCALARS) {
    5160        1907 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5161        1907 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    5162        1907 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
    5163        1907 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5164             :         }
    5165        1907 :         if (ndr_flags & NDR_BUFFERS) {
    5166        1907 :                 if (r->sids) {
    5167        1115 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    5168       41130 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->count); cntr_sids_1++) {
    5169       40159 :                                 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    5170             :                         }
    5171       41130 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->count); cntr_sids_1++) {
    5172       40159 :                                 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
    5173             :                         }
    5174             :                 }
    5175             :         }
    5176        1643 :         return NDR_ERR_SUCCESS;
    5177             : }
    5178             : 
    5179        1761 : static enum ndr_err_code ndr_pull_lsa_TransSidArray3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray3 *r)
    5180             : {
    5181             :         uint32_t _ptr_sids;
    5182        1761 :         uint32_t size_sids_1 = 0;
    5183             :         uint32_t cntr_sids_1;
    5184        1761 :         TALLOC_CTX *_mem_save_sids_0 = NULL;
    5185        1761 :         TALLOC_CTX *_mem_save_sids_1 = NULL;
    5186        1761 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5187        1761 :         if (ndr_flags & NDR_SCALARS) {
    5188        1761 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5189        1761 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    5190        1761 :                 if (r->count > 1000) {
    5191           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    5192             :                 }
    5193        1761 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
    5194        1761 :                 if (_ptr_sids) {
    5195         729 :                         NDR_PULL_ALLOC(ndr, r->sids);
    5196             :                 } else {
    5197        1032 :                         r->sids = NULL;
    5198             :                 }
    5199        1761 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5200             :         }
    5201        1761 :         if (ndr_flags & NDR_BUFFERS) {
    5202        1761 :                 if (r->sids) {
    5203         729 :                         _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5204         729 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    5205         729 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
    5206         729 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
    5207         729 :                         NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
    5208         729 :                         _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5209         729 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    5210       35639 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    5211       34910 :                                 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    5212             :                         }
    5213       35517 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    5214       34910 :                                 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
    5215             :                         }
    5216         729 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
    5217         729 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
    5218             :                 }
    5219        1761 :                 if (r->sids) {
    5220         729 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
    5221             :                 }
    5222        7784 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    5223             :                 }
    5224             :         }
    5225        1517 :         return NDR_ERR_SUCCESS;
    5226             : }
    5227             : 
    5228         296 : _PUBLIC_ void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray3 *r)
    5229             : {
    5230             :         uint32_t cntr_sids_1;
    5231         296 :         ndr_print_struct(ndr, name, "lsa_TransSidArray3");
    5232         296 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5233         296 :         ndr->depth++;
    5234         296 :         ndr_print_uint32(ndr, "count", r->count);
    5235         296 :         ndr_print_ptr(ndr, "sids", r->sids);
    5236         296 :         ndr->depth++;
    5237         296 :         if (r->sids) {
    5238         294 :                 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
    5239         294 :                 ndr->depth++;
    5240       14722 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (r->count); cntr_sids_1++) {
    5241       14428 :                         ndr_print_lsa_TranslatedSid3(ndr, "sids", &r->sids[cntr_sids_1]);
    5242             :                 }
    5243         294 :                 ndr->depth--;
    5244             :         }
    5245         296 :         ndr->depth--;
    5246         296 :         ndr->depth--;
    5247             : }
    5248             : 
    5249        3364 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_ForestTrustRecordFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    5250             : {
    5251        3364 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    5252        3364 :         return NDR_ERR_SUCCESS;
    5253             : }
    5254             : 
    5255        8830 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_ForestTrustRecordFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    5256             : {
    5257             :         uint32_t v;
    5258        8830 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    5259        8830 :         *r = v;
    5260        8830 :         return NDR_ERR_SUCCESS;
    5261             : }
    5262             : 
    5263          56 : _PUBLIC_ void ndr_print_lsa_ForestTrustRecordFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    5264             : {
    5265          56 :         ndr_print_uint32(ndr, name, r);
    5266          56 :         ndr->depth++;
    5267          56 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TLN_DISABLED_NEW", LSA_TLN_DISABLED_NEW, r);
    5268          56 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TLN_DISABLED_ADMIN", LSA_TLN_DISABLED_ADMIN, r);
    5269          56 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TLN_DISABLED_CONFLICT", LSA_TLN_DISABLED_CONFLICT, r);
    5270          56 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_SID_DISABLED_ADMIN", LSA_SID_DISABLED_ADMIN, r);
    5271          56 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_SID_DISABLED_CONFLICT", LSA_SID_DISABLED_CONFLICT, r);
    5272          56 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_NB_DISABLED_ADMIN", LSA_NB_DISABLED_ADMIN, r);
    5273          56 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_NB_DISABLED_CONFLICT", LSA_NB_DISABLED_CONFLICT, r);
    5274          56 :         ndr->depth--;
    5275          56 : }
    5276             : 
    5277        4860 : static enum ndr_err_code ndr_push_lsa_ForestTrustRecordType(struct ndr_push *ndr, int ndr_flags, enum lsa_ForestTrustRecordType r)
    5278             : {
    5279        4924 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
    5280        4860 :         return NDR_ERR_SUCCESS;
    5281             : }
    5282             : 
    5283        2502 : static enum ndr_err_code ndr_pull_lsa_ForestTrustRecordType(struct ndr_pull *ndr, int ndr_flags, enum lsa_ForestTrustRecordType *r)
    5284             : {
    5285             :         uint16_t v;
    5286        2542 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
    5287        2542 :         *r = v;
    5288        2502 :         return NDR_ERR_SUCCESS;
    5289             : }
    5290             : 
    5291          56 : _PUBLIC_ void ndr_print_lsa_ForestTrustRecordType(struct ndr_print *ndr, const char *name, enum lsa_ForestTrustRecordType r)
    5292             : {
    5293          56 :         const char *val = NULL;
    5294             : 
    5295          56 :         switch (r) {
    5296          34 :                 case LSA_FOREST_TRUST_TOP_LEVEL_NAME: val = "LSA_FOREST_TRUST_TOP_LEVEL_NAME"; break;
    5297           0 :                 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: val = "LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX"; break;
    5298          22 :                 case LSA_FOREST_TRUST_DOMAIN_INFO: val = "LSA_FOREST_TRUST_DOMAIN_INFO"; break;
    5299           0 :                 case LSA_FOREST_TRUST_RECORD_TYPE_LAST: val = "LSA_FOREST_TRUST_RECORD_TYPE_LAST"; break;
    5300             :         }
    5301          56 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    5302          56 : }
    5303             : 
    5304           0 : static enum ndr_err_code ndr_push_lsa_ForestTrustBinaryData(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustBinaryData *r)
    5305             : {
    5306           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5307           0 :         if (ndr_flags & NDR_SCALARS) {
    5308           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5309           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
    5310           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
    5311           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5312             :         }
    5313           0 :         if (ndr_flags & NDR_BUFFERS) {
    5314           0 :                 if (r->data) {
    5315           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
    5316           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
    5317             :                 }
    5318             :         }
    5319           0 :         return NDR_ERR_SUCCESS;
    5320             : }
    5321             : 
    5322           0 : static enum ndr_err_code ndr_pull_lsa_ForestTrustBinaryData(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustBinaryData *r)
    5323             : {
    5324             :         uint32_t _ptr_data;
    5325           0 :         uint32_t size_data_1 = 0;
    5326           0 :         TALLOC_CTX *_mem_save_data_0 = NULL;
    5327           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5328           0 :         if (ndr_flags & NDR_SCALARS) {
    5329           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5330           0 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->length));
    5331           0 :                 if (r->length > 131072) {
    5332           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    5333             :                 }
    5334           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
    5335           0 :                 if (_ptr_data) {
    5336           0 :                         NDR_PULL_ALLOC(ndr, r->data);
    5337             :                 } else {
    5338           0 :                         r->data = NULL;
    5339             :                 }
    5340           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5341             :         }
    5342           0 :         if (ndr_flags & NDR_BUFFERS) {
    5343           0 :                 if (r->data) {
    5344           0 :                         _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5345           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
    5346           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
    5347           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
    5348           0 :                         NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
    5349           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
    5350           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
    5351             :                 }
    5352           0 :                 if (r->data) {
    5353           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
    5354             :                 }
    5355             :         }
    5356           0 :         return NDR_ERR_SUCCESS;
    5357             : }
    5358             : 
    5359           0 : _PUBLIC_ void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustBinaryData *r)
    5360             : {
    5361           0 :         ndr_print_struct(ndr, name, "lsa_ForestTrustBinaryData");
    5362           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5363           0 :         ndr->depth++;
    5364           0 :         ndr_print_uint3264(ndr, "length", r->length);
    5365           0 :         ndr_print_ptr(ndr, "data", r->data);
    5366           0 :         ndr->depth++;
    5367           0 :         if (r->data) {
    5368           0 :                 ndr_print_array_uint8(ndr, "data", r->data, r->length);
    5369             :         }
    5370           0 :         ndr->depth--;
    5371           0 :         ndr->depth--;
    5372             : }
    5373             : 
    5374         894 : static enum ndr_err_code ndr_push_lsa_ForestTrustDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustDomainInfo *r)
    5375             : {
    5376         894 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5377         894 :         if (ndr_flags & NDR_SCALARS) {
    5378         447 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5379         447 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid));
    5380         447 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain_name));
    5381         447 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_domain_name));
    5382         447 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5383             :         }
    5384         894 :         if (ndr_flags & NDR_BUFFERS) {
    5385         447 :                 if (r->domain_sid) {
    5386         447 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
    5387             :                 }
    5388         447 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain_name));
    5389         447 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_domain_name));
    5390             :         }
    5391         876 :         return NDR_ERR_SUCCESS;
    5392             : }
    5393             : 
    5394         856 : static enum ndr_err_code ndr_pull_lsa_ForestTrustDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustDomainInfo *r)
    5395             : {
    5396             :         uint32_t _ptr_domain_sid;
    5397         856 :         TALLOC_CTX *_mem_save_domain_sid_0 = NULL;
    5398         856 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5399         856 :         if (ndr_flags & NDR_SCALARS) {
    5400         428 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5401         428 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_sid));
    5402         428 :                 if (_ptr_domain_sid) {
    5403         428 :                         NDR_PULL_ALLOC(ndr, r->domain_sid);
    5404             :                 } else {
    5405           0 :                         r->domain_sid = NULL;
    5406             :                 }
    5407         428 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain_name));
    5408         428 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_domain_name));
    5409         428 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5410             :         }
    5411         856 :         if (ndr_flags & NDR_BUFFERS) {
    5412         428 :                 if (r->domain_sid) {
    5413         428 :                         _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5414         428 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain_sid, 0);
    5415         428 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
    5416         428 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, 0);
    5417             :                 }
    5418         428 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain_name));
    5419         428 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_domain_name));
    5420             :         }
    5421         832 :         return NDR_ERR_SUCCESS;
    5422             : }
    5423             : 
    5424          18 : _PUBLIC_ void ndr_print_lsa_ForestTrustDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustDomainInfo *r)
    5425             : {
    5426          18 :         ndr_print_struct(ndr, name, "lsa_ForestTrustDomainInfo");
    5427          18 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5428          18 :         ndr->depth++;
    5429          18 :         ndr_print_ptr(ndr, "domain_sid", r->domain_sid);
    5430          18 :         ndr->depth++;
    5431          18 :         if (r->domain_sid) {
    5432          18 :                 ndr_print_dom_sid2(ndr, "domain_sid", r->domain_sid);
    5433             :         }
    5434          18 :         ndr->depth--;
    5435          18 :         ndr_print_lsa_StringLarge(ndr, "dns_domain_name", &r->dns_domain_name);
    5436          18 :         ndr_print_lsa_StringLarge(ndr, "netbios_domain_name", &r->netbios_domain_name);
    5437          18 :         ndr->depth--;
    5438             : }
    5439             : 
    5440        4728 : static enum ndr_err_code ndr_push_lsa_ForestTrustData(struct ndr_push *ndr, int ndr_flags, const union lsa_ForestTrustData *r)
    5441             : {
    5442             :         uint32_t level;
    5443        4728 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5444        4728 :         if (ndr_flags & NDR_SCALARS) {
    5445             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5446        2364 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5447        2364 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5448        2396 :                 NDR_CHECK(ndr_push_lsa_ForestTrustRecordType(ndr, NDR_SCALARS, level));
    5449        2364 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5450        2364 :                 switch (level) {
    5451        1861 :                         case LSA_FOREST_TRUST_TOP_LEVEL_NAME: {
    5452        1861 :                                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name));
    5453        1838 :                         break; }
    5454             : 
    5455          56 :                         case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: {
    5456          56 :                                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name_ex));
    5457          56 :                         break; }
    5458             : 
    5459         447 :                         case LSA_FOREST_TRUST_DOMAIN_INFO: {
    5460         447 :                                 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr, NDR_SCALARS, &r->domain_info));
    5461         438 :                         break; }
    5462             : 
    5463           0 :                         default: {
    5464           0 :                                 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr, NDR_SCALARS, &r->data));
    5465           0 :                         break; }
    5466             : 
    5467             :                 }
    5468        1290 :         }
    5469        4728 :         if (ndr_flags & NDR_BUFFERS) {
    5470        2364 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5471             :                         /* We didn't get it above, and the token is not needed after this. */
    5472        2364 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5473             :                 }
    5474        2364 :                 switch (level) {
    5475        1861 :                         case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
    5476        1861 :                                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->top_level_name));
    5477        1838 :                         break;
    5478             : 
    5479          56 :                         case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
    5480          56 :                                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->top_level_name_ex));
    5481          56 :                         break;
    5482             : 
    5483         447 :                         case LSA_FOREST_TRUST_DOMAIN_INFO:
    5484         447 :                                 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr, NDR_BUFFERS, &r->domain_info));
    5485         438 :                         break;
    5486             : 
    5487           0 :                         default:
    5488           0 :                                 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr, NDR_BUFFERS, &r->data));
    5489           0 :                         break;
    5490             : 
    5491             :                 }
    5492        1290 :         }
    5493        4664 :         return NDR_ERR_SUCCESS;
    5494             : }
    5495             : 
    5496        4572 : static enum ndr_err_code ndr_pull_lsa_ForestTrustData(struct ndr_pull *ndr, int ndr_flags, union lsa_ForestTrustData *r)
    5497             : {
    5498             :         uint32_t level;
    5499             :         uint16_t _level;
    5500        4572 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5501        4572 :         if (ndr_flags & NDR_SCALARS) {
    5502             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5503        2286 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5504        2286 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5505        2286 :                 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
    5506        2286 :                 if (_level != level) {
    5507           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    5508             :                 }
    5509        2286 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5510        2286 :                 switch (level) {
    5511        1802 :                         case LSA_FOREST_TRUST_TOP_LEVEL_NAME: {
    5512        1802 :                                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name));
    5513        1778 :                         break; }
    5514             : 
    5515          56 :                         case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: {
    5516          56 :                                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name_ex));
    5517          56 :                         break; }
    5518             : 
    5519         428 :                         case LSA_FOREST_TRUST_DOMAIN_INFO: {
    5520         428 :                                 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr, NDR_SCALARS, &r->domain_info));
    5521         416 :                         break; }
    5522             : 
    5523           0 :                         default: {
    5524           0 :                                 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr, NDR_SCALARS, &r->data));
    5525           0 :                         break; }
    5526             : 
    5527             :                 }
    5528        1248 :         }
    5529        4572 :         if (ndr_flags & NDR_BUFFERS) {
    5530        2286 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5531             :                         /* We didn't get it above, and the token is not needed after this. */
    5532        2286 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5533             :                 }
    5534        2286 :                 switch (level) {
    5535        1802 :                         case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
    5536        1802 :                                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->top_level_name));
    5537        1778 :                         break;
    5538             : 
    5539          56 :                         case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
    5540          56 :                                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->top_level_name_ex));
    5541          56 :                         break;
    5542             : 
    5543         428 :                         case LSA_FOREST_TRUST_DOMAIN_INFO:
    5544         428 :                                 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr, NDR_BUFFERS, &r->domain_info));
    5545         416 :                         break;
    5546             : 
    5547           0 :                         default:
    5548           0 :                                 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr, NDR_BUFFERS, &r->data));
    5549           0 :                         break;
    5550             : 
    5551             :                 }
    5552        1248 :         }
    5553        4500 :         return NDR_ERR_SUCCESS;
    5554             : }
    5555             : 
    5556          52 : _PUBLIC_ void ndr_print_lsa_ForestTrustData(struct ndr_print *ndr, const char *name, const union lsa_ForestTrustData *r)
    5557             : {
    5558             :         uint32_t level;
    5559          52 :         level = ndr_print_steal_switch_value(ndr, r);
    5560          52 :         ndr_print_union(ndr, name, level, "lsa_ForestTrustData");
    5561          52 :         switch (level) {
    5562          34 :                 case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
    5563          34 :                         ndr_print_lsa_StringLarge(ndr, "top_level_name", &r->top_level_name);
    5564          34 :                 break;
    5565             : 
    5566           0 :                 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
    5567           0 :                         ndr_print_lsa_StringLarge(ndr, "top_level_name_ex", &r->top_level_name_ex);
    5568           0 :                 break;
    5569             : 
    5570          18 :                 case LSA_FOREST_TRUST_DOMAIN_INFO:
    5571          18 :                         ndr_print_lsa_ForestTrustDomainInfo(ndr, "domain_info", &r->domain_info);
    5572          18 :                 break;
    5573             : 
    5574           0 :                 default:
    5575           0 :                         ndr_print_lsa_ForestTrustBinaryData(ndr, "data", &r->data);
    5576           0 :                 break;
    5577             : 
    5578             :         }
    5579          52 : }
    5580             : 
    5581        2364 : static enum ndr_err_code ndr_push_lsa_ForestTrustRecord(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustRecord *r)
    5582             : {
    5583        2364 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5584        2364 :         if (ndr_flags & NDR_SCALARS) {
    5585        2364 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    5586        2364 :                 NDR_CHECK(ndr_push_lsa_ForestTrustRecordFlags(ndr, NDR_SCALARS, r->flags));
    5587        2396 :                 NDR_CHECK(ndr_push_lsa_ForestTrustRecordType(ndr, NDR_SCALARS, r->type));
    5588        2364 :                 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->time));
    5589        2364 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->forest_trust_data, r->type));
    5590        2364 :                 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr, NDR_SCALARS, &r->forest_trust_data));
    5591        2364 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    5592             :         }
    5593        2364 :         if (ndr_flags & NDR_BUFFERS) {
    5594        2364 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->forest_trust_data, r->type));
    5595        2364 :                 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr, NDR_BUFFERS, &r->forest_trust_data));
    5596             :         }
    5597        2332 :         return NDR_ERR_SUCCESS;
    5598             : }
    5599             : 
    5600        2286 : static enum ndr_err_code ndr_pull_lsa_ForestTrustRecord(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustRecord *r)
    5601             : {
    5602        2286 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5603        2286 :         if (ndr_flags & NDR_SCALARS) {
    5604        2286 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    5605        2286 :                 NDR_CHECK(ndr_pull_lsa_ForestTrustRecordFlags(ndr, NDR_SCALARS, &r->flags));
    5606        2322 :                 NDR_CHECK(ndr_pull_lsa_ForestTrustRecordType(ndr, NDR_SCALARS, &r->type));
    5607        2286 :                 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->time));
    5608        2286 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->forest_trust_data, r->type));
    5609        2286 :                 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr, NDR_SCALARS, &r->forest_trust_data));
    5610        2286 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    5611             :         }
    5612        2286 :         if (ndr_flags & NDR_BUFFERS) {
    5613        2286 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->forest_trust_data, r->type));
    5614        2286 :                 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr, NDR_BUFFERS, &r->forest_trust_data));
    5615             :         }
    5616        2250 :         return NDR_ERR_SUCCESS;
    5617             : }
    5618             : 
    5619          52 : _PUBLIC_ void ndr_print_lsa_ForestTrustRecord(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustRecord *r)
    5620             : {
    5621          52 :         ndr_print_struct(ndr, name, "lsa_ForestTrustRecord");
    5622          52 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5623          52 :         ndr->depth++;
    5624          52 :         ndr_print_lsa_ForestTrustRecordFlags(ndr, "flags", r->flags);
    5625          52 :         ndr_print_lsa_ForestTrustRecordType(ndr, "type", r->type);
    5626          52 :         ndr_print_NTTIME_hyper(ndr, "time", r->time);
    5627          52 :         ndr_print_set_switch_value(ndr, &r->forest_trust_data, r->type);
    5628          52 :         ndr_print_lsa_ForestTrustData(ndr, "forest_trust_data", &r->forest_trust_data);
    5629          52 :         ndr->depth--;
    5630             : }
    5631             : 
    5632         447 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_ForestTrustInformation(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustInformation *r)
    5633             : {
    5634             :         uint32_t cntr_entries_1;
    5635         447 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5636         447 :         if (ndr_flags & NDR_SCALARS) {
    5637         447 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5638         447 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    5639         447 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
    5640         447 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5641             :         }
    5642         447 :         if (ndr_flags & NDR_BUFFERS) {
    5643         447 :                 if (r->entries) {
    5644         447 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    5645        2802 :                         for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
    5646        2364 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries[cntr_entries_1]));
    5647             :                         }
    5648        2802 :                         for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
    5649        2364 :                                 if (r->entries[cntr_entries_1]) {
    5650        2364 :                                         NDR_CHECK(ndr_push_lsa_ForestTrustRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1]));
    5651             :                                 }
    5652             :                         }
    5653             :                 }
    5654             :         }
    5655         438 :         return NDR_ERR_SUCCESS;
    5656             : }
    5657             : 
    5658         428 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_ForestTrustInformation(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustInformation *r)
    5659             : {
    5660             :         uint32_t _ptr_entries;
    5661         428 :         uint32_t size_entries_1 = 0;
    5662             :         uint32_t cntr_entries_1;
    5663         428 :         TALLOC_CTX *_mem_save_entries_0 = NULL;
    5664         428 :         TALLOC_CTX *_mem_save_entries_1 = NULL;
    5665         428 :         TALLOC_CTX *_mem_save_entries_2 = NULL;
    5666         428 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5667         428 :         if (ndr_flags & NDR_SCALARS) {
    5668         428 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5669         428 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    5670         428 :                 if (r->count > 4000) {
    5671           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    5672             :                 }
    5673         428 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
    5674         428 :                 if (_ptr_entries) {
    5675         428 :                         NDR_PULL_ALLOC(ndr, r->entries);
    5676             :                 } else {
    5677           0 :                         r->entries = NULL;
    5678             :                 }
    5679         428 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5680             :         }
    5681         428 :         if (ndr_flags & NDR_BUFFERS) {
    5682         428 :                 if (r->entries) {
    5683         428 :                         _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5684         428 :                         NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
    5685         428 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
    5686         428 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->entries, &size_entries_1));
    5687         428 :                         NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
    5688         428 :                         _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5689         428 :                         NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
    5690        2714 :                         for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
    5691        2286 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
    5692        2286 :                                 if (_ptr_entries) {
    5693        2286 :                                         NDR_PULL_ALLOC(ndr, r->entries[cntr_entries_1]);
    5694             :                                 } else {
    5695           0 :                                         r->entries[cntr_entries_1] = NULL;
    5696             :                                 }
    5697             :                         }
    5698        2702 :                         for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
    5699        2286 :                                 if (r->entries[cntr_entries_1]) {
    5700        2286 :                                         _mem_save_entries_2 = NDR_PULL_GET_MEM_CTX(ndr);
    5701        2286 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->entries[cntr_entries_1], 0);
    5702        2286 :                                         NDR_CHECK(ndr_pull_lsa_ForestTrustRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1]));
    5703        2286 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_2, 0);
    5704             :                                 }
    5705             :                         }
    5706         428 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
    5707         428 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
    5708             :                 }
    5709         428 :                 if (r->entries) {
    5710         428 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
    5711             :                 }
    5712        1466 :                 for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
    5713             :                 }
    5714             :         }
    5715         416 :         return NDR_ERR_SUCCESS;
    5716             : }
    5717             : 
    5718           0 : static void ndr_print_flags_lsa_ForestTrustInformation(struct ndr_print *ndr, const char *name, int unused, const struct lsa_ForestTrustInformation *r)
    5719             : {
    5720           0 :         ndr_print_lsa_ForestTrustInformation(ndr, name, r);
    5721           0 : }
    5722             : 
    5723          18 : _PUBLIC_ void ndr_print_lsa_ForestTrustInformation(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustInformation *r)
    5724             : {
    5725             :         uint32_t cntr_entries_1;
    5726          18 :         ndr_print_struct(ndr, name, "lsa_ForestTrustInformation");
    5727          18 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5728          18 :         ndr->depth++;
    5729          18 :         ndr_print_uint32(ndr, "count", r->count);
    5730          18 :         ndr_print_ptr(ndr, "entries", r->entries);
    5731          18 :         ndr->depth++;
    5732          18 :         if (r->entries) {
    5733          18 :                 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
    5734          18 :                 ndr->depth++;
    5735          70 :                 for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
    5736          52 :                         ndr_print_ptr(ndr, "entries", r->entries[cntr_entries_1]);
    5737          52 :                         ndr->depth++;
    5738          52 :                         if (r->entries[cntr_entries_1]) {
    5739          52 :                                 ndr_print_lsa_ForestTrustRecord(ndr, "entries", r->entries[cntr_entries_1]);
    5740             :                         }
    5741          52 :                         ndr->depth--;
    5742             :                 }
    5743          18 :                 ndr->depth--;
    5744             :         }
    5745          18 :         ndr->depth--;
    5746          18 :         ndr->depth--;
    5747             : }
    5748             : 
    5749          36 : static enum ndr_err_code ndr_push_lsa_ForestTrustCollisionRecordType(struct ndr_push *ndr, int ndr_flags, enum lsa_ForestTrustCollisionRecordType r)
    5750             : {
    5751          36 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    5752          36 :         return NDR_ERR_SUCCESS;
    5753             : }
    5754             : 
    5755          32 : static enum ndr_err_code ndr_pull_lsa_ForestTrustCollisionRecordType(struct ndr_pull *ndr, int ndr_flags, enum lsa_ForestTrustCollisionRecordType *r)
    5756             : {
    5757             :         uint32_t v;
    5758          32 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    5759          32 :         *r = v;
    5760          32 :         return NDR_ERR_SUCCESS;
    5761             : }
    5762             : 
    5763           0 : _PUBLIC_ void ndr_print_lsa_ForestTrustCollisionRecordType(struct ndr_print *ndr, const char *name, enum lsa_ForestTrustCollisionRecordType r)
    5764             : {
    5765           0 :         const char *val = NULL;
    5766             : 
    5767           0 :         switch (r) {
    5768           0 :                 case LSA_FOREST_TRUST_COLLISION_TDO: val = "LSA_FOREST_TRUST_COLLISION_TDO"; break;
    5769           0 :                 case LSA_FOREST_TRUST_COLLISION_XREF: val = "LSA_FOREST_TRUST_COLLISION_XREF"; break;
    5770           0 :                 case LSA_FOREST_TRUST_COLLISION_OTHER: val = "LSA_FOREST_TRUST_COLLISION_OTHER"; break;
    5771             :         }
    5772           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    5773           0 : }
    5774             : 
    5775          36 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_ForestTrustCollisionRecord(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustCollisionRecord *r)
    5776             : {
    5777          36 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5778          36 :         if (ndr_flags & NDR_SCALARS) {
    5779          36 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5780          36 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->index));
    5781          36 :                 NDR_CHECK(ndr_push_lsa_ForestTrustCollisionRecordType(ndr, NDR_SCALARS, r->type));
    5782          36 :                 NDR_CHECK(ndr_push_lsa_ForestTrustRecordFlags(ndr, NDR_SCALARS, r->flags));
    5783          36 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
    5784          36 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5785             :         }
    5786          36 :         if (ndr_flags & NDR_BUFFERS) {
    5787          36 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
    5788             :         }
    5789          36 :         return NDR_ERR_SUCCESS;
    5790             : }
    5791             : 
    5792          32 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_ForestTrustCollisionRecord(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustCollisionRecord *r)
    5793             : {
    5794          32 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5795          32 :         if (ndr_flags & NDR_SCALARS) {
    5796          32 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5797          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->index));
    5798          32 :                 NDR_CHECK(ndr_pull_lsa_ForestTrustCollisionRecordType(ndr, NDR_SCALARS, &r->type));
    5799          32 :                 NDR_CHECK(ndr_pull_lsa_ForestTrustRecordFlags(ndr, NDR_SCALARS, &r->flags));
    5800          32 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
    5801          32 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5802             :         }
    5803          32 :         if (ndr_flags & NDR_BUFFERS) {
    5804          32 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
    5805             :         }
    5806          32 :         return NDR_ERR_SUCCESS;
    5807             : }
    5808             : 
    5809           0 : static void ndr_print_flags_lsa_ForestTrustCollisionRecord(struct ndr_print *ndr, const char *name, int unused, const struct lsa_ForestTrustCollisionRecord *r)
    5810             : {
    5811           0 :         ndr_print_lsa_ForestTrustCollisionRecord(ndr, name, r);
    5812           0 : }
    5813             : 
    5814           0 : _PUBLIC_ void ndr_print_lsa_ForestTrustCollisionRecord(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustCollisionRecord *r)
    5815             : {
    5816           0 :         ndr_print_struct(ndr, name, "lsa_ForestTrustCollisionRecord");
    5817           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5818           0 :         ndr->depth++;
    5819           0 :         ndr_print_uint32(ndr, "index", r->index);
    5820           0 :         ndr_print_lsa_ForestTrustCollisionRecordType(ndr, "type", r->type);
    5821           0 :         ndr_print_lsa_ForestTrustRecordFlags(ndr, "flags", r->flags);
    5822           0 :         ndr_print_lsa_String(ndr, "name", &r->name);
    5823           0 :         ndr->depth--;
    5824             : }
    5825             : 
    5826          20 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_ForestTrustCollisionInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustCollisionInfo *r)
    5827             : {
    5828             :         uint32_t cntr_entries_1;
    5829          20 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5830          20 :         if (ndr_flags & NDR_SCALARS) {
    5831          20 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5832          20 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    5833          20 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
    5834          20 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5835             :         }
    5836          20 :         if (ndr_flags & NDR_BUFFERS) {
    5837          20 :                 if (r->entries) {
    5838          20 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    5839          56 :                         for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
    5840          36 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries[cntr_entries_1]));
    5841             :                         }
    5842          56 :                         for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
    5843          36 :                                 if (r->entries[cntr_entries_1]) {
    5844          36 :                                         NDR_CHECK(ndr_push_lsa_ForestTrustCollisionRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1]));
    5845             :                                 }
    5846             :                         }
    5847             :                 }
    5848             :         }
    5849          20 :         return NDR_ERR_SUCCESS;
    5850             : }
    5851             : 
    5852          16 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_ForestTrustCollisionInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustCollisionInfo *r)
    5853             : {
    5854             :         uint32_t _ptr_entries;
    5855          16 :         uint32_t size_entries_1 = 0;
    5856             :         uint32_t cntr_entries_1;
    5857          16 :         TALLOC_CTX *_mem_save_entries_0 = NULL;
    5858          16 :         TALLOC_CTX *_mem_save_entries_1 = NULL;
    5859          16 :         TALLOC_CTX *_mem_save_entries_2 = NULL;
    5860          16 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5861          16 :         if (ndr_flags & NDR_SCALARS) {
    5862          16 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5863          16 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    5864          16 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
    5865          16 :                 if (_ptr_entries) {
    5866          16 :                         NDR_PULL_ALLOC(ndr, r->entries);
    5867             :                 } else {
    5868           0 :                         r->entries = NULL;
    5869             :                 }
    5870          16 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5871             :         }
    5872          16 :         if (ndr_flags & NDR_BUFFERS) {
    5873          16 :                 if (r->entries) {
    5874          16 :                         _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5875          16 :                         NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
    5876          16 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
    5877          16 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->entries, &size_entries_1));
    5878          16 :                         NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
    5879          16 :                         _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5880          16 :                         NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
    5881          48 :                         for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
    5882          32 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
    5883          32 :                                 if (_ptr_entries) {
    5884          32 :                                         NDR_PULL_ALLOC(ndr, r->entries[cntr_entries_1]);
    5885             :                                 } else {
    5886           0 :                                         r->entries[cntr_entries_1] = NULL;
    5887             :                                 }
    5888             :                         }
    5889          48 :                         for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
    5890          32 :                                 if (r->entries[cntr_entries_1]) {
    5891          32 :                                         _mem_save_entries_2 = NDR_PULL_GET_MEM_CTX(ndr);
    5892          32 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->entries[cntr_entries_1], 0);
    5893          32 :                                         NDR_CHECK(ndr_pull_lsa_ForestTrustCollisionRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1]));
    5894          32 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_2, 0);
    5895             :                                 }
    5896             :                         }
    5897          16 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
    5898          16 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
    5899             :                 }
    5900          16 :                 if (r->entries) {
    5901          16 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
    5902             :                 }
    5903          32 :                 for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
    5904             :                 }
    5905             :         }
    5906          16 :         return NDR_ERR_SUCCESS;
    5907             : }
    5908             : 
    5909           0 : static void ndr_print_flags_lsa_ForestTrustCollisionInfo(struct ndr_print *ndr, const char *name, int unused, const struct lsa_ForestTrustCollisionInfo *r)
    5910             : {
    5911           0 :         ndr_print_lsa_ForestTrustCollisionInfo(ndr, name, r);
    5912           0 : }
    5913             : 
    5914           0 : _PUBLIC_ void ndr_print_lsa_ForestTrustCollisionInfo(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustCollisionInfo *r)
    5915             : {
    5916             :         uint32_t cntr_entries_1;
    5917           0 :         ndr_print_struct(ndr, name, "lsa_ForestTrustCollisionInfo");
    5918           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5919           0 :         ndr->depth++;
    5920           0 :         ndr_print_uint32(ndr, "count", r->count);
    5921           0 :         ndr_print_ptr(ndr, "entries", r->entries);
    5922           0 :         ndr->depth++;
    5923           0 :         if (r->entries) {
    5924           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
    5925           0 :                 ndr->depth++;
    5926           0 :                 for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
    5927           0 :                         ndr_print_ptr(ndr, "entries", r->entries[cntr_entries_1]);
    5928           0 :                         ndr->depth++;
    5929           0 :                         if (r->entries[cntr_entries_1]) {
    5930           0 :                                 ndr_print_lsa_ForestTrustCollisionRecord(ndr, "entries", r->entries[cntr_entries_1]);
    5931             :                         }
    5932           0 :                         ndr->depth--;
    5933             :                 }
    5934           0 :                 ndr->depth--;
    5935             :         }
    5936           0 :         ndr->depth--;
    5937           0 :         ndr->depth--;
    5938             : }
    5939             : 
    5940        3739 : static enum ndr_err_code ndr_push_lsa_Close(struct ndr_push *ndr, int flags, const struct lsa_Close *r)
    5941             : {
    5942        3739 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    5943        3739 :         if (flags & NDR_IN) {
    5944        2025 :                 if (r->in.handle == NULL) {
    5945           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    5946             :                 }
    5947        2025 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    5948             :         }
    5949        3739 :         if (flags & NDR_OUT) {
    5950        1714 :                 if (r->out.handle == NULL) {
    5951           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    5952             :                 }
    5953        1714 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
    5954        1714 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    5955             :         }
    5956        3671 :         return NDR_ERR_SUCCESS;
    5957             : }
    5958             : 
    5959        3607 : static enum ndr_err_code ndr_pull_lsa_Close(struct ndr_pull *ndr, int flags, struct lsa_Close *r)
    5960             : {
    5961        3607 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    5962        3607 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    5963        3607 :         if (flags & NDR_IN) {
    5964        1834 :                 NDR_ZERO_STRUCT(r->out);
    5965             : 
    5966        1834 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    5967        1834 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    5968             :                 }
    5969        1834 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5970        1834 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    5971        1834 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    5972        1834 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    5973        1834 :                 NDR_PULL_ALLOC(ndr, r->out.handle);
    5974        1834 :                 *r->out.handle = *r->in.handle;
    5975             :         }
    5976        3607 :         if (flags & NDR_OUT) {
    5977             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    5978             :                 if (r->in.handle == NULL) {
    5979             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    5980             :                         NDR_ZERO_STRUCTP(r->in.handle);
    5981             :                 }
    5982             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    5983        1773 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    5984        1303 :                         NDR_PULL_ALLOC(ndr, r->out.handle);
    5985             :                 }
    5986        1773 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5987        1773 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
    5988        1773 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
    5989        1773 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    5990        1773 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    5991             :         }
    5992        3543 :         return NDR_ERR_SUCCESS;
    5993             : }
    5994             : 
    5995         228 : _PUBLIC_ void ndr_print_lsa_Close(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Close *r)
    5996             : {
    5997         228 :         ndr_print_struct(ndr, name, "lsa_Close");
    5998         228 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5999         228 :         ndr->depth++;
    6000         228 :         if (flags & NDR_SET_VALUES) {
    6001           2 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    6002             :         }
    6003         228 :         if (flags & NDR_IN) {
    6004           2 :                 ndr_print_struct(ndr, "in", "lsa_Close");
    6005           2 :                 ndr->depth++;
    6006           2 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    6007           2 :                 ndr->depth++;
    6008           2 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    6009           2 :                 ndr->depth--;
    6010           2 :                 ndr->depth--;
    6011             :         }
    6012         228 :         if (flags & NDR_OUT) {
    6013         226 :                 ndr_print_struct(ndr, "out", "lsa_Close");
    6014         226 :                 ndr->depth++;
    6015         226 :                 ndr_print_ptr(ndr, "handle", r->out.handle);
    6016         226 :                 ndr->depth++;
    6017         226 :                 ndr_print_policy_handle(ndr, "handle", r->out.handle);
    6018         226 :                 ndr->depth--;
    6019         226 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    6020         226 :                 ndr->depth--;
    6021             :         }
    6022         228 :         ndr->depth--;
    6023             : }
    6024             : 
    6025         131 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_Delete *r)
    6026             : {
    6027         131 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    6028         131 :         if (flags & NDR_IN) {
    6029          62 :                 if (r->in.handle == NULL) {
    6030           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6031             :                 }
    6032          62 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6033             :         }
    6034         131 :         if (flags & NDR_OUT) {
    6035          69 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    6036             :         }
    6037         131 :         return NDR_ERR_SUCCESS;
    6038             : }
    6039             : 
    6040         122 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, struct lsa_Delete *r)
    6041             : {
    6042         122 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    6043         122 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    6044         122 :         if (flags & NDR_IN) {
    6045          58 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6046          58 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6047             :                 }
    6048          58 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6049          58 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    6050          58 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6051          58 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    6052             :         }
    6053         122 :         if (flags & NDR_OUT) {
    6054             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    6055             :                 if (r->in.handle == NULL) {
    6056             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6057             :                         NDR_ZERO_STRUCTP(r->in.handle);
    6058             :                 }
    6059             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    6060          64 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    6061             :         }
    6062         118 :         return NDR_ERR_SUCCESS;
    6063             : }
    6064             : 
    6065          30 : _PUBLIC_ void ndr_print_lsa_Delete(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Delete *r)
    6066             : {
    6067          30 :         ndr_print_struct(ndr, name, "lsa_Delete");
    6068          30 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6069          30 :         ndr->depth++;
    6070          30 :         if (flags & NDR_SET_VALUES) {
    6071           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    6072             :         }
    6073          30 :         if (flags & NDR_IN) {
    6074           2 :                 ndr_print_struct(ndr, "in", "lsa_Delete");
    6075           2 :                 ndr->depth++;
    6076           2 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    6077           2 :                 ndr->depth++;
    6078           2 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    6079           2 :                 ndr->depth--;
    6080           2 :                 ndr->depth--;
    6081             :         }
    6082          30 :         if (flags & NDR_OUT) {
    6083          28 :                 ndr_print_struct(ndr, "out", "lsa_Delete");
    6084          28 :                 ndr->depth++;
    6085          28 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    6086          28 :                 ndr->depth--;
    6087             :         }
    6088          30 :         ndr->depth--;
    6089             : }
    6090             : 
    6091          17 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivs *r)
    6092             : {
    6093          17 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    6094          17 :         if (flags & NDR_IN) {
    6095           8 :                 if (r->in.handle == NULL) {
    6096           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6097             :                 }
    6098           8 :                 if (r->in.resume_handle == NULL) {
    6099           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6100             :                 }
    6101           8 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6102           8 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
    6103           8 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_count));
    6104             :         }
    6105          17 :         if (flags & NDR_OUT) {
    6106           9 :                 if (r->out.resume_handle == NULL) {
    6107           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6108             :                 }
    6109           9 :                 if (r->out.privs == NULL) {
    6110           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6111             :                 }
    6112           9 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
    6113           9 :                 NDR_CHECK(ndr_push_lsa_PrivArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs));
    6114           9 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    6115             :         }
    6116          17 :         return NDR_ERR_SUCCESS;
    6117             : }
    6118             : 
    6119          20 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivs *r)
    6120             : {
    6121          20 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    6122          20 :         TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
    6123          20 :         TALLOC_CTX *_mem_save_privs_0 = NULL;
    6124          20 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    6125          20 :         if (flags & NDR_IN) {
    6126          10 :                 NDR_ZERO_STRUCT(r->out);
    6127             : 
    6128          10 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6129          10 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6130             :                 }
    6131          10 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6132          10 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    6133          10 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6134          10 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    6135          10 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6136          10 :                         NDR_PULL_ALLOC(ndr, r->in.resume_handle);
    6137             :                 }
    6138          10 :                 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6139          10 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
    6140          10 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
    6141          10 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
    6142          10 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_count));
    6143          10 :                 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
    6144          10 :                 *r->out.resume_handle = *r->in.resume_handle;
    6145          10 :                 NDR_PULL_ALLOC(ndr, r->out.privs);
    6146          10 :                 NDR_ZERO_STRUCTP(r->out.privs);
    6147             :         }
    6148          20 :         if (flags & NDR_OUT) {
    6149             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    6150             :                 if (r->in.handle == NULL) {
    6151             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6152             :                         NDR_ZERO_STRUCTP(r->in.handle);
    6153             :                 }
    6154             :                 if (r->in.resume_handle == NULL) {
    6155             :                         NDR_PULL_ALLOC(ndr, r->in.resume_handle);
    6156             :                         NDR_ZERO_STRUCTP(r->in.resume_handle);
    6157             :                 }
    6158             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    6159          10 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6160           3 :                         NDR_PULL_ALLOC(ndr, r->out.resume_handle);
    6161             :                 }
    6162          10 :                 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6163          10 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
    6164          10 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
    6165          10 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
    6166          10 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6167           3 :                         NDR_PULL_ALLOC(ndr, r->out.privs);
    6168             :                 }
    6169          10 :                 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6170          10 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, LIBNDR_FLAG_REF_ALLOC);
    6171          10 :                 NDR_CHECK(ndr_pull_lsa_PrivArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs));
    6172          10 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
    6173          10 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    6174             :         }
    6175          16 :         return NDR_ERR_SUCCESS;
    6176             : }
    6177             : 
    6178           6 : _PUBLIC_ void ndr_print_lsa_EnumPrivs(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivs *r)
    6179             : {
    6180           6 :         ndr_print_struct(ndr, name, "lsa_EnumPrivs");
    6181           6 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6182           6 :         ndr->depth++;
    6183           6 :         if (flags & NDR_SET_VALUES) {
    6184           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    6185             :         }
    6186           6 :         if (flags & NDR_IN) {
    6187           2 :                 ndr_print_struct(ndr, "in", "lsa_EnumPrivs");
    6188           2 :                 ndr->depth++;
    6189           2 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    6190           2 :                 ndr->depth++;
    6191           2 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    6192           2 :                 ndr->depth--;
    6193           2 :                 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
    6194           2 :                 ndr->depth++;
    6195           2 :                 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
    6196           2 :                 ndr->depth--;
    6197           2 :                 ndr_print_uint32(ndr, "max_count", r->in.max_count);
    6198           2 :                 ndr->depth--;
    6199             :         }
    6200           6 :         if (flags & NDR_OUT) {
    6201           4 :                 ndr_print_struct(ndr, "out", "lsa_EnumPrivs");
    6202           4 :                 ndr->depth++;
    6203           4 :                 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
    6204           4 :                 ndr->depth++;
    6205           4 :                 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
    6206           4 :                 ndr->depth--;
    6207           4 :                 ndr_print_ptr(ndr, "privs", r->out.privs);
    6208           4 :                 ndr->depth++;
    6209           4 :                 ndr_print_lsa_PrivArray(ndr, "privs", r->out.privs);
    6210           4 :                 ndr->depth--;
    6211           4 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    6212           4 :                 ndr->depth--;
    6213             :         }
    6214           6 :         ndr->depth--;
    6215             : }
    6216             : 
    6217         192 : static enum ndr_err_code ndr_push_lsa_QuerySecurity(struct ndr_push *ndr, int flags, const struct lsa_QuerySecurity *r)
    6218             : {
    6219         192 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    6220         192 :         if (flags & NDR_IN) {
    6221          88 :                 if (r->in.handle == NULL) {
    6222           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6223             :                 }
    6224          88 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6225          88 :                 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
    6226             :         }
    6227         192 :         if (flags & NDR_OUT) {
    6228         104 :                 if (r->out.sdbuf == NULL) {
    6229           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6230             :                 }
    6231         104 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sdbuf));
    6232         104 :                 if (*r->out.sdbuf) {
    6233         104 :                         NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
    6234             :                 }
    6235         104 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    6236             :         }
    6237         156 :         return NDR_ERR_SUCCESS;
    6238             : }
    6239             : 
    6240         176 : static enum ndr_err_code ndr_pull_lsa_QuerySecurity(struct ndr_pull *ndr, int flags, struct lsa_QuerySecurity *r)
    6241             : {
    6242             :         uint32_t _ptr_sdbuf;
    6243         176 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    6244         176 :         TALLOC_CTX *_mem_save_sdbuf_0 = NULL;
    6245         176 :         TALLOC_CTX *_mem_save_sdbuf_1 = NULL;
    6246         176 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    6247         176 :         if (flags & NDR_IN) {
    6248          88 :                 NDR_ZERO_STRUCT(r->out);
    6249             : 
    6250          88 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6251          88 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6252             :                 }
    6253          88 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6254          88 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    6255          88 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6256          88 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    6257          88 :                 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
    6258          88 :                 NDR_PULL_ALLOC(ndr, r->out.sdbuf);
    6259          88 :                 NDR_ZERO_STRUCTP(r->out.sdbuf);
    6260             :         }
    6261         176 :         if (flags & NDR_OUT) {
    6262             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    6263             :                 if (r->in.handle == NULL) {
    6264             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6265             :                         NDR_ZERO_STRUCTP(r->in.handle);
    6266             :                 }
    6267             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    6268          88 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6269          16 :                         NDR_PULL_ALLOC(ndr, r->out.sdbuf);
    6270             :                 }
    6271          88 :                 _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6272          88 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC);
    6273          88 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sdbuf));
    6274          88 :                 if (_ptr_sdbuf) {
    6275          88 :                         NDR_PULL_ALLOC(ndr, *r->out.sdbuf);
    6276             :                 } else {
    6277           0 :                         *r->out.sdbuf = NULL;
    6278             :                 }
    6279          88 :                 if (*r->out.sdbuf) {
    6280          88 :                         _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr);
    6281          88 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, 0);
    6282          88 :                         NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
    6283          88 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, 0);
    6284             :                 }
    6285          88 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
    6286          88 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    6287             :         }
    6288         144 :         return NDR_ERR_SUCCESS;
    6289             : }
    6290             : 
    6291          32 : _PUBLIC_ void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecurity *r)
    6292             : {
    6293          32 :         ndr_print_struct(ndr, name, "lsa_QuerySecurity");
    6294          32 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6295          32 :         ndr->depth++;
    6296          32 :         if (flags & NDR_SET_VALUES) {
    6297           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    6298             :         }
    6299          32 :         if (flags & NDR_IN) {
    6300           0 :                 ndr_print_struct(ndr, "in", "lsa_QuerySecurity");
    6301           0 :                 ndr->depth++;
    6302           0 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    6303           0 :                 ndr->depth++;
    6304           0 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    6305           0 :                 ndr->depth--;
    6306           0 :                 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
    6307           0 :                 ndr->depth--;
    6308             :         }
    6309          32 :         if (flags & NDR_OUT) {
    6310          32 :                 ndr_print_struct(ndr, "out", "lsa_QuerySecurity");
    6311          32 :                 ndr->depth++;
    6312          32 :                 ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf);
    6313          32 :                 ndr->depth++;
    6314          32 :                 ndr_print_ptr(ndr, "sdbuf", *r->out.sdbuf);
    6315          32 :                 ndr->depth++;
    6316          32 :                 if (*r->out.sdbuf) {
    6317          32 :                         ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf);
    6318             :                 }
    6319          32 :                 ndr->depth--;
    6320          32 :                 ndr->depth--;
    6321          32 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    6322          32 :                 ndr->depth--;
    6323             :         }
    6324          32 :         ndr->depth--;
    6325             : }
    6326             : 
    6327           0 : static enum ndr_err_code ndr_push_lsa_SetSecObj(struct ndr_push *ndr, int flags, const struct lsa_SetSecObj *r)
    6328             : {
    6329           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    6330           0 :         if (flags & NDR_IN) {
    6331           0 :                 if (r->in.handle == NULL) {
    6332           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6333             :                 }
    6334           0 :                 if (r->in.sdbuf == NULL) {
    6335           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6336             :                 }
    6337           0 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6338           0 :                 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
    6339           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
    6340             :         }
    6341           0 :         if (flags & NDR_OUT) {
    6342           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    6343             :         }
    6344           0 :         return NDR_ERR_SUCCESS;
    6345             : }
    6346             : 
    6347           0 : static enum ndr_err_code ndr_pull_lsa_SetSecObj(struct ndr_pull *ndr, int flags, struct lsa_SetSecObj *r)
    6348             : {
    6349           0 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    6350           0 :         TALLOC_CTX *_mem_save_sdbuf_0 = NULL;
    6351           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    6352           0 :         if (flags & NDR_IN) {
    6353           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6354           0 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6355             :                 }
    6356           0 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6357           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    6358           0 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6359           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    6360           0 :                 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
    6361           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6362           0 :                         NDR_PULL_ALLOC(ndr, r->in.sdbuf);
    6363             :                 }
    6364           0 :                 _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6365           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sdbuf, LIBNDR_FLAG_REF_ALLOC);
    6366           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
    6367           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
    6368             :         }
    6369           0 :         if (flags & NDR_OUT) {
    6370             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    6371             :                 if (r->in.handle == NULL) {
    6372             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6373             :                         NDR_ZERO_STRUCTP(r->in.handle);
    6374             :                 }
    6375             :                 if (r->in.sdbuf == NULL) {
    6376             :                         NDR_PULL_ALLOC(ndr, r->in.sdbuf);
    6377             :                         NDR_ZERO_STRUCTP(r->in.sdbuf);
    6378             :                 }
    6379             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    6380           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    6381             :         }
    6382           0 :         return NDR_ERR_SUCCESS;
    6383             : }
    6384             : 
    6385           0 : _PUBLIC_ void ndr_print_lsa_SetSecObj(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecObj *r)
    6386             : {
    6387           0 :         ndr_print_struct(ndr, name, "lsa_SetSecObj");
    6388           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6389           0 :         ndr->depth++;
    6390           0 :         if (flags & NDR_SET_VALUES) {
    6391           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    6392             :         }
    6393           0 :         if (flags & NDR_IN) {
    6394           0 :                 ndr_print_struct(ndr, "in", "lsa_SetSecObj");
    6395           0 :                 ndr->depth++;
    6396           0 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    6397           0 :                 ndr->depth++;
    6398           0 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    6399           0 :                 ndr->depth--;
    6400           0 :                 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
    6401           0 :                 ndr_print_ptr(ndr, "sdbuf", r->in.sdbuf);
    6402           0 :                 ndr->depth++;
    6403           0 :                 ndr_print_sec_desc_buf(ndr, "sdbuf", r->in.sdbuf);
    6404           0 :                 ndr->depth--;
    6405           0 :                 ndr->depth--;
    6406             :         }
    6407           0 :         if (flags & NDR_OUT) {
    6408           0 :                 ndr_print_struct(ndr, "out", "lsa_SetSecObj");
    6409           0 :                 ndr->depth++;
    6410           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    6411           0 :                 ndr->depth--;
    6412             :         }
    6413           0 :         ndr->depth--;
    6414             : }
    6415             : 
    6416           0 : static enum ndr_err_code ndr_push_lsa_ChangePassword(struct ndr_push *ndr, int flags, const struct lsa_ChangePassword *r)
    6417             : {
    6418           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    6419           0 :         if (flags & NDR_IN) {
    6420             :         }
    6421           0 :         if (flags & NDR_OUT) {
    6422           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    6423             :         }
    6424           0 :         return NDR_ERR_SUCCESS;
    6425             : }
    6426             : 
    6427           0 : static enum ndr_err_code ndr_pull_lsa_ChangePassword(struct ndr_pull *ndr, int flags, struct lsa_ChangePassword *r)
    6428             : {
    6429           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    6430           0 :         if (flags & NDR_IN) {
    6431             :         }
    6432           0 :         if (flags & NDR_OUT) {
    6433             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    6434             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    6435           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    6436             :         }
    6437           0 :         return NDR_ERR_SUCCESS;
    6438             : }
    6439             : 
    6440           0 : _PUBLIC_ void ndr_print_lsa_ChangePassword(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ChangePassword *r)
    6441             : {
    6442           0 :         ndr_print_struct(ndr, name, "lsa_ChangePassword");
    6443           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6444           0 :         ndr->depth++;
    6445           0 :         if (flags & NDR_SET_VALUES) {
    6446           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    6447             :         }
    6448           0 :         if (flags & NDR_IN) {
    6449           0 :                 ndr_print_struct(ndr, "in", "lsa_ChangePassword");
    6450           0 :                 ndr->depth++;
    6451           0 :                 ndr->depth--;
    6452             :         }
    6453           0 :         if (flags & NDR_OUT) {
    6454           0 :                 ndr_print_struct(ndr, "out", "lsa_ChangePassword");
    6455           0 :                 ndr->depth++;
    6456           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    6457           0 :                 ndr->depth--;
    6458             :         }
    6459           0 :         ndr->depth--;
    6460             : }
    6461             : 
    6462       16621 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy *r)
    6463             : {
    6464       16621 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    6465       16621 :         if (flags & NDR_IN) {
    6466        8326 :                 if (r->in.attr == NULL) {
    6467           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6468             :                 }
    6469        8326 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
    6470        8326 :                 if (r->in.system_name) {
    6471        8326 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
    6472             :                 }
    6473        8326 :                 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
    6474        8326 :                 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
    6475             :         }
    6476       16621 :         if (flags & NDR_OUT) {
    6477        8295 :                 if (r->out.handle == NULL) {
    6478           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6479             :                 }
    6480        8295 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
    6481        8295 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    6482             :         }
    6483       16592 :         return NDR_ERR_SUCCESS;
    6484             : }
    6485             : 
    6486       16604 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy *r)
    6487             : {
    6488             :         uint32_t _ptr_system_name;
    6489       16604 :         TALLOC_CTX *_mem_save_system_name_0 = NULL;
    6490       16604 :         TALLOC_CTX *_mem_save_attr_0 = NULL;
    6491       16604 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    6492       16604 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    6493       16604 :         if (flags & NDR_IN) {
    6494        8284 :                 NDR_ZERO_STRUCT(r->out);
    6495             : 
    6496        8284 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
    6497        8284 :                 if (_ptr_system_name) {
    6498        8284 :                         NDR_PULL_ALLOC(ndr, r->in.system_name);
    6499             :                 } else {
    6500           0 :                         r->in.system_name = NULL;
    6501             :                 }
    6502        8284 :                 if (r->in.system_name) {
    6503        8284 :                         _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6504        8284 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
    6505        8284 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
    6506        8284 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
    6507             :                 }
    6508        8284 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6509        8284 :                         NDR_PULL_ALLOC(ndr, r->in.attr);
    6510             :                 }
    6511        8284 :                 _mem_save_attr_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6512        8284 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC);
    6513        8284 :                 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
    6514        8284 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC);
    6515        8284 :                 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
    6516        8284 :                 NDR_PULL_ALLOC(ndr, r->out.handle);
    6517        8284 :                 NDR_ZERO_STRUCTP(r->out.handle);
    6518             :         }
    6519       16604 :         if (flags & NDR_OUT) {
    6520             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    6521             :                 if (r->in.attr == NULL) {
    6522             :                         NDR_PULL_ALLOC(ndr, r->in.attr);
    6523             :                         NDR_ZERO_STRUCTP(r->in.attr);
    6524             :                 }
    6525             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    6526        8320 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6527        8213 :                         NDR_PULL_ALLOC(ndr, r->out.handle);
    6528             :                 }
    6529        8320 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6530        8320 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
    6531        8320 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
    6532        8320 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    6533        8320 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    6534             :         }
    6535       16574 :         return NDR_ERR_SUCCESS;
    6536             : }
    6537             : 
    6538          46 : _PUBLIC_ void ndr_print_lsa_OpenPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy *r)
    6539             : {
    6540          46 :         ndr_print_struct(ndr, name, "lsa_OpenPolicy");
    6541          46 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6542          46 :         ndr->depth++;
    6543          46 :         if (flags & NDR_SET_VALUES) {
    6544           2 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    6545             :         }
    6546          46 :         if (flags & NDR_IN) {
    6547           4 :                 ndr_print_struct(ndr, "in", "lsa_OpenPolicy");
    6548           4 :                 ndr->depth++;
    6549           4 :                 ndr_print_ptr(ndr, "system_name", r->in.system_name);
    6550           4 :                 ndr->depth++;
    6551           4 :                 if (r->in.system_name) {
    6552           4 :                         ndr_print_uint16(ndr, "system_name", *r->in.system_name);
    6553             :                 }
    6554           4 :                 ndr->depth--;
    6555           4 :                 ndr_print_ptr(ndr, "attr", r->in.attr);
    6556           4 :                 ndr->depth++;
    6557           4 :                 ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr);
    6558           4 :                 ndr->depth--;
    6559           4 :                 ndr_print_lsa_PolicyAccessMask(ndr, "access_mask", r->in.access_mask);
    6560           4 :                 ndr->depth--;
    6561             :         }
    6562          46 :         if (flags & NDR_OUT) {
    6563          42 :                 ndr_print_struct(ndr, "out", "lsa_OpenPolicy");
    6564          42 :                 ndr->depth++;
    6565          42 :                 ndr_print_ptr(ndr, "handle", r->out.handle);
    6566          42 :                 ndr->depth++;
    6567          42 :                 ndr_print_policy_handle(ndr, "handle", r->out.handle);
    6568          42 :                 ndr->depth--;
    6569          42 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    6570          42 :                 ndr->depth--;
    6571             :         }
    6572          46 :         ndr->depth--;
    6573             : }
    6574             : 
    6575        3814 : static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy *r)
    6576             : {
    6577        3814 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    6578        3814 :         if (flags & NDR_IN) {
    6579        1903 :                 if (r->in.handle == NULL) {
    6580           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6581             :                 }
    6582        1903 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6583        1993 :                 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
    6584             :         }
    6585        3814 :         if (flags & NDR_OUT) {
    6586        1911 :                 if (r->out.info == NULL) {
    6587           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6588             :                 }
    6589        1911 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
    6590        1911 :                 if (*r->out.info) {
    6591        1845 :                         NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
    6592        1845 :                         NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
    6593             :                 }
    6594        1911 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    6595             :         }
    6596        3616 :         return NDR_ERR_SUCCESS;
    6597             : }
    6598             : 
    6599        3632 : static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy *r)
    6600             : {
    6601             :         uint32_t _ptr_info;
    6602        3632 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    6603        3632 :         TALLOC_CTX *_mem_save_info_0 = NULL;
    6604        3632 :         TALLOC_CTX *_mem_save_info_1 = NULL;
    6605        3632 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    6606        3632 :         if (flags & NDR_IN) {
    6607        1729 :                 NDR_ZERO_STRUCT(r->out);
    6608             : 
    6609        1729 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6610        1729 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6611             :                 }
    6612        1729 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6613        1729 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    6614        1729 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6615        1729 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    6616        1819 :                 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
    6617        1729 :                 NDR_PULL_ALLOC(ndr, r->out.info);
    6618        1729 :                 NDR_ZERO_STRUCTP(r->out.info);
    6619             :         }
    6620        3632 :         if (flags & NDR_OUT) {
    6621             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    6622             :                 if (r->in.handle == NULL) {
    6623             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6624             :                         NDR_ZERO_STRUCTP(r->in.handle);
    6625             :                 }
    6626             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    6627        1903 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6628        1068 :                         NDR_PULL_ALLOC(ndr, r->out.info);
    6629             :                 }
    6630        1903 :                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6631        1903 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
    6632        1903 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
    6633        1903 :                 if (_ptr_info) {
    6634        1843 :                         NDR_PULL_ALLOC(ndr, *r->out.info);
    6635             :                 } else {
    6636          60 :                         *r->out.info = NULL;
    6637             :                 }
    6638        1903 :                 if (*r->out.info) {
    6639        1843 :                         _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
    6640        1843 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
    6641        1843 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
    6642        1843 :                         NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
    6643        1843 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
    6644             :                 }
    6645        1903 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
    6646        1903 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    6647             :         }
    6648        3452 :         return NDR_ERR_SUCCESS;
    6649             : }
    6650             : 
    6651         368 : _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy *r)
    6652             : {
    6653         368 :         ndr_print_struct(ndr, name, "lsa_QueryInfoPolicy");
    6654         368 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6655         368 :         ndr->depth++;
    6656         368 :         if (flags & NDR_SET_VALUES) {
    6657           2 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    6658             :         }
    6659         368 :         if (flags & NDR_IN) {
    6660           2 :                 ndr_print_struct(ndr, "in", "lsa_QueryInfoPolicy");
    6661           2 :                 ndr->depth++;
    6662           2 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    6663           2 :                 ndr->depth++;
    6664           2 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    6665           2 :                 ndr->depth--;
    6666           2 :                 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
    6667           2 :                 ndr->depth--;
    6668             :         }
    6669         368 :         if (flags & NDR_OUT) {
    6670         366 :                 ndr_print_struct(ndr, "out", "lsa_QueryInfoPolicy");
    6671         366 :                 ndr->depth++;
    6672         366 :                 ndr_print_ptr(ndr, "info", r->out.info);
    6673         366 :                 ndr->depth++;
    6674         366 :                 ndr_print_ptr(ndr, "info", *r->out.info);
    6675         366 :                 ndr->depth++;
    6676         366 :                 if (*r->out.info) {
    6677         342 :                         ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
    6678         342 :                         ndr_print_lsa_PolicyInformation(ndr, "info", *r->out.info);
    6679             :                 }
    6680         366 :                 ndr->depth--;
    6681         366 :                 ndr->depth--;
    6682         366 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    6683         366 :                 ndr->depth--;
    6684             :         }
    6685         368 :         ndr->depth--;
    6686             : }
    6687             : 
    6688           0 : static enum ndr_err_code ndr_push_lsa_SetInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy *r)
    6689             : {
    6690           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    6691           0 :         if (flags & NDR_IN) {
    6692           0 :                 if (r->in.handle == NULL) {
    6693           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6694             :                 }
    6695           0 :                 if (r->in.info == NULL) {
    6696           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6697             :                 }
    6698           0 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6699           0 :                 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
    6700           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
    6701           0 :                 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
    6702             :         }
    6703           0 :         if (flags & NDR_OUT) {
    6704           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    6705             :         }
    6706           0 :         return NDR_ERR_SUCCESS;
    6707             : }
    6708             : 
    6709           0 : static enum ndr_err_code ndr_pull_lsa_SetInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy *r)
    6710             : {
    6711           0 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    6712           0 :         TALLOC_CTX *_mem_save_info_0 = NULL;
    6713           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    6714           0 :         if (flags & NDR_IN) {
    6715           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6716           0 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6717             :                 }
    6718           0 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6719           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    6720           0 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6721           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    6722           0 :                 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
    6723           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6724           0 :                         NDR_PULL_ALLOC(ndr, r->in.info);
    6725             :                 }
    6726           0 :                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6727           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
    6728           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
    6729           0 :                 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
    6730           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
    6731             :         }
    6732           0 :         if (flags & NDR_OUT) {
    6733             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    6734             :                 if (r->in.handle == NULL) {
    6735             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6736             :                         NDR_ZERO_STRUCTP(r->in.handle);
    6737             :                 }
    6738             :                 if (r->in.info == NULL) {
    6739             :                         NDR_PULL_ALLOC(ndr, r->in.info);
    6740             :                         NDR_ZERO_STRUCTP(r->in.info);
    6741             :                 }
    6742             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    6743           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    6744             :         }
    6745           0 :         return NDR_ERR_SUCCESS;
    6746             : }
    6747             : 
    6748           0 : _PUBLIC_ void ndr_print_lsa_SetInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy *r)
    6749             : {
    6750           0 :         ndr_print_struct(ndr, name, "lsa_SetInfoPolicy");
    6751           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6752           0 :         ndr->depth++;
    6753           0 :         if (flags & NDR_SET_VALUES) {
    6754           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    6755             :         }
    6756           0 :         if (flags & NDR_IN) {
    6757           0 :                 ndr_print_struct(ndr, "in", "lsa_SetInfoPolicy");
    6758           0 :                 ndr->depth++;
    6759           0 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    6760           0 :                 ndr->depth++;
    6761           0 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    6762           0 :                 ndr->depth--;
    6763           0 :                 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
    6764           0 :                 ndr_print_ptr(ndr, "info", r->in.info);
    6765           0 :                 ndr->depth++;
    6766           0 :                 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
    6767           0 :                 ndr_print_lsa_PolicyInformation(ndr, "info", r->in.info);
    6768           0 :                 ndr->depth--;
    6769           0 :                 ndr->depth--;
    6770             :         }
    6771           0 :         if (flags & NDR_OUT) {
    6772           0 :                 ndr_print_struct(ndr, "out", "lsa_SetInfoPolicy");
    6773           0 :                 ndr->depth++;
    6774           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    6775           0 :                 ndr->depth--;
    6776             :         }
    6777           0 :         ndr->depth--;
    6778             : }
    6779             : 
    6780           0 : static enum ndr_err_code ndr_push_lsa_ClearAuditLog(struct ndr_push *ndr, int flags, const struct lsa_ClearAuditLog *r)
    6781             : {
    6782           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    6783           0 :         if (flags & NDR_IN) {
    6784             :         }
    6785           0 :         if (flags & NDR_OUT) {
    6786           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    6787             :         }
    6788           0 :         return NDR_ERR_SUCCESS;
    6789             : }
    6790             : 
    6791           0 : static enum ndr_err_code ndr_pull_lsa_ClearAuditLog(struct ndr_pull *ndr, int flags, struct lsa_ClearAuditLog *r)
    6792             : {
    6793           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    6794           0 :         if (flags & NDR_IN) {
    6795             :         }
    6796           0 :         if (flags & NDR_OUT) {
    6797             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    6798             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    6799           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    6800             :         }
    6801           0 :         return NDR_ERR_SUCCESS;
    6802             : }
    6803             : 
    6804           0 : _PUBLIC_ void ndr_print_lsa_ClearAuditLog(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ClearAuditLog *r)
    6805             : {
    6806           0 :         ndr_print_struct(ndr, name, "lsa_ClearAuditLog");
    6807           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6808           0 :         ndr->depth++;
    6809           0 :         if (flags & NDR_SET_VALUES) {
    6810           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    6811             :         }
    6812           0 :         if (flags & NDR_IN) {
    6813           0 :                 ndr_print_struct(ndr, "in", "lsa_ClearAuditLog");
    6814           0 :                 ndr->depth++;
    6815           0 :                 ndr->depth--;
    6816             :         }
    6817           0 :         if (flags & NDR_OUT) {
    6818           0 :                 ndr_print_struct(ndr, "out", "lsa_ClearAuditLog");
    6819           0 :                 ndr->depth++;
    6820           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    6821           0 :                 ndr->depth--;
    6822             :         }
    6823           0 :         ndr->depth--;
    6824             : }
    6825             : 
    6826          17 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struct lsa_CreateAccount *r)
    6827             : {
    6828          17 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    6829          17 :         if (flags & NDR_IN) {
    6830           8 :                 if (r->in.handle == NULL) {
    6831           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6832             :                 }
    6833           8 :                 if (r->in.sid == NULL) {
    6834           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6835             :                 }
    6836           8 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6837           8 :                 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
    6838           8 :                 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
    6839             :         }
    6840          17 :         if (flags & NDR_OUT) {
    6841           9 :                 if (r->out.acct_handle == NULL) {
    6842           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6843             :                 }
    6844           9 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
    6845           9 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    6846             :         }
    6847          17 :         return NDR_ERR_SUCCESS;
    6848             : }
    6849             : 
    6850          20 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r)
    6851             : {
    6852          20 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    6853          20 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    6854          20 :         TALLOC_CTX *_mem_save_acct_handle_0 = NULL;
    6855          20 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    6856          20 :         if (flags & NDR_IN) {
    6857          10 :                 NDR_ZERO_STRUCT(r->out);
    6858             : 
    6859          10 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6860          10 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6861             :                 }
    6862          10 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6863          10 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    6864          10 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6865          10 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    6866          10 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6867          10 :                         NDR_PULL_ALLOC(ndr, r->in.sid);
    6868             :                 }
    6869          10 :                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6870          10 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
    6871          10 :                 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
    6872          10 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
    6873          10 :                 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
    6874          10 :                 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
    6875          10 :                 NDR_ZERO_STRUCTP(r->out.acct_handle);
    6876             :         }
    6877          20 :         if (flags & NDR_OUT) {
    6878             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    6879             :                 if (r->in.handle == NULL) {
    6880             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6881             :                         NDR_ZERO_STRUCTP(r->in.handle);
    6882             :                 }
    6883             :                 if (r->in.sid == NULL) {
    6884             :                         NDR_PULL_ALLOC(ndr, r->in.sid);
    6885             :                         NDR_ZERO_STRUCTP(r->in.sid);
    6886             :                 }
    6887             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    6888          10 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6889           3 :                         NDR_PULL_ALLOC(ndr, r->out.acct_handle);
    6890             :                 }
    6891          10 :                 _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6892          10 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC);
    6893          10 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
    6894          10 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC);
    6895          10 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    6896             :         }
    6897          16 :         return NDR_ERR_SUCCESS;
    6898             : }
    6899             : 
    6900           6 : _PUBLIC_ void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateAccount *r)
    6901             : {
    6902           6 :         ndr_print_struct(ndr, name, "lsa_CreateAccount");
    6903           6 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6904           6 :         ndr->depth++;
    6905           6 :         if (flags & NDR_SET_VALUES) {
    6906           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    6907             :         }
    6908           6 :         if (flags & NDR_IN) {
    6909           2 :                 ndr_print_struct(ndr, "in", "lsa_CreateAccount");
    6910           2 :                 ndr->depth++;
    6911           2 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    6912           2 :                 ndr->depth++;
    6913           2 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    6914           2 :                 ndr->depth--;
    6915           2 :                 ndr_print_ptr(ndr, "sid", r->in.sid);
    6916           2 :                 ndr->depth++;
    6917           2 :                 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
    6918           2 :                 ndr->depth--;
    6919           2 :                 ndr_print_lsa_AccountAccessMask(ndr, "access_mask", r->in.access_mask);
    6920           2 :                 ndr->depth--;
    6921             :         }
    6922           6 :         if (flags & NDR_OUT) {
    6923           4 :                 ndr_print_struct(ndr, "out", "lsa_CreateAccount");
    6924           4 :                 ndr->depth++;
    6925           4 :                 ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle);
    6926           4 :                 ndr->depth++;
    6927           4 :                 ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle);
    6928           4 :                 ndr->depth--;
    6929           4 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    6930           4 :                 ndr->depth--;
    6931             :         }
    6932           6 :         ndr->depth--;
    6933             : }
    6934             : 
    6935          79 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct lsa_EnumAccounts *r)
    6936             : {
    6937          79 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    6938          79 :         if (flags & NDR_IN) {
    6939          40 :                 if (r->in.handle == NULL) {
    6940           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6941             :                 }
    6942          40 :                 if (r->in.resume_handle == NULL) {
    6943           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6944             :                 }
    6945          40 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6946          40 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
    6947          40 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_entries));
    6948             :         }
    6949          79 :         if (flags & NDR_OUT) {
    6950          39 :                 if (r->out.resume_handle == NULL) {
    6951           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6952             :                 }
    6953          39 :                 if (r->out.sids == NULL) {
    6954           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    6955             :                 }
    6956          39 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
    6957          39 :                 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
    6958          39 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    6959             :         }
    6960          79 :         return NDR_ERR_SUCCESS;
    6961             : }
    6962             : 
    6963          81 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int flags, struct lsa_EnumAccounts *r)
    6964             : {
    6965          81 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    6966          81 :         TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
    6967          81 :         TALLOC_CTX *_mem_save_sids_0 = NULL;
    6968          81 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    6969          81 :         if (flags & NDR_IN) {
    6970          39 :                 NDR_ZERO_STRUCT(r->out);
    6971             : 
    6972          39 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6973          39 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6974             :                 }
    6975          39 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6976          39 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    6977          39 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    6978          39 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    6979          39 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    6980          39 :                         NDR_PULL_ALLOC(ndr, r->in.resume_handle);
    6981             :                 }
    6982          39 :                 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6983          39 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
    6984          39 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
    6985          39 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
    6986          39 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_entries));
    6987          39 :                 if (r->in.num_entries > 8192) {
    6988           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    6989             :                 }
    6990          39 :                 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
    6991          39 :                 *r->out.resume_handle = *r->in.resume_handle;
    6992          39 :                 NDR_PULL_ALLOC(ndr, r->out.sids);
    6993          39 :                 NDR_ZERO_STRUCTP(r->out.sids);
    6994             :         }
    6995          81 :         if (flags & NDR_OUT) {
    6996             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    6997             :                 if (r->in.handle == NULL) {
    6998             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    6999             :                         NDR_ZERO_STRUCTP(r->in.handle);
    7000             :                 }
    7001             :                 if (r->in.resume_handle == NULL) {
    7002             :                         NDR_PULL_ALLOC(ndr, r->in.resume_handle);
    7003             :                         NDR_ZERO_STRUCTP(r->in.resume_handle);
    7004             :                 }
    7005             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    7006          42 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7007           4 :                         NDR_PULL_ALLOC(ndr, r->out.resume_handle);
    7008             :                 }
    7009          42 :                 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7010          42 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
    7011          42 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
    7012          42 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
    7013          42 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7014           4 :                         NDR_PULL_ALLOC(ndr, r->out.sids);
    7015             :                 }
    7016          42 :                 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7017          42 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
    7018          42 :                 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
    7019          42 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
    7020          42 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    7021             :         }
    7022          77 :         return NDR_ERR_SUCCESS;
    7023             : }
    7024             : 
    7025           8 : _PUBLIC_ void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccounts *r)
    7026             : {
    7027           8 :         ndr_print_struct(ndr, name, "lsa_EnumAccounts");
    7028           8 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7029           8 :         ndr->depth++;
    7030           8 :         if (flags & NDR_SET_VALUES) {
    7031           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    7032             :         }
    7033           8 :         if (flags & NDR_IN) {
    7034           2 :                 ndr_print_struct(ndr, "in", "lsa_EnumAccounts");
    7035           2 :                 ndr->depth++;
    7036           2 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    7037           2 :                 ndr->depth++;
    7038           2 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    7039           2 :                 ndr->depth--;
    7040           2 :                 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
    7041           2 :                 ndr->depth++;
    7042           2 :                 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
    7043           2 :                 ndr->depth--;
    7044           2 :                 ndr_print_uint32(ndr, "num_entries", r->in.num_entries);
    7045           2 :                 ndr->depth--;
    7046             :         }
    7047           8 :         if (flags & NDR_OUT) {
    7048           6 :                 ndr_print_struct(ndr, "out", "lsa_EnumAccounts");
    7049           6 :                 ndr->depth++;
    7050           6 :                 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
    7051           6 :                 ndr->depth++;
    7052           6 :                 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
    7053           6 :                 ndr->depth--;
    7054           6 :                 ndr_print_ptr(ndr, "sids", r->out.sids);
    7055           6 :                 ndr->depth++;
    7056           6 :                 ndr_print_lsa_SidArray(ndr, "sids", r->out.sids);
    7057           6 :                 ndr->depth--;
    7058           6 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    7059           6 :                 ndr->depth--;
    7060             :         }
    7061           8 :         ndr->depth--;
    7062             : }
    7063             : 
    7064         108 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *r)
    7065             : {
    7066         108 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    7067         108 :         if (flags & NDR_IN) {
    7068          48 :                 if (r->in.policy_handle == NULL) {
    7069           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7070             :                 }
    7071          48 :                 if (r->in.info == NULL) {
    7072           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7073             :                 }
    7074          48 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
    7075          48 :                 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
    7076          48 :                 NDR_CHECK(ndr_push_lsa_TrustedAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
    7077             :         }
    7078         108 :         if (flags & NDR_OUT) {
    7079          60 :                 if (r->out.trustdom_handle == NULL) {
    7080           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7081             :                 }
    7082          60 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
    7083          60 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    7084             :         }
    7085         108 :         return NDR_ERR_SUCCESS;
    7086             : }
    7087             : 
    7088         100 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r)
    7089             : {
    7090         100 :         TALLOC_CTX *_mem_save_policy_handle_0 = NULL;
    7091         100 :         TALLOC_CTX *_mem_save_info_0 = NULL;
    7092         100 :         TALLOC_CTX *_mem_save_trustdom_handle_0 = NULL;
    7093         100 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    7094         100 :         if (flags & NDR_IN) {
    7095          50 :                 NDR_ZERO_STRUCT(r->out);
    7096             : 
    7097          50 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7098          50 :                         NDR_PULL_ALLOC(ndr, r->in.policy_handle);
    7099             :                 }
    7100          50 :                 _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7101          50 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
    7102          50 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
    7103          50 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
    7104          50 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7105          50 :                         NDR_PULL_ALLOC(ndr, r->in.info);
    7106             :                 }
    7107          50 :                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7108          50 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
    7109          50 :                 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
    7110          50 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
    7111          50 :                 NDR_CHECK(ndr_pull_lsa_TrustedAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
    7112          50 :                 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
    7113          50 :                 NDR_ZERO_STRUCTP(r->out.trustdom_handle);
    7114             :         }
    7115         100 :         if (flags & NDR_OUT) {
    7116             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    7117             :                 if (r->in.policy_handle == NULL) {
    7118             :                         NDR_PULL_ALLOC(ndr, r->in.policy_handle);
    7119             :                         NDR_ZERO_STRUCTP(r->in.policy_handle);
    7120             :                 }
    7121             :                 if (r->in.info == NULL) {
    7122             :                         NDR_PULL_ALLOC(ndr, r->in.info);
    7123             :                         NDR_ZERO_STRUCTP(r->in.info);
    7124             :                 }
    7125             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    7126          50 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7127          14 :                         NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
    7128             :                 }
    7129          50 :                 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7130          50 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
    7131          50 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
    7132          50 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
    7133          50 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    7134             :         }
    7135          96 :         return NDR_ERR_SUCCESS;
    7136             : }
    7137             : 
    7138          28 : _PUBLIC_ void ndr_print_lsa_CreateTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomain *r)
    7139             : {
    7140          28 :         ndr_print_struct(ndr, name, "lsa_CreateTrustedDomain");
    7141          28 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7142          28 :         ndr->depth++;
    7143          28 :         if (flags & NDR_SET_VALUES) {
    7144           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    7145             :         }
    7146          28 :         if (flags & NDR_IN) {
    7147           2 :                 ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomain");
    7148           2 :                 ndr->depth++;
    7149           2 :                 ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
    7150           2 :                 ndr->depth++;
    7151           2 :                 ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
    7152           2 :                 ndr->depth--;
    7153           2 :                 ndr_print_ptr(ndr, "info", r->in.info);
    7154           2 :                 ndr->depth++;
    7155           2 :                 ndr_print_lsa_DomainInfo(ndr, "info", r->in.info);
    7156           2 :                 ndr->depth--;
    7157           2 :                 ndr_print_lsa_TrustedAccessMask(ndr, "access_mask", r->in.access_mask);
    7158           2 :                 ndr->depth--;
    7159             :         }
    7160          28 :         if (flags & NDR_OUT) {
    7161          26 :                 ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomain");
    7162          26 :                 ndr->depth++;
    7163          26 :                 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
    7164          26 :                 ndr->depth++;
    7165          26 :                 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
    7166          26 :                 ndr->depth--;
    7167          26 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    7168          26 :                 ndr->depth--;
    7169             :         }
    7170          28 :         ndr->depth--;
    7171             : }
    7172             : 
    7173         198 : static enum ndr_err_code ndr_push_lsa_EnumTrustDom(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustDom *r)
    7174             : {
    7175         198 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    7176         198 :         if (flags & NDR_IN) {
    7177          88 :                 if (r->in.handle == NULL) {
    7178           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7179             :                 }
    7180          88 :                 if (r->in.resume_handle == NULL) {
    7181           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7182             :                 }
    7183          88 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    7184          88 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
    7185          88 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
    7186             :         }
    7187         198 :         if (flags & NDR_OUT) {
    7188         110 :                 if (r->out.resume_handle == NULL) {
    7189           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7190             :                 }
    7191         110 :                 if (r->out.domains == NULL) {
    7192           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7193             :                 }
    7194         110 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
    7195         110 :                 NDR_CHECK(ndr_push_lsa_DomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
    7196         110 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    7197             :         }
    7198         189 :         return NDR_ERR_SUCCESS;
    7199             : }
    7200             : 
    7201         176 : static enum ndr_err_code ndr_pull_lsa_EnumTrustDom(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustDom *r)
    7202             : {
    7203         176 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    7204         176 :         TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
    7205         176 :         TALLOC_CTX *_mem_save_domains_0 = NULL;
    7206         176 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    7207         176 :         if (flags & NDR_IN) {
    7208          88 :                 NDR_ZERO_STRUCT(r->out);
    7209             : 
    7210          88 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7211          88 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    7212             :                 }
    7213          88 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7214          88 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    7215          88 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    7216          88 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    7217          88 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7218          88 :                         NDR_PULL_ALLOC(ndr, r->in.resume_handle);
    7219             :                 }
    7220          88 :                 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7221          88 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
    7222          88 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
    7223          88 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
    7224          88 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
    7225          88 :                 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
    7226          88 :                 *r->out.resume_handle = *r->in.resume_handle;
    7227          88 :                 NDR_PULL_ALLOC(ndr, r->out.domains);
    7228          88 :                 NDR_ZERO_STRUCTP(r->out.domains);
    7229             :         }
    7230         176 :         if (flags & NDR_OUT) {
    7231             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    7232             :                 if (r->in.handle == NULL) {
    7233             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    7234             :                         NDR_ZERO_STRUCTP(r->in.handle);
    7235             :                 }
    7236             :                 if (r->in.resume_handle == NULL) {
    7237             :                         NDR_PULL_ALLOC(ndr, r->in.resume_handle);
    7238             :                         NDR_ZERO_STRUCTP(r->in.resume_handle);
    7239             :                 }
    7240             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    7241          88 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7242          22 :                         NDR_PULL_ALLOC(ndr, r->out.resume_handle);
    7243             :                 }
    7244          88 :                 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7245          88 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
    7246          88 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
    7247          88 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
    7248          88 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7249          22 :                         NDR_PULL_ALLOC(ndr, r->out.domains);
    7250             :                 }
    7251          88 :                 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7252          88 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
    7253          88 :                 NDR_CHECK(ndr_pull_lsa_DomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
    7254          88 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
    7255          88 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    7256             :         }
    7257         168 :         return NDR_ERR_SUCCESS;
    7258             : }
    7259             : 
    7260          44 : _PUBLIC_ void ndr_print_lsa_EnumTrustDom(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustDom *r)
    7261             : {
    7262          44 :         ndr_print_struct(ndr, name, "lsa_EnumTrustDom");
    7263          44 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7264          44 :         ndr->depth++;
    7265          44 :         if (flags & NDR_SET_VALUES) {
    7266           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    7267             :         }
    7268          44 :         if (flags & NDR_IN) {
    7269           0 :                 ndr_print_struct(ndr, "in", "lsa_EnumTrustDom");
    7270           0 :                 ndr->depth++;
    7271           0 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    7272           0 :                 ndr->depth++;
    7273           0 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    7274           0 :                 ndr->depth--;
    7275           0 :                 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
    7276           0 :                 ndr->depth++;
    7277           0 :                 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
    7278           0 :                 ndr->depth--;
    7279           0 :                 ndr_print_uint32(ndr, "max_size", r->in.max_size);
    7280           0 :                 ndr->depth--;
    7281             :         }
    7282          44 :         if (flags & NDR_OUT) {
    7283          44 :                 ndr_print_struct(ndr, "out", "lsa_EnumTrustDom");
    7284          44 :                 ndr->depth++;
    7285          44 :                 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
    7286          44 :                 ndr->depth++;
    7287          44 :                 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
    7288          44 :                 ndr->depth--;
    7289          44 :                 ndr_print_ptr(ndr, "domains", r->out.domains);
    7290          44 :                 ndr->depth++;
    7291          44 :                 ndr_print_lsa_DomainList(ndr, "domains", r->out.domains);
    7292          44 :                 ndr->depth--;
    7293          44 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    7294          44 :                 ndr->depth--;
    7295             :         }
    7296          44 :         ndr->depth--;
    7297             : }
    7298             : 
    7299        3710 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct lsa_LookupNames *r)
    7300             : {
    7301             :         uint32_t cntr_names_0;
    7302        3710 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    7303        3710 :         if (flags & NDR_IN) {
    7304        1836 :                 if (r->in.handle == NULL) {
    7305           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7306             :                 }
    7307        1836 :                 if (r->in.sids == NULL) {
    7308           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7309             :                 }
    7310        1836 :                 if (r->in.count == NULL) {
    7311           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7312             :                 }
    7313        1836 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    7314        1836 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
    7315        1836 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_names));
    7316        6577 :                 for (cntr_names_0 = 0; cntr_names_0 < (r->in.num_names); cntr_names_0++) {
    7317        4741 :                         NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
    7318             :                 }
    7319        6577 :                 for (cntr_names_0 = 0; cntr_names_0 < (r->in.num_names); cntr_names_0++) {
    7320        4741 :                         NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
    7321             :                 }
    7322        1836 :                 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
    7323        1836 :                 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
    7324        1836 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
    7325             :         }
    7326        3710 :         if (flags & NDR_OUT) {
    7327        1874 :                 if (r->out.domains == NULL) {
    7328           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7329             :                 }
    7330        1874 :                 if (r->out.sids == NULL) {
    7331           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7332             :                 }
    7333        1874 :                 if (r->out.count == NULL) {
    7334           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7335             :                 }
    7336        1874 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
    7337        1874 :                 if (*r->out.domains) {
    7338        1874 :                         NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
    7339             :                 }
    7340        1874 :                 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
    7341        1874 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
    7342        1874 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    7343             :         }
    7344        3710 :         return NDR_ERR_SUCCESS;
    7345             : }
    7346             : 
    7347        3655 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flags, struct lsa_LookupNames *r)
    7348             : {
    7349        3655 :         uint32_t size_names_0 = 0;
    7350             :         uint32_t cntr_names_0;
    7351             :         uint32_t _ptr_domains;
    7352        3655 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    7353        3655 :         TALLOC_CTX *_mem_save_names_0 = NULL;
    7354        3655 :         TALLOC_CTX *_mem_save_domains_0 = NULL;
    7355        3655 :         TALLOC_CTX *_mem_save_domains_1 = NULL;
    7356        3655 :         TALLOC_CTX *_mem_save_sids_0 = NULL;
    7357        3655 :         TALLOC_CTX *_mem_save_count_0 = NULL;
    7358        3655 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    7359        3655 :         if (flags & NDR_IN) {
    7360        1817 :                 NDR_ZERO_STRUCT(r->out);
    7361             : 
    7362        1817 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7363        1817 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    7364             :                 }
    7365        1817 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7366        1817 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    7367        1817 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    7368        1817 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    7369        1817 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
    7370        1817 :                 if (r->in.num_names > 1000) {
    7371           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    7372             :                 }
    7373        1817 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
    7374        1817 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.names, &size_names_0));
    7375        1817 :                 NDR_PULL_ALLOC_N(ndr, r->in.names, size_names_0);
    7376        1817 :                 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7377        1817 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
    7378        6539 :                 for (cntr_names_0 = 0; cntr_names_0 < (size_names_0); cntr_names_0++) {
    7379        4722 :                         NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
    7380             :                 }
    7381        6537 :                 for (cntr_names_0 = 0; cntr_names_0 < (size_names_0); cntr_names_0++) {
    7382        4722 :                         NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
    7383             :                 }
    7384        1817 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
    7385        1817 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7386        1817 :                         NDR_PULL_ALLOC(ndr, r->in.sids);
    7387             :                 }
    7388        1817 :                 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7389        1817 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
    7390        1817 :                 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
    7391        1817 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
    7392        1817 :                 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
    7393        1817 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7394        1817 :                         NDR_PULL_ALLOC(ndr, r->in.count);
    7395             :                 }
    7396        1817 :                 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7397        1817 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
    7398        1817 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
    7399        1817 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
    7400        1817 :                 NDR_PULL_ALLOC(ndr, r->out.domains);
    7401        1817 :                 NDR_ZERO_STRUCTP(r->out.domains);
    7402        1817 :                 NDR_PULL_ALLOC(ndr, r->out.sids);
    7403        1817 :                 *r->out.sids = *r->in.sids;
    7404        1817 :                 NDR_PULL_ALLOC(ndr, r->out.count);
    7405        1817 :                 *r->out.count = *r->in.count;
    7406        1817 :                 if (r->in.names) {
    7407        1817 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
    7408             :                 }
    7409        2674 :                 for (cntr_names_0 = 0; cntr_names_0 < (size_names_0); cntr_names_0++) {
    7410             :                 }
    7411             :         }
    7412        3655 :         if (flags & NDR_OUT) {
    7413             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    7414             :                 if (r->in.handle == NULL) {
    7415             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    7416             :                         NDR_ZERO_STRUCTP(r->in.handle);
    7417             :                 }
    7418             :                 if (r->in.sids == NULL) {
    7419             :                         NDR_PULL_ALLOC(ndr, r->in.sids);
    7420             :                         NDR_ZERO_STRUCTP(r->in.sids);
    7421             :                 }
    7422             :                 if (r->in.count == NULL) {
    7423             :                         NDR_PULL_ALLOC(ndr, r->in.count);
    7424             :                         NDR_ZERO_STRUCTP(r->in.count);
    7425             :                 }
    7426             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    7427        1838 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7428        1592 :                         NDR_PULL_ALLOC(ndr, r->out.domains);
    7429             :                 }
    7430        1838 :                 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7431        1838 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
    7432        1838 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
    7433        1838 :                 if (_ptr_domains) {
    7434        1838 :                         NDR_PULL_ALLOC(ndr, *r->out.domains);
    7435             :                 } else {
    7436           0 :                         *r->out.domains = NULL;
    7437             :                 }
    7438        1838 :                 if (*r->out.domains) {
    7439        1838 :                         _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
    7440        1838 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
    7441        1838 :                         NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
    7442        1838 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
    7443             :                 }
    7444        1838 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
    7445        1838 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7446        1592 :                         NDR_PULL_ALLOC(ndr, r->out.sids);
    7447             :                 }
    7448        1838 :                 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7449        1838 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
    7450        1838 :                 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
    7451        1838 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
    7452        1838 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7453        1592 :                         NDR_PULL_ALLOC(ndr, r->out.count);
    7454             :                 }
    7455        1838 :                 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7456        1838 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
    7457        1838 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
    7458        1838 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
    7459        1838 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    7460             :         }
    7461        3651 :         return NDR_ERR_SUCCESS;
    7462             : }
    7463             : 
    7464         122 : _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames *r)
    7465             : {
    7466             :         uint32_t cntr_names_0;
    7467         122 :         ndr_print_struct(ndr, name, "lsa_LookupNames");
    7468         122 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7469         122 :         ndr->depth++;
    7470         122 :         if (flags & NDR_SET_VALUES) {
    7471           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    7472             :         }
    7473         122 :         if (flags & NDR_IN) {
    7474           2 :                 ndr_print_struct(ndr, "in", "lsa_LookupNames");
    7475           2 :                 ndr->depth++;
    7476           2 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    7477           2 :                 ndr->depth++;
    7478           2 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    7479           2 :                 ndr->depth--;
    7480           2 :                 ndr_print_uint32(ndr, "num_names", r->in.num_names);
    7481           2 :                 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
    7482           2 :                 ndr->depth++;
    7483         202 :                 for (cntr_names_0 = 0; cntr_names_0 < (r->in.num_names); cntr_names_0++) {
    7484         200 :                         ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
    7485             :                 }
    7486           2 :                 ndr->depth--;
    7487           2 :                 ndr_print_ptr(ndr, "sids", r->in.sids);
    7488           2 :                 ndr->depth++;
    7489           2 :                 ndr_print_lsa_TransSidArray(ndr, "sids", r->in.sids);
    7490           2 :                 ndr->depth--;
    7491           2 :                 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
    7492           2 :                 ndr_print_ptr(ndr, "count", r->in.count);
    7493           2 :                 ndr->depth++;
    7494           2 :                 ndr_print_uint32(ndr, "count", *r->in.count);
    7495           2 :                 ndr->depth--;
    7496           2 :                 ndr->depth--;
    7497             :         }
    7498         122 :         if (flags & NDR_OUT) {
    7499         120 :                 ndr_print_struct(ndr, "out", "lsa_LookupNames");
    7500         120 :                 ndr->depth++;
    7501         120 :                 ndr_print_ptr(ndr, "domains", r->out.domains);
    7502         120 :                 ndr->depth++;
    7503         120 :                 ndr_print_ptr(ndr, "domains", *r->out.domains);
    7504         120 :                 ndr->depth++;
    7505         120 :                 if (*r->out.domains) {
    7506         120 :                         ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
    7507             :                 }
    7508         120 :                 ndr->depth--;
    7509         120 :                 ndr->depth--;
    7510         120 :                 ndr_print_ptr(ndr, "sids", r->out.sids);
    7511         120 :                 ndr->depth++;
    7512         120 :                 ndr_print_lsa_TransSidArray(ndr, "sids", r->out.sids);
    7513         120 :                 ndr->depth--;
    7514         120 :                 ndr_print_ptr(ndr, "count", r->out.count);
    7515         120 :                 ndr->depth++;
    7516         120 :                 ndr_print_uint32(ndr, "count", *r->out.count);
    7517         120 :                 ndr->depth--;
    7518         120 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    7519         120 :                 ndr->depth--;
    7520             :         }
    7521         122 :         ndr->depth--;
    7522             : }
    7523             : 
    7524       15361 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct lsa_LookupSids *r)
    7525             : {
    7526       15361 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    7527       15361 :         if (flags & NDR_IN) {
    7528        8221 :                 if (r->in.handle == NULL) {
    7529           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7530             :                 }
    7531        8221 :                 if (r->in.sids == NULL) {
    7532           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7533             :                 }
    7534        8221 :                 if (r->in.names == NULL) {
    7535           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7536             :                 }
    7537        8221 :                 if (r->in.count == NULL) {
    7538           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7539             :                 }
    7540        8221 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    7541        8221 :                 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
    7542        8221 :                 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
    7543        8221 :                 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
    7544        8221 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
    7545             :         }
    7546       15361 :         if (flags & NDR_OUT) {
    7547        7140 :                 if (r->out.domains == NULL) {
    7548           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7549             :                 }
    7550        7140 :                 if (r->out.names == NULL) {
    7551           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7552             :                 }
    7553        7140 :                 if (r->out.count == NULL) {
    7554           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7555             :                 }
    7556        7140 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
    7557        7140 :                 if (*r->out.domains) {
    7558        7140 :                         NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
    7559             :                 }
    7560        7140 :                 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
    7561        7140 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
    7562        7140 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    7563             :         }
    7564       15361 :         return NDR_ERR_SUCCESS;
    7565             : }
    7566             : 
    7567       15159 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int flags, struct lsa_LookupSids *r)
    7568             : {
    7569             :         uint32_t _ptr_domains;
    7570       15159 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    7571       15159 :         TALLOC_CTX *_mem_save_sids_0 = NULL;
    7572       15159 :         TALLOC_CTX *_mem_save_domains_0 = NULL;
    7573       15159 :         TALLOC_CTX *_mem_save_domains_1 = NULL;
    7574       15159 :         TALLOC_CTX *_mem_save_names_0 = NULL;
    7575       15159 :         TALLOC_CTX *_mem_save_count_0 = NULL;
    7576       15159 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    7577       15159 :         if (flags & NDR_IN) {
    7578        6936 :                 NDR_ZERO_STRUCT(r->out);
    7579             : 
    7580        6936 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7581        6936 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    7582             :                 }
    7583        6936 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7584        6936 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    7585        6936 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    7586        6936 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    7587        6936 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7588        6936 :                         NDR_PULL_ALLOC(ndr, r->in.sids);
    7589             :                 }
    7590        6936 :                 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7591        6936 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
    7592        6936 :                 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
    7593        6936 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
    7594        6936 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7595        6936 :                         NDR_PULL_ALLOC(ndr, r->in.names);
    7596             :                 }
    7597        6936 :                 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7598        6936 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
    7599        6936 :                 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
    7600        6936 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
    7601        6936 :                 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
    7602        6936 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7603        6936 :                         NDR_PULL_ALLOC(ndr, r->in.count);
    7604             :                 }
    7605        6936 :                 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7606        6936 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
    7607        6936 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
    7608        6936 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
    7609        6936 :                 NDR_PULL_ALLOC(ndr, r->out.domains);
    7610        6936 :                 NDR_ZERO_STRUCTP(r->out.domains);
    7611        6936 :                 NDR_PULL_ALLOC(ndr, r->out.names);
    7612        6936 :                 *r->out.names = *r->in.names;
    7613        6936 :                 NDR_PULL_ALLOC(ndr, r->out.count);
    7614        6936 :                 *r->out.count = *r->in.count;
    7615             :         }
    7616       15159 :         if (flags & NDR_OUT) {
    7617             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    7618             :                 if (r->in.handle == NULL) {
    7619             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    7620             :                         NDR_ZERO_STRUCTP(r->in.handle);
    7621             :                 }
    7622             :                 if (r->in.sids == NULL) {
    7623             :                         NDR_PULL_ALLOC(ndr, r->in.sids);
    7624             :                         NDR_ZERO_STRUCTP(r->in.sids);
    7625             :                 }
    7626             :                 if (r->in.names == NULL) {
    7627             :                         NDR_PULL_ALLOC(ndr, r->in.names);
    7628             :                         NDR_ZERO_STRUCTP(r->in.names);
    7629             :                 }
    7630             :                 if (r->in.count == NULL) {
    7631             :                         NDR_PULL_ALLOC(ndr, r->in.count);
    7632             :                         NDR_ZERO_STRUCTP(r->in.count);
    7633             :                 }
    7634             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    7635        8223 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7636        7243 :                         NDR_PULL_ALLOC(ndr, r->out.domains);
    7637             :                 }
    7638        8223 :                 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7639        8223 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
    7640        8223 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
    7641        8223 :                 if (_ptr_domains) {
    7642        8223 :                         NDR_PULL_ALLOC(ndr, *r->out.domains);
    7643             :                 } else {
    7644           0 :                         *r->out.domains = NULL;
    7645             :                 }
    7646        8223 :                 if (*r->out.domains) {
    7647        8223 :                         _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
    7648        8223 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
    7649        8223 :                         NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
    7650        8223 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
    7651             :                 }
    7652        8223 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
    7653        8223 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7654        7243 :                         NDR_PULL_ALLOC(ndr, r->out.names);
    7655             :                 }
    7656        8223 :                 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7657        8223 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
    7658        8223 :                 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
    7659        8223 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
    7660        8223 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7661        7243 :                         NDR_PULL_ALLOC(ndr, r->out.count);
    7662             :                 }
    7663        8223 :                 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7664        8223 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
    7665        8223 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
    7666        8223 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
    7667        8223 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    7668             :         }
    7669       15155 :         return NDR_ERR_SUCCESS;
    7670             : }
    7671             : 
    7672         416 : _PUBLIC_ void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids *r)
    7673             : {
    7674         416 :         ndr_print_struct(ndr, name, "lsa_LookupSids");
    7675         416 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7676         416 :         ndr->depth++;
    7677         416 :         if (flags & NDR_SET_VALUES) {
    7678           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    7679             :         }
    7680         416 :         if (flags & NDR_IN) {
    7681           2 :                 ndr_print_struct(ndr, "in", "lsa_LookupSids");
    7682           2 :                 ndr->depth++;
    7683           2 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    7684           2 :                 ndr->depth++;
    7685           2 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    7686           2 :                 ndr->depth--;
    7687           2 :                 ndr_print_ptr(ndr, "sids", r->in.sids);
    7688           2 :                 ndr->depth++;
    7689           2 :                 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
    7690           2 :                 ndr->depth--;
    7691           2 :                 ndr_print_ptr(ndr, "names", r->in.names);
    7692           2 :                 ndr->depth++;
    7693           2 :                 ndr_print_lsa_TransNameArray(ndr, "names", r->in.names);
    7694           2 :                 ndr->depth--;
    7695           2 :                 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
    7696           2 :                 ndr_print_ptr(ndr, "count", r->in.count);
    7697           2 :                 ndr->depth++;
    7698           2 :                 ndr_print_uint32(ndr, "count", *r->in.count);
    7699           2 :                 ndr->depth--;
    7700           2 :                 ndr->depth--;
    7701             :         }
    7702         416 :         if (flags & NDR_OUT) {
    7703         414 :                 ndr_print_struct(ndr, "out", "lsa_LookupSids");
    7704         414 :                 ndr->depth++;
    7705         414 :                 ndr_print_ptr(ndr, "domains", r->out.domains);
    7706         414 :                 ndr->depth++;
    7707         414 :                 ndr_print_ptr(ndr, "domains", *r->out.domains);
    7708         414 :                 ndr->depth++;
    7709         414 :                 if (*r->out.domains) {
    7710         414 :                         ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
    7711             :                 }
    7712         414 :                 ndr->depth--;
    7713         414 :                 ndr->depth--;
    7714         414 :                 ndr_print_ptr(ndr, "names", r->out.names);
    7715         414 :                 ndr->depth++;
    7716         414 :                 ndr_print_lsa_TransNameArray(ndr, "names", r->out.names);
    7717         414 :                 ndr->depth--;
    7718         414 :                 ndr_print_ptr(ndr, "count", r->out.count);
    7719         414 :                 ndr->depth++;
    7720         414 :                 ndr_print_uint32(ndr, "count", *r->out.count);
    7721         414 :                 ndr->depth--;
    7722         414 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    7723         414 :                 ndr->depth--;
    7724             :         }
    7725         416 :         ndr->depth--;
    7726             : }
    7727             : 
    7728        4192 : _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct lsa_CreateSecret *r)
    7729             : {
    7730        4192 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    7731        4192 :         if (flags & NDR_IN) {
    7732        2380 :                 if (r->in.handle == NULL) {
    7733           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7734             :                 }
    7735        2380 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    7736        2380 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
    7737        2380 :                 NDR_CHECK(ndr_push_lsa_SecretAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
    7738             :         }
    7739        4192 :         if (flags & NDR_OUT) {
    7740        1812 :                 if (r->out.sec_handle == NULL) {
    7741           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7742             :                 }
    7743        1812 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
    7744        1812 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    7745             :         }
    7746        4192 :         return NDR_ERR_SUCCESS;
    7747             : }
    7748             : 
    7749        4180 : _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int flags, struct lsa_CreateSecret *r)
    7750             : {
    7751        4180 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    7752        4180 :         TALLOC_CTX *_mem_save_sec_handle_0 = NULL;
    7753        4180 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    7754        4180 :         if (flags & NDR_IN) {
    7755        1798 :                 NDR_ZERO_STRUCT(r->out);
    7756             : 
    7757        1798 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7758        1798 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    7759             :                 }
    7760        1798 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7761        1798 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    7762        1798 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    7763        1798 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    7764        1798 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
    7765        1798 :                 NDR_CHECK(ndr_pull_lsa_SecretAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
    7766        1798 :                 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
    7767        1798 :                 NDR_ZERO_STRUCTP(r->out.sec_handle);
    7768             :         }
    7769        4180 :         if (flags & NDR_OUT) {
    7770             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    7771             :                 if (r->in.handle == NULL) {
    7772             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    7773             :                         NDR_ZERO_STRUCTP(r->in.handle);
    7774             :                 }
    7775             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    7776        2382 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7777          20 :                         NDR_PULL_ALLOC(ndr, r->out.sec_handle);
    7778             :                 }
    7779        2382 :                 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7780        2382 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sec_handle, LIBNDR_FLAG_REF_ALLOC);
    7781        2382 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
    7782        2382 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
    7783        2382 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    7784             :         }
    7785        4176 :         return NDR_ERR_SUCCESS;
    7786             : }
    7787             : 
    7788          36 : _PUBLIC_ void ndr_print_lsa_CreateSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateSecret *r)
    7789             : {
    7790          36 :         ndr_print_struct(ndr, name, "lsa_CreateSecret");
    7791          36 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7792          36 :         ndr->depth++;
    7793          36 :         if (flags & NDR_SET_VALUES) {
    7794           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    7795             :         }
    7796          36 :         if (flags & NDR_IN) {
    7797           2 :                 ndr_print_struct(ndr, "in", "lsa_CreateSecret");
    7798           2 :                 ndr->depth++;
    7799           2 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    7800           2 :                 ndr->depth++;
    7801           2 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    7802           2 :                 ndr->depth--;
    7803           2 :                 ndr_print_lsa_String(ndr, "name", &r->in.name);
    7804           2 :                 ndr_print_lsa_SecretAccessMask(ndr, "access_mask", r->in.access_mask);
    7805           2 :                 ndr->depth--;
    7806             :         }
    7807          36 :         if (flags & NDR_OUT) {
    7808          34 :                 ndr_print_struct(ndr, "out", "lsa_CreateSecret");
    7809          34 :                 ndr->depth++;
    7810          34 :                 ndr_print_ptr(ndr, "sec_handle", r->out.sec_handle);
    7811          34 :                 ndr->depth++;
    7812          34 :                 ndr_print_policy_handle(ndr, "sec_handle", r->out.sec_handle);
    7813          34 :                 ndr->depth--;
    7814          34 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    7815          34 :                 ndr->depth--;
    7816             :         }
    7817          36 :         ndr->depth--;
    7818             : }
    7819             : 
    7820         132 : static enum ndr_err_code ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flags, const struct lsa_OpenAccount *r)
    7821             : {
    7822         132 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    7823         132 :         if (flags & NDR_IN) {
    7824          64 :                 if (r->in.handle == NULL) {
    7825           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7826             :                 }
    7827          64 :                 if (r->in.sid == NULL) {
    7828           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7829             :                 }
    7830          64 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    7831          64 :                 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
    7832          64 :                 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
    7833             :         }
    7834         132 :         if (flags & NDR_OUT) {
    7835          68 :                 if (r->out.acct_handle == NULL) {
    7836           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7837             :                 }
    7838          68 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
    7839          68 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    7840             :         }
    7841         132 :         return NDR_ERR_SUCCESS;
    7842             : }
    7843             : 
    7844         126 : static enum ndr_err_code ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flags, struct lsa_OpenAccount *r)
    7845             : {
    7846         126 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    7847         126 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    7848         126 :         TALLOC_CTX *_mem_save_acct_handle_0 = NULL;
    7849         126 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    7850         126 :         if (flags & NDR_IN) {
    7851          62 :                 NDR_ZERO_STRUCT(r->out);
    7852             : 
    7853          62 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7854          62 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    7855             :                 }
    7856          62 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7857          62 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    7858          62 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    7859          62 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    7860          62 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7861          62 :                         NDR_PULL_ALLOC(ndr, r->in.sid);
    7862             :                 }
    7863          62 :                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7864          62 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
    7865          62 :                 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
    7866          62 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
    7867          62 :                 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
    7868          62 :                 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
    7869          62 :                 NDR_ZERO_STRUCTP(r->out.acct_handle);
    7870             :         }
    7871         126 :         if (flags & NDR_OUT) {
    7872             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    7873             :                 if (r->in.handle == NULL) {
    7874             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    7875             :                         NDR_ZERO_STRUCTP(r->in.handle);
    7876             :                 }
    7877             :                 if (r->in.sid == NULL) {
    7878             :                         NDR_PULL_ALLOC(ndr, r->in.sid);
    7879             :                         NDR_ZERO_STRUCTP(r->in.sid);
    7880             :                 }
    7881             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    7882          64 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7883           6 :                         NDR_PULL_ALLOC(ndr, r->out.acct_handle);
    7884             :                 }
    7885          64 :                 _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7886          64 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC);
    7887          64 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
    7888          64 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC);
    7889          64 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    7890             :         }
    7891         126 :         return NDR_ERR_SUCCESS;
    7892             : }
    7893             : 
    7894          12 : _PUBLIC_ void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenAccount *r)
    7895             : {
    7896          12 :         ndr_print_struct(ndr, name, "lsa_OpenAccount");
    7897          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7898          12 :         ndr->depth++;
    7899          12 :         if (flags & NDR_SET_VALUES) {
    7900           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    7901             :         }
    7902          12 :         if (flags & NDR_IN) {
    7903           0 :                 ndr_print_struct(ndr, "in", "lsa_OpenAccount");
    7904           0 :                 ndr->depth++;
    7905           0 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    7906           0 :                 ndr->depth++;
    7907           0 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    7908           0 :                 ndr->depth--;
    7909           0 :                 ndr_print_ptr(ndr, "sid", r->in.sid);
    7910           0 :                 ndr->depth++;
    7911           0 :                 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
    7912           0 :                 ndr->depth--;
    7913           0 :                 ndr_print_lsa_AccountAccessMask(ndr, "access_mask", r->in.access_mask);
    7914           0 :                 ndr->depth--;
    7915             :         }
    7916          12 :         if (flags & NDR_OUT) {
    7917          12 :                 ndr_print_struct(ndr, "out", "lsa_OpenAccount");
    7918          12 :                 ndr->depth++;
    7919          12 :                 ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle);
    7920          12 :                 ndr->depth++;
    7921          12 :                 ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle);
    7922          12 :                 ndr->depth--;
    7923          12 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    7924          12 :                 ndr->depth--;
    7925             :         }
    7926          12 :         ndr->depth--;
    7927             : }
    7928             : 
    7929         102 : static enum ndr_err_code ndr_push_lsa_EnumPrivsAccount(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivsAccount *r)
    7930             : {
    7931         102 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    7932         102 :         if (flags & NDR_IN) {
    7933          48 :                 if (r->in.handle == NULL) {
    7934           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7935             :                 }
    7936          48 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    7937             :         }
    7938         102 :         if (flags & NDR_OUT) {
    7939          54 :                 if (r->out.privs == NULL) {
    7940           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    7941             :                 }
    7942          54 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.privs));
    7943          54 :                 if (*r->out.privs) {
    7944          54 :                         NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs));
    7945             :                 }
    7946          54 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    7947             :         }
    7948         102 :         return NDR_ERR_SUCCESS;
    7949             : }
    7950             : 
    7951          96 : static enum ndr_err_code ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivsAccount *r)
    7952             : {
    7953             :         uint32_t _ptr_privs;
    7954          96 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    7955          96 :         TALLOC_CTX *_mem_save_privs_0 = NULL;
    7956          96 :         TALLOC_CTX *_mem_save_privs_1 = NULL;
    7957          96 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    7958          96 :         if (flags & NDR_IN) {
    7959          48 :                 NDR_ZERO_STRUCT(r->out);
    7960             : 
    7961          48 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7962          48 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    7963             :                 }
    7964          48 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7965          48 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    7966          48 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    7967          48 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    7968          48 :                 NDR_PULL_ALLOC(ndr, r->out.privs);
    7969          48 :                 NDR_ZERO_STRUCTP(r->out.privs);
    7970             :         }
    7971          96 :         if (flags & NDR_OUT) {
    7972             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    7973             :                 if (r->in.handle == NULL) {
    7974             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    7975             :                         NDR_ZERO_STRUCTP(r->in.handle);
    7976             :                 }
    7977             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    7978          48 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    7979           6 :                         NDR_PULL_ALLOC(ndr, r->out.privs);
    7980             :                 }
    7981          48 :                 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7982          48 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, LIBNDR_FLAG_REF_ALLOC);
    7983          48 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
    7984          48 :                 if (_ptr_privs) {
    7985          48 :                         NDR_PULL_ALLOC(ndr, *r->out.privs);
    7986             :                 } else {
    7987           0 :                         *r->out.privs = NULL;
    7988             :                 }
    7989          48 :                 if (*r->out.privs) {
    7990          48 :                         _mem_save_privs_1 = NDR_PULL_GET_MEM_CTX(ndr);
    7991          48 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.privs, 0);
    7992          48 :                         NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs));
    7993          48 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_1, 0);
    7994             :                 }
    7995          48 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
    7996          48 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    7997             :         }
    7998          96 :         return NDR_ERR_SUCCESS;
    7999             : }
    8000             : 
    8001          12 : _PUBLIC_ void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivsAccount *r)
    8002             : {
    8003          12 :         ndr_print_struct(ndr, name, "lsa_EnumPrivsAccount");
    8004          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8005          12 :         ndr->depth++;
    8006          12 :         if (flags & NDR_SET_VALUES) {
    8007           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    8008             :         }
    8009          12 :         if (flags & NDR_IN) {
    8010           0 :                 ndr_print_struct(ndr, "in", "lsa_EnumPrivsAccount");
    8011           0 :                 ndr->depth++;
    8012           0 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    8013           0 :                 ndr->depth++;
    8014           0 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    8015           0 :                 ndr->depth--;
    8016           0 :                 ndr->depth--;
    8017             :         }
    8018          12 :         if (flags & NDR_OUT) {
    8019          12 :                 ndr_print_struct(ndr, "out", "lsa_EnumPrivsAccount");
    8020          12 :                 ndr->depth++;
    8021          12 :                 ndr_print_ptr(ndr, "privs", r->out.privs);
    8022          12 :                 ndr->depth++;
    8023          12 :                 ndr_print_ptr(ndr, "privs", *r->out.privs);
    8024          12 :                 ndr->depth++;
    8025          12 :                 if (*r->out.privs) {
    8026          12 :                         ndr_print_lsa_PrivilegeSet(ndr, "privs", *r->out.privs);
    8027             :                 }
    8028          12 :                 ndr->depth--;
    8029          12 :                 ndr->depth--;
    8030          12 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    8031          12 :                 ndr->depth--;
    8032             :         }
    8033          12 :         ndr->depth--;
    8034             : }
    8035             : 
    8036          69 : static enum ndr_err_code ndr_push_lsa_AddPrivilegesToAccount(struct ndr_push *ndr, int flags, const struct lsa_AddPrivilegesToAccount *r)
    8037             : {
    8038          69 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    8039          69 :         if (flags & NDR_IN) {
    8040          32 :                 if (r->in.handle == NULL) {
    8041           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    8042             :                 }
    8043          32 :                 if (r->in.privs == NULL) {
    8044           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    8045             :                 }
    8046          32 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    8047          32 :                 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
    8048             :         }
    8049          69 :         if (flags & NDR_OUT) {
    8050          37 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    8051             :         }
    8052          69 :         return NDR_ERR_SUCCESS;
    8053             : }
    8054             : 
    8055          64 : static enum ndr_err_code ndr_pull_lsa_AddPrivilegesToAccount(struct ndr_pull *ndr, int flags, struct lsa_AddPrivilegesToAccount *r)
    8056             : {
    8057          64 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    8058          64 :         TALLOC_CTX *_mem_save_privs_0 = NULL;
    8059          64 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    8060          64 :         if (flags & NDR_IN) {
    8061          32 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    8062          32 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    8063             :                 }
    8064          32 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8065          32 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    8066          32 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    8067          32 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    8068          32 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    8069          32 :                         NDR_PULL_ALLOC(ndr, r->in.privs);
    8070             :                 }
    8071          32 :                 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8072          32 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.privs, LIBNDR_FLAG_REF_ALLOC);
    8073          32 :                 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
    8074          32 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
    8075             :         }
    8076          64 :         if (flags & NDR_OUT) {
    8077             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    8078             :                 if (r->in.handle == NULL) {
    8079             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    8080             :                         NDR_ZERO_STRUCTP(r->in.handle);
    8081             :                 }
    8082             :                 if (r->in.privs == NULL) {
    8083             :                         NDR_PULL_ALLOC(ndr, r->in.privs);
    8084             :                         NDR_ZERO_STRUCTP(r->in.privs);
    8085             :                 }
    8086             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    8087          32 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    8088             :         }
    8089          64 :         return NDR_ERR_SUCCESS;
    8090             : }
    8091             : 
    8092          10 : _PUBLIC_ void ndr_print_lsa_AddPrivilegesToAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddPrivilegesToAccount *r)
    8093             : {
    8094          10 :         ndr_print_struct(ndr, name, "lsa_AddPrivilegesToAccount");
    8095          10 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8096          10 :         ndr->depth++;
    8097          10 :         if (flags & NDR_SET_VALUES) {
    8098           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    8099             :         }
    8100          10 :         if (flags & NDR_IN) {
    8101           0 :                 ndr_print_struct(ndr, "in", "lsa_AddPrivilegesToAccount");
    8102           0 :                 ndr->depth++;
    8103           0 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    8104           0 :                 ndr->depth++;
    8105           0 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    8106           0 :                 ndr->depth--;
    8107           0 :                 ndr_print_ptr(ndr, "privs", r->in.privs);
    8108           0 :                 ndr->depth++;
    8109           0 :                 ndr_print_lsa_PrivilegeSet(ndr, "privs", r->in.privs);
    8110           0 :                 ndr->depth--;
    8111           0 :                 ndr->depth--;
    8112             :         }
    8113          10 :         if (flags & NDR_OUT) {
    8114          10 :                 ndr_print_struct(ndr, "out", "lsa_AddPrivilegesToAccount");
    8115          10 :                 ndr->depth++;
    8116          10 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    8117          10 :                 ndr->depth--;
    8118             :         }
    8119          10 :         ndr->depth--;
    8120             : }
    8121             : 
    8122          69 : static enum ndr_err_code ndr_push_lsa_RemovePrivilegesFromAccount(struct ndr_push *ndr, int flags, const struct lsa_RemovePrivilegesFromAccount *r)
    8123             : {
    8124          69 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    8125          69 :         if (flags & NDR_IN) {
    8126          32 :                 if (r->in.handle == NULL) {
    8127           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    8128             :                 }
    8129          32 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    8130          32 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.remove_all));
    8131          32 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.privs));
    8132          32 :                 if (r->in.privs) {
    8133          32 :                         NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
    8134             :                 }
    8135             :         }
    8136          69 :         if (flags & NDR_OUT) {
    8137          37 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    8138             :         }
    8139          69 :         return NDR_ERR_SUCCESS;
    8140             : }
    8141             : 
    8142          64 : static enum ndr_err_code ndr_pull_lsa_RemovePrivilegesFromAccount(struct ndr_pull *ndr, int flags, struct lsa_RemovePrivilegesFromAccount *r)
    8143             : {
    8144             :         uint32_t _ptr_privs;
    8145          64 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    8146          64 :         TALLOC_CTX *_mem_save_privs_0 = NULL;
    8147          64 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    8148          64 :         if (flags & NDR_IN) {
    8149          32 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    8150          32 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    8151             :                 }
    8152          32 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8153          32 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    8154          32 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    8155          32 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    8156          32 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.remove_all));
    8157          32 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
    8158          32 :                 if (_ptr_privs) {
    8159          32 :                         NDR_PULL_ALLOC(ndr, r->in.privs);
    8160             :                 } else {
    8161           0 :                         r->in.privs = NULL;
    8162             :                 }
    8163          32 :                 if (r->in.privs) {
    8164          32 :                         _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8165          32 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.privs, 0);
    8166          32 :                         NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
    8167          32 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0);
    8168             :                 }
    8169             :         }
    8170          64 :         if (flags & NDR_OUT) {
    8171             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    8172             :                 if (r->in.handle == NULL) {
    8173             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    8174             :                         NDR_ZERO_STRUCTP(r->in.handle);
    8175             :                 }
    8176             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    8177          32 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    8178             :         }
    8179          64 :         return NDR_ERR_SUCCESS;
    8180             : }
    8181             : 
    8182          10 : _PUBLIC_ void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemovePrivilegesFromAccount *r)
    8183             : {
    8184          10 :         ndr_print_struct(ndr, name, "lsa_RemovePrivilegesFromAccount");
    8185          10 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8186          10 :         ndr->depth++;
    8187          10 :         if (flags & NDR_SET_VALUES) {
    8188           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    8189             :         }
    8190          10 :         if (flags & NDR_IN) {
    8191           0 :                 ndr_print_struct(ndr, "in", "lsa_RemovePrivilegesFromAccount");
    8192           0 :                 ndr->depth++;
    8193           0 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    8194           0 :                 ndr->depth++;
    8195           0 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    8196           0 :                 ndr->depth--;
    8197           0 :                 ndr_print_uint8(ndr, "remove_all", r->in.remove_all);
    8198           0 :                 ndr_print_ptr(ndr, "privs", r->in.privs);
    8199           0 :                 ndr->depth++;
    8200           0 :                 if (r->in.privs) {
    8201           0 :                         ndr_print_lsa_PrivilegeSet(ndr, "privs", r->in.privs);
    8202             :                 }
    8203           0 :                 ndr->depth--;
    8204           0 :                 ndr->depth--;
    8205             :         }
    8206          10 :         if (flags & NDR_OUT) {
    8207          10 :                 ndr_print_struct(ndr, "out", "lsa_RemovePrivilegesFromAccount");
    8208          10 :                 ndr->depth++;
    8209          10 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    8210          10 :                 ndr->depth--;
    8211             :         }
    8212          10 :         ndr->depth--;
    8213             : }
    8214             : 
    8215           0 : static enum ndr_err_code ndr_push_lsa_GetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_GetQuotasForAccount *r)
    8216             : {
    8217           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    8218           0 :         if (flags & NDR_IN) {
    8219             :         }
    8220           0 :         if (flags & NDR_OUT) {
    8221           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    8222             :         }
    8223           0 :         return NDR_ERR_SUCCESS;
    8224             : }
    8225             : 
    8226           0 : static enum ndr_err_code ndr_pull_lsa_GetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_GetQuotasForAccount *r)
    8227             : {
    8228           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    8229           0 :         if (flags & NDR_IN) {
    8230             :         }
    8231           0 :         if (flags & NDR_OUT) {
    8232             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    8233             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    8234           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    8235             :         }
    8236           0 :         return NDR_ERR_SUCCESS;
    8237             : }
    8238             : 
    8239           0 : _PUBLIC_ void ndr_print_lsa_GetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetQuotasForAccount *r)
    8240             : {
    8241           0 :         ndr_print_struct(ndr, name, "lsa_GetQuotasForAccount");
    8242           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8243           0 :         ndr->depth++;
    8244           0 :         if (flags & NDR_SET_VALUES) {
    8245           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    8246             :         }
    8247           0 :         if (flags & NDR_IN) {
    8248           0 :                 ndr_print_struct(ndr, "in", "lsa_GetQuotasForAccount");
    8249           0 :                 ndr->depth++;
    8250           0 :                 ndr->depth--;
    8251             :         }
    8252           0 :         if (flags & NDR_OUT) {
    8253           0 :                 ndr_print_struct(ndr, "out", "lsa_GetQuotasForAccount");
    8254           0 :                 ndr->depth++;
    8255           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    8256           0 :                 ndr->depth--;
    8257             :         }
    8258           0 :         ndr->depth--;
    8259             : }
    8260             : 
    8261           0 : static enum ndr_err_code ndr_push_lsa_SetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_SetQuotasForAccount *r)
    8262             : {
    8263           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    8264           0 :         if (flags & NDR_IN) {
    8265             :         }
    8266           0 :         if (flags & NDR_OUT) {
    8267           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    8268             :         }
    8269           0 :         return NDR_ERR_SUCCESS;
    8270             : }
    8271             : 
    8272           0 : static enum ndr_err_code ndr_pull_lsa_SetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_SetQuotasForAccount *r)
    8273             : {
    8274           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    8275           0 :         if (flags & NDR_IN) {
    8276             :         }
    8277           0 :         if (flags & NDR_OUT) {
    8278             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    8279             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    8280           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    8281             :         }
    8282           0 :         return NDR_ERR_SUCCESS;
    8283             : }
    8284             : 
    8285           0 : _PUBLIC_ void ndr_print_lsa_SetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetQuotasForAccount *r)
    8286             : {
    8287           0 :         ndr_print_struct(ndr, name, "lsa_SetQuotasForAccount");
    8288           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8289           0 :         ndr->depth++;
    8290           0 :         if (flags & NDR_SET_VALUES) {
    8291           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    8292             :         }
    8293           0 :         if (flags & NDR_IN) {
    8294           0 :                 ndr_print_struct(ndr, "in", "lsa_SetQuotasForAccount");
    8295           0 :                 ndr->depth++;
    8296           0 :                 ndr->depth--;
    8297             :         }
    8298           0 :         if (flags & NDR_OUT) {
    8299           0 :                 ndr_print_struct(ndr, "out", "lsa_SetQuotasForAccount");
    8300           0 :                 ndr->depth++;
    8301           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    8302           0 :                 ndr->depth--;
    8303             :         }
    8304           0 :         ndr->depth--;
    8305             : }
    8306             : 
    8307         132 : static enum ndr_err_code ndr_push_lsa_GetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_GetSystemAccessAccount *r)
    8308             : {
    8309         132 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    8310         132 :         if (flags & NDR_IN) {
    8311          64 :                 if (r->in.handle == NULL) {
    8312           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    8313             :                 }
    8314          64 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    8315             :         }
    8316         132 :         if (flags & NDR_OUT) {
    8317          68 :                 if (r->out.access_mask == NULL) {
    8318           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    8319             :                 }
    8320          68 :                 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr, NDR_SCALARS, *r->out.access_mask));
    8321          68 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    8322             :         }
    8323         132 :         return NDR_ERR_SUCCESS;
    8324             : }
    8325             : 
    8326         126 : static enum ndr_err_code ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_GetSystemAccessAccount *r)
    8327             : {
    8328         126 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    8329         126 :         TALLOC_CTX *_mem_save_access_mask_0 = NULL;
    8330         126 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    8331         126 :         if (flags & NDR_IN) {
    8332          62 :                 NDR_ZERO_STRUCT(r->out);
    8333             : 
    8334          62 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    8335          62 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    8336             :                 }
    8337          62 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8338          62 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    8339          62 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    8340          62 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    8341          62 :                 NDR_PULL_ALLOC(ndr, r->out.access_mask);
    8342          62 :                 NDR_ZERO_STRUCTP(r->out.access_mask);
    8343             :         }
    8344         126 :         if (flags & NDR_OUT) {
    8345             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    8346             :                 if (r->in.handle == NULL) {
    8347             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    8348             :                         NDR_ZERO_STRUCTP(r->in.handle);
    8349             :                 }
    8350             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    8351          64 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    8352           6 :                         NDR_PULL_ALLOC(ndr, r->out.access_mask);
    8353             :                 }
    8354          64 :                 _mem_save_access_mask_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8355          64 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.access_mask, LIBNDR_FLAG_REF_ALLOC);
    8356          64 :                 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr, NDR_SCALARS, r->out.access_mask));
    8357          64 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_access_mask_0, LIBNDR_FLAG_REF_ALLOC);
    8358          64 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    8359             :         }
    8360         126 :         return NDR_ERR_SUCCESS;
    8361             : }
    8362             : 
    8363          12 : _PUBLIC_ void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetSystemAccessAccount *r)
    8364             : {
    8365          12 :         ndr_print_struct(ndr, name, "lsa_GetSystemAccessAccount");
    8366          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8367          12 :         ndr->depth++;
    8368          12 :         if (flags & NDR_SET_VALUES) {
    8369           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    8370             :         }
    8371          12 :         if (flags & NDR_IN) {
    8372           0 :                 ndr_print_struct(ndr, "in", "lsa_GetSystemAccessAccount");
    8373           0 :                 ndr->depth++;
    8374           0 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    8375           0 :                 ndr->depth++;
    8376           0 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    8377           0 :                 ndr->depth--;
    8378           0 :                 ndr->depth--;
    8379             :         }
    8380          12 :         if (flags & NDR_OUT) {
    8381          12 :                 ndr_print_struct(ndr, "out", "lsa_GetSystemAccessAccount");
    8382          12 :                 ndr->depth++;
    8383          12 :                 ndr_print_ptr(ndr, "access_mask", r->out.access_mask);
    8384          12 :                 ndr->depth++;
    8385          12 :                 ndr_print_lsa_AccountAccessMask(ndr, "access_mask", *r->out.access_mask);
    8386          12 :                 ndr->depth--;
    8387          12 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    8388          12 :                 ndr->depth--;
    8389             :         }
    8390          12 :         ndr->depth--;
    8391             : }
    8392             : 
    8393           0 : static enum ndr_err_code ndr_push_lsa_SetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_SetSystemAccessAccount *r)
    8394             : {
    8395           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    8396           0 :         if (flags & NDR_IN) {
    8397           0 :                 if (r->in.handle == NULL) {
    8398           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    8399             :                 }
    8400           0 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    8401           0 :                 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
    8402             :         }
    8403           0 :         if (flags & NDR_OUT) {
    8404           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    8405             :         }
    8406           0 :         return NDR_ERR_SUCCESS;
    8407             : }
    8408             : 
    8409           0 : static enum ndr_err_code ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_SetSystemAccessAccount *r)
    8410             : {
    8411           0 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    8412           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    8413           0 :         if (flags & NDR_IN) {
    8414           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    8415           0 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    8416             :                 }
    8417           0 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8418           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    8419           0 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    8420           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    8421           0 :                 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
    8422             :         }
    8423           0 :         if (flags & NDR_OUT) {
    8424             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    8425             :                 if (r->in.handle == NULL) {
    8426             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    8427             :                         NDR_ZERO_STRUCTP(r->in.handle);
    8428             :                 }
    8429             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    8430           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    8431             :         }
    8432           0 :         return NDR_ERR_SUCCESS;
    8433             : }
    8434             : 
    8435           0 : _PUBLIC_ void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSystemAccessAccount *r)
    8436             : {
    8437           0 :         ndr_print_struct(ndr, name, "lsa_SetSystemAccessAccount");
    8438           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8439           0 :         ndr->depth++;
    8440           0 :         if (flags & NDR_SET_VALUES) {
    8441           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    8442             :         }
    8443           0 :         if (flags & NDR_IN) {
    8444           0 :                 ndr_print_struct(ndr, "in", "lsa_SetSystemAccessAccount");
    8445           0 :                 ndr->depth++;
    8446           0 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
    8447           0 :                 ndr->depth++;
    8448           0 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
    8449           0 :                 ndr->depth--;
    8450           0 :                 ndr_print_lsa_AccountAccessMask(ndr, "access_mask", r->in.access_mask);
    8451           0 :                 ndr->depth--;
    8452             :         }
    8453           0 :         if (flags & NDR_OUT) {
    8454           0 :                 ndr_print_struct(ndr, "out", "lsa_SetSystemAccessAccount");
    8455           0 :                 ndr->depth++;
    8456           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    8457           0 :                 ndr->depth--;
    8458             :         }
    8459           0 :         ndr->depth--;
    8460             : }
    8461             : 
    8462         324 : static enum ndr_err_code ndr_push_lsa_OpenTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomain *r)
    8463             : {
    8464         324 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    8465         324 :         if (flags & NDR_IN) {
    8466         144 :                 if (r->in.handle == NULL) {
    8467           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    8468             :                 }
    8469         144 :                 if (r->in.sid == NULL) {
    8470           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    8471             :                 }
    8472         144 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    8473         144 :                 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
    8474         144 :                 NDR_CHECK(ndr_push_lsa_TrustedAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
    8475             :         }
    8476         324 :         if (flags & NDR_OUT) {
    8477         180 :                 if (r->out.trustdom_handle == NULL) {
    8478           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    8479             :                 }
    8480         180 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
    8481         180 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    8482             :         }
    8483         324 :         return NDR_ERR_SUCCESS;
    8484             : }
    8485             : 
    8486         288 : static enum ndr_err_code ndr_pull_lsa_OpenTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomain *r)
    8487             : {
    8488         288 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
    8489         288 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    8490         288 :         TALLOC_CTX *_mem_save_trustdom_handle_0 = NULL;
    8491         288 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    8492         288 :         if (flags & NDR_IN) {
    8493         144 :                 NDR_ZERO_STRUCT(r->out);
    8494             : 
    8495         144 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    8496         144 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
    8497             :                 }
    8498         144 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8499         144 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
    8500         144 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
    8501         144 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
    8502         144 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    8503         144 :                         NDR_PULL_ALLOC(ndr, r->in.sid);
    8504             :                 }
    8505         144 :                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8506         144 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
    8507         144 :                 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
    8508