LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_samr.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 6925 9551 72.5 %
Date: 2021-09-23 10:06:22 Functions: 375 485 77.3 %

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