LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_netlogon.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 7893 14004 56.4 %
Date: 2021-09-23 10:06:22 Functions: 308 471 65.4 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_netlogon.h"
       5             : 
       6             : #include "librpc/gen_ndr/ndr_misc.h"
       7             : #include "librpc/gen_ndr/ndr_lsa.h"
       8             : #include "librpc/gen_ndr/ndr_samr.h"
       9             : #include "librpc/gen_ndr/ndr_security.h"
      10           0 : static enum ndr_err_code ndr_push_netr_UasInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_UasInfo *r)
      11             : {
      12           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      13           0 :         if (ndr_flags & NDR_SCALARS) {
      14           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
      15           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->account_name));
      16           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priv));
      17           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auth_flags));
      18           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_count));
      19           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_pw_count));
      20           0 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->last_logon));
      21           0 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->last_logoff));
      22           0 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->logoff_time));
      23           0 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->kickoff_time));
      24           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->password_age));
      25           0 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->pw_can_change));
      26           0 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->pw_must_change));
      27           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer));
      28           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
      29           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->script_path));
      30           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
      31           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
      32             :         }
      33           0 :         if (ndr_flags & NDR_BUFFERS) {
      34           0 :                 if (r->account_name) {
      35           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
      36           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      37           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
      38           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, ndr_charset_length(r->account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
      39             :                 }
      40           0 :                 if (r->computer) {
      41           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer, CH_UTF16)));
      42           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      43           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer, CH_UTF16)));
      44           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer, ndr_charset_length(r->computer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
      45             :                 }
      46           0 :                 if (r->domain) {
      47           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
      48           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      49           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
      50           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
      51             :                 }
      52           0 :                 if (r->script_path) {
      53           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->script_path, CH_UTF16)));
      54           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      55           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->script_path, CH_UTF16)));
      56           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->script_path, ndr_charset_length(r->script_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
      57             :                 }
      58             :         }
      59           0 :         return NDR_ERR_SUCCESS;
      60             : }
      61             : 
      62           0 : static enum ndr_err_code ndr_pull_netr_UasInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_UasInfo *r)
      63             : {
      64             :         uint32_t _ptr_account_name;
      65           0 :         uint32_t size_account_name_1 = 0;
      66           0 :         uint32_t length_account_name_1 = 0;
      67           0 :         TALLOC_CTX *_mem_save_account_name_0 = NULL;
      68             :         uint32_t _ptr_computer;
      69           0 :         uint32_t size_computer_1 = 0;
      70           0 :         uint32_t length_computer_1 = 0;
      71           0 :         TALLOC_CTX *_mem_save_computer_0 = NULL;
      72             :         uint32_t _ptr_domain;
      73           0 :         uint32_t size_domain_1 = 0;
      74           0 :         uint32_t length_domain_1 = 0;
      75           0 :         TALLOC_CTX *_mem_save_domain_0 = NULL;
      76             :         uint32_t _ptr_script_path;
      77           0 :         uint32_t size_script_path_1 = 0;
      78           0 :         uint32_t length_script_path_1 = 0;
      79           0 :         TALLOC_CTX *_mem_save_script_path_0 = NULL;
      80           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      81           0 :         if (ndr_flags & NDR_SCALARS) {
      82           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
      83           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
      84           0 :                 if (_ptr_account_name) {
      85           0 :                         NDR_PULL_ALLOC(ndr, r->account_name);
      86             :                 } else {
      87           0 :                         r->account_name = NULL;
      88             :                 }
      89           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priv));
      90           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auth_flags));
      91           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_count));
      92           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bad_pw_count));
      93           0 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->last_logon));
      94           0 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->last_logoff));
      95           0 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->logoff_time));
      96           0 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->kickoff_time));
      97           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->password_age));
      98           0 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->pw_can_change));
      99           0 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->pw_must_change));
     100           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer));
     101           0 :                 if (_ptr_computer) {
     102           0 :                         NDR_PULL_ALLOC(ndr, r->computer);
     103             :                 } else {
     104           0 :                         r->computer = NULL;
     105             :                 }
     106           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
     107           0 :                 if (_ptr_domain) {
     108           0 :                         NDR_PULL_ALLOC(ndr, r->domain);
     109             :                 } else {
     110           0 :                         r->domain = NULL;
     111             :                 }
     112           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_script_path));
     113           0 :                 if (_ptr_script_path) {
     114           0 :                         NDR_PULL_ALLOC(ndr, r->script_path);
     115             :                 } else {
     116           0 :                         r->script_path = NULL;
     117             :                 }
     118           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
     119           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     120             :         }
     121           0 :         if (ndr_flags & NDR_BUFFERS) {
     122           0 :                 if (r->account_name) {
     123           0 :                         _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
     124           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->account_name, 0);
     125           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
     126           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
     127           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->account_name, &size_account_name_1));
     128           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->account_name, &length_account_name_1));
     129           0 :                         if (length_account_name_1 > size_account_name_1) {
     130           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_1, length_account_name_1);
     131             :                         }
     132           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
     133           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
     134           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0);
     135             :                 }
     136           0 :                 if (r->computer) {
     137           0 :                         _mem_save_computer_0 = NDR_PULL_GET_MEM_CTX(ndr);
     138           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->computer, 0);
     139           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->computer));
     140           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->computer));
     141           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer, &size_computer_1));
     142           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer, &length_computer_1));
     143           0 :                         if (length_computer_1 > size_computer_1) {
     144           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_1, length_computer_1);
     145             :                         }
     146           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_1, sizeof(uint16_t)));
     147           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer, length_computer_1, sizeof(uint16_t), CH_UTF16));
     148           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_0, 0);
     149             :                 }
     150           0 :                 if (r->domain) {
     151           0 :                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
     152           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
     153           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
     154           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
     155           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
     156           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
     157           0 :                         if (length_domain_1 > size_domain_1) {
     158           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
     159             :                         }
     160           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
     161           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
     162           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
     163             :                 }
     164           0 :                 if (r->script_path) {
     165           0 :                         _mem_save_script_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
     166           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->script_path, 0);
     167           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->script_path));
     168           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->script_path));
     169           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->script_path, &size_script_path_1));
     170           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->script_path, &length_script_path_1));
     171           0 :                         if (length_script_path_1 > size_script_path_1) {
     172           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_script_path_1, length_script_path_1);
     173             :                         }
     174           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_script_path_1, sizeof(uint16_t)));
     175           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->script_path, length_script_path_1, sizeof(uint16_t), CH_UTF16));
     176           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_script_path_0, 0);
     177             :                 }
     178             :         }
     179           0 :         return NDR_ERR_SUCCESS;
     180             : }
     181             : 
     182           0 : _PUBLIC_ void ndr_print_netr_UasInfo(struct ndr_print *ndr, const char *name, const struct netr_UasInfo *r)
     183             : {
     184           0 :         ndr_print_struct(ndr, name, "netr_UasInfo");
     185           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     186           0 :         ndr->depth++;
     187           0 :         ndr_print_ptr(ndr, "account_name", r->account_name);
     188           0 :         ndr->depth++;
     189           0 :         if (r->account_name) {
     190           0 :                 ndr_print_string(ndr, "account_name", r->account_name);
     191             :         }
     192           0 :         ndr->depth--;
     193           0 :         ndr_print_uint32(ndr, "priv", r->priv);
     194           0 :         ndr_print_uint32(ndr, "auth_flags", r->auth_flags);
     195           0 :         ndr_print_uint32(ndr, "logon_count", r->logon_count);
     196           0 :         ndr_print_uint32(ndr, "bad_pw_count", r->bad_pw_count);
     197           0 :         ndr_print_time_t(ndr, "last_logon", r->last_logon);
     198           0 :         ndr_print_time_t(ndr, "last_logoff", r->last_logoff);
     199           0 :         ndr_print_time_t(ndr, "logoff_time", r->logoff_time);
     200           0 :         ndr_print_time_t(ndr, "kickoff_time", r->kickoff_time);
     201           0 :         ndr_print_uint32(ndr, "password_age", r->password_age);
     202           0 :         ndr_print_time_t(ndr, "pw_can_change", r->pw_can_change);
     203           0 :         ndr_print_time_t(ndr, "pw_must_change", r->pw_must_change);
     204           0 :         ndr_print_ptr(ndr, "computer", r->computer);
     205           0 :         ndr->depth++;
     206           0 :         if (r->computer) {
     207           0 :                 ndr_print_string(ndr, "computer", r->computer);
     208             :         }
     209           0 :         ndr->depth--;
     210           0 :         ndr_print_ptr(ndr, "domain", r->domain);
     211           0 :         ndr->depth++;
     212           0 :         if (r->domain) {
     213           0 :                 ndr_print_string(ndr, "domain", r->domain);
     214             :         }
     215           0 :         ndr->depth--;
     216           0 :         ndr_print_ptr(ndr, "script_path", r->script_path);
     217           0 :         ndr->depth++;
     218           0 :         if (r->script_path) {
     219           0 :                 ndr_print_string(ndr, "script_path", r->script_path);
     220             :         }
     221           0 :         ndr->depth--;
     222           0 :         ndr_print_uint32(ndr, "unknown", r->unknown);
     223           0 :         ndr->depth--;
     224             : }
     225             : 
     226           0 : static enum ndr_err_code ndr_push_netr_UasLogoffInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_UasLogoffInfo *r)
     227             : {
     228           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     229           0 :         if (ndr_flags & NDR_SCALARS) {
     230           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     231           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->duration));
     232           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
     233           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     234             :         }
     235           0 :         if (ndr_flags & NDR_BUFFERS) {
     236             :         }
     237           0 :         return NDR_ERR_SUCCESS;
     238             : }
     239             : 
     240           0 : static enum ndr_err_code ndr_pull_netr_UasLogoffInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_UasLogoffInfo *r)
     241             : {
     242           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     243           0 :         if (ndr_flags & NDR_SCALARS) {
     244           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     245           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->duration));
     246           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
     247           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     248             :         }
     249           0 :         if (ndr_flags & NDR_BUFFERS) {
     250             :         }
     251           0 :         return NDR_ERR_SUCCESS;
     252             : }
     253             : 
     254           0 : _PUBLIC_ void ndr_print_netr_UasLogoffInfo(struct ndr_print *ndr, const char *name, const struct netr_UasLogoffInfo *r)
     255             : {
     256           0 :         ndr_print_struct(ndr, name, "netr_UasLogoffInfo");
     257           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     258           0 :         ndr->depth++;
     259           0 :         ndr_print_uint32(ndr, "duration", r->duration);
     260           0 :         ndr_print_uint16(ndr, "logon_count", r->logon_count);
     261           0 :         ndr->depth--;
     262             : }
     263             : 
     264           0 : _PUBLIC_ enum ndr_err_code ndr_push_netr_AcctLockStr(struct ndr_push *ndr, int ndr_flags, const struct netr_AcctLockStr *r)
     265             : {
     266           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     267           0 :         if (ndr_flags & NDR_SCALARS) {
     268           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     269           0 :                 NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->lockout_duration));
     270           0 :                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->reset_count));
     271           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_attempt_lockout));
     272           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy));
     273           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     274             :         }
     275           0 :         if (ndr_flags & NDR_BUFFERS) {
     276             :         }
     277           0 :         return NDR_ERR_SUCCESS;
     278             : }
     279             : 
     280           0 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_AcctLockStr(struct ndr_pull *ndr, int ndr_flags, struct netr_AcctLockStr *r)
     281             : {
     282           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     283           0 :         if (ndr_flags & NDR_SCALARS) {
     284           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     285           0 :                 NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->lockout_duration));
     286           0 :                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->reset_count));
     287           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bad_attempt_lockout));
     288           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy));
     289           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     290             :         }
     291           0 :         if (ndr_flags & NDR_BUFFERS) {
     292             :         }
     293           0 :         return NDR_ERR_SUCCESS;
     294             : }
     295             : 
     296           0 : static void ndr_print_flags_netr_AcctLockStr(struct ndr_print *ndr, const char *name, int unused, const struct netr_AcctLockStr *r)
     297             : {
     298           0 :         ndr_print_netr_AcctLockStr(ndr, name, r);
     299           0 : }
     300             : 
     301           0 : _PUBLIC_ void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name, const struct netr_AcctLockStr *r)
     302             : {
     303           0 :         ndr_print_struct(ndr, name, "netr_AcctLockStr");
     304           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     305           0 :         ndr->depth++;
     306           0 :         ndr_print_dlong(ndr, "lockout_duration", r->lockout_duration);
     307           0 :         ndr_print_udlong(ndr, "reset_count", r->reset_count);
     308           0 :         ndr_print_uint32(ndr, "bad_attempt_lockout", r->bad_attempt_lockout);
     309           0 :         ndr_print_uint32(ndr, "dummy", r->dummy);
     310           0 :         ndr->depth--;
     311             : }
     312             : 
     313       19350 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonParameterControl(struct ndr_push *ndr, int ndr_flags, uint32_t r)
     314             : {
     315       19350 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
     316       19350 :         return NDR_ERR_SUCCESS;
     317             : }
     318             : 
     319       19385 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonParameterControl(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
     320             : {
     321             :         uint32_t v;
     322       19385 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     323       19385 :         *r = v;
     324       19385 :         return NDR_ERR_SUCCESS;
     325             : }
     326             : 
     327           2 : _PUBLIC_ void ndr_print_netr_LogonParameterControl(struct ndr_print *ndr, const char *name, uint32_t r)
     328             : {
     329           2 :         ndr_print_uint32(ndr, name, r);
     330           2 :         ndr->depth++;
     331           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_CLEARTEXT_PASSWORD_ALLOWED", MSV1_0_CLEARTEXT_PASSWORD_ALLOWED, r);
     332           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_UPDATE_LOGON_STATISTICS", MSV1_0_UPDATE_LOGON_STATISTICS, r);
     333           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_RETURN_USER_PARAMETERS", MSV1_0_RETURN_USER_PARAMETERS, r);
     334           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_DONT_TRY_GUEST_ACCOUNT", MSV1_0_DONT_TRY_GUEST_ACCOUNT, r);
     335           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT", MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT, r);
     336           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_RETURN_PASSWORD_EXPIRY", MSV1_0_RETURN_PASSWORD_EXPIRY, r);
     337           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_USE_CLIENT_CHALLENGE", MSV1_0_USE_CLIENT_CHALLENGE, r);
     338           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_TRY_GUEST_ACCOUNT_ONLY", MSV1_0_TRY_GUEST_ACCOUNT_ONLY, r);
     339           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_RETURN_PROFILE_PATH", MSV1_0_RETURN_PROFILE_PATH, r);
     340           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY", MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY, r);
     341           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT", MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT, r);
     342           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_DISABLE_PERSONAL_FALLBACK", MSV1_0_DISABLE_PERSONAL_FALLBACK, r);
     343           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_FORCE_GUEST", MSV1_0_ALLOW_FORCE_GUEST, r);
     344           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED", MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED, r);
     345           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY", MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY, r);
     346           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_MSVCHAPV2", MSV1_0_ALLOW_MSVCHAPV2, r);
     347           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_S4U2SELF", MSV1_0_S4U2SELF, r);
     348           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_CHECK_LOGONHOURS_FOR_S4U", MSV1_0_CHECK_LOGONHOURS_FOR_S4U, r);
     349           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_SUBAUTHENTICATION_DLL_EX", MSV1_0_SUBAUTHENTICATION_DLL_EX, r);
     350           2 :         ndr->depth--;
     351           2 : }
     352             : 
     353       38700 : static enum ndr_err_code ndr_push_netr_IdentityInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_IdentityInfo *r)
     354             : {
     355       38700 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     356       38700 :         if (ndr_flags & NDR_SCALARS) {
     357       19350 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     358       19350 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
     359       19350 :                 NDR_CHECK(ndr_push_netr_LogonParameterControl(ndr, NDR_SCALARS, r->parameter_control));
     360       19350 :                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->logon_id));
     361       19350 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
     362       19350 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstation));
     363       19350 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     364             :         }
     365       38700 :         if (ndr_flags & NDR_BUFFERS) {
     366       19350 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
     367       19350 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
     368       19350 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstation));
     369             :         }
     370       35324 :         return NDR_ERR_SUCCESS;
     371             : }
     372             : 
     373       38770 : static enum ndr_err_code ndr_pull_netr_IdentityInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_IdentityInfo *r)
     374             : {
     375       38770 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     376       38770 :         if (ndr_flags & NDR_SCALARS) {
     377       19385 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     378       19385 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
     379       19385 :                 NDR_CHECK(ndr_pull_netr_LogonParameterControl(ndr, NDR_SCALARS, &r->parameter_control));
     380       19385 :                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->logon_id));
     381       19385 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
     382       19385 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstation));
     383       19385 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     384             :         }
     385       38770 :         if (ndr_flags & NDR_BUFFERS) {
     386       19385 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
     387       19385 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
     388       19385 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstation));
     389             :         }
     390       35390 :         return NDR_ERR_SUCCESS;
     391             : }
     392             : 
     393           2 : _PUBLIC_ void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *name, const struct netr_IdentityInfo *r)
     394             : {
     395           2 :         ndr_print_struct(ndr, name, "netr_IdentityInfo");
     396           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
     397           2 :         ndr->depth++;
     398           2 :         ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
     399           2 :         ndr_print_netr_LogonParameterControl(ndr, "parameter_control", r->parameter_control);
     400           2 :         ndr_print_udlong(ndr, "logon_id", r->logon_id);
     401           2 :         ndr_print_lsa_String(ndr, "account_name", &r->account_name);
     402           2 :         ndr_print_lsa_String(ndr, "workstation", &r->workstation);
     403           2 :         ndr->depth--;
     404             : }
     405             : 
     406         567 : static enum ndr_err_code ndr_push_netr_PasswordInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_PasswordInfo *r)
     407             : {
     408         567 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     409         567 :         if (ndr_flags & NDR_SCALARS) {
     410         567 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     411         567 :                 NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
     412         567 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
     413         567 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
     414         567 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     415             :         }
     416         567 :         if (ndr_flags & NDR_BUFFERS) {
     417         567 :                 NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
     418             :         }
     419         567 :         return NDR_ERR_SUCCESS;
     420             : }
     421             : 
     422         811 : static enum ndr_err_code ndr_pull_netr_PasswordInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_PasswordInfo *r)
     423             : {
     424         811 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     425         811 :         if (ndr_flags & NDR_SCALARS) {
     426         811 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     427         811 :                 NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
     428         811 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
     429         811 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
     430         811 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     431             :         }
     432         811 :         if (ndr_flags & NDR_BUFFERS) {
     433         811 :                 NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
     434             :         }
     435         809 :         return NDR_ERR_SUCCESS;
     436             : }
     437             : 
     438           2 : _PUBLIC_ void ndr_print_netr_PasswordInfo(struct ndr_print *ndr, const char *name, const struct netr_PasswordInfo *r)
     439             : {
     440           2 :         ndr_print_struct(ndr, name, "netr_PasswordInfo");
     441           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
     442           2 :         ndr->depth++;
     443           2 :         ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info);
     444           2 :         ndr_print_samr_Password(ndr, "lmpassword", &r->lmpassword);
     445           2 :         ndr_print_samr_Password(ndr, "ntpassword", &r->ntpassword);
     446           2 :         ndr->depth--;
     447             : }
     448             : 
     449       74092 : static enum ndr_err_code ndr_push_netr_ChallengeResponse(struct ndr_push *ndr, int ndr_flags, const struct netr_ChallengeResponse *r)
     450             : {
     451             :         {
     452       74092 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     453       74092 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     454       74092 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     455       74092 :                 if (ndr_flags & NDR_SCALARS) {
     456       37046 :                         NDR_CHECK(ndr_push_align(ndr, 5));
     457       37046 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
     458       37046 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
     459       37046 :                         NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
     460       37046 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     461             :                 }
     462       74092 :                 if (ndr_flags & NDR_BUFFERS) {
     463       37046 :                         if (r->data) {
     464       34879 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
     465       34879 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     466       34879 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
     467       34879 :                                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
     468             :                         }
     469             :                 }
     470       74092 :                 ndr->flags = _flags_save_STRUCT;
     471             :         }
     472       74092 :         return NDR_ERR_SUCCESS;
     473             : }
     474             : 
     475       73256 : static enum ndr_err_code ndr_pull_netr_ChallengeResponse(struct ndr_pull *ndr, int ndr_flags, struct netr_ChallengeResponse *r)
     476             : {
     477             :         uint32_t _ptr_data;
     478       73256 :         uint32_t size_data_1 = 0;
     479       73256 :         uint32_t length_data_1 = 0;
     480       73256 :         TALLOC_CTX *_mem_save_data_0 = NULL;
     481             :         {
     482       73256 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     483       73256 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     484       73256 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     485       73256 :                 if (ndr_flags & NDR_SCALARS) {
     486       36628 :                         NDR_CHECK(ndr_pull_align(ndr, 5));
     487       36628 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
     488       36628 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
     489       36628 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
     490       36628 :                         if (_ptr_data) {
     491       34461 :                                 NDR_PULL_ALLOC(ndr, r->data);
     492             :                         } else {
     493        2167 :                                 r->data = NULL;
     494             :                         }
     495       36628 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     496             :                 }
     497       73256 :                 if (ndr_flags & NDR_BUFFERS) {
     498       36628 :                         if (r->data) {
     499       34461 :                                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
     500       34461 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
     501       34461 :                                 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
     502       34461 :                                 NDR_CHECK(ndr_pull_array_length(ndr, &r->data));
     503       34461 :                                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
     504       34461 :                                 NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->data, &length_data_1));
     505       34461 :                                 if (length_data_1 > size_data_1) {
     506           0 :                                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_data_1, length_data_1);
     507             :                                 }
     508       34461 :                                 NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
     509       34461 :                                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, length_data_1));
     510       34461 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
     511             :                         }
     512       36628 :                         if (r->data) {
     513       34461 :                                 NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
     514             :                         }
     515       36628 :                         if (r->data) {
     516       34461 :                                 NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->data, r->length));
     517             :                         }
     518             :                 }
     519       73256 :                 ndr->flags = _flags_save_STRUCT;
     520             :         }
     521       73256 :         return NDR_ERR_SUCCESS;
     522             : }
     523             : 
     524           0 : _PUBLIC_ void ndr_print_netr_ChallengeResponse(struct ndr_print *ndr, const char *name, const struct netr_ChallengeResponse *r)
     525             : {
     526           0 :         ndr_print_struct(ndr, name, "netr_ChallengeResponse");
     527           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     528             :         {
     529           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     530           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     531           0 :                 ndr->depth++;
     532           0 :                 ndr_print_uint16(ndr, "length", r->length);
     533           0 :                 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->length:r->size);
     534           0 :                 ndr_print_ptr(ndr, "data", r->data);
     535           0 :                 ndr->depth++;
     536           0 :                 if (r->data) {
     537           0 :                         ndr_print_array_uint8(ndr, "data", r->data, r->length);
     538             :                 }
     539           0 :                 ndr->depth--;
     540           0 :                 ndr->depth--;
     541           0 :                 ndr->flags = _flags_save_STRUCT;
     542             :         }
     543             : }
     544             : 
     545       18523 : static enum ndr_err_code ndr_push_netr_NetworkInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_NetworkInfo *r)
     546             : {
     547             :         {
     548       18523 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     549       18523 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     550       18523 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     551       18523 :                 if (ndr_flags & NDR_SCALARS) {
     552       18523 :                         NDR_CHECK(ndr_push_align(ndr, 5));
     553       18523 :                         NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
     554       18523 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->challenge, 8));
     555       18523 :                         NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->nt));
     556       18523 :                         NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->lm));
     557       18523 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     558             :                 }
     559       18523 :                 if (ndr_flags & NDR_BUFFERS) {
     560       18523 :                         NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
     561       18523 :                         NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->nt));
     562       18523 :                         NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->lm));
     563             :                 }
     564       18523 :                 ndr->flags = _flags_save_STRUCT;
     565             :         }
     566       18523 :         return NDR_ERR_SUCCESS;
     567             : }
     568             : 
     569       18314 : static enum ndr_err_code ndr_pull_netr_NetworkInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_NetworkInfo *r)
     570             : {
     571       18314 :         uint32_t size_challenge_0 = 0;
     572             :         {
     573       18314 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     574       18314 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     575       18314 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     576       18314 :                 if (ndr_flags & NDR_SCALARS) {
     577       18314 :                         NDR_CHECK(ndr_pull_align(ndr, 5));
     578       18314 :                         NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
     579       18314 :                         size_challenge_0 = 8;
     580       18314 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->challenge, size_challenge_0));
     581       18314 :                         NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->nt));
     582       18314 :                         NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->lm));
     583       18314 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     584             :                 }
     585       18314 :                 if (ndr_flags & NDR_BUFFERS) {
     586       18314 :                         NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
     587       18314 :                         NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->nt));
     588       18314 :                         NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->lm));
     589             :                 }
     590       18314 :                 ndr->flags = _flags_save_STRUCT;
     591             :         }
     592       18314 :         return NDR_ERR_SUCCESS;
     593             : }
     594             : 
     595           0 : _PUBLIC_ void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name, const struct netr_NetworkInfo *r)
     596             : {
     597           0 :         ndr_print_struct(ndr, name, "netr_NetworkInfo");
     598           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     599             :         {
     600           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     601           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     602           0 :                 ndr->depth++;
     603           0 :                 ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info);
     604           0 :                 ndr_print_array_uint8(ndr, "challenge", r->challenge, 8);
     605           0 :                 ndr_print_netr_ChallengeResponse(ndr, "nt", &r->nt);
     606           0 :                 ndr_print_netr_ChallengeResponse(ndr, "lm", &r->lm);
     607           0 :                 ndr->depth--;
     608           0 :                 ndr->flags = _flags_save_STRUCT;
     609             :         }
     610             : }
     611             : 
     612         260 : static enum ndr_err_code ndr_push_netr_GenericInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_GenericInfo *r)
     613             : {
     614             :         {
     615         260 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     616         260 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     617         260 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     618         260 :                 if (ndr_flags & NDR_SCALARS) {
     619         260 :                         NDR_CHECK(ndr_push_align(ndr, 5));
     620         260 :                         NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
     621         260 :                         NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->package_name));
     622         260 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
     623         260 :                         NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
     624         260 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     625             :                 }
     626         260 :                 if (ndr_flags & NDR_BUFFERS) {
     627         260 :                         NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
     628         260 :                         NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->package_name));
     629         260 :                         if (r->data) {
     630         260 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
     631         260 :                                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
     632             :                         }
     633             :                 }
     634         260 :                 ndr->flags = _flags_save_STRUCT;
     635             :         }
     636         260 :         return NDR_ERR_SUCCESS;
     637             : }
     638             : 
     639         260 : static enum ndr_err_code ndr_pull_netr_GenericInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_GenericInfo *r)
     640             : {
     641             :         uint32_t _ptr_data;
     642         260 :         uint32_t size_data_1 = 0;
     643         260 :         TALLOC_CTX *_mem_save_data_0 = NULL;
     644             :         {
     645         260 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     646         260 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     647         260 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     648         260 :                 if (ndr_flags & NDR_SCALARS) {
     649         260 :                         NDR_CHECK(ndr_pull_align(ndr, 5));
     650         260 :                         NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
     651         260 :                         NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->package_name));
     652         260 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
     653         260 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
     654         260 :                         if (_ptr_data) {
     655         260 :                                 NDR_PULL_ALLOC(ndr, r->data);
     656             :                         } else {
     657           0 :                                 r->data = NULL;
     658             :                         }
     659         260 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     660             :                 }
     661         260 :                 if (ndr_flags & NDR_BUFFERS) {
     662         260 :                         NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
     663         260 :                         NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->package_name));
     664         260 :                         if (r->data) {
     665         260 :                                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
     666         260 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
     667         260 :                                 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
     668         260 :                                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
     669         260 :                                 NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
     670         260 :                                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
     671         260 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
     672             :                         }
     673         260 :                         if (r->data) {
     674         260 :                                 NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
     675             :                         }
     676             :                 }
     677         260 :                 ndr->flags = _flags_save_STRUCT;
     678             :         }
     679         260 :         return NDR_ERR_SUCCESS;
     680             : }
     681             : 
     682           0 : _PUBLIC_ void ndr_print_netr_GenericInfo(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo *r)
     683             : {
     684           0 :         ndr_print_struct(ndr, name, "netr_GenericInfo");
     685           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     686             :         {
     687           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     688           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     689           0 :                 ndr->depth++;
     690           0 :                 ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info);
     691           0 :                 ndr_print_lsa_String(ndr, "package_name", &r->package_name);
     692           0 :                 ndr_print_uint32(ndr, "length", r->length);
     693           0 :                 ndr_print_ptr(ndr, "data", r->data);
     694           0 :                 ndr->depth++;
     695           0 :                 if (r->data) {
     696           0 :                         ndr_print_array_uint8(ndr, "data", r->data, r->length);
     697             :                 }
     698           0 :                 ndr->depth--;
     699           0 :                 ndr->depth--;
     700           0 :                 ndr->flags = _flags_save_STRUCT;
     701             :         }
     702             : }
     703             : 
     704       45822 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfoClass(struct ndr_push *ndr, int ndr_flags, enum netr_LogonInfoClass r)
     705             : {
     706       45822 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
     707       45822 :         return NDR_ERR_SUCCESS;
     708             : }
     709             : 
     710       22552 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfoClass(struct ndr_pull *ndr, int ndr_flags, enum netr_LogonInfoClass *r)
     711             : {
     712             :         uint16_t v;
     713       22552 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
     714       22552 :         *r = v;
     715       22552 :         return NDR_ERR_SUCCESS;
     716             : }
     717             : 
     718           2 : _PUBLIC_ void ndr_print_netr_LogonInfoClass(struct ndr_print *ndr, const char *name, enum netr_LogonInfoClass r)
     719             : {
     720           2 :         const char *val = NULL;
     721             : 
     722           2 :         switch (r) {
     723           2 :                 case NetlogonInteractiveInformation: val = "NetlogonInteractiveInformation"; break;
     724           0 :                 case NetlogonNetworkInformation: val = "NetlogonNetworkInformation"; break;
     725           0 :                 case NetlogonServiceInformation: val = "NetlogonServiceInformation"; break;
     726           0 :                 case NetlogonGenericInformation: val = "NetlogonGenericInformation"; break;
     727           0 :                 case NetlogonInteractiveTransitiveInformation: val = "NetlogonInteractiveTransitiveInformation"; break;
     728           0 :                 case NetlogonNetworkTransitiveInformation: val = "NetlogonNetworkTransitiveInformation"; break;
     729           0 :                 case NetlogonServiceTransitiveInformation: val = "NetlogonServiceTransitiveInformation"; break;
     730             :         }
     731           2 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     732           2 : }
     733             : 
     734       23654 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int ndr_flags, const union netr_LogonLevel *r)
     735             : {
     736             :         uint32_t level;
     737       23654 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     738       23654 :         if (ndr_flags & NDR_SCALARS) {
     739             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     740       23654 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     741       23654 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
     742       23654 :                 NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, level));
     743             :                 /* ms_union is always aligned to the largest union arm*/
     744       23654 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     745       23654 :                 switch (level) {
     746         548 :                         case NetlogonInteractiveInformation: {
     747         548 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
     748         548 :                         break; }
     749             : 
     750       15444 :                         case NetlogonNetworkInformation: {
     751       15444 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->network));
     752       13756 :                         break; }
     753             : 
     754           0 :                         case NetlogonServiceInformation: {
     755           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
     756           0 :                         break; }
     757             : 
     758         260 :                         case NetlogonGenericInformation: {
     759         260 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->generic));
     760         260 :                         break; }
     761             : 
     762          19 :                         case NetlogonInteractiveTransitiveInformation: {
     763          19 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
     764          19 :                         break; }
     765             : 
     766        3079 :                         case NetlogonNetworkTransitiveInformation: {
     767        3079 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->network));
     768        3079 :                         break; }
     769             : 
     770           0 :                         case NetlogonServiceTransitiveInformation: {
     771           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
     772           0 :                         break; }
     773             : 
     774        3568 :                         default: {
     775        3568 :                         break; }
     776             : 
     777             :                 }
     778           0 :         }
     779       23654 :         if (ndr_flags & NDR_BUFFERS) {
     780       23654 :                 if (!(ndr_flags & NDR_SCALARS)) {
     781             :                         /* We didn't get it above, and the token is not needed after this. */
     782           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     783             :                 }
     784       23654 :                 switch (level) {
     785         548 :                         case NetlogonInteractiveInformation:
     786         548 :                                 if (r->password) {
     787         548 :                                         NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     788             :                                 }
     789         548 :                         break;
     790             : 
     791       15444 :                         case NetlogonNetworkInformation:
     792       15444 :                                 if (r->network) {
     793       15444 :                                         NDR_CHECK(ndr_push_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
     794             :                                 }
     795       13756 :                         break;
     796             : 
     797           0 :                         case NetlogonServiceInformation:
     798           0 :                                 if (r->password) {
     799           0 :                                         NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     800             :                                 }
     801           0 :                         break;
     802             : 
     803         260 :                         case NetlogonGenericInformation:
     804         260 :                                 if (r->generic) {
     805         260 :                                         NDR_CHECK(ndr_push_netr_GenericInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
     806             :                                 }
     807         260 :                         break;
     808             : 
     809          19 :                         case NetlogonInteractiveTransitiveInformation:
     810          19 :                                 if (r->password) {
     811          19 :                                         NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     812             :                                 }
     813          19 :                         break;
     814             : 
     815        3079 :                         case NetlogonNetworkTransitiveInformation:
     816        3079 :                                 if (r->network) {
     817        3079 :                                         NDR_CHECK(ndr_push_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
     818             :                                 }
     819        3079 :                         break;
     820             : 
     821           0 :                         case NetlogonServiceTransitiveInformation:
     822           0 :                                 if (r->password) {
     823           0 :                                         NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     824             :                                 }
     825           0 :                         break;
     826             : 
     827        3568 :                         default:
     828        3568 :                         break;
     829             : 
     830             :                 }
     831           0 :         }
     832       21230 :         return NDR_ERR_SUCCESS;
     833             : }
     834             : 
     835       23529 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, int ndr_flags, union netr_LogonLevel *r)
     836             : {
     837             :         uint32_t level;
     838             :         uint16_t _level;
     839       23529 :         TALLOC_CTX *_mem_save_password_0 = NULL;
     840             :         uint32_t _ptr_password;
     841       23529 :         TALLOC_CTX *_mem_save_network_0 = NULL;
     842             :         uint32_t _ptr_network;
     843       23529 :         TALLOC_CTX *_mem_save_generic_0 = NULL;
     844             :         uint32_t _ptr_generic;
     845       23529 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     846       23529 :         if (ndr_flags & NDR_SCALARS) {
     847             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     848       23529 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     849       23529 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
     850       23529 :                 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
     851       23529 :                 if (_level != level) {
     852           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
     853             :                 }
     854             :                 /* ms_union is always aligned to the largest union arm*/
     855       23529 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     856       23529 :                 switch (level) {
     857         726 :                         case NetlogonInteractiveInformation: {
     858         726 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
     859         726 :                                 if (_ptr_password) {
     860         726 :                                         NDR_PULL_ALLOC(ndr, r->password);
     861             :                                 } else {
     862           0 :                                         r->password = NULL;
     863             :                                 }
     864         724 :                         break; }
     865             : 
     866       15010 :                         case NetlogonNetworkInformation: {
     867       15010 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_network));
     868       15010 :                                 if (_ptr_network) {
     869       15010 :                                         NDR_PULL_ALLOC(ndr, r->network);
     870             :                                 } else {
     871           0 :                                         r->network = NULL;
     872             :                                 }
     873       13322 :                         break; }
     874             : 
     875           0 :                         case NetlogonServiceInformation: {
     876           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
     877           0 :                                 if (_ptr_password) {
     878           0 :                                         NDR_PULL_ALLOC(ndr, r->password);
     879             :                                 } else {
     880           0 :                                         r->password = NULL;
     881             :                                 }
     882           0 :                         break; }
     883             : 
     884         260 :                         case NetlogonGenericInformation: {
     885         260 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_generic));
     886         260 :                                 if (_ptr_generic) {
     887         260 :                                         NDR_PULL_ALLOC(ndr, r->generic);
     888             :                                 } else {
     889           0 :                                         r->generic = NULL;
     890             :                                 }
     891         260 :                         break; }
     892             : 
     893          85 :                         case NetlogonInteractiveTransitiveInformation: {
     894          85 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
     895          85 :                                 if (_ptr_password) {
     896          85 :                                         NDR_PULL_ALLOC(ndr, r->password);
     897             :                                 } else {
     898           0 :                                         r->password = NULL;
     899             :                                 }
     900          85 :                         break; }
     901             : 
     902        3304 :                         case NetlogonNetworkTransitiveInformation: {
     903        3304 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_network));
     904        3304 :                                 if (_ptr_network) {
     905        3304 :                                         NDR_PULL_ALLOC(ndr, r->network);
     906             :                                 } else {
     907           0 :                                         r->network = NULL;
     908             :                                 }
     909        3304 :                         break; }
     910             : 
     911           0 :                         case NetlogonServiceTransitiveInformation: {
     912           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
     913           0 :                                 if (_ptr_password) {
     914           0 :                                         NDR_PULL_ALLOC(ndr, r->password);
     915             :                                 } else {
     916           0 :                                         r->password = NULL;
     917             :                                 }
     918           0 :                         break; }
     919             : 
     920        3408 :                         default: {
     921        3408 :                         break; }
     922             : 
     923             :                 }
     924           0 :         }
     925       23529 :         if (ndr_flags & NDR_BUFFERS) {
     926       23529 :                 if (!(ndr_flags & NDR_SCALARS)) {
     927             :                         /* We didn't get it above, and the token is not needed after this. */
     928           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     929             :                 }
     930       23529 :                 switch (level) {
     931         726 :                         case NetlogonInteractiveInformation:
     932         726 :                                 if (r->password) {
     933         726 :                                         _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
     934         726 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
     935         726 :                                         NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     936         726 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
     937             :                                 }
     938         724 :                         break;
     939             : 
     940       15010 :                         case NetlogonNetworkInformation:
     941       15010 :                                 if (r->network) {
     942       15010 :                                         _mem_save_network_0 = NDR_PULL_GET_MEM_CTX(ndr);
     943       15010 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->network, 0);
     944       15010 :                                         NDR_CHECK(ndr_pull_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
     945       15010 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_network_0, 0);
     946             :                                 }
     947       13322 :                         break;
     948             : 
     949           0 :                         case NetlogonServiceInformation:
     950           0 :                                 if (r->password) {
     951           0 :                                         _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
     952           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
     953           0 :                                         NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     954           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
     955             :                                 }
     956           0 :                         break;
     957             : 
     958         260 :                         case NetlogonGenericInformation:
     959         260 :                                 if (r->generic) {
     960         260 :                                         _mem_save_generic_0 = NDR_PULL_GET_MEM_CTX(ndr);
     961         260 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->generic, 0);
     962         260 :                                         NDR_CHECK(ndr_pull_netr_GenericInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
     963         260 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_generic_0, 0);
     964             :                                 }
     965         260 :                         break;
     966             : 
     967          85 :                         case NetlogonInteractiveTransitiveInformation:
     968          85 :                                 if (r->password) {
     969          85 :                                         _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
     970          85 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
     971          85 :                                         NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     972          85 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
     973             :                                 }
     974          85 :                         break;
     975             : 
     976        3304 :                         case NetlogonNetworkTransitiveInformation:
     977        3304 :                                 if (r->network) {
     978        3304 :                                         _mem_save_network_0 = NDR_PULL_GET_MEM_CTX(ndr);
     979        3304 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->network, 0);
     980        3304 :                                         NDR_CHECK(ndr_pull_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
     981        3304 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_network_0, 0);
     982             :                                 }
     983        3304 :                         break;
     984             : 
     985           0 :                         case NetlogonServiceTransitiveInformation:
     986           0 :                                 if (r->password) {
     987           0 :                                         _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
     988           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
     989           0 :                                         NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     990           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
     991             :                                 }
     992           0 :                         break;
     993             : 
     994        3408 :                         default:
     995        3408 :                         break;
     996             : 
     997             :                 }
     998           0 :         }
     999       21103 :         return NDR_ERR_SUCCESS;
    1000             : }
    1001             : 
    1002           2 : _PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, const union netr_LogonLevel *r)
    1003             : {
    1004             :         uint32_t level;
    1005           2 :         level = ndr_print_steal_switch_value(ndr, r);
    1006           2 :         ndr_print_union(ndr, name, level, "netr_LogonLevel");
    1007           2 :         switch (level) {
    1008           2 :                 case NetlogonInteractiveInformation:
    1009           2 :                         ndr_print_ptr(ndr, "password", r->password);
    1010           2 :                         ndr->depth++;
    1011           2 :                         if (r->password) {
    1012           2 :                                 ndr_print_netr_PasswordInfo(ndr, "password", r->password);
    1013             :                         }
    1014           2 :                         ndr->depth--;
    1015           2 :                 break;
    1016             : 
    1017           0 :                 case NetlogonNetworkInformation:
    1018           0 :                         ndr_print_ptr(ndr, "network", r->network);
    1019           0 :                         ndr->depth++;
    1020           0 :                         if (r->network) {
    1021           0 :                                 ndr_print_netr_NetworkInfo(ndr, "network", r->network);
    1022             :                         }
    1023           0 :                         ndr->depth--;
    1024           0 :                 break;
    1025             : 
    1026           0 :                 case NetlogonServiceInformation:
    1027           0 :                         ndr_print_ptr(ndr, "password", r->password);
    1028           0 :                         ndr->depth++;
    1029           0 :                         if (r->password) {
    1030           0 :                                 ndr_print_netr_PasswordInfo(ndr, "password", r->password);
    1031             :                         }
    1032           0 :                         ndr->depth--;
    1033           0 :                 break;
    1034             : 
    1035           0 :                 case NetlogonGenericInformation:
    1036           0 :                         ndr_print_ptr(ndr, "generic", r->generic);
    1037           0 :                         ndr->depth++;
    1038           0 :                         if (r->generic) {
    1039           0 :                                 ndr_print_netr_GenericInfo(ndr, "generic", r->generic);
    1040             :                         }
    1041           0 :                         ndr->depth--;
    1042           0 :                 break;
    1043             : 
    1044           0 :                 case NetlogonInteractiveTransitiveInformation:
    1045           0 :                         ndr_print_ptr(ndr, "password", r->password);
    1046           0 :                         ndr->depth++;
    1047           0 :                         if (r->password) {
    1048           0 :                                 ndr_print_netr_PasswordInfo(ndr, "password", r->password);
    1049             :                         }
    1050           0 :                         ndr->depth--;
    1051           0 :                 break;
    1052             : 
    1053           0 :                 case NetlogonNetworkTransitiveInformation:
    1054           0 :                         ndr_print_ptr(ndr, "network", r->network);
    1055           0 :                         ndr->depth++;
    1056           0 :                         if (r->network) {
    1057           0 :                                 ndr_print_netr_NetworkInfo(ndr, "network", r->network);
    1058             :                         }
    1059           0 :                         ndr->depth--;
    1060           0 :                 break;
    1061             : 
    1062           0 :                 case NetlogonServiceTransitiveInformation:
    1063           0 :                         ndr_print_ptr(ndr, "password", r->password);
    1064           0 :                         ndr->depth++;
    1065           0 :                         if (r->password) {
    1066           0 :                                 ndr_print_netr_PasswordInfo(ndr, "password", r->password);
    1067             :                         }
    1068           0 :                         ndr->depth--;
    1069           0 :                 break;
    1070             : 
    1071           0 :                 default:
    1072           0 :                 break;
    1073             : 
    1074             :         }
    1075           2 : }
    1076             : 
    1077       82034 : _PUBLIC_ enum ndr_err_code ndr_push_netr_UserSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_UserSessionKey *r)
    1078             : {
    1079             :         {
    1080       82034 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1081       82034 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1082       82034 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1083       82034 :                 if (ndr_flags & NDR_SCALARS) {
    1084       82034 :                         NDR_CHECK(ndr_push_align(ndr, 1));
    1085       82034 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->key, 16));
    1086       82034 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    1087             :                 }
    1088       78585 :                 if (ndr_flags & NDR_BUFFERS) {
    1089             :                 }
    1090       82034 :                 ndr->flags = _flags_save_STRUCT;
    1091             :         }
    1092       82034 :         return NDR_ERR_SUCCESS;
    1093             : }
    1094             : 
    1095      118530 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_UserSessionKey *r)
    1096             : {
    1097      118530 :         uint32_t size_key_0 = 0;
    1098             :         {
    1099      118530 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1100      118530 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1101      118530 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1102      118530 :                 if (ndr_flags & NDR_SCALARS) {
    1103      118530 :                         NDR_CHECK(ndr_pull_align(ndr, 1));
    1104      118530 :                         size_key_0 = 16;
    1105      118530 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->key, size_key_0));
    1106      118530 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    1107             :                 }
    1108      115239 :                 if (ndr_flags & NDR_BUFFERS) {
    1109             :                 }
    1110      118530 :                 ndr->flags = _flags_save_STRUCT;
    1111             :         }
    1112      118530 :         return NDR_ERR_SUCCESS;
    1113             : }
    1114             : 
    1115           0 : static void ndr_print_flags_netr_UserSessionKey(struct ndr_print *ndr, const char *name, int unused, const struct netr_UserSessionKey *r)
    1116             : {
    1117           0 :         ndr_print_netr_UserSessionKey(ndr, name, r);
    1118           0 : }
    1119             : 
    1120        3519 : _PUBLIC_ void ndr_print_netr_UserSessionKey(struct ndr_print *ndr, const char *name, const struct netr_UserSessionKey *r)
    1121             : {
    1122        3519 :         ndr_print_struct(ndr, name, "netr_UserSessionKey");
    1123        3519 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1124             :         {
    1125        3519 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1126        3519 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1127        3519 :                 ndr->depth++;
    1128        3519 :                 ndr_print_array_uint8(ndr, "key", r->key, 16);
    1129        3519 :                 ndr->depth--;
    1130        3519 :                 ndr->flags = _flags_save_STRUCT;
    1131             :         }
    1132             : }
    1133             : 
    1134       82034 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LMSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_LMSessionKey *r)
    1135             : {
    1136             :         {
    1137       82034 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1138       82034 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1139       82034 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1140       82034 :                 if (ndr_flags & NDR_SCALARS) {
    1141       82034 :                         NDR_CHECK(ndr_push_align(ndr, 1));
    1142       82034 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->key, 8));
    1143       82034 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    1144             :                 }
    1145       78585 :                 if (ndr_flags & NDR_BUFFERS) {
    1146             :                 }
    1147       82034 :                 ndr->flags = _flags_save_STRUCT;
    1148             :         }
    1149       82034 :         return NDR_ERR_SUCCESS;
    1150             : }
    1151             : 
    1152      118530 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LMSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_LMSessionKey *r)
    1153             : {
    1154      118530 :         uint32_t size_key_0 = 0;
    1155             :         {
    1156      118530 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1157      118530 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1158      118530 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1159      118530 :                 if (ndr_flags & NDR_SCALARS) {
    1160      118530 :                         NDR_CHECK(ndr_pull_align(ndr, 1));
    1161      118530 :                         size_key_0 = 8;
    1162      118530 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->key, size_key_0));
    1163      118530 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    1164             :                 }
    1165      115239 :                 if (ndr_flags & NDR_BUFFERS) {
    1166             :                 }
    1167      118530 :                 ndr->flags = _flags_save_STRUCT;
    1168             :         }
    1169      118530 :         return NDR_ERR_SUCCESS;
    1170             : }
    1171             : 
    1172           0 : static void ndr_print_flags_netr_LMSessionKey(struct ndr_print *ndr, const char *name, int unused, const struct netr_LMSessionKey *r)
    1173             : {
    1174           0 :         ndr_print_netr_LMSessionKey(ndr, name, r);
    1175           0 : }
    1176             : 
    1177        3519 : _PUBLIC_ void ndr_print_netr_LMSessionKey(struct ndr_print *ndr, const char *name, const struct netr_LMSessionKey *r)
    1178             : {
    1179        3519 :         ndr_print_struct(ndr, name, "netr_LMSessionKey");
    1180        3519 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1181             :         {
    1182        3519 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1183        3519 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1184        3519 :                 ndr->depth++;
    1185        3519 :                 ndr_print_array_uint8(ndr, "key", r->key, 8);
    1186        3519 :                 ndr->depth--;
    1187        3519 :                 ndr->flags = _flags_save_STRUCT;
    1188             :         }
    1189             : }
    1190             : 
    1191       82034 : _PUBLIC_ enum ndr_err_code ndr_push_netr_UserFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    1192             : {
    1193       82034 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    1194       82034 :         return NDR_ERR_SUCCESS;
    1195             : }
    1196             : 
    1197      118530 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    1198             : {
    1199             :         uint32_t v;
    1200      118530 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    1201      118530 :         *r = v;
    1202      118530 :         return NDR_ERR_SUCCESS;
    1203             : }
    1204             : 
    1205        3519 : _PUBLIC_ void ndr_print_netr_UserFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    1206             : {
    1207        3519 :         ndr_print_uint32(ndr, name, r);
    1208        3519 :         ndr->depth++;
    1209        3519 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_GUEST", NETLOGON_GUEST, r);
    1210        3519 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NOENCRYPTION", NETLOGON_NOENCRYPTION, r);
    1211        3519 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_CACHED_ACCOUNT", NETLOGON_CACHED_ACCOUNT, r);
    1212        3519 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_USED_LM_PASSWORD", NETLOGON_USED_LM_PASSWORD, r);
    1213        3519 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_EXTRA_SIDS", NETLOGON_EXTRA_SIDS, r);
    1214        3519 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SUBAUTH_SESSION_KEY", NETLOGON_SUBAUTH_SESSION_KEY, r);
    1215        3519 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SERVER_TRUST_ACCOUNT", NETLOGON_SERVER_TRUST_ACCOUNT, r);
    1216        3519 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NTLMV2_ENABLED", NETLOGON_NTLMV2_ENABLED, r);
    1217        3519 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_RESOURCE_GROUPS", NETLOGON_RESOURCE_GROUPS, r);
    1218        3519 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_PROFILE_PATH_RETURNED", NETLOGON_PROFILE_PATH_RETURNED, r);
    1219        3519 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_GRACE_LOGON", NETLOGON_GRACE_LOGON, r);
    1220        3519 :         ndr->depth--;
    1221        3519 : }
    1222             : 
    1223      164068 : static enum ndr_err_code ndr_push_netr_SamBaseInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_SamBaseInfo *r)
    1224             : {
    1225      164068 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1226      164068 :         if (ndr_flags & NDR_SCALARS) {
    1227       82034 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1228       82034 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->logon_time));
    1229       82034 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->logoff_time));
    1230       82034 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->kickoff_time));
    1231       82034 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
    1232       82034 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->allow_password_change));
    1233       82034 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_password_change));
    1234       82034 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
    1235       82034 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
    1236       82034 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
    1237       82034 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
    1238       82034 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
    1239       82034 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
    1240       82034 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
    1241       82034 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
    1242       82034 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    1243       82034 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
    1244       82034 :                 NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->groups));
    1245       82034 :                 NDR_CHECK(ndr_push_netr_UserFlags(ndr, NDR_SCALARS, r->user_flags));
    1246             :                 {
    1247       82034 :                         uint32_t _flags_save_netr_UserSessionKey = ndr->flags;
    1248       82034 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
    1249       82034 :                         NDR_CHECK(ndr_push_netr_UserSessionKey(ndr, NDR_SCALARS, &r->key));
    1250       82034 :                         ndr->flags = _flags_save_netr_UserSessionKey;
    1251             :                 }
    1252       82034 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_server));
    1253       82034 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_domain));
    1254       82034 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid));
    1255             :                 {
    1256       82034 :                         uint32_t _flags_save_netr_LMSessionKey = ndr->flags;
    1257       82034 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
    1258       82034 :                         NDR_CHECK(ndr_push_netr_LMSessionKey(ndr, NDR_SCALARS, &r->LMSessKey));
    1259       82034 :                         ndr->flags = _flags_save_netr_LMSessionKey;
    1260             :                 }
    1261       82034 :                 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
    1262       82034 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sub_auth_status));
    1263       82034 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_successful_logon));
    1264       82034 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_failed_logon));
    1265       82034 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->failed_logon_count));
    1266       82034 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
    1267       82034 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1268             :         }
    1269      164068 :         if (ndr_flags & NDR_BUFFERS) {
    1270       82034 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
    1271       82034 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
    1272       82034 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
    1273       82034 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
    1274       82034 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
    1275       82034 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
    1276       82034 :                 NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->groups));
    1277       82034 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_server));
    1278       82034 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_domain));
    1279       82034 :                 if (r->domain_sid) {
    1280       81802 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
    1281             :                 }
    1282             :         }
    1283      157170 :         return NDR_ERR_SUCCESS;
    1284             : }
    1285             : 
    1286      237060 : static enum ndr_err_code ndr_pull_netr_SamBaseInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_SamBaseInfo *r)
    1287             : {
    1288             :         uint32_t _ptr_domain_sid;
    1289      237060 :         TALLOC_CTX *_mem_save_domain_sid_0 = NULL;
    1290      237060 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1291      237060 :         if (ndr_flags & NDR_SCALARS) {
    1292      118530 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1293      118530 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->logon_time));
    1294      118530 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->logoff_time));
    1295      118530 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->kickoff_time));
    1296      118530 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
    1297      118530 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->allow_password_change));
    1298      118530 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_password_change));
    1299      118530 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
    1300      118530 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
    1301      118530 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
    1302      118530 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
    1303      118530 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
    1304      118530 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
    1305      118530 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
    1306      118530 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
    1307      118530 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    1308      118530 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
    1309      118530 :                 NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->groups));
    1310      118530 :                 NDR_CHECK(ndr_pull_netr_UserFlags(ndr, NDR_SCALARS, &r->user_flags));
    1311             :                 {
    1312      118530 :                         uint32_t _flags_save_netr_UserSessionKey = ndr->flags;
    1313      118530 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
    1314      118530 :                         NDR_CHECK(ndr_pull_netr_UserSessionKey(ndr, NDR_SCALARS, &r->key));
    1315      118530 :                         ndr->flags = _flags_save_netr_UserSessionKey;
    1316             :                 }
    1317      118530 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_server));
    1318      118530 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_domain));
    1319      118530 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_sid));
    1320      118530 :                 if (_ptr_domain_sid) {
    1321      118294 :                         NDR_PULL_ALLOC(ndr, r->domain_sid);
    1322             :                 } else {
    1323         236 :                         r->domain_sid = NULL;
    1324             :                 }
    1325             :                 {
    1326      118530 :                         uint32_t _flags_save_netr_LMSessionKey = ndr->flags;
    1327      118530 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
    1328      118530 :                         NDR_CHECK(ndr_pull_netr_LMSessionKey(ndr, NDR_SCALARS, &r->LMSessKey));
    1329      118530 :                         ndr->flags = _flags_save_netr_LMSessionKey;
    1330             :                 }
    1331      118530 :                 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
    1332      118530 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sub_auth_status));
    1333      118530 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_successful_logon));
    1334      118530 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_failed_logon));
    1335      118530 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->failed_logon_count));
    1336      118530 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
    1337      118530 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1338             :         }
    1339      237060 :         if (ndr_flags & NDR_BUFFERS) {
    1340      118530 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
    1341      118530 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
    1342      118530 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
    1343      118530 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
    1344      118530 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
    1345      118530 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
    1346      118530 :                 NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->groups));
    1347      118530 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_server));
    1348      118530 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_domain));
    1349      118530 :                 if (r->domain_sid) {
    1350      118294 :                         _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1351      118294 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain_sid, 0);
    1352      118294 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
    1353      118294 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, 0);
    1354             :                 }
    1355             :         }
    1356      230478 :         return NDR_ERR_SUCCESS;
    1357             : }
    1358             : 
    1359        3519 : _PUBLIC_ void ndr_print_netr_SamBaseInfo(struct ndr_print *ndr, const char *name, const struct netr_SamBaseInfo *r)
    1360             : {
    1361        3519 :         ndr_print_struct(ndr, name, "netr_SamBaseInfo");
    1362        3519 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1363        3519 :         ndr->depth++;
    1364        3519 :         ndr_print_NTTIME(ndr, "logon_time", r->logon_time);
    1365        3519 :         ndr_print_NTTIME(ndr, "logoff_time", r->logoff_time);
    1366        3519 :         ndr_print_NTTIME(ndr, "kickoff_time", r->kickoff_time);
    1367        3519 :         ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
    1368        3519 :         ndr_print_NTTIME(ndr, "allow_password_change", r->allow_password_change);
    1369        3519 :         ndr_print_NTTIME(ndr, "force_password_change", r->force_password_change);
    1370        3519 :         ndr_print_lsa_String(ndr, "account_name", &r->account_name);
    1371        3519 :         ndr_print_lsa_String(ndr, "full_name", &r->full_name);
    1372        3519 :         ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
    1373        3519 :         ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
    1374        3519 :         ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
    1375        3519 :         ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
    1376        3519 :         ndr_print_uint16(ndr, "logon_count", r->logon_count);
    1377        3519 :         ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
    1378        3519 :         ndr_print_uint32(ndr, "rid", r->rid);
    1379        3519 :         ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
    1380        3519 :         ndr_print_samr_RidWithAttributeArray(ndr, "groups", &r->groups);
    1381        3519 :         ndr_print_netr_UserFlags(ndr, "user_flags", r->user_flags);
    1382             :         {
    1383        3519 :                 uint32_t _flags_save_netr_UserSessionKey = ndr->flags;
    1384        3519 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
    1385        3519 :                 ndr_print_netr_UserSessionKey(ndr, "key", &r->key);
    1386        3519 :                 ndr->flags = _flags_save_netr_UserSessionKey;
    1387             :         }
    1388        3519 :         ndr_print_lsa_StringLarge(ndr, "logon_server", &r->logon_server);
    1389        3519 :         ndr_print_lsa_StringLarge(ndr, "logon_domain", &r->logon_domain);
    1390        3519 :         ndr_print_ptr(ndr, "domain_sid", r->domain_sid);
    1391        3519 :         ndr->depth++;
    1392        3519 :         if (r->domain_sid) {
    1393        3519 :                 ndr_print_dom_sid2(ndr, "domain_sid", r->domain_sid);
    1394             :         }
    1395        3519 :         ndr->depth--;
    1396             :         {
    1397        3519 :                 uint32_t _flags_save_netr_LMSessionKey = ndr->flags;
    1398        3519 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
    1399        3519 :                 ndr_print_netr_LMSessionKey(ndr, "LMSessKey", &r->LMSessKey);
    1400        3519 :                 ndr->flags = _flags_save_netr_LMSessionKey;
    1401             :         }
    1402        3519 :         ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
    1403        3519 :         ndr_print_uint32(ndr, "sub_auth_status", r->sub_auth_status);
    1404        3519 :         ndr_print_NTTIME(ndr, "last_successful_logon", r->last_successful_logon);
    1405        3519 :         ndr_print_NTTIME(ndr, "last_failed_logon", r->last_failed_logon);
    1406        3519 :         ndr_print_uint32(ndr, "failed_logon_count", r->failed_logon_count);
    1407        3519 :         ndr_print_uint32(ndr, "reserved", r->reserved);
    1408        3519 :         ndr->depth--;
    1409             : }
    1410             : 
    1411        5870 : static enum ndr_err_code ndr_push_netr_SamInfo2(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo2 *r)
    1412             : {
    1413        5870 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1414        5870 :         if (ndr_flags & NDR_SCALARS) {
    1415        5870 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1416        5870 :                 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
    1417        5870 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1418             :         }
    1419        5870 :         if (ndr_flags & NDR_BUFFERS) {
    1420        5870 :                 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
    1421             :         }
    1422        5039 :         return NDR_ERR_SUCCESS;
    1423             : }
    1424             : 
    1425        5182 : static enum ndr_err_code ndr_pull_netr_SamInfo2(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo2 *r)
    1426             : {
    1427        5182 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1428        5182 :         if (ndr_flags & NDR_SCALARS) {
    1429        5182 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1430        5182 :                 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
    1431        5182 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1432             :         }
    1433        5182 :         if (ndr_flags & NDR_BUFFERS) {
    1434        5182 :                 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
    1435             :         }
    1436        4490 :         return NDR_ERR_SUCCESS;
    1437             : }
    1438             : 
    1439        1680 : _PUBLIC_ void ndr_print_netr_SamInfo2(struct ndr_print *ndr, const char *name, const struct netr_SamInfo2 *r)
    1440             : {
    1441        1680 :         ndr_print_struct(ndr, name, "netr_SamInfo2");
    1442        1680 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1443        1680 :         ndr->depth++;
    1444        1680 :         ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
    1445        1680 :         ndr->depth--;
    1446             : }
    1447             : 
    1448       19244 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SidAttr(struct ndr_push *ndr, int ndr_flags, const struct netr_SidAttr *r)
    1449             : {
    1450       19244 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1451       19244 :         if (ndr_flags & NDR_SCALARS) {
    1452        9622 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1453        9622 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    1454        9622 :                 NDR_CHECK(ndr_push_security_GroupAttrs(ndr, NDR_SCALARS, r->attributes));
    1455        9622 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1456             :         }
    1457       19244 :         if (ndr_flags & NDR_BUFFERS) {
    1458        9622 :                 if (r->sid) {
    1459        9622 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    1460             :                 }
    1461             :         }
    1462       18646 :         return NDR_ERR_SUCCESS;
    1463             : }
    1464             : 
    1465       17204 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SidAttr(struct ndr_pull *ndr, int ndr_flags, struct netr_SidAttr *r)
    1466             : {
    1467             :         uint32_t _ptr_sid;
    1468       17204 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    1469       17204 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1470       17204 :         if (ndr_flags & NDR_SCALARS) {
    1471        8602 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1472        8602 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    1473        8602 :                 if (_ptr_sid) {
    1474        8602 :                         NDR_PULL_ALLOC(ndr, r->sid);
    1475             :                 } else {
    1476           0 :                         r->sid = NULL;
    1477             :                 }
    1478        8602 :                 NDR_CHECK(ndr_pull_security_GroupAttrs(ndr, NDR_SCALARS, &r->attributes));
    1479        8602 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1480             :         }
    1481       17204 :         if (ndr_flags & NDR_BUFFERS) {
    1482        8602 :                 if (r->sid) {
    1483        8602 :                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1484        8602 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    1485        8602 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    1486        8602 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    1487             :                 }
    1488             :         }
    1489       16462 :         return NDR_ERR_SUCCESS;
    1490             : }
    1491             : 
    1492           0 : static void ndr_print_flags_netr_SidAttr(struct ndr_print *ndr, const char *name, int unused, const struct netr_SidAttr *r)
    1493             : {
    1494           0 :         ndr_print_netr_SidAttr(ndr, name, r);
    1495           0 : }
    1496             : 
    1497           4 : _PUBLIC_ void ndr_print_netr_SidAttr(struct ndr_print *ndr, const char *name, const struct netr_SidAttr *r)
    1498             : {
    1499           4 :         ndr_print_struct(ndr, name, "netr_SidAttr");
    1500           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1501           4 :         ndr->depth++;
    1502           4 :         ndr_print_ptr(ndr, "sid", r->sid);
    1503           4 :         ndr->depth++;
    1504           4 :         if (r->sid) {
    1505           4 :                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    1506             :         }
    1507           4 :         ndr->depth--;
    1508           4 :         ndr_print_security_GroupAttrs(ndr, "attributes", r->attributes);
    1509           4 :         ndr->depth--;
    1510             : }
    1511             : 
    1512      140990 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SamInfo3(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo3 *r)
    1513             : {
    1514             :         uint32_t cntr_sids_1;
    1515      140990 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1516      140990 :         if (ndr_flags & NDR_SCALARS) {
    1517       73588 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1518       73588 :                 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
    1519       73588 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sidcount));
    1520       73588 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
    1521       73588 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1522             :         }
    1523      140990 :         if (ndr_flags & NDR_BUFFERS) {
    1524       73588 :                 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
    1525       73588 :                 if (r->sids) {
    1526        9606 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->sidcount));
    1527       18913 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
    1528        9606 :                                 NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    1529             :                         }
    1530       18913 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
    1531        9606 :                                 NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
    1532             :                         }
    1533             :                 }
    1534             :         }
    1535      136729 :         return NDR_ERR_SUCCESS;
    1536             : }
    1537             : 
    1538      217010 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamInfo3(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo3 *r)
    1539             : {
    1540             :         uint32_t _ptr_sids;
    1541      217010 :         uint32_t size_sids_1 = 0;
    1542             :         uint32_t cntr_sids_1;
    1543      217010 :         TALLOC_CTX *_mem_save_sids_0 = NULL;
    1544      217010 :         TALLOC_CTX *_mem_save_sids_1 = NULL;
    1545      217010 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1546      217010 :         if (ndr_flags & NDR_SCALARS) {
    1547      111256 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1548      111256 :                 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
    1549      111256 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sidcount));
    1550      111256 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
    1551      111256 :                 if (_ptr_sids) {
    1552        8602 :                         NDR_PULL_ALLOC(ndr, r->sids);
    1553             :                 } else {
    1554      102654 :                         r->sids = NULL;
    1555             :                 }
    1556      111256 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1557             :         }
    1558      217010 :         if (ndr_flags & NDR_BUFFERS) {
    1559      111256 :                 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
    1560      111256 :                 if (r->sids) {
    1561        8602 :                         _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1562        8602 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    1563        8602 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
    1564        8602 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
    1565        8602 :                         NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
    1566        8602 :                         _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
    1567        8602 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    1568       17204 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    1569        8602 :                                 NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    1570             :                         }
    1571       16833 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    1572        8602 :                                 NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
    1573             :                         }
    1574        8602 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
    1575        8602 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
    1576             :                 }
    1577      111256 :                 if (r->sids) {
    1578        8602 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->sidcount));
    1579             :                 }
    1580      111559 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    1581             :                 }
    1582             :         }
    1583      212624 :         return NDR_ERR_SUCCESS;
    1584             : }
    1585             : 
    1586           0 : static void ndr_print_flags_netr_SamInfo3(struct ndr_print *ndr, const char *name, int unused, const struct netr_SamInfo3 *r)
    1587             : {
    1588           0 :         ndr_print_netr_SamInfo3(ndr, name, r);
    1589           0 : }
    1590             : 
    1591        1695 : _PUBLIC_ void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, const struct netr_SamInfo3 *r)
    1592             : {
    1593             :         uint32_t cntr_sids_1;
    1594        1695 :         ndr_print_struct(ndr, name, "netr_SamInfo3");
    1595        1695 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1596        1695 :         ndr->depth++;
    1597        1695 :         ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
    1598        1695 :         ndr_print_uint32(ndr, "sidcount", r->sidcount);
    1599        1695 :         ndr_print_ptr(ndr, "sids", r->sids);
    1600        1695 :         ndr->depth++;
    1601        1695 :         if (r->sids) {
    1602           4 :                 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->sidcount);
    1603           4 :                 ndr->depth++;
    1604           8 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
    1605           4 :                         ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]);
    1606             :                 }
    1607           4 :                 ndr->depth--;
    1608             :         }
    1609        1695 :         ndr->depth--;
    1610        1695 :         ndr->depth--;
    1611             : }
    1612             : 
    1613        2576 : static enum ndr_err_code ndr_push_netr_SamInfo6(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo6 *r)
    1614             : {
    1615             :         uint32_t cntr_sids_1;
    1616             :         uint32_t cntr_unknown4_0;
    1617        2576 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1618        2576 :         if (ndr_flags & NDR_SCALARS) {
    1619        2576 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1620        2576 :                 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
    1621        2576 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sidcount));
    1622        2576 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
    1623        2576 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dns_domainname));
    1624        2576 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
    1625       54024 :                 for (cntr_unknown4_0 = 0; cntr_unknown4_0 < (20); cntr_unknown4_0++) {
    1626       51520 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4[cntr_unknown4_0]));
    1627             :                 }
    1628        2576 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1629             :         }
    1630        2576 :         if (ndr_flags & NDR_BUFFERS) {
    1631        2576 :                 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
    1632        2576 :                 if (r->sids) {
    1633          16 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->sidcount));
    1634          32 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
    1635          16 :                                 NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    1636             :                         }
    1637          32 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
    1638          16 :                                 NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
    1639             :                         }
    1640             :                 }
    1641        2576 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dns_domainname));
    1642        2576 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
    1643             :         }
    1644        2504 :         return NDR_ERR_SUCCESS;
    1645             : }
    1646             : 
    1647        2092 : static enum ndr_err_code ndr_pull_netr_SamInfo6(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo6 *r)
    1648             : {
    1649             :         uint32_t _ptr_sids;
    1650        2092 :         uint32_t size_sids_1 = 0;
    1651             :         uint32_t cntr_sids_1;
    1652        2092 :         TALLOC_CTX *_mem_save_sids_0 = NULL;
    1653        2092 :         TALLOC_CTX *_mem_save_sids_1 = NULL;
    1654        2092 :         uint32_t size_unknown4_0 = 0;
    1655             :         uint32_t cntr_unknown4_0;
    1656        2092 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1657        2092 :         if (ndr_flags & NDR_SCALARS) {
    1658        2092 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1659        2092 :                 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
    1660        2092 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sidcount));
    1661        2092 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
    1662        2092 :                 if (_ptr_sids) {
    1663           0 :                         NDR_PULL_ALLOC(ndr, r->sids);
    1664             :                 } else {
    1665        2092 :                         r->sids = NULL;
    1666             :                 }
    1667        2092 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dns_domainname));
    1668        2092 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
    1669        2032 :                 size_unknown4_0 = 20;
    1670       43872 :                 for (cntr_unknown4_0 = 0; cntr_unknown4_0 < (size_unknown4_0); cntr_unknown4_0++) {
    1671       41840 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4[cntr_unknown4_0]));
    1672             :                 }
    1673        2092 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1674             :         }
    1675        2092 :         if (ndr_flags & NDR_BUFFERS) {
    1676        2092 :                 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
    1677        2092 :                 if (r->sids) {
    1678           0 :                         _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1679           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    1680           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
    1681           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
    1682           0 :                         NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
    1683           0 :                         _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
    1684           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    1685           0 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    1686           0 :                                 NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    1687             :                         }
    1688           0 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    1689           0 :                                 NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
    1690             :                         }
    1691           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
    1692           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
    1693             :                 }
    1694        2092 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dns_domainname));
    1695        2092 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
    1696        2092 :                 if (r->sids) {
    1697           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->sidcount));
    1698             :                 }
    1699        2092 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    1700             :                 }
    1701             :         }
    1702        2032 :         return NDR_ERR_SUCCESS;
    1703             : }
    1704             : 
    1705         144 : _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, const struct netr_SamInfo6 *r)
    1706             : {
    1707             :         uint32_t cntr_sids_1;
    1708             :         uint32_t cntr_unknown4_0;
    1709         144 :         ndr_print_struct(ndr, name, "netr_SamInfo6");
    1710         144 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1711         144 :         ndr->depth++;
    1712         144 :         ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
    1713         144 :         ndr_print_uint32(ndr, "sidcount", r->sidcount);
    1714         144 :         ndr_print_ptr(ndr, "sids", r->sids);
    1715         144 :         ndr->depth++;
    1716         144 :         if (r->sids) {
    1717           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->sidcount);
    1718           0 :                 ndr->depth++;
    1719           0 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
    1720           0 :                         ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]);
    1721             :                 }
    1722           0 :                 ndr->depth--;
    1723             :         }
    1724         144 :         ndr->depth--;
    1725         144 :         ndr_print_lsa_String(ndr, "dns_domainname", &r->dns_domainname);
    1726         144 :         ndr_print_lsa_String(ndr, "principal_name", &r->principal_name);
    1727         144 :         ndr->print(ndr, "%s: ARRAY(%d)", "unknown4", (int)20);
    1728         144 :         ndr->depth++;
    1729        3024 :         for (cntr_unknown4_0 = 0; cntr_unknown4_0 < (20); cntr_unknown4_0++) {
    1730        2880 :                 ndr_print_uint32(ndr, "unknown4", r->unknown4[cntr_unknown4_0]);
    1731             :         }
    1732         144 :         ndr->depth--;
    1733         144 :         ndr->depth--;
    1734             : }
    1735             : 
    1736           0 : static enum ndr_err_code ndr_push_netr_PacInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_PacInfo *r)
    1737             : {
    1738             :         uint32_t cntr_expansionroom_0;
    1739           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1740           0 :         if (ndr_flags & NDR_SCALARS) {
    1741           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1742           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pac_size));
    1743           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac));
    1744           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_domain));
    1745           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_server));
    1746           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
    1747           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auth_size));
    1748           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->auth));
    1749           0 :                 NDR_CHECK(ndr_push_netr_UserSessionKey(ndr, NDR_SCALARS, &r->user_session_key));
    1750           0 :                 for (cntr_expansionroom_0 = 0; cntr_expansionroom_0 < (10); cntr_expansionroom_0++) {
    1751           0 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->expansionroom[cntr_expansionroom_0]));
    1752             :                 }
    1753           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    1754           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    1755           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    1756           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    1757           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1758             :         }
    1759           0 :         if (ndr_flags & NDR_BUFFERS) {
    1760           0 :                 if (r->pac) {
    1761           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->pac_size));
    1762           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->pac, r->pac_size));
    1763             :                 }
    1764           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_domain));
    1765           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_server));
    1766           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
    1767           0 :                 if (r->auth) {
    1768           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->auth_size));
    1769           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->auth, r->auth_size));
    1770             :                 }
    1771           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    1772           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    1773           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    1774           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    1775             :         }
    1776           0 :         return NDR_ERR_SUCCESS;
    1777             : }
    1778             : 
    1779           0 : static enum ndr_err_code ndr_pull_netr_PacInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_PacInfo *r)
    1780             : {
    1781             :         uint32_t _ptr_pac;
    1782           0 :         uint32_t size_pac_1 = 0;
    1783           0 :         TALLOC_CTX *_mem_save_pac_0 = NULL;
    1784             :         uint32_t _ptr_auth;
    1785           0 :         uint32_t size_auth_1 = 0;
    1786           0 :         TALLOC_CTX *_mem_save_auth_0 = NULL;
    1787           0 :         uint32_t size_expansionroom_0 = 0;
    1788             :         uint32_t cntr_expansionroom_0;
    1789           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1790           0 :         if (ndr_flags & NDR_SCALARS) {
    1791           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1792           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pac_size));
    1793           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pac));
    1794           0 :                 if (_ptr_pac) {
    1795           0 :                         NDR_PULL_ALLOC(ndr, r->pac);
    1796             :                 } else {
    1797           0 :                         r->pac = NULL;
    1798             :                 }
    1799           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_domain));
    1800           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_server));
    1801           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
    1802           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auth_size));
    1803           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_auth));
    1804           0 :                 if (_ptr_auth) {
    1805           0 :                         NDR_PULL_ALLOC(ndr, r->auth);
    1806             :                 } else {
    1807           0 :                         r->auth = NULL;
    1808             :                 }
    1809           0 :                 NDR_CHECK(ndr_pull_netr_UserSessionKey(ndr, NDR_SCALARS, &r->user_session_key));
    1810           0 :                 size_expansionroom_0 = 10;
    1811           0 :                 for (cntr_expansionroom_0 = 0; cntr_expansionroom_0 < (size_expansionroom_0); cntr_expansionroom_0++) {
    1812           0 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->expansionroom[cntr_expansionroom_0]));
    1813             :                 }
    1814           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    1815           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    1816           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    1817           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    1818           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1819             :         }
    1820           0 :         if (ndr_flags & NDR_BUFFERS) {
    1821           0 :                 if (r->pac) {
    1822           0 :                         _mem_save_pac_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1823           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->pac, 0);
    1824           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->pac));
    1825           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->pac, &size_pac_1));
    1826           0 :                         NDR_PULL_ALLOC_N(ndr, r->pac, size_pac_1);
    1827           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->pac, size_pac_1));
    1828           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pac_0, 0);
    1829             :                 }
    1830           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_domain));
    1831           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_server));
    1832           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
    1833           0 :                 if (r->auth) {
    1834           0 :                         _mem_save_auth_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1835           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->auth, 0);
    1836           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->auth));
    1837           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->auth, &size_auth_1));
    1838           0 :                         NDR_PULL_ALLOC_N(ndr, r->auth, size_auth_1);
    1839           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->auth, size_auth_1));
    1840           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_0, 0);
    1841             :                 }
    1842           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    1843           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    1844           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    1845           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    1846           0 :                 if (r->pac) {
    1847           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->pac, r->pac_size));
    1848             :                 }
    1849           0 :                 if (r->auth) {
    1850           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->auth, r->auth_size));
    1851             :                 }
    1852             :         }
    1853           0 :         return NDR_ERR_SUCCESS;
    1854             : }
    1855             : 
    1856           0 : _PUBLIC_ void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, const struct netr_PacInfo *r)
    1857             : {
    1858             :         uint32_t cntr_expansionroom_0;
    1859           0 :         ndr_print_struct(ndr, name, "netr_PacInfo");
    1860           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1861           0 :         ndr->depth++;
    1862           0 :         ndr_print_uint32(ndr, "pac_size", r->pac_size);
    1863           0 :         ndr_print_ptr(ndr, "pac", r->pac);
    1864           0 :         ndr->depth++;
    1865           0 :         if (r->pac) {
    1866           0 :                 ndr_print_array_uint8(ndr, "pac", r->pac, r->pac_size);
    1867             :         }
    1868           0 :         ndr->depth--;
    1869           0 :         ndr_print_lsa_String(ndr, "logon_domain", &r->logon_domain);
    1870           0 :         ndr_print_lsa_String(ndr, "logon_server", &r->logon_server);
    1871           0 :         ndr_print_lsa_String(ndr, "principal_name", &r->principal_name);
    1872           0 :         ndr_print_uint32(ndr, "auth_size", r->auth_size);
    1873           0 :         ndr_print_ptr(ndr, "auth", r->auth);
    1874           0 :         ndr->depth++;
    1875           0 :         if (r->auth) {
    1876           0 :                 ndr_print_array_uint8(ndr, "auth", r->auth, r->auth_size);
    1877             :         }
    1878           0 :         ndr->depth--;
    1879           0 :         ndr_print_netr_UserSessionKey(ndr, "user_session_key", &r->user_session_key);
    1880           0 :         ndr->print(ndr, "%s: ARRAY(%d)", "expansionroom", (int)10);
    1881           0 :         ndr->depth++;
    1882           0 :         for (cntr_expansionroom_0 = 0; cntr_expansionroom_0 < (10); cntr_expansionroom_0++) {
    1883           0 :                 ndr_print_uint32(ndr, "expansionroom", r->expansionroom[cntr_expansionroom_0]);
    1884             :         }
    1885           0 :         ndr->depth--;
    1886           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    1887           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    1888           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    1889           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    1890           0 :         ndr->depth--;
    1891             : }
    1892             : 
    1893         260 : static enum ndr_err_code ndr_push_netr_GenericInfo2(struct ndr_push *ndr, int ndr_flags, const struct netr_GenericInfo2 *r)
    1894             : {
    1895             :         {
    1896         260 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1897         260 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1898         260 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1899         260 :                 if (ndr_flags & NDR_SCALARS) {
    1900         260 :                         NDR_CHECK(ndr_push_align(ndr, 5));
    1901         260 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
    1902         260 :                         NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
    1903         260 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1904             :                 }
    1905         260 :                 if (ndr_flags & NDR_BUFFERS) {
    1906         260 :                         if (r->data) {
    1907          52 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
    1908          52 :                                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
    1909             :                         }
    1910             :                 }
    1911         260 :                 ndr->flags = _flags_save_STRUCT;
    1912             :         }
    1913         260 :         return NDR_ERR_SUCCESS;
    1914             : }
    1915             : 
    1916         260 : static enum ndr_err_code ndr_pull_netr_GenericInfo2(struct ndr_pull *ndr, int ndr_flags, struct netr_GenericInfo2 *r)
    1917             : {
    1918             :         uint32_t _ptr_data;
    1919         260 :         uint32_t size_data_1 = 0;
    1920         260 :         TALLOC_CTX *_mem_save_data_0 = NULL;
    1921             :         {
    1922         260 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1923         260 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1924         260 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1925         260 :                 if (ndr_flags & NDR_SCALARS) {
    1926         260 :                         NDR_CHECK(ndr_pull_align(ndr, 5));
    1927         260 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
    1928         260 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
    1929         260 :                         if (_ptr_data) {
    1930          52 :                                 NDR_PULL_ALLOC(ndr, r->data);
    1931             :                         } else {
    1932         208 :                                 r->data = NULL;
    1933             :                         }
    1934         260 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1935             :                 }
    1936         260 :                 if (ndr_flags & NDR_BUFFERS) {
    1937         260 :                         if (r->data) {
    1938          52 :                                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1939          52 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
    1940          52 :                                 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
    1941          52 :                                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
    1942          52 :                                 NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
    1943          52 :                                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
    1944          52 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
    1945             :                         }
    1946         260 :                         if (r->data) {
    1947          52 :                                 NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
    1948             :                         }
    1949             :                 }
    1950         260 :                 ndr->flags = _flags_save_STRUCT;
    1951             :         }
    1952         260 :         return NDR_ERR_SUCCESS;
    1953             : }
    1954             : 
    1955           0 : _PUBLIC_ void ndr_print_netr_GenericInfo2(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo2 *r)
    1956             : {
    1957           0 :         ndr_print_struct(ndr, name, "netr_GenericInfo2");
    1958           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1959             :         {
    1960           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1961           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1962           0 :                 ndr->depth++;
    1963           0 :                 ndr_print_uint32(ndr, "length", r->length);
    1964           0 :                 ndr_print_ptr(ndr, "data", r->data);
    1965           0 :                 ndr->depth++;
    1966           0 :                 if (r->data) {
    1967           0 :                         ndr_print_array_uint8(ndr, "data", r->data, r->length);
    1968             :                 }
    1969           0 :                 ndr->depth--;
    1970           0 :                 ndr->depth--;
    1971           0 :                 ndr->flags = _flags_save_STRUCT;
    1972             :         }
    1973             : }
    1974             : 
    1975       26471 : _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int ndr_flags, const union netr_Validation *r)
    1976             : {
    1977             :         uint32_t level;
    1978       26471 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1979       26471 :         if (ndr_flags & NDR_SCALARS) {
    1980             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1981       26471 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1982       26471 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    1983       26471 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
    1984             :                 /* ms_union is always aligned to the largest union arm*/
    1985       26471 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1986       26471 :                 switch (level) {
    1987        9724 :                         case NetlogonValidationSamInfo: {
    1988        9724 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam2));
    1989        8379 :                         break; }
    1990             : 
    1991        9665 :                         case NetlogonValidationSamInfo2: {
    1992        9665 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam3));
    1993        8392 :                         break; }
    1994             : 
    1995           0 :                         case 4: {
    1996           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac));
    1997           0 :                         break; }
    1998             : 
    1999         260 :                         case NetlogonValidationGenericInfo2: {
    2000         260 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->generic));
    2001         260 :                         break; }
    2002             : 
    2003        5562 :                         case NetlogonValidationSamInfo4: {
    2004        5562 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam6));
    2005        5490 :                         break; }
    2006             : 
    2007        1039 :                         default: {
    2008        1039 :                         break; }
    2009             : 
    2010             :                 }
    2011           0 :         }
    2012       26471 :         if (ndr_flags & NDR_BUFFERS) {
    2013       26471 :                 if (!(ndr_flags & NDR_SCALARS)) {
    2014             :                         /* We didn't get it above, and the token is not needed after this. */
    2015           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    2016             :                 }
    2017       26471 :                 switch (level) {
    2018        9724 :                         case NetlogonValidationSamInfo:
    2019        9724 :                                 if (r->sam2) {
    2020        5870 :                                         NDR_CHECK(ndr_push_netr_SamInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam2));
    2021             :                                 }
    2022        8379 :                         break;
    2023             : 
    2024        9665 :                         case NetlogonValidationSamInfo2:
    2025        9665 :                                 if (r->sam3) {
    2026        6186 :                                         NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam3));
    2027             :                                 }
    2028        8392 :                         break;
    2029             : 
    2030           0 :                         case 4:
    2031           0 :                                 if (r->pac) {
    2032           0 :                                         NDR_CHECK(ndr_push_netr_PacInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pac));
    2033             :                                 }
    2034           0 :                         break;
    2035             : 
    2036         260 :                         case NetlogonValidationGenericInfo2:
    2037         260 :                                 if (r->generic) {
    2038         260 :                                         NDR_CHECK(ndr_push_netr_GenericInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
    2039             :                                 }
    2040         260 :                         break;
    2041             : 
    2042        5562 :                         case NetlogonValidationSamInfo4:
    2043        5562 :                                 if (r->sam6) {
    2044        2576 :                                         NDR_CHECK(ndr_push_netr_SamInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam6));
    2045             :                                 }
    2046        5490 :                         break;
    2047             : 
    2048        1039 :                         default:
    2049        1039 :                         break;
    2050             : 
    2051             :                 }
    2052           0 :         }
    2053       23560 :         return NDR_ERR_SUCCESS;
    2054             : }
    2055             : 
    2056       23633 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int ndr_flags, union netr_Validation *r)
    2057             : {
    2058             :         uint32_t level;
    2059             :         uint16_t _level;
    2060       23633 :         TALLOC_CTX *_mem_save_sam2_0 = NULL;
    2061             :         uint32_t _ptr_sam2;
    2062       23633 :         TALLOC_CTX *_mem_save_sam3_0 = NULL;
    2063             :         uint32_t _ptr_sam3;
    2064       23633 :         TALLOC_CTX *_mem_save_pac_0 = NULL;
    2065             :         uint32_t _ptr_pac;
    2066       23633 :         TALLOC_CTX *_mem_save_generic_0 = NULL;
    2067             :         uint32_t _ptr_generic;
    2068       23633 :         TALLOC_CTX *_mem_save_sam6_0 = NULL;
    2069             :         uint32_t _ptr_sam6;
    2070       23633 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2071       23633 :         if (ndr_flags & NDR_SCALARS) {
    2072             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    2073       23633 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    2074       23633 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    2075       23633 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
    2076       23633 :                 if (_level != level) {
    2077           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    2078             :                 }
    2079             :                 /* ms_union is always aligned to the largest union arm*/
    2080       23633 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2081       23633 :                 switch (level) {
    2082        8612 :                         case NetlogonValidationSamInfo: {
    2083        8612 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam2));
    2084        8612 :                                 if (_ptr_sam2) {
    2085        5182 :                                         NDR_PULL_ALLOC(ndr, r->sam2);
    2086             :                                 } else {
    2087        3430 :                                         r->sam2 = NULL;
    2088             :                                 }
    2089        7492 :                         break; }
    2090             : 
    2091        8613 :                         case NetlogonValidationSamInfo2: {
    2092        8613 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam3));
    2093        8613 :                                 if (_ptr_sam3) {
    2094        5502 :                                         NDR_PULL_ALLOC(ndr, r->sam3);
    2095             :                                 } else {
    2096        3111 :                                         r->sam3 = NULL;
    2097             :                                 }
    2098        7553 :                         break; }
    2099             : 
    2100           0 :                         case 4: {
    2101           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pac));
    2102           0 :                                 if (_ptr_pac) {
    2103           0 :                                         NDR_PULL_ALLOC(ndr, r->pac);
    2104             :                                 } else {
    2105           0 :                                         r->pac = NULL;
    2106             :                                 }
    2107           0 :                         break; }
    2108             : 
    2109         260 :                         case NetlogonValidationGenericInfo2: {
    2110         260 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_generic));
    2111         260 :                                 if (_ptr_generic) {
    2112         260 :                                         NDR_PULL_ALLOC(ndr, r->generic);
    2113             :                                 } else {
    2114           0 :                                         r->generic = NULL;
    2115             :                                 }
    2116         260 :                         break; }
    2117             : 
    2118        5072 :                         case NetlogonValidationSamInfo4: {
    2119        5072 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam6));
    2120        5072 :                                 if (_ptr_sam6) {
    2121        2092 :                                         NDR_PULL_ALLOC(ndr, r->sam6);
    2122             :                                 } else {
    2123        2980 :                                         r->sam6 = NULL;
    2124             :                                 }
    2125        5012 :                         break; }
    2126             : 
    2127         892 :                         default: {
    2128         892 :                         break; }
    2129             : 
    2130             :                 }
    2131           0 :         }
    2132       23633 :         if (ndr_flags & NDR_BUFFERS) {
    2133       23633 :                 if (!(ndr_flags & NDR_SCALARS)) {
    2134             :                         /* We didn't get it above, and the token is not needed after this. */
    2135           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    2136             :                 }
    2137       23633 :                 switch (level) {
    2138        8612 :                         case NetlogonValidationSamInfo:
    2139        8612 :                                 if (r->sam2) {
    2140        5182 :                                         _mem_save_sam2_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2141        5182 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sam2, 0);
    2142        5182 :                                         NDR_CHECK(ndr_pull_netr_SamInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam2));
    2143        5182 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam2_0, 0);
    2144             :                                 }
    2145        7492 :                         break;
    2146             : 
    2147        8613 :                         case NetlogonValidationSamInfo2:
    2148        8613 :                                 if (r->sam3) {
    2149        5502 :                                         _mem_save_sam3_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2150        5502 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sam3, 0);
    2151        5502 :                                         NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam3));
    2152        5502 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam3_0, 0);
    2153             :                                 }
    2154        7553 :                         break;
    2155             : 
    2156           0 :                         case 4:
    2157           0 :                                 if (r->pac) {
    2158           0 :                                         _mem_save_pac_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2159           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->pac, 0);
    2160           0 :                                         NDR_CHECK(ndr_pull_netr_PacInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pac));
    2161           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pac_0, 0);
    2162             :                                 }
    2163           0 :                         break;
    2164             : 
    2165         260 :                         case NetlogonValidationGenericInfo2:
    2166         260 :                                 if (r->generic) {
    2167         260 :                                         _mem_save_generic_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2168         260 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->generic, 0);
    2169         260 :                                         NDR_CHECK(ndr_pull_netr_GenericInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
    2170         260 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_generic_0, 0);
    2171             :                                 }
    2172         260 :                         break;
    2173             : 
    2174        5072 :                         case NetlogonValidationSamInfo4:
    2175        5072 :                                 if (r->sam6) {
    2176        2092 :                                         _mem_save_sam6_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2177        2092 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sam6, 0);
    2178        2092 :                                         NDR_CHECK(ndr_pull_netr_SamInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam6));
    2179        2092 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam6_0, 0);
    2180             :                                 }
    2181        5012 :                         break;
    2182             : 
    2183         892 :                         default:
    2184         892 :                         break;
    2185             : 
    2186             :                 }
    2187           0 :         }
    2188       21209 :         return NDR_ERR_SUCCESS;
    2189             : }
    2190             : 
    2191        5888 : _PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name, const union netr_Validation *r)
    2192             : {
    2193             :         uint32_t level;
    2194        5888 :         level = ndr_print_steal_switch_value(ndr, r);
    2195        5888 :         ndr_print_union(ndr, name, level, "netr_Validation");
    2196        5888 :         switch (level) {
    2197        2720 :                 case NetlogonValidationSamInfo:
    2198        2720 :                         ndr_print_ptr(ndr, "sam2", r->sam2);
    2199        2720 :                         ndr->depth++;
    2200        2720 :                         if (r->sam2) {
    2201        1680 :                                 ndr_print_netr_SamInfo2(ndr, "sam2", r->sam2);
    2202             :                         }
    2203        2720 :                         ndr->depth--;
    2204        2720 :                 break;
    2205             : 
    2206        2576 :                 case NetlogonValidationSamInfo2:
    2207        2576 :                         ndr_print_ptr(ndr, "sam3", r->sam3);
    2208        2576 :                         ndr->depth++;
    2209        2576 :                         if (r->sam3) {
    2210        1680 :                                 ndr_print_netr_SamInfo3(ndr, "sam3", r->sam3);
    2211             :                         }
    2212        2576 :                         ndr->depth--;
    2213        2576 :                 break;
    2214             : 
    2215           0 :                 case 4:
    2216           0 :                         ndr_print_ptr(ndr, "pac", r->pac);
    2217           0 :                         ndr->depth++;
    2218           0 :                         if (r->pac) {
    2219           0 :                                 ndr_print_netr_PacInfo(ndr, "pac", r->pac);
    2220             :                         }
    2221           0 :                         ndr->depth--;
    2222           0 :                 break;
    2223             : 
    2224           0 :                 case NetlogonValidationGenericInfo2:
    2225           0 :                         ndr_print_ptr(ndr, "generic", r->generic);
    2226           0 :                         ndr->depth++;
    2227           0 :                         if (r->generic) {
    2228           0 :                                 ndr_print_netr_GenericInfo2(ndr, "generic", r->generic);
    2229             :                         }
    2230           0 :                         ndr->depth--;
    2231           0 :                 break;
    2232             : 
    2233         144 :                 case NetlogonValidationSamInfo4:
    2234         144 :                         ndr_print_ptr(ndr, "sam6", r->sam6);
    2235         144 :                         ndr->depth++;
    2236         144 :                         if (r->sam6) {
    2237         144 :                                 ndr_print_netr_SamInfo6(ndr, "sam6", r->sam6);
    2238             :                         }
    2239         144 :                         ndr->depth--;
    2240         144 :                 break;
    2241             : 
    2242         374 :                 default:
    2243         374 :                 break;
    2244             : 
    2245             :         }
    2246        5888 : }
    2247             : 
    2248      133212 : _PUBLIC_ enum ndr_err_code ndr_push_netr_Credential(struct ndr_push *ndr, int ndr_flags, const struct netr_Credential *r)
    2249             : {
    2250             :         {
    2251      133212 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2252      133212 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2253      133212 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2254      133212 :                 if (ndr_flags & NDR_SCALARS) {
    2255      133212 :                         NDR_CHECK(ndr_push_align(ndr, 1));
    2256      133212 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 8));
    2257      133212 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    2258             :                 }
    2259      119979 :                 if (ndr_flags & NDR_BUFFERS) {
    2260             :                 }
    2261      133212 :                 ndr->flags = _flags_save_STRUCT;
    2262             :         }
    2263      133212 :         return NDR_ERR_SUCCESS;
    2264             : }
    2265             : 
    2266      131708 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_Credential(struct ndr_pull *ndr, int ndr_flags, struct netr_Credential *r)
    2267             : {
    2268      131708 :         uint32_t size_data_0 = 0;
    2269             :         {
    2270      131708 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2271      131708 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2272      131708 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2273      131708 :                 if (ndr_flags & NDR_SCALARS) {
    2274      131708 :                         NDR_CHECK(ndr_pull_align(ndr, 1));
    2275      131708 :                         size_data_0 = 8;
    2276      131708 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
    2277      131708 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    2278             :                 }
    2279      118875 :                 if (ndr_flags & NDR_BUFFERS) {
    2280             :                 }
    2281      131708 :                 ndr->flags = _flags_save_STRUCT;
    2282             :         }
    2283      131708 :         return NDR_ERR_SUCCESS;
    2284             : }
    2285             : 
    2286           0 : static void ndr_print_flags_netr_Credential(struct ndr_print *ndr, const char *name, int unused, const struct netr_Credential *r)
    2287             : {
    2288           0 :         ndr_print_netr_Credential(ndr, name, r);
    2289           0 : }
    2290             : 
    2291        8774 : _PUBLIC_ void ndr_print_netr_Credential(struct ndr_print *ndr, const char *name, const struct netr_Credential *r)
    2292             : {
    2293        8774 :         ndr_print_struct(ndr, name, "netr_Credential");
    2294        8774 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2295             :         {
    2296        8774 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2297        8774 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2298        8774 :                 ndr->depth++;
    2299        8774 :                 ndr_print_array_uint8(ndr, "data", r->data, 8);
    2300        8774 :                 ndr->depth--;
    2301        8774 :                 ndr->flags = _flags_save_STRUCT;
    2302             :         }
    2303             : }
    2304             : 
    2305       47955 : _PUBLIC_ enum ndr_err_code ndr_push_netr_Authenticator(struct ndr_push *ndr, int ndr_flags, const struct netr_Authenticator *r)
    2306             : {
    2307       47955 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2308       47955 :         if (ndr_flags & NDR_SCALARS) {
    2309       47955 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2310       47955 :                 NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->cred));
    2311       47955 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->timestamp));
    2312       47955 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2313             :         }
    2314       42231 :         if (ndr_flags & NDR_BUFFERS) {
    2315             :         }
    2316       47955 :         return NDR_ERR_SUCCESS;
    2317             : }
    2318             : 
    2319       45954 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_Authenticator(struct ndr_pull *ndr, int ndr_flags, struct netr_Authenticator *r)
    2320             : {
    2321       45954 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2322       45954 :         if (ndr_flags & NDR_SCALARS) {
    2323       45954 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2324       45954 :                 NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->cred));
    2325       45954 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->timestamp));
    2326       45954 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2327             :         }
    2328       40476 :         if (ndr_flags & NDR_BUFFERS) {
    2329             :         }
    2330       45954 :         return NDR_ERR_SUCCESS;
    2331             : }
    2332             : 
    2333           0 : static void ndr_print_flags_netr_Authenticator(struct ndr_print *ndr, const char *name, int unused, const struct netr_Authenticator *r)
    2334             : {
    2335           0 :         ndr_print_netr_Authenticator(ndr, name, r);
    2336           0 : }
    2337             : 
    2338        3438 : _PUBLIC_ void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *name, const struct netr_Authenticator *r)
    2339             : {
    2340        3438 :         ndr_print_struct(ndr, name, "netr_Authenticator");
    2341        3438 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2342        3438 :         ndr->depth++;
    2343        3438 :         ndr_print_netr_Credential(ndr, "cred", &r->cred);
    2344        3438 :         ndr_print_time_t(ndr, "timestamp", r->timestamp);
    2345        3438 :         ndr->depth--;
    2346             : }
    2347             : 
    2348           0 : static enum ndr_err_code ndr_push_netr_DELTA_DELETE_USER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_USER *r)
    2349             : {
    2350           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2351           0 :         if (ndr_flags & NDR_SCALARS) {
    2352           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2353           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->account_name));
    2354           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    2355           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    2356           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    2357           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    2358           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    2359           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    2360           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    2361           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    2362           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2363             :         }
    2364           0 :         if (ndr_flags & NDR_BUFFERS) {
    2365           0 :                 if (r->account_name) {
    2366           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
    2367           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    2368           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
    2369           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, ndr_charset_length(r->account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    2370             :                 }
    2371           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    2372           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    2373           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    2374           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    2375             :         }
    2376           0 :         return NDR_ERR_SUCCESS;
    2377             : }
    2378             : 
    2379           0 : static enum ndr_err_code ndr_pull_netr_DELTA_DELETE_USER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DELETE_USER *r)
    2380             : {
    2381             :         uint32_t _ptr_account_name;
    2382           0 :         uint32_t size_account_name_1 = 0;
    2383           0 :         uint32_t length_account_name_1 = 0;
    2384           0 :         TALLOC_CTX *_mem_save_account_name_0 = NULL;
    2385           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2386           0 :         if (ndr_flags & NDR_SCALARS) {
    2387           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2388           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
    2389           0 :                 if (_ptr_account_name) {
    2390           0 :                         NDR_PULL_ALLOC(ndr, r->account_name);
    2391             :                 } else {
    2392           0 :                         r->account_name = NULL;
    2393             :                 }
    2394           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    2395           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    2396           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    2397           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    2398           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    2399           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    2400           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    2401           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    2402           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2403             :         }
    2404           0 :         if (ndr_flags & NDR_BUFFERS) {
    2405           0 :                 if (r->account_name) {
    2406           0 :                         _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2407           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->account_name, 0);
    2408           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
    2409           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
    2410           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->account_name, &size_account_name_1));
    2411           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->account_name, &length_account_name_1));
    2412           0 :                         if (length_account_name_1 > size_account_name_1) {
    2413           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_1, length_account_name_1);
    2414             :                         }
    2415           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
    2416           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
    2417           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0);
    2418             :                 }
    2419           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    2420           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    2421           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    2422           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    2423             :         }
    2424           0 :         return NDR_ERR_SUCCESS;
    2425             : }
    2426             : 
    2427           0 : _PUBLIC_ void ndr_print_netr_DELTA_DELETE_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_USER *r)
    2428             : {
    2429           0 :         ndr_print_struct(ndr, name, "netr_DELTA_DELETE_USER");
    2430           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2431           0 :         ndr->depth++;
    2432           0 :         ndr_print_ptr(ndr, "account_name", r->account_name);
    2433           0 :         ndr->depth++;
    2434           0 :         if (r->account_name) {
    2435           0 :                 ndr_print_string(ndr, "account_name", r->account_name);
    2436             :         }
    2437           0 :         ndr->depth--;
    2438           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    2439           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    2440           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    2441           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    2442           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    2443           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    2444           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    2445           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    2446           0 :         ndr->depth--;
    2447             : }
    2448             : 
    2449           0 : static enum ndr_err_code ndr_push_netr_USER_KEY16(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEY16 *r)
    2450             : {
    2451           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2452           0 :         if (ndr_flags & NDR_SCALARS) {
    2453           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2454           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
    2455           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
    2456           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
    2457           0 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->pwd));
    2458           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2459             :         }
    2460           0 :         if (ndr_flags & NDR_BUFFERS) {
    2461             :         }
    2462           0 :         return NDR_ERR_SUCCESS;
    2463             : }
    2464             : 
    2465           0 : static enum ndr_err_code ndr_pull_netr_USER_KEY16(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEY16 *r)
    2466             : {
    2467           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2468           0 :         if (ndr_flags & NDR_SCALARS) {
    2469           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2470           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
    2471           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
    2472           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
    2473           0 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->pwd));
    2474           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2475             :         }
    2476           0 :         if (ndr_flags & NDR_BUFFERS) {
    2477             :         }
    2478           0 :         return NDR_ERR_SUCCESS;
    2479             : }
    2480             : 
    2481           0 : _PUBLIC_ void ndr_print_netr_USER_KEY16(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY16 *r)
    2482             : {
    2483           0 :         ndr_print_struct(ndr, name, "netr_USER_KEY16");
    2484           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2485           0 :         ndr->depth++;
    2486           0 :         ndr_print_uint16(ndr, "length", r->length);
    2487           0 :         ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->length:r->size);
    2488           0 :         ndr_print_uint32(ndr, "flags", r->flags);
    2489           0 :         ndr_print_samr_Password(ndr, "pwd", &r->pwd);
    2490           0 :         ndr->depth--;
    2491             : }
    2492             : 
    2493           0 : static enum ndr_err_code ndr_push_netr_PasswordHistory(struct ndr_push *ndr, int ndr_flags, const struct netr_PasswordHistory *r)
    2494             : {
    2495           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2496           0 :         if (ndr_flags & NDR_SCALARS) {
    2497           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2498           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nt_length));
    2499           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nt_length));
    2500           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nt_flags));
    2501           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm_length));
    2502           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm_length));
    2503           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lm_flags));
    2504           0 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->nt_history, r->nt_length));
    2505           0 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->lm_history, r->lm_length));
    2506           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2507             :         }
    2508           0 :         if (ndr_flags & NDR_BUFFERS) {
    2509             :         }
    2510           0 :         return NDR_ERR_SUCCESS;
    2511             : }
    2512             : 
    2513           0 : static enum ndr_err_code ndr_pull_netr_PasswordHistory(struct ndr_pull *ndr, int ndr_flags, struct netr_PasswordHistory *r)
    2514             : {
    2515           0 :         uint32_t size_nt_history_0 = 0;
    2516           0 :         uint32_t size_lm_history_0 = 0;
    2517           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2518           0 :         if (ndr_flags & NDR_SCALARS) {
    2519           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2520           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nt_length));
    2521           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nt_size));
    2522           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nt_flags));
    2523           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm_length));
    2524           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm_size));
    2525           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lm_flags));
    2526           0 :                 size_nt_history_0 = r->nt_length;
    2527           0 :                 NDR_PULL_ALLOC_N(ndr, r->nt_history, size_nt_history_0);
    2528           0 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->nt_history, size_nt_history_0));
    2529           0 :                 size_lm_history_0 = r->lm_length;
    2530           0 :                 NDR_PULL_ALLOC_N(ndr, r->lm_history, size_lm_history_0);
    2531           0 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->lm_history, size_lm_history_0));
    2532           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2533             :         }
    2534           0 :         if (ndr_flags & NDR_BUFFERS) {
    2535             :         }
    2536           0 :         return NDR_ERR_SUCCESS;
    2537             : }
    2538             : 
    2539           0 : _PUBLIC_ void ndr_print_netr_PasswordHistory(struct ndr_print *ndr, const char *name, const struct netr_PasswordHistory *r)
    2540             : {
    2541           0 :         ndr_print_struct(ndr, name, "netr_PasswordHistory");
    2542           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2543           0 :         ndr->depth++;
    2544           0 :         ndr_print_uint16(ndr, "nt_length", r->nt_length);
    2545           0 :         ndr_print_uint16(ndr, "nt_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->nt_length:r->nt_size);
    2546           0 :         ndr_print_uint32(ndr, "nt_flags", r->nt_flags);
    2547           0 :         ndr_print_uint16(ndr, "lm_length", r->lm_length);
    2548           0 :         ndr_print_uint16(ndr, "lm_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->lm_length:r->lm_size);
    2549           0 :         ndr_print_uint32(ndr, "lm_flags", r->lm_flags);
    2550           0 :         ndr_print_array_uint8(ndr, "nt_history", r->nt_history, r->nt_length);
    2551           0 :         ndr_print_array_uint8(ndr, "lm_history", r->lm_history, r->lm_length);
    2552           0 :         ndr->depth--;
    2553             : }
    2554             : 
    2555           0 : static enum ndr_err_code ndr_push_netr_USER_KEYS2(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEYS2 *r)
    2556             : {
    2557           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2558           0 :         if (ndr_flags & NDR_SCALARS) {
    2559           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2560           0 :                 NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_SCALARS, &r->lmpassword));
    2561           0 :                 NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_SCALARS, &r->ntpassword));
    2562           0 :                 NDR_CHECK(ndr_push_netr_PasswordHistory(ndr, NDR_SCALARS, &r->history));
    2563           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2564             :         }
    2565           0 :         if (ndr_flags & NDR_BUFFERS) {
    2566             :         }
    2567           0 :         return NDR_ERR_SUCCESS;
    2568             : }
    2569             : 
    2570           0 : static enum ndr_err_code ndr_pull_netr_USER_KEYS2(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEYS2 *r)
    2571             : {
    2572           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2573           0 :         if (ndr_flags & NDR_SCALARS) {
    2574           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2575           0 :                 NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_SCALARS, &r->lmpassword));
    2576           0 :                 NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_SCALARS, &r->ntpassword));
    2577           0 :                 NDR_CHECK(ndr_pull_netr_PasswordHistory(ndr, NDR_SCALARS, &r->history));
    2578           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2579             :         }
    2580           0 :         if (ndr_flags & NDR_BUFFERS) {
    2581             :         }
    2582           0 :         return NDR_ERR_SUCCESS;
    2583             : }
    2584             : 
    2585           0 : _PUBLIC_ void ndr_print_netr_USER_KEYS2(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS2 *r)
    2586             : {
    2587           0 :         ndr_print_struct(ndr, name, "netr_USER_KEYS2");
    2588           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2589           0 :         ndr->depth++;
    2590           0 :         ndr_print_netr_USER_KEY16(ndr, "lmpassword", &r->lmpassword);
    2591           0 :         ndr_print_netr_USER_KEY16(ndr, "ntpassword", &r->ntpassword);
    2592           0 :         ndr_print_netr_PasswordHistory(ndr, "history", &r->history);
    2593           0 :         ndr->depth--;
    2594             : }
    2595             : 
    2596           0 : static enum ndr_err_code ndr_push_netr_USER_KEY_UNION(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEY_UNION *r)
    2597             : {
    2598           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2599           0 :         if (ndr_flags & NDR_SCALARS) {
    2600           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2601           0 :                 NDR_CHECK(ndr_push_netr_USER_KEYS2(ndr, NDR_SCALARS, &r->keys2));
    2602           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2603             :         }
    2604           0 :         if (ndr_flags & NDR_BUFFERS) {
    2605             :         }
    2606           0 :         return NDR_ERR_SUCCESS;
    2607             : }
    2608             : 
    2609           0 : static enum ndr_err_code ndr_pull_netr_USER_KEY_UNION(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEY_UNION *r)
    2610             : {
    2611           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2612           0 :         if (ndr_flags & NDR_SCALARS) {
    2613           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2614           0 :                 NDR_CHECK(ndr_pull_netr_USER_KEYS2(ndr, NDR_SCALARS, &r->keys2));
    2615           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2616             :         }
    2617           0 :         if (ndr_flags & NDR_BUFFERS) {
    2618             :         }
    2619           0 :         return NDR_ERR_SUCCESS;
    2620             : }
    2621             : 
    2622           0 : _PUBLIC_ void ndr_print_netr_USER_KEY_UNION(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY_UNION *r)
    2623             : {
    2624           0 :         ndr_print_struct(ndr, name, "netr_USER_KEY_UNION");
    2625           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2626           0 :         ndr->depth++;
    2627           0 :         ndr_print_netr_USER_KEYS2(ndr, "keys2", &r->keys2);
    2628           0 :         ndr->depth--;
    2629             : }
    2630             : 
    2631           0 : _PUBLIC_ enum ndr_err_code ndr_push_netr_USER_KEYS(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEYS *r)
    2632             : {
    2633           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2634           0 :         if (ndr_flags & NDR_SCALARS) {
    2635           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2636           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
    2637           0 :                 NDR_CHECK(ndr_push_netr_USER_KEY_UNION(ndr, NDR_SCALARS, &r->keys));
    2638           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2639             :         }
    2640           0 :         if (ndr_flags & NDR_BUFFERS) {
    2641             :         }
    2642           0 :         return NDR_ERR_SUCCESS;
    2643             : }
    2644             : 
    2645           0 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_USER_KEYS(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEYS *r)
    2646             : {
    2647           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2648           0 :         if (ndr_flags & NDR_SCALARS) {
    2649           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2650           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
    2651           0 :                 NDR_CHECK(ndr_pull_netr_USER_KEY_UNION(ndr, NDR_SCALARS, &r->keys));
    2652           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2653             :         }
    2654           0 :         if (ndr_flags & NDR_BUFFERS) {
    2655             :         }
    2656           0 :         return NDR_ERR_SUCCESS;
    2657             : }
    2658             : 
    2659           0 : static void ndr_print_flags_netr_USER_KEYS(struct ndr_print *ndr, const char *name, int unused, const struct netr_USER_KEYS *r)
    2660             : {
    2661           0 :         ndr_print_netr_USER_KEYS(ndr, name, r);
    2662           0 : }
    2663             : 
    2664           0 : _PUBLIC_ void ndr_print_netr_USER_KEYS(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS *r)
    2665             : {
    2666           0 :         ndr_print_struct(ndr, name, "netr_USER_KEYS");
    2667           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2668           0 :         ndr->depth++;
    2669           0 :         ndr_print_uint32(ndr, "version", r->version);
    2670           0 :         ndr_print_netr_USER_KEY_UNION(ndr, "keys", &r->keys);
    2671           0 :         ndr->depth--;
    2672             : }
    2673             : 
    2674           0 : static enum ndr_err_code ndr_push_netr_USER_PRIVATE_INFO(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_PRIVATE_INFO *r)
    2675             : {
    2676           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2677           0 :         if (ndr_flags & NDR_SCALARS) {
    2678           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2679           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->SensitiveDataFlag));
    2680           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DataLength));
    2681             :                 {
    2682           0 :                         uint32_t _flags_save_uint8 = ndr->flags;
    2683           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2684           0 :                         NDR_CHECK(ndr_push_unique_ptr(ndr, r->SensitiveData));
    2685           0 :                         ndr->flags = _flags_save_uint8;
    2686             :                 }
    2687           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2688             :         }
    2689           0 :         if (ndr_flags & NDR_BUFFERS) {
    2690             :                 {
    2691           0 :                         uint32_t _flags_save_uint8 = ndr->flags;
    2692           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2693           0 :                         if (r->SensitiveData) {
    2694           0 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->DataLength));
    2695           0 :                                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->SensitiveData, r->DataLength));
    2696             :                         }
    2697           0 :                         ndr->flags = _flags_save_uint8;
    2698             :                 }
    2699             :         }
    2700           0 :         return NDR_ERR_SUCCESS;
    2701             : }
    2702             : 
    2703           0 : static enum ndr_err_code ndr_pull_netr_USER_PRIVATE_INFO(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_PRIVATE_INFO *r)
    2704             : {
    2705             :         uint32_t _ptr_SensitiveData;
    2706           0 :         uint32_t size_SensitiveData_1 = 0;
    2707           0 :         TALLOC_CTX *_mem_save_SensitiveData_0 = NULL;
    2708           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2709           0 :         if (ndr_flags & NDR_SCALARS) {
    2710           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2711           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->SensitiveDataFlag));
    2712           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DataLength));
    2713             :                 {
    2714           0 :                         uint32_t _flags_save_uint8 = ndr->flags;
    2715           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2716           0 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_SensitiveData));
    2717           0 :                         if (_ptr_SensitiveData) {
    2718           0 :                                 NDR_PULL_ALLOC(ndr, r->SensitiveData);
    2719             :                         } else {
    2720           0 :                                 r->SensitiveData = NULL;
    2721             :                         }
    2722           0 :                         ndr->flags = _flags_save_uint8;
    2723             :                 }
    2724           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2725             :         }
    2726           0 :         if (ndr_flags & NDR_BUFFERS) {
    2727             :                 {
    2728           0 :                         uint32_t _flags_save_uint8 = ndr->flags;
    2729           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2730           0 :                         if (r->SensitiveData) {
    2731           0 :                                 _mem_save_SensitiveData_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2732           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->SensitiveData, 0);
    2733           0 :                                 NDR_CHECK(ndr_pull_array_size(ndr, &r->SensitiveData));
    2734           0 :                                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->SensitiveData, &size_SensitiveData_1));
    2735           0 :                                 NDR_PULL_ALLOC_N(ndr, r->SensitiveData, size_SensitiveData_1);
    2736           0 :                                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->SensitiveData, size_SensitiveData_1));
    2737           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_SensitiveData_0, 0);
    2738             :                         }
    2739           0 :                         ndr->flags = _flags_save_uint8;
    2740             :                 }
    2741           0 :                 if (r->SensitiveData) {
    2742           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->SensitiveData, r->DataLength));
    2743             :                 }
    2744             :         }
    2745           0 :         return NDR_ERR_SUCCESS;
    2746             : }
    2747             : 
    2748           0 : _PUBLIC_ void ndr_print_netr_USER_PRIVATE_INFO(struct ndr_print *ndr, const char *name, const struct netr_USER_PRIVATE_INFO *r)
    2749             : {
    2750           0 :         ndr_print_struct(ndr, name, "netr_USER_PRIVATE_INFO");
    2751           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2752           0 :         ndr->depth++;
    2753           0 :         ndr_print_uint8(ndr, "SensitiveDataFlag", r->SensitiveDataFlag);
    2754           0 :         ndr_print_uint32(ndr, "DataLength", r->DataLength);
    2755             :         {
    2756           0 :                 uint32_t _flags_save_uint8 = ndr->flags;
    2757           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2758           0 :                 ndr_print_ptr(ndr, "SensitiveData", r->SensitiveData);
    2759           0 :                 ndr->depth++;
    2760           0 :                 if (r->SensitiveData) {
    2761           0 :                         ndr_print_array_uint8(ndr, "SensitiveData", r->SensitiveData, r->DataLength);
    2762             :                 }
    2763           0 :                 ndr->depth--;
    2764           0 :                 ndr->flags = _flags_save_uint8;
    2765             :         }
    2766           0 :         ndr->depth--;
    2767             : }
    2768             : 
    2769           0 : static enum ndr_err_code ndr_push_netr_DELTA_USER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_USER *r)
    2770             : {
    2771           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2772           0 :         if (ndr_flags & NDR_SCALARS) {
    2773           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2774           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
    2775           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
    2776           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    2777           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
    2778           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
    2779           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
    2780           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
    2781           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
    2782           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
    2783           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
    2784           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
    2785           0 :                 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
    2786           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
    2787           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
    2788           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
    2789           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
    2790           0 :                 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
    2791           0 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
    2792           0 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
    2793           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_password_present));
    2794           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_password_present));
    2795           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
    2796           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
    2797           0 :                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
    2798           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code));
    2799           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page));
    2800           0 :                 NDR_CHECK(ndr_push_netr_USER_PRIVATE_INFO(ndr, NDR_SCALARS, &r->user_private_info));
    2801           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    2802           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    2803           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
    2804           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    2805           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    2806           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    2807           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    2808           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    2809           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    2810           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    2811           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2812             :         }
    2813           0 :         if (ndr_flags & NDR_BUFFERS) {
    2814           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
    2815           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
    2816           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
    2817           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
    2818           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
    2819           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
    2820           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
    2821           0 :                 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
    2822           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
    2823           0 :                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
    2824           0 :                 NDR_CHECK(ndr_push_netr_USER_PRIVATE_INFO(ndr, NDR_BUFFERS, &r->user_private_info));
    2825           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    2826           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
    2827           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    2828           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    2829           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    2830             :         }
    2831           0 :         return NDR_ERR_SUCCESS;
    2832             : }
    2833             : 
    2834           0 : static enum ndr_err_code ndr_pull_netr_DELTA_USER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_USER *r)
    2835             : {
    2836           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2837           0 :         if (ndr_flags & NDR_SCALARS) {
    2838           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2839           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
    2840           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
    2841           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    2842           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
    2843           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
    2844           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
    2845           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
    2846           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
    2847           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
    2848           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
    2849           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
    2850           0 :                 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
    2851           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
    2852           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
    2853           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
    2854           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
    2855           0 :                 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
    2856           0 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
    2857           0 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
    2858           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_password_present));
    2859           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_password_present));
    2860           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
    2861           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
    2862           0 :                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
    2863           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code));
    2864           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page));
    2865           0 :                 NDR_CHECK(ndr_pull_netr_USER_PRIVATE_INFO(ndr, NDR_SCALARS, &r->user_private_info));
    2866           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    2867           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    2868           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
    2869           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    2870           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    2871           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    2872           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    2873           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    2874           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    2875           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    2876           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2877             :         }
    2878           0 :         if (ndr_flags & NDR_BUFFERS) {
    2879           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
    2880           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
    2881           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
    2882           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
    2883           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
    2884           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
    2885           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
    2886           0 :                 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
    2887           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
    2888           0 :                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
    2889           0 :                 NDR_CHECK(ndr_pull_netr_USER_PRIVATE_INFO(ndr, NDR_BUFFERS, &r->user_private_info));
    2890           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    2891           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
    2892           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    2893           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    2894           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    2895             :         }
    2896           0 :         return NDR_ERR_SUCCESS;
    2897             : }
    2898             : 
    2899           0 : _PUBLIC_ void ndr_print_netr_DELTA_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_USER *r)
    2900             : {
    2901           0 :         ndr_print_struct(ndr, name, "netr_DELTA_USER");
    2902           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2903           0 :         ndr->depth++;
    2904           0 :         ndr_print_lsa_String(ndr, "account_name", &r->account_name);
    2905           0 :         ndr_print_lsa_String(ndr, "full_name", &r->full_name);
    2906           0 :         ndr_print_uint32(ndr, "rid", r->rid);
    2907           0 :         ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
    2908           0 :         ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
    2909           0 :         ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
    2910           0 :         ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
    2911           0 :         ndr_print_lsa_String(ndr, "description", &r->description);
    2912           0 :         ndr_print_lsa_String(ndr, "workstations", &r->workstations);
    2913           0 :         ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
    2914           0 :         ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
    2915           0 :         ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
    2916           0 :         ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
    2917           0 :         ndr_print_uint16(ndr, "logon_count", r->logon_count);
    2918           0 :         ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
    2919           0 :         ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
    2920           0 :         ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
    2921           0 :         ndr_print_samr_Password(ndr, "lmpassword", &r->lmpassword);
    2922           0 :         ndr_print_samr_Password(ndr, "ntpassword", &r->ntpassword);
    2923           0 :         ndr_print_uint8(ndr, "nt_password_present", r->nt_password_present);
    2924           0 :         ndr_print_uint8(ndr, "lm_password_present", r->lm_password_present);
    2925           0 :         ndr_print_uint8(ndr, "password_expired", r->password_expired);
    2926           0 :         ndr_print_lsa_String(ndr, "comment", &r->comment);
    2927           0 :         ndr_print_lsa_BinaryString(ndr, "parameters", &r->parameters);
    2928           0 :         ndr_print_uint16(ndr, "country_code", r->country_code);
    2929           0 :         ndr_print_uint16(ndr, "code_page", r->code_page);
    2930           0 :         ndr_print_netr_USER_PRIVATE_INFO(ndr, "user_private_info", &r->user_private_info);
    2931           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    2932           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    2933           0 :         ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
    2934           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    2935           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    2936           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    2937           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    2938           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    2939           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    2940           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    2941           0 :         ndr->depth--;
    2942             : }
    2943             : 
    2944           0 : static enum ndr_err_code ndr_push_netr_DELTA_DOMAIN(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DOMAIN *r)
    2945             : {
    2946           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2947           0 :         if (ndr_flags & NDR_SCALARS) {
    2948           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2949           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
    2950           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
    2951           0 :                 NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->force_logoff_time));
    2952           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length));
    2953           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->password_history_length));
    2954           0 :                 NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->max_password_age));
    2955           0 :                 NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->min_password_age));
    2956           0 :                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
    2957           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time));
    2958           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    2959           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    2960           0 :                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->account_lockout));
    2961           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    2962           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    2963           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    2964           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_to_chgpass));
    2965           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    2966           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    2967           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    2968           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2969             :         }
    2970           0 :         if (ndr_flags & NDR_BUFFERS) {
    2971           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
    2972           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
    2973           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    2974           0 :                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->account_lockout));
    2975           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    2976           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    2977           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    2978             :         }
    2979           0 :         return NDR_ERR_SUCCESS;
    2980             : }
    2981             : 
    2982           0 : static enum ndr_err_code ndr_pull_netr_DELTA_DOMAIN(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DOMAIN *r)
    2983             : {
    2984           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2985           0 :         if (ndr_flags & NDR_SCALARS) {
    2986           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2987           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
    2988           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
    2989           0 :                 NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->force_logoff_time));
    2990           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length));
    2991           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->password_history_length));
    2992           0 :                 NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->max_password_age));
    2993           0 :                 NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->min_password_age));
    2994           0 :                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
    2995           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time));
    2996           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    2997           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    2998           0 :                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->account_lockout));
    2999           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3000           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3001           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3002           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_to_chgpass));
    3003           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    3004           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    3005           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    3006           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3007             :         }
    3008           0 :         if (ndr_flags & NDR_BUFFERS) {
    3009           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
    3010           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
    3011           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3012           0 :                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->account_lockout));
    3013           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3014           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3015           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3016             :         }
    3017           0 :         return NDR_ERR_SUCCESS;
    3018             : }
    3019             : 
    3020           0 : _PUBLIC_ void ndr_print_netr_DELTA_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DOMAIN *r)
    3021             : {
    3022           0 :         ndr_print_struct(ndr, name, "netr_DELTA_DOMAIN");
    3023           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3024           0 :         ndr->depth++;
    3025           0 :         ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
    3026           0 :         ndr_print_lsa_String(ndr, "oem_information", &r->oem_information);
    3027           0 :         ndr_print_dlong(ndr, "force_logoff_time", r->force_logoff_time);
    3028           0 :         ndr_print_uint16(ndr, "min_password_length", r->min_password_length);
    3029           0 :         ndr_print_uint16(ndr, "password_history_length", r->password_history_length);
    3030           0 :         ndr_print_dlong(ndr, "max_password_age", r->max_password_age);
    3031           0 :         ndr_print_dlong(ndr, "min_password_age", r->min_password_age);
    3032           0 :         ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
    3033           0 :         ndr_print_NTTIME(ndr, "domain_create_time", r->domain_create_time);
    3034           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    3035           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    3036           0 :         ndr_print_lsa_BinaryString(ndr, "account_lockout", &r->account_lockout);
    3037           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    3038           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    3039           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    3040           0 :         ndr_print_uint32(ndr, "logon_to_chgpass", r->logon_to_chgpass);
    3041           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    3042           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    3043           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    3044           0 :         ndr->depth--;
    3045             : }
    3046             : 
    3047           0 : static enum ndr_err_code ndr_push_netr_DELTA_GROUP(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_GROUP *r)
    3048             : {
    3049           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3050           0 :         if (ndr_flags & NDR_SCALARS) {
    3051           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3052           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->group_name));
    3053           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    3054           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attributes));
    3055           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
    3056           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    3057           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3058           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3059           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3060           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3061           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3062           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    3063           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    3064           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    3065           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    3066           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3067             :         }
    3068           0 :         if (ndr_flags & NDR_BUFFERS) {
    3069           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->group_name));
    3070           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
    3071           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3072           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3073           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3074           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3075           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3076             :         }
    3077           0 :         return NDR_ERR_SUCCESS;
    3078             : }
    3079             : 
    3080           0 : static enum ndr_err_code ndr_pull_netr_DELTA_GROUP(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_GROUP *r)
    3081             : {
    3082           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3083           0 :         if (ndr_flags & NDR_SCALARS) {
    3084           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3085           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->group_name));
    3086           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    3087           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attributes));
    3088           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
    3089           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    3090           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3091           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3092           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3093           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3094           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3095           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    3096           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    3097           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    3098           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    3099           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3100             :         }
    3101           0 :         if (ndr_flags & NDR_BUFFERS) {
    3102           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->group_name));
    3103           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
    3104           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3105           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3106           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3107           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3108           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3109             :         }
    3110           0 :         return NDR_ERR_SUCCESS;
    3111             : }
    3112             : 
    3113           0 : _PUBLIC_ void ndr_print_netr_DELTA_GROUP(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP *r)
    3114             : {
    3115           0 :         ndr_print_struct(ndr, name, "netr_DELTA_GROUP");
    3116           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3117           0 :         ndr->depth++;
    3118           0 :         ndr_print_lsa_String(ndr, "group_name", &r->group_name);
    3119           0 :         ndr_print_uint32(ndr, "rid", r->rid);
    3120           0 :         ndr_print_uint32(ndr, "attributes", r->attributes);
    3121           0 :         ndr_print_lsa_String(ndr, "description", &r->description);
    3122           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    3123           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    3124           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    3125           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    3126           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    3127           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    3128           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    3129           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    3130           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    3131           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    3132           0 :         ndr->depth--;
    3133             : }
    3134             : 
    3135           0 : static enum ndr_err_code ndr_push_netr_DELTA_RENAME(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_RENAME *r)
    3136             : {
    3137           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3138           0 :         if (ndr_flags & NDR_SCALARS) {
    3139           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3140           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->OldName));
    3141           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->NewName));
    3142           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3143           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3144           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3145           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3146           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    3147           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    3148           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    3149           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    3150           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3151             :         }
    3152           0 :         if (ndr_flags & NDR_BUFFERS) {
    3153           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->OldName));
    3154           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->NewName));
    3155           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3156           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3157           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3158           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3159             :         }
    3160           0 :         return NDR_ERR_SUCCESS;
    3161             : }
    3162             : 
    3163           0 : static enum ndr_err_code ndr_pull_netr_DELTA_RENAME(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_RENAME *r)
    3164             : {
    3165           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3166           0 :         if (ndr_flags & NDR_SCALARS) {
    3167           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3168           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->OldName));
    3169           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->NewName));
    3170           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3171           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3172           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3173           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3174           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    3175           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    3176           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    3177           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    3178           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3179             :         }
    3180           0 :         if (ndr_flags & NDR_BUFFERS) {
    3181           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->OldName));
    3182           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->NewName));
    3183           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3184           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3185           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3186           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3187             :         }
    3188           0 :         return NDR_ERR_SUCCESS;
    3189             : }
    3190             : 
    3191           0 : _PUBLIC_ void ndr_print_netr_DELTA_RENAME(struct ndr_print *ndr, const char *name, const struct netr_DELTA_RENAME *r)
    3192             : {
    3193           0 :         ndr_print_struct(ndr, name, "netr_DELTA_RENAME");
    3194           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3195           0 :         ndr->depth++;
    3196           0 :         ndr_print_lsa_String(ndr, "OldName", &r->OldName);
    3197           0 :         ndr_print_lsa_String(ndr, "NewName", &r->NewName);
    3198           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    3199           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    3200           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    3201           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    3202           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    3203           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    3204           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    3205           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    3206           0 :         ndr->depth--;
    3207             : }
    3208             : 
    3209           0 : static enum ndr_err_code ndr_push_netr_DELTA_GROUP_MEMBER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_GROUP_MEMBER *r)
    3210             : {
    3211             :         uint32_t cntr_rids_1;
    3212             :         uint32_t cntr_attribs_1;
    3213           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3214           0 :         if (ndr_flags & NDR_SCALARS) {
    3215           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3216           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids));
    3217           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribs));
    3218           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_rids));
    3219           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
    3220           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
    3221           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
    3222           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
    3223           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3224             :         }
    3225           0 :         if (ndr_flags & NDR_BUFFERS) {
    3226           0 :                 if (r->rids) {
    3227           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_rids));
    3228           0 :                         for (cntr_rids_1 = 0; cntr_rids_1 < (r->num_rids); cntr_rids_1++) {
    3229           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rids[cntr_rids_1]));
    3230             :                         }
    3231             :                 }
    3232           0 :                 if (r->attribs) {
    3233           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_rids));
    3234           0 :                         for (cntr_attribs_1 = 0; cntr_attribs_1 < (r->num_rids); cntr_attribs_1++) {
    3235           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attribs[cntr_attribs_1]));
    3236             :                         }
    3237             :                 }
    3238             :         }
    3239           0 :         return NDR_ERR_SUCCESS;
    3240             : }
    3241             : 
    3242           0 : static enum ndr_err_code ndr_pull_netr_DELTA_GROUP_MEMBER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_GROUP_MEMBER *r)
    3243             : {
    3244             :         uint32_t _ptr_rids;
    3245           0 :         uint32_t size_rids_1 = 0;
    3246             :         uint32_t cntr_rids_1;
    3247           0 :         TALLOC_CTX *_mem_save_rids_0 = NULL;
    3248           0 :         TALLOC_CTX *_mem_save_rids_1 = NULL;
    3249             :         uint32_t _ptr_attribs;
    3250           0 :         uint32_t size_attribs_1 = 0;
    3251             :         uint32_t cntr_attribs_1;
    3252           0 :         TALLOC_CTX *_mem_save_attribs_0 = NULL;
    3253           0 :         TALLOC_CTX *_mem_save_attribs_1 = NULL;
    3254           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3255           0 :         if (ndr_flags & NDR_SCALARS) {
    3256           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3257           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
    3258           0 :                 if (_ptr_rids) {
    3259           0 :                         NDR_PULL_ALLOC(ndr, r->rids);
    3260             :                 } else {
    3261           0 :                         r->rids = NULL;
    3262             :                 }
    3263           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribs));
    3264           0 :                 if (_ptr_attribs) {
    3265           0 :                         NDR_PULL_ALLOC(ndr, r->attribs);
    3266             :                 } else {
    3267           0 :                         r->attribs = NULL;
    3268             :                 }
    3269           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_rids));
    3270           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
    3271           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
    3272           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
    3273           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
    3274           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3275             :         }
    3276           0 :         if (ndr_flags & NDR_BUFFERS) {
    3277           0 :                 if (r->rids) {
    3278           0 :                         _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3279           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
    3280           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
    3281           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->rids, &size_rids_1));
    3282           0 :                         NDR_PULL_ALLOC_N(ndr, r->rids, size_rids_1);
    3283           0 :                         _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3284           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
    3285           0 :                         for (cntr_rids_1 = 0; cntr_rids_1 < (size_rids_1); cntr_rids_1++) {
    3286           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
    3287             :                         }
    3288           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
    3289           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
    3290             :                 }
    3291           0 :                 if (r->attribs) {
    3292           0 :                         _mem_save_attribs_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3293           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->attribs, 0);
    3294           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->attribs));
    3295           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->attribs, &size_attribs_1));
    3296           0 :                         NDR_PULL_ALLOC_N(ndr, r->attribs, size_attribs_1);
    3297           0 :                         _mem_save_attribs_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3298           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->attribs, 0);
    3299           0 :                         for (cntr_attribs_1 = 0; cntr_attribs_1 < (size_attribs_1); cntr_attribs_1++) {
    3300           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attribs[cntr_attribs_1]));
    3301             :                         }
    3302           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribs_1, 0);
    3303           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribs_0, 0);
    3304             :                 }
    3305           0 :                 if (r->rids) {
    3306           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->rids, r->num_rids));
    3307             :                 }
    3308           0 :                 if (r->attribs) {
    3309           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->attribs, r->num_rids));
    3310             :                 }
    3311             :         }
    3312           0 :         return NDR_ERR_SUCCESS;
    3313             : }
    3314             : 
    3315           0 : _PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP_MEMBER *r)
    3316             : {
    3317             :         uint32_t cntr_rids_1;
    3318             :         uint32_t cntr_attribs_1;
    3319           0 :         ndr_print_struct(ndr, name, "netr_DELTA_GROUP_MEMBER");
    3320           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3321           0 :         ndr->depth++;
    3322           0 :         ndr_print_ptr(ndr, "rids", r->rids);
    3323           0 :         ndr->depth++;
    3324           0 :         if (r->rids) {
    3325           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->num_rids);
    3326           0 :                 ndr->depth++;
    3327           0 :                 for (cntr_rids_1 = 0; cntr_rids_1 < (r->num_rids); cntr_rids_1++) {
    3328           0 :                         ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_1]);
    3329             :                 }
    3330           0 :                 ndr->depth--;
    3331             :         }
    3332           0 :         ndr->depth--;
    3333           0 :         ndr_print_ptr(ndr, "attribs", r->attribs);
    3334           0 :         ndr->depth++;
    3335           0 :         if (r->attribs) {
    3336           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "attribs", (int)r->num_rids);
    3337           0 :                 ndr->depth++;
    3338           0 :                 for (cntr_attribs_1 = 0; cntr_attribs_1 < (r->num_rids); cntr_attribs_1++) {
    3339           0 :                         ndr_print_uint32(ndr, "attribs", r->attribs[cntr_attribs_1]);
    3340             :                 }
    3341           0 :                 ndr->depth--;
    3342             :         }
    3343           0 :         ndr->depth--;
    3344           0 :         ndr_print_uint32(ndr, "num_rids", r->num_rids);
    3345           0 :         ndr_print_uint32(ndr, "unknown1", r->unknown1);
    3346           0 :         ndr_print_uint32(ndr, "unknown2", r->unknown2);
    3347           0 :         ndr_print_uint32(ndr, "unknown3", r->unknown3);
    3348           0 :         ndr_print_uint32(ndr, "unknown4", r->unknown4);
    3349           0 :         ndr->depth--;
    3350             : }
    3351             : 
    3352           0 : static enum ndr_err_code ndr_push_netr_DELTA_ALIAS(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ALIAS *r)
    3353             : {
    3354           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3355           0 :         if (ndr_flags & NDR_SCALARS) {
    3356           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3357           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->alias_name));
    3358           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    3359           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    3360           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3361           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
    3362           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3363           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3364           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3365           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    3366           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    3367           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    3368           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    3369           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3370             :         }
    3371           0 :         if (ndr_flags & NDR_BUFFERS) {
    3372           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->alias_name));
    3373           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3374           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
    3375           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3376           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3377           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3378             :         }
    3379           0 :         return NDR_ERR_SUCCESS;
    3380             : }
    3381             : 
    3382           0 : static enum ndr_err_code ndr_pull_netr_DELTA_ALIAS(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ALIAS *r)
    3383             : {
    3384           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3385           0 :         if (ndr_flags & NDR_SCALARS) {
    3386           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3387           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->alias_name));
    3388           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    3389           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    3390           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3391           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
    3392           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3393           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3394           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3395           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    3396           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    3397           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    3398           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    3399           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3400             :         }
    3401           0 :         if (ndr_flags & NDR_BUFFERS) {
    3402           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->alias_name));
    3403           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3404           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
    3405           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3406           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3407           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3408             :         }
    3409           0 :         return NDR_ERR_SUCCESS;
    3410             : }
    3411             : 
    3412           0 : _PUBLIC_ void ndr_print_netr_DELTA_ALIAS(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS *r)
    3413             : {
    3414           0 :         ndr_print_struct(ndr, name, "netr_DELTA_ALIAS");
    3415           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3416           0 :         ndr->depth++;
    3417           0 :         ndr_print_lsa_String(ndr, "alias_name", &r->alias_name);
    3418           0 :         ndr_print_uint32(ndr, "rid", r->rid);
    3419           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    3420           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    3421           0 :         ndr_print_lsa_String(ndr, "description", &r->description);
    3422           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    3423           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    3424           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    3425           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    3426           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    3427           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    3428           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    3429           0 :         ndr->depth--;
    3430             : }
    3431             : 
    3432           0 : static enum ndr_err_code ndr_push_netr_DELTA_ALIAS_MEMBER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ALIAS_MEMBER *r)
    3433             : {
    3434           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3435           0 :         if (ndr_flags & NDR_SCALARS) {
    3436           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3437           0 :                 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS, &r->sids));
    3438           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
    3439           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
    3440           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
    3441           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
    3442           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3443             :         }
    3444           0 :         if (ndr_flags & NDR_BUFFERS) {
    3445           0 :                 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_BUFFERS, &r->sids));
    3446             :         }
    3447           0 :         return NDR_ERR_SUCCESS;
    3448             : }
    3449             : 
    3450           0 : static enum ndr_err_code ndr_pull_netr_DELTA_ALIAS_MEMBER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ALIAS_MEMBER *r)
    3451             : {
    3452           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3453           0 :         if (ndr_flags & NDR_SCALARS) {
    3454           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3455           0 :                 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS, &r->sids));
    3456           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
    3457           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
    3458           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
    3459           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
    3460           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3461             :         }
    3462           0 :         if (ndr_flags & NDR_BUFFERS) {
    3463           0 :                 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_BUFFERS, &r->sids));
    3464             :         }
    3465           0 :         return NDR_ERR_SUCCESS;
    3466             : }
    3467             : 
    3468           0 : _PUBLIC_ void ndr_print_netr_DELTA_ALIAS_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS_MEMBER *r)
    3469             : {
    3470           0 :         ndr_print_struct(ndr, name, "netr_DELTA_ALIAS_MEMBER");
    3471           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3472           0 :         ndr->depth++;
    3473           0 :         ndr_print_lsa_SidArray(ndr, "sids", &r->sids);
    3474           0 :         ndr_print_uint32(ndr, "unknown1", r->unknown1);
    3475           0 :         ndr_print_uint32(ndr, "unknown2", r->unknown2);
    3476           0 :         ndr_print_uint32(ndr, "unknown3", r->unknown3);
    3477           0 :         ndr_print_uint32(ndr, "unknown4", r->unknown4);
    3478           0 :         ndr->depth--;
    3479             : }
    3480             : 
    3481           0 : static enum ndr_err_code ndr_push_netr_QUOTA_LIMITS(struct ndr_push *ndr, int ndr_flags, const struct netr_QUOTA_LIMITS *r)
    3482             : {
    3483           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3484           0 :         if (ndr_flags & NDR_SCALARS) {
    3485           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    3486           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagedpoollimit));
    3487           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nonpagedpoollimit));
    3488           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minimumworkingsetsize));
    3489           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximumworkingsetsize));
    3490           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagefilelimit));
    3491           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->timelimit));
    3492           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    3493             :         }
    3494           0 :         if (ndr_flags & NDR_BUFFERS) {
    3495             :         }
    3496           0 :         return NDR_ERR_SUCCESS;
    3497             : }
    3498             : 
    3499           0 : static enum ndr_err_code ndr_pull_netr_QUOTA_LIMITS(struct ndr_pull *ndr, int ndr_flags, struct netr_QUOTA_LIMITS *r)
    3500             : {
    3501           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3502           0 :         if (ndr_flags & NDR_SCALARS) {
    3503           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    3504           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagedpoollimit));
    3505           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nonpagedpoollimit));
    3506           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minimumworkingsetsize));
    3507           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximumworkingsetsize));
    3508           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagefilelimit));
    3509           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->timelimit));
    3510           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    3511             :         }
    3512           0 :         if (ndr_flags & NDR_BUFFERS) {
    3513             :         }
    3514           0 :         return NDR_ERR_SUCCESS;
    3515             : }
    3516             : 
    3517           0 : _PUBLIC_ void ndr_print_netr_QUOTA_LIMITS(struct ndr_print *ndr, const char *name, const struct netr_QUOTA_LIMITS *r)
    3518             : {
    3519           0 :         ndr_print_struct(ndr, name, "netr_QUOTA_LIMITS");
    3520           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3521           0 :         ndr->depth++;
    3522           0 :         ndr_print_uint32(ndr, "pagedpoollimit", r->pagedpoollimit);
    3523           0 :         ndr_print_uint32(ndr, "nonpagedpoollimit", r->nonpagedpoollimit);
    3524           0 :         ndr_print_uint32(ndr, "minimumworkingsetsize", r->minimumworkingsetsize);
    3525           0 :         ndr_print_uint32(ndr, "maximumworkingsetsize", r->maximumworkingsetsize);
    3526           0 :         ndr_print_uint32(ndr, "pagefilelimit", r->pagefilelimit);
    3527           0 :         ndr_print_NTTIME(ndr, "timelimit", r->timelimit);
    3528           0 :         ndr->depth--;
    3529             : }
    3530             : 
    3531           0 : static enum ndr_err_code ndr_push_netr_DELTA_POLICY(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_POLICY *r)
    3532             : {
    3533             :         uint32_t cntr_eventauditoptions_1;
    3534           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3535           0 :         if (ndr_flags & NDR_SCALARS) {
    3536           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3537           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlogsize));
    3538           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->auditretentionperiod));
    3539           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->auditingmode));
    3540           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxauditeventcount));
    3541           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->eventauditoptions));
    3542           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary_domain_name));
    3543           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    3544           0 :                 NDR_CHECK(ndr_push_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quota_limits));
    3545           0 :                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
    3546           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->db_create_time));
    3547           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    3548           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3549           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3550           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3551           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3552           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3553           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    3554           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    3555           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    3556           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    3557           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3558             :         }
    3559           0 :         if (ndr_flags & NDR_BUFFERS) {
    3560           0 :                 if (r->eventauditoptions) {
    3561           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->maxauditeventcount + 1));
    3562           0 :                         for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < (r->maxauditeventcount + 1); cntr_eventauditoptions_1++) {
    3563           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->eventauditoptions[cntr_eventauditoptions_1]));
    3564             :                         }
    3565             :                 }
    3566           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary_domain_name));
    3567           0 :                 if (r->sid) {
    3568           0 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    3569             :                 }
    3570           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3571           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3572           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3573           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3574           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3575             :         }
    3576           0 :         return NDR_ERR_SUCCESS;
    3577             : }
    3578             : 
    3579           0 : static enum ndr_err_code ndr_pull_netr_DELTA_POLICY(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_POLICY *r)
    3580             : {
    3581             :         uint32_t _ptr_eventauditoptions;
    3582           0 :         uint32_t size_eventauditoptions_1 = 0;
    3583             :         uint32_t cntr_eventauditoptions_1;
    3584           0 :         TALLOC_CTX *_mem_save_eventauditoptions_0 = NULL;
    3585           0 :         TALLOC_CTX *_mem_save_eventauditoptions_1 = NULL;
    3586             :         uint32_t _ptr_sid;
    3587           0 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    3588           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3589           0 :         if (ndr_flags & NDR_SCALARS) {
    3590           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3591           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlogsize));
    3592           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->auditretentionperiod));
    3593           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->auditingmode));
    3594           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxauditeventcount));
    3595           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_eventauditoptions));
    3596           0 :                 if (_ptr_eventauditoptions) {
    3597           0 :                         NDR_PULL_ALLOC(ndr, r->eventauditoptions);
    3598             :                 } else {
    3599           0 :                         r->eventauditoptions = NULL;
    3600             :                 }
    3601           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary_domain_name));
    3602           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    3603           0 :                 if (_ptr_sid) {
    3604           0 :                         NDR_PULL_ALLOC(ndr, r->sid);
    3605             :                 } else {
    3606           0 :                         r->sid = NULL;
    3607             :                 }
    3608           0 :                 NDR_CHECK(ndr_pull_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quota_limits));
    3609           0 :                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
    3610           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->db_create_time));
    3611           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    3612           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3613           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3614           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3615           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3616           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3617           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    3618           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    3619           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    3620           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    3621           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3622             :         }
    3623           0 :         if (ndr_flags & NDR_BUFFERS) {
    3624           0 :                 if (r->eventauditoptions) {
    3625           0 :                         _mem_save_eventauditoptions_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3626           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->eventauditoptions, 0);
    3627           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->eventauditoptions));
    3628           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->eventauditoptions, &size_eventauditoptions_1));
    3629           0 :                         NDR_PULL_ALLOC_N(ndr, r->eventauditoptions, size_eventauditoptions_1);
    3630           0 :                         _mem_save_eventauditoptions_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3631           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->eventauditoptions, 0);
    3632           0 :                         for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < (size_eventauditoptions_1); cntr_eventauditoptions_1++) {
    3633           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->eventauditoptions[cntr_eventauditoptions_1]));
    3634             :                         }
    3635           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventauditoptions_1, 0);
    3636           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventauditoptions_0, 0);
    3637             :                 }
    3638           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary_domain_name));
    3639           0 :                 if (r->sid) {
    3640           0 :                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3641           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    3642           0 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    3643           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    3644             :                 }
    3645           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3646           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3647           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3648           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3649           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3650           0 :                 if (r->eventauditoptions) {
    3651           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->eventauditoptions, r->maxauditeventcount + 1));
    3652             :                 }
    3653             :         }
    3654           0 :         return NDR_ERR_SUCCESS;
    3655             : }
    3656             : 
    3657           0 : _PUBLIC_ void ndr_print_netr_DELTA_POLICY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_POLICY *r)
    3658             : {
    3659             :         uint32_t cntr_eventauditoptions_1;
    3660           0 :         ndr_print_struct(ndr, name, "netr_DELTA_POLICY");
    3661           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3662           0 :         ndr->depth++;
    3663           0 :         ndr_print_uint32(ndr, "maxlogsize", r->maxlogsize);
    3664           0 :         ndr_print_NTTIME(ndr, "auditretentionperiod", r->auditretentionperiod);
    3665           0 :         ndr_print_uint8(ndr, "auditingmode", r->auditingmode);
    3666           0 :         ndr_print_uint32(ndr, "maxauditeventcount", r->maxauditeventcount);
    3667           0 :         ndr_print_ptr(ndr, "eventauditoptions", r->eventauditoptions);
    3668           0 :         ndr->depth++;
    3669           0 :         if (r->eventauditoptions) {
    3670           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "eventauditoptions", (int)r->maxauditeventcount + 1);
    3671           0 :                 ndr->depth++;
    3672           0 :                 for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < (r->maxauditeventcount + 1); cntr_eventauditoptions_1++) {
    3673           0 :                         ndr_print_uint32(ndr, "eventauditoptions", r->eventauditoptions[cntr_eventauditoptions_1]);
    3674             :                 }
    3675           0 :                 ndr->depth--;
    3676             :         }
    3677           0 :         ndr->depth--;
    3678           0 :         ndr_print_lsa_String(ndr, "primary_domain_name", &r->primary_domain_name);
    3679           0 :         ndr_print_ptr(ndr, "sid", r->sid);
    3680           0 :         ndr->depth++;
    3681           0 :         if (r->sid) {
    3682           0 :                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    3683             :         }
    3684           0 :         ndr->depth--;
    3685           0 :         ndr_print_netr_QUOTA_LIMITS(ndr, "quota_limits", &r->quota_limits);
    3686           0 :         ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
    3687           0 :         ndr_print_NTTIME(ndr, "db_create_time", r->db_create_time);
    3688           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    3689           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    3690           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    3691           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    3692           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    3693           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    3694           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    3695           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    3696           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    3697           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    3698           0 :         ndr->depth--;
    3699             : }
    3700             : 
    3701           0 : static enum ndr_err_code ndr_push_netr_DELTA_TRUSTED_DOMAIN(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_TRUSTED_DOMAIN *r)
    3702             : {
    3703             :         uint32_t cntr_controller_names_1;
    3704           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3705           0 :         if (ndr_flags & NDR_SCALARS) {
    3706           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3707           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
    3708           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_controllers));
    3709           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->controller_names));
    3710           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    3711           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3712           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3713           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3714           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3715           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3716           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->posix_offset));
    3717           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    3718           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    3719           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    3720           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3721             :         }
    3722           0 :         if (ndr_flags & NDR_BUFFERS) {
    3723           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
    3724           0 :                 if (r->controller_names) {
    3725           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_controllers));
    3726           0 :                         for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (r->num_controllers); cntr_controller_names_1++) {
    3727           0 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->controller_names[cntr_controller_names_1]));
    3728             :                         }
    3729           0 :                         for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (r->num_controllers); cntr_controller_names_1++) {
    3730           0 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->controller_names[cntr_controller_names_1]));
    3731             :                         }
    3732             :                 }
    3733           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3734           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3735           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3736           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3737           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3738             :         }
    3739           0 :         return NDR_ERR_SUCCESS;
    3740             : }
    3741             : 
    3742           0 : static enum ndr_err_code ndr_pull_netr_DELTA_TRUSTED_DOMAIN(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_TRUSTED_DOMAIN *r)
    3743             : {
    3744             :         uint32_t _ptr_controller_names;
    3745           0 :         uint32_t size_controller_names_1 = 0;
    3746             :         uint32_t cntr_controller_names_1;
    3747           0 :         TALLOC_CTX *_mem_save_controller_names_0 = NULL;
    3748           0 :         TALLOC_CTX *_mem_save_controller_names_1 = NULL;
    3749           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3750           0 :         if (ndr_flags & NDR_SCALARS) {
    3751           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3752           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
    3753           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_controllers));
    3754           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_controller_names));
    3755           0 :                 if (_ptr_controller_names) {
    3756           0 :                         NDR_PULL_ALLOC(ndr, r->controller_names);
    3757             :                 } else {
    3758           0 :                         r->controller_names = NULL;
    3759             :                 }
    3760           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    3761           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3762           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3763           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3764           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3765           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3766           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->posix_offset));
    3767           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    3768           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    3769           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    3770           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3771             :         }
    3772           0 :         if (ndr_flags & NDR_BUFFERS) {
    3773           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
    3774           0 :                 if (r->controller_names) {
    3775           0 :                         _mem_save_controller_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3776           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->controller_names, 0);
    3777           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->controller_names));
    3778           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->controller_names, &size_controller_names_1));
    3779           0 :                         NDR_PULL_ALLOC_N(ndr, r->controller_names, size_controller_names_1);
    3780           0 :                         _mem_save_controller_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3781           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->controller_names, 0);
    3782           0 :                         for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (size_controller_names_1); cntr_controller_names_1++) {
    3783           0 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->controller_names[cntr_controller_names_1]));
    3784             :                         }
    3785           0 :                         for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (size_controller_names_1); cntr_controller_names_1++) {
    3786           0 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->controller_names[cntr_controller_names_1]));
    3787             :                         }
    3788           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_controller_names_1, 0);
    3789           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_controller_names_0, 0);
    3790             :                 }
    3791           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3792           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3793           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3794           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3795           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3796           0 :                 if (r->controller_names) {
    3797           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->controller_names, r->num_controllers));
    3798             :                 }
    3799           0 :                 for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (size_controller_names_1); cntr_controller_names_1++) {
    3800             :                 }
    3801             :         }
    3802           0 :         return NDR_ERR_SUCCESS;
    3803             : }
    3804             : 
    3805           0 : _PUBLIC_ void ndr_print_netr_DELTA_TRUSTED_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_TRUSTED_DOMAIN *r)
    3806             : {
    3807             :         uint32_t cntr_controller_names_1;
    3808           0 :         ndr_print_struct(ndr, name, "netr_DELTA_TRUSTED_DOMAIN");
    3809           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3810           0 :         ndr->depth++;
    3811           0 :         ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
    3812           0 :         ndr_print_uint32(ndr, "num_controllers", r->num_controllers);
    3813           0 :         ndr_print_ptr(ndr, "controller_names", r->controller_names);
    3814           0 :         ndr->depth++;
    3815           0 :         if (r->controller_names) {
    3816           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "controller_names", (int)r->num_controllers);
    3817           0 :                 ndr->depth++;
    3818           0 :                 for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (r->num_controllers); cntr_controller_names_1++) {
    3819           0 :                         ndr_print_lsa_String(ndr, "controller_names", &r->controller_names[cntr_controller_names_1]);
    3820             :                 }
    3821           0 :                 ndr->depth--;
    3822             :         }
    3823           0 :         ndr->depth--;
    3824           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    3825           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    3826           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    3827           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    3828           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    3829           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    3830           0 :         ndr_print_uint32(ndr, "posix_offset", r->posix_offset);
    3831           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    3832           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    3833           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    3834           0 :         ndr->depth--;
    3835             : }
    3836             : 
    3837           0 : static enum ndr_err_code ndr_push_netr_DELTA_ACCOUNT(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ACCOUNT *r)
    3838             : {
    3839             :         uint32_t cntr_privilege_attrib_1;
    3840             :         uint32_t cntr_privilege_name_1;
    3841           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3842           0 :         if (ndr_flags & NDR_SCALARS) {
    3843           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3844           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_entries));
    3845           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_control));
    3846           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->privilege_attrib));
    3847           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->privilege_name));
    3848           0 :                 NDR_CHECK(ndr_push_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quotalimits));
    3849           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->system_flags));
    3850           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    3851           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3852           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3853           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3854           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3855           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3856           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    3857           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    3858           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    3859           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    3860           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3861             :         }
    3862           0 :         if (ndr_flags & NDR_BUFFERS) {
    3863           0 :                 if (r->privilege_attrib) {
    3864           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->privilege_entries));
    3865           0 :                         for (cntr_privilege_attrib_1 = 0; cntr_privilege_attrib_1 < (r->privilege_entries); cntr_privilege_attrib_1++) {
    3866           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_attrib[cntr_privilege_attrib_1]));
    3867             :                         }
    3868             :                 }
    3869           0 :                 if (r->privilege_name) {
    3870           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->privilege_entries));
    3871           0 :                         for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (r->privilege_entries); cntr_privilege_name_1++) {
    3872           0 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->privilege_name[cntr_privilege_name_1]));
    3873             :                         }
    3874           0 :                         for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (r->privilege_entries); cntr_privilege_name_1++) {
    3875           0 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->privilege_name[cntr_privilege_name_1]));
    3876             :                         }
    3877             :                 }
    3878           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3879           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3880           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3881           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3882           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3883             :         }
    3884           0 :         return NDR_ERR_SUCCESS;
    3885             : }
    3886             : 
    3887           0 : static enum ndr_err_code ndr_pull_netr_DELTA_ACCOUNT(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ACCOUNT *r)
    3888             : {
    3889             :         uint32_t _ptr_privilege_attrib;
    3890           0 :         uint32_t size_privilege_attrib_1 = 0;
    3891             :         uint32_t cntr_privilege_attrib_1;
    3892           0 :         TALLOC_CTX *_mem_save_privilege_attrib_0 = NULL;
    3893           0 :         TALLOC_CTX *_mem_save_privilege_attrib_1 = NULL;
    3894             :         uint32_t _ptr_privilege_name;
    3895           0 :         uint32_t size_privilege_name_1 = 0;
    3896             :         uint32_t cntr_privilege_name_1;
    3897           0 :         TALLOC_CTX *_mem_save_privilege_name_0 = NULL;
    3898           0 :         TALLOC_CTX *_mem_save_privilege_name_1 = NULL;
    3899           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3900           0 :         if (ndr_flags & NDR_SCALARS) {
    3901           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3902           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_entries));
    3903           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_control));
    3904           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privilege_attrib));
    3905           0 :                 if (_ptr_privilege_attrib) {
    3906           0 :                         NDR_PULL_ALLOC(ndr, r->privilege_attrib);
    3907             :                 } else {
    3908           0 :                         r->privilege_attrib = NULL;
    3909             :                 }
    3910           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privilege_name));
    3911           0 :                 if (_ptr_privilege_name) {
    3912           0 :                         NDR_PULL_ALLOC(ndr, r->privilege_name);
    3913             :                 } else {
    3914           0 :                         r->privilege_name = NULL;
    3915             :                 }
    3916           0 :                 NDR_CHECK(ndr_pull_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quotalimits));
    3917           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->system_flags));
    3918           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    3919           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3920           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3921           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3922           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3923           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3924           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    3925           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    3926           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    3927           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    3928           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3929             :         }
    3930           0 :         if (ndr_flags & NDR_BUFFERS) {
    3931           0 :                 if (r->privilege_attrib) {
    3932           0 :                         _mem_save_privilege_attrib_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3933           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->privilege_attrib, 0);
    3934           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->privilege_attrib));
    3935           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->privilege_attrib, &size_privilege_attrib_1));
    3936           0 :                         NDR_PULL_ALLOC_N(ndr, r->privilege_attrib, size_privilege_attrib_1);
    3937           0 :                         _mem_save_privilege_attrib_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3938           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->privilege_attrib, 0);
    3939           0 :                         for (cntr_privilege_attrib_1 = 0; cntr_privilege_attrib_1 < (size_privilege_attrib_1); cntr_privilege_attrib_1++) {
    3940           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_attrib[cntr_privilege_attrib_1]));
    3941             :                         }
    3942           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_attrib_1, 0);
    3943           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_attrib_0, 0);
    3944             :                 }
    3945           0 :                 if (r->privilege_name) {
    3946           0 :                         _mem_save_privilege_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3947           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->privilege_name, 0);
    3948           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->privilege_name));
    3949           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->privilege_name, &size_privilege_name_1));
    3950           0 :                         NDR_PULL_ALLOC_N(ndr, r->privilege_name, size_privilege_name_1);
    3951           0 :                         _mem_save_privilege_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3952           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->privilege_name, 0);
    3953           0 :                         for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (size_privilege_name_1); cntr_privilege_name_1++) {
    3954           0 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->privilege_name[cntr_privilege_name_1]));
    3955             :                         }
    3956           0 :                         for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (size_privilege_name_1); cntr_privilege_name_1++) {
    3957           0 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->privilege_name[cntr_privilege_name_1]));
    3958             :                         }
    3959           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_name_1, 0);
    3960           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_name_0, 0);
    3961             :                 }
    3962           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3963           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3964           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3965           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3966           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3967           0 :                 if (r->privilege_attrib) {
    3968           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->privilege_attrib, r->privilege_entries));
    3969             :                 }
    3970           0 :                 if (r->privilege_name) {
    3971           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->privilege_name, r->privilege_entries));
    3972             :                 }
    3973           0 :                 for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (size_privilege_name_1); cntr_privilege_name_1++) {
    3974             :                 }
    3975             :         }
    3976           0 :         return NDR_ERR_SUCCESS;
    3977             : }
    3978             : 
    3979           0 : _PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ACCOUNT *r)
    3980             : {
    3981             :         uint32_t cntr_privilege_attrib_1;
    3982             :         uint32_t cntr_privilege_name_1;
    3983           0 :         ndr_print_struct(ndr, name, "netr_DELTA_ACCOUNT");
    3984           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3985           0 :         ndr->depth++;
    3986           0 :         ndr_print_uint32(ndr, "privilege_entries", r->privilege_entries);
    3987           0 :         ndr_print_uint32(ndr, "privilege_control", r->privilege_control);
    3988           0 :         ndr_print_ptr(ndr, "privilege_attrib", r->privilege_attrib);
    3989           0 :         ndr->depth++;
    3990           0 :         if (r->privilege_attrib) {
    3991           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "privilege_attrib", (int)r->privilege_entries);
    3992           0 :                 ndr->depth++;
    3993           0 :                 for (cntr_privilege_attrib_1 = 0; cntr_privilege_attrib_1 < (r->privilege_entries); cntr_privilege_attrib_1++) {
    3994           0 :                         ndr_print_uint32(ndr, "privilege_attrib", r->privilege_attrib[cntr_privilege_attrib_1]);
    3995             :                 }
    3996           0 :                 ndr->depth--;
    3997             :         }
    3998           0 :         ndr->depth--;
    3999           0 :         ndr_print_ptr(ndr, "privilege_name", r->privilege_name);
    4000           0 :         ndr->depth++;
    4001           0 :         if (r->privilege_name) {
    4002           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "privilege_name", (int)r->privilege_entries);
    4003           0 :                 ndr->depth++;
    4004           0 :                 for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (r->privilege_entries); cntr_privilege_name_1++) {
    4005           0 :                         ndr_print_lsa_String(ndr, "privilege_name", &r->privilege_name[cntr_privilege_name_1]);
    4006             :                 }
    4007           0 :                 ndr->depth--;
    4008             :         }
    4009           0 :         ndr->depth--;
    4010           0 :         ndr_print_netr_QUOTA_LIMITS(ndr, "quotalimits", &r->quotalimits);
    4011           0 :         ndr_print_uint32(ndr, "system_flags", r->system_flags);
    4012           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    4013           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    4014           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    4015           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    4016           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    4017           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    4018           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    4019           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    4020           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    4021           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    4022           0 :         ndr->depth--;
    4023             : }
    4024             : 
    4025           0 : static enum ndr_err_code ndr_push_netr_CIPHER_VALUE(struct ndr_push *ndr, int ndr_flags, const struct netr_CIPHER_VALUE *r)
    4026             : {
    4027           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4028           0 :         if (ndr_flags & NDR_SCALARS) {
    4029           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4030           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
    4031           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlen));
    4032           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->cipher_data));
    4033           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4034             :         }
    4035           0 :         if (ndr_flags & NDR_BUFFERS) {
    4036           0 :                 if (r->cipher_data) {
    4037           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->maxlen));
    4038           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4039           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->len));
    4040           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->cipher_data, r->len));
    4041             :                 }
    4042             :         }
    4043           0 :         return NDR_ERR_SUCCESS;
    4044             : }
    4045             : 
    4046           0 : static enum ndr_err_code ndr_pull_netr_CIPHER_VALUE(struct ndr_pull *ndr, int ndr_flags, struct netr_CIPHER_VALUE *r)
    4047             : {
    4048             :         uint32_t _ptr_cipher_data;
    4049           0 :         uint32_t size_cipher_data_1 = 0;
    4050           0 :         uint32_t length_cipher_data_1 = 0;
    4051           0 :         TALLOC_CTX *_mem_save_cipher_data_0 = NULL;
    4052           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4053           0 :         if (ndr_flags & NDR_SCALARS) {
    4054           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4055           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
    4056           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlen));
    4057           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_cipher_data));
    4058           0 :                 if (_ptr_cipher_data) {
    4059           0 :                         NDR_PULL_ALLOC(ndr, r->cipher_data);
    4060             :                 } else {
    4061           0 :                         r->cipher_data = NULL;
    4062             :                 }
    4063           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4064             :         }
    4065           0 :         if (ndr_flags & NDR_BUFFERS) {
    4066           0 :                 if (r->cipher_data) {
    4067           0 :                         _mem_save_cipher_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4068           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->cipher_data, 0);
    4069           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->cipher_data));
    4070           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->cipher_data));
    4071           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->cipher_data, &size_cipher_data_1));
    4072           0 :                         NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->cipher_data, &length_cipher_data_1));
    4073           0 :                         if (length_cipher_data_1 > size_cipher_data_1) {
    4074           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_cipher_data_1, length_cipher_data_1);
    4075             :                         }
    4076           0 :                         NDR_PULL_ALLOC_N(ndr, r->cipher_data, size_cipher_data_1);
    4077           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->cipher_data, length_cipher_data_1));
    4078           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cipher_data_0, 0);
    4079             :                 }
    4080           0 :                 if (r->cipher_data) {
    4081           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->cipher_data, r->maxlen));
    4082             :                 }
    4083           0 :                 if (r->cipher_data) {
    4084           0 :                         NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->cipher_data, r->len));
    4085             :                 }
    4086             :         }
    4087           0 :         return NDR_ERR_SUCCESS;
    4088             : }
    4089             : 
    4090           0 : _PUBLIC_ void ndr_print_netr_CIPHER_VALUE(struct ndr_print *ndr, const char *name, const struct netr_CIPHER_VALUE *r)
    4091             : {
    4092           0 :         ndr_print_struct(ndr, name, "netr_CIPHER_VALUE");
    4093           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4094           0 :         ndr->depth++;
    4095           0 :         ndr_print_uint32(ndr, "len", r->len);
    4096           0 :         ndr_print_uint32(ndr, "maxlen", r->maxlen);
    4097           0 :         ndr_print_ptr(ndr, "cipher_data", r->cipher_data);
    4098           0 :         ndr->depth++;
    4099           0 :         if (r->cipher_data) {
    4100           0 :                 ndr_print_array_uint8(ndr, "cipher_data", r->cipher_data, r->len);
    4101             :         }
    4102           0 :         ndr->depth--;
    4103           0 :         ndr->depth--;
    4104             : }
    4105             : 
    4106           0 : static enum ndr_err_code ndr_push_netr_DELTA_SECRET(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_SECRET *r)
    4107             : {
    4108           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4109           0 :         if (ndr_flags & NDR_SCALARS) {
    4110           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4111           0 :                 NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->current_cipher));
    4112           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->current_cipher_set_time));
    4113           0 :                 NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->old_cipher));
    4114           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->old_cipher_set_time));
    4115           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    4116           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    4117           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    4118           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    4119           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    4120           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    4121           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    4122           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    4123           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    4124           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    4125           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4126             :         }
    4127           0 :         if (ndr_flags & NDR_BUFFERS) {
    4128           0 :                 NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->current_cipher));
    4129           0 :                 NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->old_cipher));
    4130           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    4131           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    4132           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    4133           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    4134           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    4135             :         }
    4136           0 :         return NDR_ERR_SUCCESS;
    4137             : }
    4138             : 
    4139           0 : static enum ndr_err_code ndr_pull_netr_DELTA_SECRET(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_SECRET *r)
    4140             : {
    4141           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4142           0 :         if (ndr_flags & NDR_SCALARS) {
    4143           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4144           0 :                 NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->current_cipher));
    4145           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->current_cipher_set_time));
    4146           0 :                 NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->old_cipher));
    4147           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->old_cipher_set_time));
    4148           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    4149           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    4150           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    4151           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    4152           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    4153           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    4154           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    4155           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    4156           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    4157           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    4158           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4159             :         }
    4160           0 :         if (ndr_flags & NDR_BUFFERS) {
    4161           0 :                 NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->current_cipher));
    4162           0 :                 NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->old_cipher));
    4163           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    4164           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    4165           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    4166           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    4167           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    4168             :         }
    4169           0 :         return NDR_ERR_SUCCESS;
    4170             : }
    4171             : 
    4172           0 : _PUBLIC_ void ndr_print_netr_DELTA_SECRET(struct ndr_print *ndr, const char *name, const struct netr_DELTA_SECRET *r)
    4173             : {
    4174           0 :         ndr_print_struct(ndr, name, "netr_DELTA_SECRET");
    4175           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4176           0 :         ndr->depth++;
    4177           0 :         ndr_print_netr_CIPHER_VALUE(ndr, "current_cipher", &r->current_cipher);
    4178           0 :         ndr_print_NTTIME(ndr, "current_cipher_set_time", r->current_cipher_set_time);
    4179           0 :         ndr_print_netr_CIPHER_VALUE(ndr, "old_cipher", &r->old_cipher);
    4180           0 :         ndr_print_NTTIME(ndr, "old_cipher_set_time", r->old_cipher_set_time);
    4181           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    4182           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    4183           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    4184           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    4185           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    4186           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    4187           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    4188           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    4189           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    4190           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    4191           0 :         ndr->depth--;
    4192             : }
    4193             : 
    4194           0 : static enum ndr_err_code ndr_push_netr_DeltaEnum(struct ndr_push *ndr, int ndr_flags, enum netr_DeltaEnum r)
    4195             : {
    4196           0 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
    4197           0 :         return NDR_ERR_SUCCESS;
    4198             : }
    4199             : 
    4200           0 : static enum ndr_err_code ndr_pull_netr_DeltaEnum(struct ndr_pull *ndr, int ndr_flags, enum netr_DeltaEnum *r)
    4201             : {
    4202             :         uint16_t v;
    4203           0 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
    4204           0 :         *r = v;
    4205           0 :         return NDR_ERR_SUCCESS;
    4206             : }
    4207             : 
    4208           0 : _PUBLIC_ void ndr_print_netr_DeltaEnum(struct ndr_print *ndr, const char *name, enum netr_DeltaEnum r)
    4209             : {
    4210           0 :         const char *val = NULL;
    4211             : 
    4212           0 :         switch (r) {
    4213           0 :                 case NETR_DELTA_DOMAIN: val = "NETR_DELTA_DOMAIN"; break;
    4214           0 :                 case NETR_DELTA_GROUP: val = "NETR_DELTA_GROUP"; break;
    4215           0 :                 case NETR_DELTA_DELETE_GROUP: val = "NETR_DELTA_DELETE_GROUP"; break;
    4216           0 :                 case NETR_DELTA_RENAME_GROUP: val = "NETR_DELTA_RENAME_GROUP"; break;
    4217           0 :                 case NETR_DELTA_USER: val = "NETR_DELTA_USER"; break;
    4218           0 :                 case NETR_DELTA_DELETE_USER: val = "NETR_DELTA_DELETE_USER"; break;
    4219           0 :                 case NETR_DELTA_RENAME_USER: val = "NETR_DELTA_RENAME_USER"; break;
    4220           0 :                 case NETR_DELTA_GROUP_MEMBER: val = "NETR_DELTA_GROUP_MEMBER"; break;
    4221           0 :                 case NETR_DELTA_ALIAS: val = "NETR_DELTA_ALIAS"; break;
    4222           0 :                 case NETR_DELTA_DELETE_ALIAS: val = "NETR_DELTA_DELETE_ALIAS"; break;
    4223           0 :                 case NETR_DELTA_RENAME_ALIAS: val = "NETR_DELTA_RENAME_ALIAS"; break;
    4224           0 :                 case NETR_DELTA_ALIAS_MEMBER: val = "NETR_DELTA_ALIAS_MEMBER"; break;
    4225           0 :                 case NETR_DELTA_POLICY: val = "NETR_DELTA_POLICY"; break;
    4226           0 :                 case NETR_DELTA_TRUSTED_DOMAIN: val = "NETR_DELTA_TRUSTED_DOMAIN"; break;
    4227           0 :                 case NETR_DELTA_DELETE_TRUST: val = "NETR_DELTA_DELETE_TRUST"; break;
    4228           0 :                 case NETR_DELTA_ACCOUNT: val = "NETR_DELTA_ACCOUNT"; break;
    4229           0 :                 case NETR_DELTA_DELETE_ACCOUNT: val = "NETR_DELTA_DELETE_ACCOUNT"; break;
    4230           0 :                 case NETR_DELTA_SECRET: val = "NETR_DELTA_SECRET"; break;
    4231           0 :                 case NETR_DELTA_DELETE_SECRET: val = "NETR_DELTA_DELETE_SECRET"; break;
    4232           0 :                 case NETR_DELTA_DELETE_GROUP2: val = "NETR_DELTA_DELETE_GROUP2"; break;
    4233           0 :                 case NETR_DELTA_DELETE_USER2: val = "NETR_DELTA_DELETE_USER2"; break;
    4234           0 :                 case NETR_DELTA_MODIFY_COUNT: val = "NETR_DELTA_MODIFY_COUNT"; break;
    4235             :         }
    4236           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    4237           0 : }
    4238             : 
    4239           0 : static enum ndr_err_code ndr_push_netr_DELTA_UNION(struct ndr_push *ndr, int ndr_flags, const union netr_DELTA_UNION *r)
    4240             : {
    4241             :         uint32_t level;
    4242           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4243           0 :         if (ndr_flags & NDR_SCALARS) {
    4244             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4245           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4246           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4247           0 :                 NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, level));
    4248             :                 /* ms_union is always aligned to the largest union arm*/
    4249           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4250           0 :                 switch (level) {
    4251           0 :                         case NETR_DELTA_DOMAIN: {
    4252           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    4253           0 :                         break; }
    4254             : 
    4255           0 :                         case NETR_DELTA_GROUP: {
    4256           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->group));
    4257           0 :                         break; }
    4258             : 
    4259           0 :                         case NETR_DELTA_DELETE_GROUP: {
    4260           0 :                         break; }
    4261             : 
    4262           0 :                         case NETR_DELTA_RENAME_GROUP: {
    4263           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_group));
    4264           0 :                         break; }
    4265             : 
    4266           0 :                         case NETR_DELTA_USER: {
    4267           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
    4268           0 :                         break; }
    4269             : 
    4270           0 :                         case NETR_DELTA_DELETE_USER: {
    4271           0 :                         break; }
    4272             : 
    4273           0 :                         case NETR_DELTA_RENAME_USER: {
    4274           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_user));
    4275           0 :                         break; }
    4276             : 
    4277           0 :                         case NETR_DELTA_GROUP_MEMBER: {
    4278           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->group_member));
    4279           0 :                         break; }
    4280             : 
    4281           0 :                         case NETR_DELTA_ALIAS: {
    4282           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alias));
    4283           0 :                         break; }
    4284             : 
    4285           0 :                         case NETR_DELTA_DELETE_ALIAS: {
    4286           0 :                         break; }
    4287             : 
    4288           0 :                         case NETR_DELTA_RENAME_ALIAS: {
    4289           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_alias));
    4290           0 :                         break; }
    4291             : 
    4292           0 :                         case NETR_DELTA_ALIAS_MEMBER: {
    4293           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alias_member));
    4294           0 :                         break; }
    4295             : 
    4296           0 :                         case NETR_DELTA_POLICY: {
    4297           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->policy));
    4298           0 :                         break; }
    4299             : 
    4300           0 :                         case NETR_DELTA_TRUSTED_DOMAIN: {
    4301           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_domain));
    4302           0 :                         break; }
    4303             : 
    4304           0 :                         case NETR_DELTA_DELETE_TRUST: {
    4305           0 :                         break; }
    4306             : 
    4307           0 :                         case NETR_DELTA_ACCOUNT: {
    4308           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->account));
    4309           0 :                         break; }
    4310             : 
    4311           0 :                         case NETR_DELTA_DELETE_ACCOUNT: {
    4312           0 :                         break; }
    4313             : 
    4314           0 :                         case NETR_DELTA_SECRET: {
    4315           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->secret));
    4316           0 :                         break; }
    4317             : 
    4318           0 :                         case NETR_DELTA_DELETE_SECRET: {
    4319           0 :                         break; }
    4320             : 
    4321           0 :                         case NETR_DELTA_DELETE_GROUP2: {
    4322           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_group));
    4323           0 :                         break; }
    4324             : 
    4325           0 :                         case NETR_DELTA_DELETE_USER2: {
    4326           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_user));
    4327           0 :                         break; }
    4328             : 
    4329           0 :                         case NETR_DELTA_MODIFY_COUNT: {
    4330           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->modified_count));
    4331           0 :                         break; }
    4332             : 
    4333           0 :                         default: {
    4334           0 :                         break; }
    4335             : 
    4336             :                 }
    4337           0 :         }
    4338           0 :         if (ndr_flags & NDR_BUFFERS) {
    4339           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4340             :                         /* We didn't get it above, and the token is not needed after this. */
    4341           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4342             :                 }
    4343           0 :                 switch (level) {
    4344           0 :                         case NETR_DELTA_DOMAIN:
    4345           0 :                                 if (r->domain) {
    4346           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
    4347             :                                 }
    4348           0 :                         break;
    4349             : 
    4350           0 :                         case NETR_DELTA_GROUP:
    4351           0 :                                 if (r->group) {
    4352           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_GROUP(ndr, NDR_SCALARS|NDR_BUFFERS, r->group));
    4353             :                                 }
    4354           0 :                         break;
    4355             : 
    4356           0 :                         case NETR_DELTA_DELETE_GROUP:
    4357           0 :                         break;
    4358             : 
    4359           0 :                         case NETR_DELTA_RENAME_GROUP:
    4360           0 :                                 if (r->rename_group) {
    4361           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_group));
    4362             :                                 }
    4363           0 :                         break;
    4364             : 
    4365           0 :                         case NETR_DELTA_USER:
    4366           0 :                                 if (r->user) {
    4367           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->user));
    4368             :                                 }
    4369           0 :                         break;
    4370             : 
    4371           0 :                         case NETR_DELTA_DELETE_USER:
    4372           0 :                         break;
    4373             : 
    4374           0 :                         case NETR_DELTA_RENAME_USER:
    4375           0 :                                 if (r->rename_user) {
    4376           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_user));
    4377             :                                 }
    4378           0 :                         break;
    4379             : 
    4380           0 :                         case NETR_DELTA_GROUP_MEMBER:
    4381           0 :                                 if (r->group_member) {
    4382           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_GROUP_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->group_member));
    4383             :                                 }
    4384           0 :                         break;
    4385             : 
    4386           0 :                         case NETR_DELTA_ALIAS:
    4387           0 :                                 if (r->alias) {
    4388           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_ALIAS(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias));
    4389             :                                 }
    4390           0 :                         break;
    4391             : 
    4392           0 :                         case NETR_DELTA_DELETE_ALIAS:
    4393           0 :                         break;
    4394             : 
    4395           0 :                         case NETR_DELTA_RENAME_ALIAS:
    4396           0 :                                 if (r->rename_alias) {
    4397           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_alias));
    4398             :                                 }
    4399           0 :                         break;
    4400             : 
    4401           0 :                         case NETR_DELTA_ALIAS_MEMBER:
    4402           0 :                                 if (r->alias_member) {
    4403           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_ALIAS_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias_member));
    4404             :                                 }
    4405           0 :                         break;
    4406             : 
    4407           0 :                         case NETR_DELTA_POLICY:
    4408           0 :                                 if (r->policy) {
    4409           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_POLICY(ndr, NDR_SCALARS|NDR_BUFFERS, r->policy));
    4410             :                                 }
    4411           0 :                         break;
    4412             : 
    4413           0 :                         case NETR_DELTA_TRUSTED_DOMAIN:
    4414           0 :                                 if (r->trusted_domain) {
    4415           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_TRUSTED_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->trusted_domain));
    4416             :                                 }
    4417           0 :                         break;
    4418             : 
    4419           0 :                         case NETR_DELTA_DELETE_TRUST:
    4420           0 :                         break;
    4421             : 
    4422           0 :                         case NETR_DELTA_ACCOUNT:
    4423           0 :                                 if (r->account) {
    4424           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_ACCOUNT(ndr, NDR_SCALARS|NDR_BUFFERS, r->account));
    4425             :                                 }
    4426           0 :                         break;
    4427             : 
    4428           0 :                         case NETR_DELTA_DELETE_ACCOUNT:
    4429           0 :                         break;
    4430             : 
    4431           0 :                         case NETR_DELTA_SECRET:
    4432           0 :                                 if (r->secret) {
    4433           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_SECRET(ndr, NDR_SCALARS|NDR_BUFFERS, r->secret));
    4434             :                                 }
    4435           0 :                         break;
    4436             : 
    4437           0 :                         case NETR_DELTA_DELETE_SECRET:
    4438           0 :                         break;
    4439             : 
    4440           0 :                         case NETR_DELTA_DELETE_GROUP2:
    4441           0 :                                 if (r->delete_group) {
    4442           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_group));
    4443             :                                 }
    4444           0 :                         break;
    4445             : 
    4446           0 :                         case NETR_DELTA_DELETE_USER2:
    4447           0 :                                 if (r->delete_user) {
    4448           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_user));
    4449             :                                 }
    4450           0 :                         break;
    4451             : 
    4452           0 :                         case NETR_DELTA_MODIFY_COUNT:
    4453           0 :                                 if (r->modified_count) {
    4454           0 :                                         NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, *r->modified_count));
    4455             :                                 }
    4456           0 :                         break;
    4457             : 
    4458           0 :                         default:
    4459           0 :                         break;
    4460             : 
    4461             :                 }
    4462           0 :         }
    4463           0 :         return NDR_ERR_SUCCESS;
    4464             : }
    4465             : 
    4466           0 : static enum ndr_err_code ndr_pull_netr_DELTA_UNION(struct ndr_pull *ndr, int ndr_flags, union netr_DELTA_UNION *r)
    4467             : {
    4468             :         uint32_t level;
    4469             :         uint16_t _level;
    4470           0 :         TALLOC_CTX *_mem_save_domain_0 = NULL;
    4471             :         uint32_t _ptr_domain;
    4472           0 :         TALLOC_CTX *_mem_save_group_0 = NULL;
    4473             :         uint32_t _ptr_group;
    4474           0 :         TALLOC_CTX *_mem_save_rename_group_0 = NULL;
    4475             :         uint32_t _ptr_rename_group;
    4476           0 :         TALLOC_CTX *_mem_save_user_0 = NULL;
    4477             :         uint32_t _ptr_user;
    4478           0 :         TALLOC_CTX *_mem_save_rename_user_0 = NULL;
    4479             :         uint32_t _ptr_rename_user;
    4480           0 :         TALLOC_CTX *_mem_save_group_member_0 = NULL;
    4481             :         uint32_t _ptr_group_member;
    4482           0 :         TALLOC_CTX *_mem_save_alias_0 = NULL;
    4483             :         uint32_t _ptr_alias;
    4484           0 :         TALLOC_CTX *_mem_save_rename_alias_0 = NULL;
    4485             :         uint32_t _ptr_rename_alias;
    4486           0 :         TALLOC_CTX *_mem_save_alias_member_0 = NULL;
    4487             :         uint32_t _ptr_alias_member;
    4488           0 :         TALLOC_CTX *_mem_save_policy_0 = NULL;
    4489             :         uint32_t _ptr_policy;
    4490           0 :         TALLOC_CTX *_mem_save_trusted_domain_0 = NULL;
    4491             :         uint32_t _ptr_trusted_domain;
    4492           0 :         TALLOC_CTX *_mem_save_account_0 = NULL;
    4493             :         uint32_t _ptr_account;
    4494           0 :         TALLOC_CTX *_mem_save_secret_0 = NULL;
    4495             :         uint32_t _ptr_secret;
    4496           0 :         TALLOC_CTX *_mem_save_delete_group_0 = NULL;
    4497             :         uint32_t _ptr_delete_group;
    4498           0 :         TALLOC_CTX *_mem_save_delete_user_0 = NULL;
    4499             :         uint32_t _ptr_delete_user;
    4500           0 :         TALLOC_CTX *_mem_save_modified_count_0 = NULL;
    4501             :         uint32_t _ptr_modified_count;
    4502           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4503           0 :         if (ndr_flags & NDR_SCALARS) {
    4504             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4505           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4506           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4507           0 :                 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
    4508           0 :                 if (_level != level) {
    4509           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    4510             :                 }
    4511             :                 /* ms_union is always aligned to the largest union arm*/
    4512           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4513           0 :                 switch (level) {
    4514           0 :                         case NETR_DELTA_DOMAIN: {
    4515           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    4516           0 :                                 if (_ptr_domain) {
    4517           0 :                                         NDR_PULL_ALLOC(ndr, r->domain);
    4518             :                                 } else {
    4519           0 :                                         r->domain = NULL;
    4520             :                                 }
    4521           0 :                         break; }
    4522             : 
    4523           0 :                         case NETR_DELTA_GROUP: {
    4524           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group));
    4525           0 :                                 if (_ptr_group) {
    4526           0 :                                         NDR_PULL_ALLOC(ndr, r->group);
    4527             :                                 } else {
    4528           0 :                                         r->group = NULL;
    4529             :                                 }
    4530           0 :                         break; }
    4531             : 
    4532           0 :                         case NETR_DELTA_DELETE_GROUP: {
    4533           0 :                         break; }
    4534             : 
    4535           0 :                         case NETR_DELTA_RENAME_GROUP: {
    4536           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_group));
    4537           0 :                                 if (_ptr_rename_group) {
    4538           0 :                                         NDR_PULL_ALLOC(ndr, r->rename_group);
    4539             :                                 } else {
    4540           0 :                                         r->rename_group = NULL;
    4541             :                                 }
    4542           0 :                         break; }
    4543             : 
    4544           0 :                         case NETR_DELTA_USER: {
    4545           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
    4546           0 :                                 if (_ptr_user) {
    4547           0 :                                         NDR_PULL_ALLOC(ndr, r->user);
    4548             :                                 } else {
    4549           0 :                                         r->user = NULL;
    4550             :                                 }
    4551           0 :                         break; }
    4552             : 
    4553           0 :                         case NETR_DELTA_DELETE_USER: {
    4554           0 :                         break; }
    4555             : 
    4556           0 :                         case NETR_DELTA_RENAME_USER: {
    4557           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_user));
    4558           0 :                                 if (_ptr_rename_user) {
    4559           0 :                                         NDR_PULL_ALLOC(ndr, r->rename_user);
    4560             :                                 } else {
    4561           0 :                                         r->rename_user = NULL;
    4562             :                                 }
    4563           0 :                         break; }
    4564             : 
    4565           0 :                         case NETR_DELTA_GROUP_MEMBER: {
    4566           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_member));
    4567           0 :                                 if (_ptr_group_member) {
    4568           0 :                                         NDR_PULL_ALLOC(ndr, r->group_member);
    4569             :                                 } else {
    4570           0 :                                         r->group_member = NULL;
    4571             :                                 }
    4572           0 :                         break; }
    4573             : 
    4574           0 :                         case NETR_DELTA_ALIAS: {
    4575           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alias));
    4576           0 :                                 if (_ptr_alias) {
    4577           0 :                                         NDR_PULL_ALLOC(ndr, r->alias);
    4578             :                                 } else {
    4579           0 :                                         r->alias = NULL;
    4580             :                                 }
    4581           0 :                         break; }
    4582             : 
    4583           0 :                         case NETR_DELTA_DELETE_ALIAS: {
    4584           0 :                         break; }
    4585             : 
    4586           0 :                         case NETR_DELTA_RENAME_ALIAS: {
    4587           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_alias));
    4588           0 :                                 if (_ptr_rename_alias) {
    4589           0 :                                         NDR_PULL_ALLOC(ndr, r->rename_alias);
    4590             :                                 } else {
    4591           0 :                                         r->rename_alias = NULL;
    4592             :                                 }
    4593           0 :                         break; }
    4594             : 
    4595           0 :                         case NETR_DELTA_ALIAS_MEMBER: {
    4596           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alias_member));
    4597           0 :                                 if (_ptr_alias_member) {
    4598           0 :                                         NDR_PULL_ALLOC(ndr, r->alias_member);
    4599             :                                 } else {
    4600           0 :                                         r->alias_member = NULL;
    4601             :                                 }
    4602           0 :                         break; }
    4603             : 
    4604           0 :                         case NETR_DELTA_POLICY: {
    4605           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_policy));
    4606           0 :                                 if (_ptr_policy) {
    4607           0 :                                         NDR_PULL_ALLOC(ndr, r->policy);
    4608             :                                 } else {
    4609           0 :                                         r->policy = NULL;
    4610             :                                 }
    4611           0 :                         break; }
    4612             : 
    4613           0 :                         case NETR_DELTA_TRUSTED_DOMAIN: {
    4614           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domain));
    4615           0 :                                 if (_ptr_trusted_domain) {
    4616           0 :                                         NDR_PULL_ALLOC(ndr, r->trusted_domain);
    4617             :                                 } else {
    4618           0 :                                         r->trusted_domain = NULL;
    4619             :                                 }
    4620           0 :                         break; }
    4621             : 
    4622           0 :                         case NETR_DELTA_DELETE_TRUST: {
    4623           0 :                         break; }
    4624             : 
    4625           0 :                         case NETR_DELTA_ACCOUNT: {
    4626           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account));
    4627           0 :                                 if (_ptr_account) {
    4628           0 :                                         NDR_PULL_ALLOC(ndr, r->account);
    4629             :                                 } else {
    4630           0 :                                         r->account = NULL;
    4631             :                                 }
    4632           0 :                         break; }
    4633             : 
    4634           0 :                         case NETR_DELTA_DELETE_ACCOUNT: {
    4635           0 :                         break; }
    4636             : 
    4637           0 :                         case NETR_DELTA_SECRET: {
    4638           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secret));
    4639           0 :                                 if (_ptr_secret) {
    4640           0 :                                         NDR_PULL_ALLOC(ndr, r->secret);
    4641             :                                 } else {
    4642           0 :                                         r->secret = NULL;
    4643             :                                 }
    4644           0 :                         break; }
    4645             : 
    4646           0 :                         case NETR_DELTA_DELETE_SECRET: {
    4647           0 :                         break; }
    4648             : 
    4649           0 :                         case NETR_DELTA_DELETE_GROUP2: {
    4650           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delete_group));
    4651           0 :                                 if (_ptr_delete_group) {
    4652           0 :                                         NDR_PULL_ALLOC(ndr, r->delete_group);
    4653             :                                 } else {
    4654           0 :                                         r->delete_group = NULL;
    4655             :                                 }
    4656           0 :                         break; }
    4657             : 
    4658           0 :                         case NETR_DELTA_DELETE_USER2: {
    4659           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delete_user));
    4660           0 :                                 if (_ptr_delete_user) {
    4661           0 :                                         NDR_PULL_ALLOC(ndr, r->delete_user);
    4662             :                                 } else {
    4663           0 :                                         r->delete_user = NULL;
    4664             :                                 }
    4665           0 :                         break; }
    4666             : 
    4667           0 :                         case NETR_DELTA_MODIFY_COUNT: {
    4668           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_modified_count));
    4669           0 :                                 if (_ptr_modified_count) {
    4670           0 :                                         NDR_PULL_ALLOC(ndr, r->modified_count);
    4671             :                                 } else {
    4672           0 :                                         r->modified_count = NULL;
    4673             :                                 }
    4674           0 :                         break; }
    4675             : 
    4676           0 :                         default: {
    4677           0 :                         break; }
    4678             : 
    4679             :                 }
    4680           0 :         }
    4681           0 :         if (ndr_flags & NDR_BUFFERS) {
    4682           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4683             :                         /* We didn't get it above, and the token is not needed after this. */
    4684           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4685             :                 }
    4686           0 :                 switch (level) {
    4687           0 :                         case NETR_DELTA_DOMAIN:
    4688           0 :                                 if (r->domain) {
    4689           0 :                                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4690           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    4691           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
    4692           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    4693             :                                 }
    4694           0 :                         break;
    4695             : 
    4696           0 :                         case NETR_DELTA_GROUP:
    4697           0 :                                 if (r->group) {
    4698           0 :                                         _mem_save_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4699           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->group, 0);
    4700           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_GROUP(ndr, NDR_SCALARS|NDR_BUFFERS, r->group));
    4701           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_0, 0);
    4702             :                                 }
    4703           0 :                         break;
    4704             : 
    4705           0 :                         case NETR_DELTA_DELETE_GROUP:
    4706           0 :                         break;
    4707             : 
    4708           0 :                         case NETR_DELTA_RENAME_GROUP:
    4709           0 :                                 if (r->rename_group) {
    4710           0 :                                         _mem_save_rename_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4711           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->rename_group, 0);
    4712           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_group));
    4713           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_group_0, 0);
    4714             :                                 }
    4715           0 :                         break;
    4716             : 
    4717           0 :                         case NETR_DELTA_USER:
    4718           0 :                                 if (r->user) {
    4719           0 :                                         _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4720           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
    4721           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->user));
    4722           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
    4723             :                                 }
    4724           0 :                         break;
    4725             : 
    4726           0 :                         case NETR_DELTA_DELETE_USER:
    4727           0 :                         break;
    4728             : 
    4729           0 :                         case NETR_DELTA_RENAME_USER:
    4730           0 :                                 if (r->rename_user) {
    4731           0 :                                         _mem_save_rename_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4732           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->rename_user, 0);
    4733           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_user));
    4734           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_user_0, 0);
    4735             :                                 }
    4736           0 :                         break;
    4737             : 
    4738           0 :                         case NETR_DELTA_GROUP_MEMBER:
    4739           0 :                                 if (r->group_member) {
    4740           0 :                                         _mem_save_group_member_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4741           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->group_member, 0);
    4742           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_GROUP_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->group_member));
    4743           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_member_0, 0);
    4744             :                                 }
    4745           0 :                         break;
    4746             : 
    4747           0 :                         case NETR_DELTA_ALIAS:
    4748           0 :                                 if (r->alias) {
    4749           0 :                                         _mem_save_alias_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4750           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->alias, 0);
    4751           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_ALIAS(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias));
    4752           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_0, 0);
    4753             :                                 }
    4754           0 :                         break;
    4755             : 
    4756           0 :                         case NETR_DELTA_DELETE_ALIAS:
    4757           0 :                         break;
    4758             : 
    4759           0 :                         case NETR_DELTA_RENAME_ALIAS:
    4760           0 :                                 if (r->rename_alias) {
    4761           0 :                                         _mem_save_rename_alias_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4762           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->rename_alias, 0);
    4763           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_alias));
    4764           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_alias_0, 0);
    4765             :                                 }
    4766           0 :                         break;
    4767             : 
    4768           0 :                         case NETR_DELTA_ALIAS_MEMBER:
    4769           0 :                                 if (r->alias_member) {
    4770           0 :                                         _mem_save_alias_member_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4771           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->alias_member, 0);
    4772           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_ALIAS_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias_member));
    4773           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_member_0, 0);
    4774             :                                 }
    4775           0 :                         break;
    4776             : 
    4777           0 :                         case NETR_DELTA_POLICY:
    4778           0 :                                 if (r->policy) {
    4779           0 :                                         _mem_save_policy_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4780           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->policy, 0);
    4781           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_POLICY(ndr, NDR_SCALARS|NDR_BUFFERS, r->policy));
    4782           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_0, 0);
    4783             :                                 }
    4784           0 :                         break;
    4785             : 
    4786           0 :                         case NETR_DELTA_TRUSTED_DOMAIN:
    4787           0 :                                 if (r->trusted_domain) {
    4788           0 :                                         _mem_save_trusted_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4789           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domain, 0);
    4790           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_TRUSTED_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->trusted_domain));
    4791           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_0, 0);
    4792             :                                 }
    4793           0 :                         break;
    4794             : 
    4795           0 :                         case NETR_DELTA_DELETE_TRUST:
    4796           0 :                         break;
    4797             : 
    4798           0 :                         case NETR_DELTA_ACCOUNT:
    4799           0 :                                 if (r->account) {
    4800           0 :                                         _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4801           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->account, 0);
    4802           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_ACCOUNT(ndr, NDR_SCALARS|NDR_BUFFERS, r->account));
    4803           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, 0);
    4804             :                                 }
    4805           0 :                         break;
    4806             : 
    4807           0 :                         case NETR_DELTA_DELETE_ACCOUNT:
    4808           0 :                         break;
    4809             : 
    4810           0 :                         case NETR_DELTA_SECRET:
    4811           0 :                                 if (r->secret) {
    4812           0 :                                         _mem_save_secret_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4813           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->secret, 0);
    4814           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_SECRET(ndr, NDR_SCALARS|NDR_BUFFERS, r->secret));
    4815           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secret_0, 0);
    4816             :                                 }
    4817           0 :                         break;
    4818             : 
    4819           0 :                         case NETR_DELTA_DELETE_SECRET:
    4820           0 :                         break;
    4821             : 
    4822           0 :                         case NETR_DELTA_DELETE_GROUP2:
    4823           0 :                                 if (r->delete_group) {
    4824           0 :                                         _mem_save_delete_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4825           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->delete_group, 0);
    4826           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_group));
    4827           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_group_0, 0);
    4828             :                                 }
    4829           0 :                         break;
    4830             : 
    4831           0 :                         case NETR_DELTA_DELETE_USER2:
    4832           0 :                                 if (r->delete_user) {
    4833           0 :                                         _mem_save_delete_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4834           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->delete_user, 0);
    4835           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_user));
    4836           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_user_0, 0);
    4837             :                                 }
    4838           0 :                         break;
    4839             : 
    4840           0 :                         case NETR_DELTA_MODIFY_COUNT:
    4841           0 :                                 if (r->modified_count) {
    4842           0 :                                         _mem_save_modified_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4843           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->modified_count, 0);
    4844           0 :                                         NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, r->modified_count));
    4845           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_modified_count_0, 0);
    4846             :                                 }
    4847           0 :                         break;
    4848             : 
    4849           0 :                         default:
    4850           0 :                         break;
    4851             : 
    4852             :                 }
    4853           0 :         }
    4854           0 :         return NDR_ERR_SUCCESS;
    4855             : }
    4856             : 
    4857           0 : _PUBLIC_ void ndr_print_netr_DELTA_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_UNION *r)
    4858             : {
    4859             :         uint32_t level;
    4860           0 :         level = ndr_print_steal_switch_value(ndr, r);
    4861           0 :         ndr_print_union(ndr, name, level, "netr_DELTA_UNION");
    4862           0 :         switch (level) {
    4863           0 :                 case NETR_DELTA_DOMAIN:
    4864           0 :                         ndr_print_ptr(ndr, "domain", r->domain);
    4865           0 :                         ndr->depth++;
    4866           0 :                         if (r->domain) {
    4867           0 :                                 ndr_print_netr_DELTA_DOMAIN(ndr, "domain", r->domain);
    4868             :                         }
    4869           0 :                         ndr->depth--;
    4870           0 :                 break;
    4871             : 
    4872           0 :                 case NETR_DELTA_GROUP:
    4873           0 :                         ndr_print_ptr(ndr, "group", r->group);
    4874           0 :                         ndr->depth++;
    4875           0 :                         if (r->group) {
    4876           0 :                                 ndr_print_netr_DELTA_GROUP(ndr, "group", r->group);
    4877             :                         }
    4878           0 :                         ndr->depth--;
    4879           0 :                 break;
    4880             : 
    4881           0 :                 case NETR_DELTA_DELETE_GROUP:
    4882           0 :                 break;
    4883             : 
    4884           0 :                 case NETR_DELTA_RENAME_GROUP:
    4885           0 :                         ndr_print_ptr(ndr, "rename_group", r->rename_group);
    4886           0 :                         ndr->depth++;
    4887           0 :                         if (r->rename_group) {
    4888           0 :                                 ndr_print_netr_DELTA_RENAME(ndr, "rename_group", r->rename_group);
    4889             :                         }
    4890           0 :                         ndr->depth--;
    4891           0 :                 break;
    4892             : 
    4893           0 :                 case NETR_DELTA_USER:
    4894           0 :                         ndr_print_ptr(ndr, "user", r->user);
    4895           0 :                         ndr->depth++;
    4896           0 :                         if (r->user) {
    4897           0 :                                 ndr_print_netr_DELTA_USER(ndr, "user", r->user);
    4898             :                         }
    4899           0 :                         ndr->depth--;
    4900           0 :                 break;
    4901             : 
    4902           0 :                 case NETR_DELTA_DELETE_USER:
    4903           0 :                 break;
    4904             : 
    4905           0 :                 case NETR_DELTA_RENAME_USER:
    4906           0 :                         ndr_print_ptr(ndr, "rename_user", r->rename_user);
    4907           0 :                         ndr->depth++;
    4908           0 :                         if (r->rename_user) {
    4909           0 :                                 ndr_print_netr_DELTA_RENAME(ndr, "rename_user", r->rename_user);
    4910             :                         }
    4911           0 :                         ndr->depth--;
    4912           0 :                 break;
    4913             : 
    4914           0 :                 case NETR_DELTA_GROUP_MEMBER:
    4915           0 :                         ndr_print_ptr(ndr, "group_member", r->group_member);
    4916           0 :                         ndr->depth++;
    4917           0 :                         if (r->group_member) {
    4918           0 :                                 ndr_print_netr_DELTA_GROUP_MEMBER(ndr, "group_member", r->group_member);
    4919             :                         }
    4920           0 :                         ndr->depth--;
    4921           0 :                 break;
    4922             : 
    4923           0 :                 case NETR_DELTA_ALIAS:
    4924           0 :                         ndr_print_ptr(ndr, "alias", r->alias);
    4925           0 :                         ndr->depth++;
    4926           0 :                         if (r->alias) {
    4927           0 :                                 ndr_print_netr_DELTA_ALIAS(ndr, "alias", r->alias);
    4928             :                         }
    4929           0 :                         ndr->depth--;
    4930           0 :                 break;
    4931             : 
    4932           0 :                 case NETR_DELTA_DELETE_ALIAS:
    4933           0 :                 break;
    4934             : 
    4935           0 :                 case NETR_DELTA_RENAME_ALIAS:
    4936           0 :                         ndr_print_ptr(ndr, "rename_alias", r->rename_alias);
    4937           0 :                         ndr->depth++;
    4938           0 :                         if (r->rename_alias) {
    4939           0 :                                 ndr_print_netr_DELTA_RENAME(ndr, "rename_alias", r->rename_alias);
    4940             :                         }
    4941           0 :                         ndr->depth--;
    4942           0 :                 break;
    4943             : 
    4944           0 :                 case NETR_DELTA_ALIAS_MEMBER:
    4945           0 :                         ndr_print_ptr(ndr, "alias_member", r->alias_member);
    4946           0 :                         ndr->depth++;
    4947           0 :                         if (r->alias_member) {
    4948           0 :                                 ndr_print_netr_DELTA_ALIAS_MEMBER(ndr, "alias_member", r->alias_member);
    4949             :                         }
    4950           0 :                         ndr->depth--;
    4951           0 :                 break;
    4952             : 
    4953           0 :                 case NETR_DELTA_POLICY:
    4954           0 :                         ndr_print_ptr(ndr, "policy", r->policy);
    4955           0 :                         ndr->depth++;
    4956           0 :                         if (r->policy) {
    4957           0 :                                 ndr_print_netr_DELTA_POLICY(ndr, "policy", r->policy);
    4958             :                         }
    4959           0 :                         ndr->depth--;
    4960           0 :                 break;
    4961             : 
    4962           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
    4963           0 :                         ndr_print_ptr(ndr, "trusted_domain", r->trusted_domain);
    4964           0 :                         ndr->depth++;
    4965           0 :                         if (r->trusted_domain) {
    4966           0 :                                 ndr_print_netr_DELTA_TRUSTED_DOMAIN(ndr, "trusted_domain", r->trusted_domain);
    4967             :                         }
    4968           0 :                         ndr->depth--;
    4969           0 :                 break;
    4970             : 
    4971           0 :                 case NETR_DELTA_DELETE_TRUST:
    4972           0 :                 break;
    4973             : 
    4974           0 :                 case NETR_DELTA_ACCOUNT:
    4975           0 :                         ndr_print_ptr(ndr, "account", r->account);
    4976           0 :                         ndr->depth++;
    4977           0 :                         if (r->account) {
    4978           0 :                                 ndr_print_netr_DELTA_ACCOUNT(ndr, "account", r->account);
    4979             :                         }
    4980           0 :                         ndr->depth--;
    4981           0 :                 break;
    4982             : 
    4983           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
    4984           0 :                 break;
    4985             : 
    4986           0 :                 case NETR_DELTA_SECRET:
    4987           0 :                         ndr_print_ptr(ndr, "secret", r->secret);
    4988           0 :                         ndr->depth++;
    4989           0 :                         if (r->secret) {
    4990           0 :                                 ndr_print_netr_DELTA_SECRET(ndr, "secret", r->secret);
    4991             :                         }
    4992           0 :                         ndr->depth--;
    4993           0 :                 break;
    4994             : 
    4995           0 :                 case NETR_DELTA_DELETE_SECRET:
    4996           0 :                 break;
    4997             : 
    4998           0 :                 case NETR_DELTA_DELETE_GROUP2:
    4999           0 :                         ndr_print_ptr(ndr, "delete_group", r->delete_group);
    5000           0 :                         ndr->depth++;
    5001           0 :                         if (r->delete_group) {
    5002           0 :                                 ndr_print_netr_DELTA_DELETE_USER(ndr, "delete_group", r->delete_group);
    5003             :                         }
    5004           0 :                         ndr->depth--;
    5005           0 :                 break;
    5006             : 
    5007           0 :                 case NETR_DELTA_DELETE_USER2:
    5008           0 :                         ndr_print_ptr(ndr, "delete_user", r->delete_user);
    5009           0 :                         ndr->depth++;
    5010           0 :                         if (r->delete_user) {
    5011           0 :                                 ndr_print_netr_DELTA_DELETE_USER(ndr, "delete_user", r->delete_user);
    5012             :                         }
    5013           0 :                         ndr->depth--;
    5014           0 :                 break;
    5015             : 
    5016           0 :                 case NETR_DELTA_MODIFY_COUNT:
    5017           0 :                         ndr_print_ptr(ndr, "modified_count", r->modified_count);
    5018           0 :                         ndr->depth++;
    5019           0 :                         if (r->modified_count) {
    5020           0 :                                 ndr_print_udlong(ndr, "modified_count", *r->modified_count);
    5021             :                         }
    5022           0 :                         ndr->depth--;
    5023           0 :                 break;
    5024             : 
    5025           0 :                 default:
    5026           0 :                 break;
    5027             : 
    5028             :         }
    5029           0 : }
    5030             : 
    5031           0 : static enum ndr_err_code ndr_push_netr_DELTA_ID_UNION(struct ndr_push *ndr, int ndr_flags, const union netr_DELTA_ID_UNION *r)
    5032             : {
    5033             :         uint32_t level;
    5034           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5035           0 :         if (ndr_flags & NDR_SCALARS) {
    5036             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5037           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5038           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5039           0 :                 NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, level));
    5040             :                 /* ms_union is always aligned to the largest union arm*/
    5041           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5042           0 :                 switch (level) {
    5043           0 :                         case NETR_DELTA_DOMAIN: {
    5044           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5045           0 :                         break; }
    5046             : 
    5047           0 :                         case NETR_DELTA_GROUP: {
    5048           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5049           0 :                         break; }
    5050             : 
    5051           0 :                         case NETR_DELTA_DELETE_GROUP: {
    5052           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5053           0 :                         break; }
    5054             : 
    5055           0 :                         case NETR_DELTA_RENAME_GROUP: {
    5056           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5057           0 :                         break; }
    5058             : 
    5059           0 :                         case NETR_DELTA_USER: {
    5060           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5061           0 :                         break; }
    5062             : 
    5063           0 :                         case NETR_DELTA_DELETE_USER: {
    5064           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5065           0 :                         break; }
    5066             : 
    5067           0 :                         case NETR_DELTA_RENAME_USER: {
    5068           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5069           0 :                         break; }
    5070             : 
    5071           0 :                         case NETR_DELTA_GROUP_MEMBER: {
    5072           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5073           0 :                         break; }
    5074             : 
    5075           0 :                         case NETR_DELTA_ALIAS: {
    5076           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5077           0 :                         break; }
    5078             : 
    5079           0 :                         case NETR_DELTA_DELETE_ALIAS: {
    5080           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5081           0 :                         break; }
    5082             : 
    5083           0 :                         case NETR_DELTA_RENAME_ALIAS: {
    5084           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5085           0 :                         break; }
    5086             : 
    5087           0 :                         case NETR_DELTA_ALIAS_MEMBER: {
    5088           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5089           0 :                         break; }
    5090             : 
    5091           0 :                         case NETR_DELTA_POLICY: {
    5092           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    5093           0 :                         break; }
    5094             : 
    5095           0 :                         case NETR_DELTA_TRUSTED_DOMAIN: {
    5096           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    5097           0 :                         break; }
    5098             : 
    5099           0 :                         case NETR_DELTA_DELETE_TRUST: {
    5100           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    5101           0 :                         break; }
    5102             : 
    5103           0 :                         case NETR_DELTA_ACCOUNT: {
    5104           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    5105           0 :                         break; }
    5106             : 
    5107           0 :                         case NETR_DELTA_DELETE_ACCOUNT: {
    5108           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    5109           0 :                         break; }
    5110             : 
    5111           0 :                         case NETR_DELTA_SECRET: {
    5112           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
    5113           0 :                         break; }
    5114             : 
    5115           0 :                         case NETR_DELTA_DELETE_SECRET: {
    5116           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
    5117           0 :                         break; }
    5118             : 
    5119           0 :                         case NETR_DELTA_DELETE_GROUP2: {
    5120           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5121           0 :                         break; }
    5122             : 
    5123           0 :                         case NETR_DELTA_DELETE_USER2: {
    5124           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5125           0 :                         break; }
    5126             : 
    5127           0 :                         case NETR_DELTA_MODIFY_COUNT: {
    5128           0 :                         break; }
    5129             : 
    5130           0 :                         default: {
    5131           0 :                         break; }
    5132             : 
    5133             :                 }
    5134           0 :         }
    5135           0 :         if (ndr_flags & NDR_BUFFERS) {
    5136           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5137             :                         /* We didn't get it above, and the token is not needed after this. */
    5138           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5139             :                 }
    5140           0 :                 switch (level) {
    5141           0 :                         case NETR_DELTA_DOMAIN:
    5142           0 :                         break;
    5143             : 
    5144           0 :                         case NETR_DELTA_GROUP:
    5145           0 :                         break;
    5146             : 
    5147           0 :                         case NETR_DELTA_DELETE_GROUP:
    5148           0 :                         break;
    5149             : 
    5150           0 :                         case NETR_DELTA_RENAME_GROUP:
    5151           0 :                         break;
    5152             : 
    5153           0 :                         case NETR_DELTA_USER:
    5154           0 :                         break;
    5155             : 
    5156           0 :                         case NETR_DELTA_DELETE_USER:
    5157           0 :                         break;
    5158             : 
    5159           0 :                         case NETR_DELTA_RENAME_USER:
    5160           0 :                         break;
    5161             : 
    5162           0 :                         case NETR_DELTA_GROUP_MEMBER:
    5163           0 :                         break;
    5164             : 
    5165           0 :                         case NETR_DELTA_ALIAS:
    5166           0 :                         break;
    5167             : 
    5168           0 :                         case NETR_DELTA_DELETE_ALIAS:
    5169           0 :                         break;
    5170             : 
    5171           0 :                         case NETR_DELTA_RENAME_ALIAS:
    5172           0 :                         break;
    5173             : 
    5174           0 :                         case NETR_DELTA_ALIAS_MEMBER:
    5175           0 :                         break;
    5176             : 
    5177           0 :                         case NETR_DELTA_POLICY:
    5178           0 :                                 if (r->sid) {
    5179           0 :                                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5180             :                                 }
    5181           0 :                         break;
    5182             : 
    5183           0 :                         case NETR_DELTA_TRUSTED_DOMAIN:
    5184           0 :                                 if (r->sid) {
    5185           0 :                                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5186             :                                 }
    5187           0 :                         break;
    5188             : 
    5189           0 :                         case NETR_DELTA_DELETE_TRUST:
    5190           0 :                                 if (r->sid) {
    5191           0 :                                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5192             :                                 }
    5193           0 :                         break;
    5194             : 
    5195           0 :                         case NETR_DELTA_ACCOUNT:
    5196           0 :                                 if (r->sid) {
    5197           0 :                                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5198             :                                 }
    5199           0 :                         break;
    5200             : 
    5201           0 :                         case NETR_DELTA_DELETE_ACCOUNT:
    5202           0 :                                 if (r->sid) {
    5203           0 :                                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5204             :                                 }
    5205           0 :                         break;
    5206             : 
    5207           0 :                         case NETR_DELTA_SECRET:
    5208           0 :                                 if (r->name) {
    5209           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    5210           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5211           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    5212           0 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5213             :                                 }
    5214           0 :                         break;
    5215             : 
    5216           0 :                         case NETR_DELTA_DELETE_SECRET:
    5217           0 :                                 if (r->name) {
    5218           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    5219           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5220           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    5221           0 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5222             :                                 }
    5223           0 :                         break;
    5224             : 
    5225           0 :                         case NETR_DELTA_DELETE_GROUP2:
    5226           0 :                         break;
    5227             : 
    5228           0 :                         case NETR_DELTA_DELETE_USER2:
    5229           0 :                         break;
    5230             : 
    5231           0 :                         case NETR_DELTA_MODIFY_COUNT:
    5232           0 :                         break;
    5233             : 
    5234           0 :                         default:
    5235           0 :                         break;
    5236             : 
    5237             :                 }
    5238           0 :         }
    5239           0 :         return NDR_ERR_SUCCESS;
    5240             : }
    5241             : 
    5242           0 : static enum ndr_err_code ndr_pull_netr_DELTA_ID_UNION(struct ndr_pull *ndr, int ndr_flags, union netr_DELTA_ID_UNION *r)
    5243             : {
    5244             :         uint32_t level;
    5245             :         uint16_t _level;
    5246           0 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    5247             :         uint32_t _ptr_sid;
    5248           0 :         TALLOC_CTX *_mem_save_name_0 = NULL;
    5249             :         uint32_t _ptr_name;
    5250           0 :         uint32_t size_name_1 = 0;
    5251           0 :         uint32_t length_name_1 = 0;
    5252           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5253           0 :         if (ndr_flags & NDR_SCALARS) {
    5254             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5255           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5256           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5257           0 :                 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
    5258           0 :                 if (_level != level) {
    5259           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    5260             :                 }
    5261             :                 /* ms_union is always aligned to the largest union arm*/
    5262           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5263           0 :                 switch (level) {
    5264           0 :                         case NETR_DELTA_DOMAIN: {
    5265           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5266           0 :                         break; }
    5267             : 
    5268           0 :                         case NETR_DELTA_GROUP: {
    5269           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5270           0 :                         break; }
    5271             : 
    5272           0 :                         case NETR_DELTA_DELETE_GROUP: {
    5273           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5274           0 :                         break; }
    5275             : 
    5276           0 :                         case NETR_DELTA_RENAME_GROUP: {
    5277           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5278           0 :                         break; }
    5279             : 
    5280           0 :                         case NETR_DELTA_USER: {
    5281           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5282           0 :                         break; }
    5283             : 
    5284           0 :                         case NETR_DELTA_DELETE_USER: {
    5285           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5286           0 :                         break; }
    5287             : 
    5288           0 :                         case NETR_DELTA_RENAME_USER: {
    5289           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5290           0 :                         break; }
    5291             : 
    5292           0 :                         case NETR_DELTA_GROUP_MEMBER: {
    5293           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5294           0 :                         break; }
    5295             : 
    5296           0 :                         case NETR_DELTA_ALIAS: {
    5297           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5298           0 :                         break; }
    5299             : 
    5300           0 :                         case NETR_DELTA_DELETE_ALIAS: {
    5301           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5302           0 :                         break; }
    5303             : 
    5304           0 :                         case NETR_DELTA_RENAME_ALIAS: {
    5305           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5306           0 :                         break; }
    5307             : 
    5308           0 :                         case NETR_DELTA_ALIAS_MEMBER: {
    5309           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5310           0 :                         break; }
    5311             : 
    5312           0 :                         case NETR_DELTA_POLICY: {
    5313           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    5314           0 :                                 if (_ptr_sid) {
    5315           0 :                                         NDR_PULL_ALLOC(ndr, r->sid);
    5316             :                                 } else {
    5317           0 :                                         r->sid = NULL;
    5318             :                                 }
    5319           0 :                         break; }
    5320             : 
    5321           0 :                         case NETR_DELTA_TRUSTED_DOMAIN: {
    5322           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    5323           0 :                                 if (_ptr_sid) {
    5324           0 :                                         NDR_PULL_ALLOC(ndr, r->sid);
    5325             :                                 } else {
    5326           0 :                                         r->sid = NULL;
    5327             :                                 }
    5328           0 :                         break; }
    5329             : 
    5330           0 :                         case NETR_DELTA_DELETE_TRUST: {
    5331           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    5332           0 :                                 if (_ptr_sid) {
    5333           0 :                                         NDR_PULL_ALLOC(ndr, r->sid);
    5334             :                                 } else {
    5335           0 :                                         r->sid = NULL;
    5336             :                                 }
    5337           0 :                         break; }
    5338             : 
    5339           0 :                         case NETR_DELTA_ACCOUNT: {
    5340           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    5341           0 :                                 if (_ptr_sid) {
    5342           0 :                                         NDR_PULL_ALLOC(ndr, r->sid);
    5343             :                                 } else {
    5344           0 :                                         r->sid = NULL;
    5345             :                                 }
    5346           0 :                         break; }
    5347             : 
    5348           0 :                         case NETR_DELTA_DELETE_ACCOUNT: {
    5349           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    5350           0 :                                 if (_ptr_sid) {
    5351           0 :                                         NDR_PULL_ALLOC(ndr, r->sid);
    5352             :                                 } else {
    5353           0 :                                         r->sid = NULL;
    5354             :                                 }
    5355           0 :                         break; }
    5356             : 
    5357           0 :                         case NETR_DELTA_SECRET: {
    5358           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
    5359           0 :                                 if (_ptr_name) {
    5360           0 :                                         NDR_PULL_ALLOC(ndr, r->name);
    5361             :                                 } else {
    5362           0 :                                         r->name = NULL;
    5363             :                                 }
    5364           0 :                         break; }
    5365             : 
    5366           0 :                         case NETR_DELTA_DELETE_SECRET: {
    5367           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
    5368           0 :                                 if (_ptr_name) {
    5369           0 :                                         NDR_PULL_ALLOC(ndr, r->name);
    5370             :                                 } else {
    5371           0 :                                         r->name = NULL;
    5372             :                                 }
    5373           0 :                         break; }
    5374             : 
    5375           0 :                         case NETR_DELTA_DELETE_GROUP2: {
    5376           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5377           0 :                         break; }
    5378             : 
    5379           0 :                         case NETR_DELTA_DELETE_USER2: {
    5380           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5381           0 :                         break; }
    5382             : 
    5383           0 :                         case NETR_DELTA_MODIFY_COUNT: {
    5384           0 :                         break; }
    5385             : 
    5386           0 :                         default: {
    5387           0 :                         break; }
    5388             : 
    5389             :                 }
    5390           0 :         }
    5391           0 :         if (ndr_flags & NDR_BUFFERS) {
    5392           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5393             :                         /* We didn't get it above, and the token is not needed after this. */
    5394           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5395             :                 }
    5396           0 :                 switch (level) {
    5397           0 :                         case NETR_DELTA_DOMAIN:
    5398           0 :                         break;
    5399             : 
    5400           0 :                         case NETR_DELTA_GROUP:
    5401           0 :                         break;
    5402             : 
    5403           0 :                         case NETR_DELTA_DELETE_GROUP:
    5404           0 :                         break;
    5405             : 
    5406           0 :                         case NETR_DELTA_RENAME_GROUP:
    5407           0 :                         break;
    5408             : 
    5409           0 :                         case NETR_DELTA_USER:
    5410           0 :                         break;
    5411             : 
    5412           0 :                         case NETR_DELTA_DELETE_USER:
    5413           0 :                         break;
    5414             : 
    5415           0 :                         case NETR_DELTA_RENAME_USER:
    5416           0 :                         break;
    5417             : 
    5418           0 :                         case NETR_DELTA_GROUP_MEMBER:
    5419           0 :                         break;
    5420             : 
    5421           0 :                         case NETR_DELTA_ALIAS:
    5422           0 :                         break;
    5423             : 
    5424           0 :                         case NETR_DELTA_DELETE_ALIAS:
    5425           0 :                         break;
    5426             : 
    5427           0 :                         case NETR_DELTA_RENAME_ALIAS:
    5428           0 :                         break;
    5429             : 
    5430           0 :                         case NETR_DELTA_ALIAS_MEMBER:
    5431           0 :                         break;
    5432             : 
    5433           0 :                         case NETR_DELTA_POLICY:
    5434           0 :                                 if (r->sid) {
    5435           0 :                                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5436           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    5437           0 :                                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5438           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    5439             :                                 }
    5440           0 :                         break;
    5441             : 
    5442           0 :                         case NETR_DELTA_TRUSTED_DOMAIN:
    5443           0 :                                 if (r->sid) {
    5444           0 :                                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5445           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    5446           0 :                                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5447           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    5448             :                                 }
    5449           0 :                         break;
    5450             : 
    5451           0 :                         case NETR_DELTA_DELETE_TRUST:
    5452           0 :                                 if (r->sid) {
    5453           0 :                                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5454           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    5455           0 :                                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5456           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    5457             :                                 }
    5458           0 :                         break;
    5459             : 
    5460           0 :                         case NETR_DELTA_ACCOUNT:
    5461           0 :                                 if (r->sid) {
    5462           0 :                                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5463           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    5464           0 :                                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5465           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    5466             :                                 }
    5467           0 :                         break;
    5468             : 
    5469           0 :                         case NETR_DELTA_DELETE_ACCOUNT:
    5470           0 :                                 if (r->sid) {
    5471           0 :                                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5472           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    5473           0 :                                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5474           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    5475             :                                 }
    5476           0 :                         break;
    5477             : 
    5478           0 :                         case NETR_DELTA_SECRET:
    5479           0 :                                 if (r->name) {
    5480           0 :                                         _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5481           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
    5482           0 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
    5483           0 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
    5484           0 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
    5485           0 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
    5486           0 :                                         if (length_name_1 > size_name_1) {
    5487           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
    5488             :                                         }
    5489           0 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
    5490           0 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
    5491           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
    5492             :                                 }
    5493           0 :                         break;
    5494             : 
    5495           0 :                         case NETR_DELTA_DELETE_SECRET:
    5496           0 :                                 if (r->name) {
    5497           0 :                                         _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5498           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
    5499           0 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
    5500           0 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
    5501           0 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
    5502           0 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
    5503           0 :                                         if (length_name_1 > size_name_1) {
    5504           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
    5505             :                                         }
    5506           0 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
    5507           0 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
    5508           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
    5509             :                                 }
    5510           0 :                         break;
    5511             : 
    5512           0 :                         case NETR_DELTA_DELETE_GROUP2:
    5513           0 :                         break;
    5514             : 
    5515           0 :                         case NETR_DELTA_DELETE_USER2:
    5516           0 :                         break;
    5517             : 
    5518           0 :                         case NETR_DELTA_MODIFY_COUNT:
    5519           0 :                         break;
    5520             : 
    5521           0 :                         default:
    5522           0 :                         break;
    5523             : 
    5524             :                 }
    5525           0 :         }
    5526           0 :         return NDR_ERR_SUCCESS;
    5527             : }
    5528             : 
    5529           0 : _PUBLIC_ void ndr_print_netr_DELTA_ID_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_ID_UNION *r)
    5530             : {
    5531             :         uint32_t level;
    5532           0 :         level = ndr_print_steal_switch_value(ndr, r);
    5533           0 :         ndr_print_union(ndr, name, level, "netr_DELTA_ID_UNION");
    5534           0 :         switch (level) {
    5535           0 :                 case NETR_DELTA_DOMAIN:
    5536           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5537           0 :                 break;
    5538             : 
    5539           0 :                 case NETR_DELTA_GROUP:
    5540           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5541           0 :                 break;
    5542             : 
    5543           0 :                 case NETR_DELTA_DELETE_GROUP:
    5544           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5545           0 :                 break;
    5546             : 
    5547           0 :                 case NETR_DELTA_RENAME_GROUP:
    5548           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5549           0 :                 break;
    5550             : 
    5551           0 :                 case NETR_DELTA_USER:
    5552           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5553           0 :                 break;
    5554             : 
    5555           0 :                 case NETR_DELTA_DELETE_USER:
    5556           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5557           0 :                 break;
    5558             : 
    5559           0 :                 case NETR_DELTA_RENAME_USER:
    5560           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5561           0 :                 break;
    5562             : 
    5563           0 :                 case NETR_DELTA_GROUP_MEMBER:
    5564           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5565           0 :                 break;
    5566             : 
    5567           0 :                 case NETR_DELTA_ALIAS:
    5568           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5569           0 :                 break;
    5570             : 
    5571           0 :                 case NETR_DELTA_DELETE_ALIAS:
    5572           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5573           0 :                 break;
    5574             : 
    5575           0 :                 case NETR_DELTA_RENAME_ALIAS:
    5576           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5577           0 :                 break;
    5578             : 
    5579           0 :                 case NETR_DELTA_ALIAS_MEMBER:
    5580           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5581           0 :                 break;
    5582             : 
    5583           0 :                 case NETR_DELTA_POLICY:
    5584           0 :                         ndr_print_ptr(ndr, "sid", r->sid);
    5585           0 :                         ndr->depth++;
    5586           0 :                         if (r->sid) {
    5587           0 :                                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    5588             :                         }
    5589           0 :                         ndr->depth--;
    5590           0 :                 break;
    5591             : 
    5592           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
    5593           0 :                         ndr_print_ptr(ndr, "sid", r->sid);
    5594           0 :                         ndr->depth++;
    5595           0 :                         if (r->sid) {
    5596           0 :                                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    5597             :                         }
    5598           0 :                         ndr->depth--;
    5599           0 :                 break;
    5600             : 
    5601           0 :                 case NETR_DELTA_DELETE_TRUST:
    5602           0 :                         ndr_print_ptr(ndr, "sid", r->sid);
    5603           0 :                         ndr->depth++;
    5604           0 :                         if (r->sid) {
    5605           0 :                                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    5606             :                         }
    5607           0 :                         ndr->depth--;
    5608           0 :                 break;
    5609             : 
    5610           0 :                 case NETR_DELTA_ACCOUNT:
    5611           0 :                         ndr_print_ptr(ndr, "sid", r->sid);
    5612           0 :                         ndr->depth++;
    5613           0 :                         if (r->sid) {
    5614           0 :                                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    5615             :                         }
    5616           0 :                         ndr->depth--;
    5617           0 :                 break;
    5618             : 
    5619           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
    5620           0 :                         ndr_print_ptr(ndr, "sid", r->sid);
    5621           0 :                         ndr->depth++;
    5622           0 :                         if (r->sid) {
    5623           0 :                                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    5624             :                         }
    5625           0 :                         ndr->depth--;
    5626           0 :                 break;
    5627             : 
    5628           0 :                 case NETR_DELTA_SECRET:
    5629           0 :                         ndr_print_ptr(ndr, "name", r->name);
    5630           0 :                         ndr->depth++;
    5631           0 :                         if (r->name) {
    5632           0 :                                 ndr_print_string(ndr, "name", r->name);
    5633             :                         }
    5634           0 :                         ndr->depth--;
    5635           0 :                 break;
    5636             : 
    5637           0 :                 case NETR_DELTA_DELETE_SECRET:
    5638           0 :                         ndr_print_ptr(ndr, "name", r->name);
    5639           0 :                         ndr->depth++;
    5640           0 :                         if (r->name) {
    5641           0 :                                 ndr_print_string(ndr, "name", r->name);
    5642             :                         }
    5643           0 :                         ndr->depth--;
    5644           0 :                 break;
    5645             : 
    5646           0 :                 case NETR_DELTA_DELETE_GROUP2:
    5647           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5648           0 :                 break;
    5649             : 
    5650           0 :                 case NETR_DELTA_DELETE_USER2:
    5651           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5652           0 :                 break;
    5653             : 
    5654           0 :                 case NETR_DELTA_MODIFY_COUNT:
    5655           0 :                 break;
    5656             : 
    5657           0 :                 default:
    5658           0 :                 break;
    5659             : 
    5660             :         }
    5661           0 : }
    5662             : 
    5663           0 : static enum ndr_err_code ndr_push_netr_DELTA_ENUM(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ENUM *r)
    5664             : {
    5665           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5666           0 :         if (ndr_flags & NDR_SCALARS) {
    5667           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5668           0 :                 NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, r->delta_type));
    5669           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
    5670           0 :                 NDR_CHECK(ndr_push_netr_DELTA_ID_UNION(ndr, NDR_SCALARS, &r->delta_id_union));
    5671           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_union, r->delta_type));
    5672           0 :                 NDR_CHECK(ndr_push_netr_DELTA_UNION(ndr, NDR_SCALARS, &r->delta_union));
    5673           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5674             :         }
    5675           0 :         if (ndr_flags & NDR_BUFFERS) {
    5676           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
    5677           0 :                 NDR_CHECK(ndr_push_netr_DELTA_ID_UNION(ndr, NDR_BUFFERS, &r->delta_id_union));
    5678           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_union, r->delta_type));
    5679           0 :                 NDR_CHECK(ndr_push_netr_DELTA_UNION(ndr, NDR_BUFFERS, &r->delta_union));
    5680             :         }
    5681           0 :         return NDR_ERR_SUCCESS;
    5682             : }
    5683             : 
    5684           0 : static enum ndr_err_code ndr_pull_netr_DELTA_ENUM(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ENUM *r)
    5685             : {
    5686           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5687           0 :         if (ndr_flags & NDR_SCALARS) {
    5688           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5689           0 :                 NDR_CHECK(ndr_pull_netr_DeltaEnum(ndr, NDR_SCALARS, &r->delta_type));
    5690           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
    5691           0 :                 NDR_CHECK(ndr_pull_netr_DELTA_ID_UNION(ndr, NDR_SCALARS, &r->delta_id_union));
    5692           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_union, r->delta_type));
    5693           0 :                 NDR_CHECK(ndr_pull_netr_DELTA_UNION(ndr, NDR_SCALARS, &r->delta_union));
    5694           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5695             :         }
    5696           0 :         if (ndr_flags & NDR_BUFFERS) {
    5697           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
    5698           0 :                 NDR_CHECK(ndr_pull_netr_DELTA_ID_UNION(ndr, NDR_BUFFERS, &r->delta_id_union));
    5699           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_union, r->delta_type));
    5700           0 :                 NDR_CHECK(ndr_pull_netr_DELTA_UNION(ndr, NDR_BUFFERS, &r->delta_union));
    5701             :         }
    5702           0 :         return NDR_ERR_SUCCESS;
    5703             : }
    5704             : 
    5705           0 : _PUBLIC_ void ndr_print_netr_DELTA_ENUM(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM *r)
    5706             : {
    5707           0 :         ndr_print_struct(ndr, name, "netr_DELTA_ENUM");
    5708           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5709           0 :         ndr->depth++;
    5710           0 :         ndr_print_netr_DeltaEnum(ndr, "delta_type", r->delta_type);
    5711           0 :         ndr_print_set_switch_value(ndr, &r->delta_id_union, r->delta_type);
    5712           0 :         ndr_print_netr_DELTA_ID_UNION(ndr, "delta_id_union", &r->delta_id_union);
    5713           0 :         ndr_print_set_switch_value(ndr, &r->delta_union, r->delta_type);
    5714           0 :         ndr_print_netr_DELTA_UNION(ndr, "delta_union", &r->delta_union);
    5715           0 :         ndr->depth--;
    5716             : }
    5717             : 
    5718           0 : static enum ndr_err_code ndr_push_netr_DELTA_ENUM_ARRAY(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ENUM_ARRAY *r)
    5719             : {
    5720             :         uint32_t cntr_delta_enum_1;
    5721           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5722           0 :         if (ndr_flags & NDR_SCALARS) {
    5723           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5724           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_deltas));
    5725           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->delta_enum));
    5726           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5727             :         }
    5728           0 :         if (ndr_flags & NDR_BUFFERS) {
    5729           0 :                 if (r->delta_enum) {
    5730           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_deltas));
    5731           0 :                         for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (r->num_deltas); cntr_delta_enum_1++) {
    5732           0 :                                 NDR_CHECK(ndr_push_netr_DELTA_ENUM(ndr, NDR_SCALARS, &r->delta_enum[cntr_delta_enum_1]));
    5733             :                         }
    5734           0 :                         for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (r->num_deltas); cntr_delta_enum_1++) {
    5735           0 :                                 NDR_CHECK(ndr_push_netr_DELTA_ENUM(ndr, NDR_BUFFERS, &r->delta_enum[cntr_delta_enum_1]));
    5736             :                         }
    5737             :                 }
    5738             :         }
    5739           0 :         return NDR_ERR_SUCCESS;
    5740             : }
    5741             : 
    5742           0 : static enum ndr_err_code ndr_pull_netr_DELTA_ENUM_ARRAY(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ENUM_ARRAY *r)
    5743             : {
    5744             :         uint32_t _ptr_delta_enum;
    5745           0 :         uint32_t size_delta_enum_1 = 0;
    5746             :         uint32_t cntr_delta_enum_1;
    5747           0 :         TALLOC_CTX *_mem_save_delta_enum_0 = NULL;
    5748           0 :         TALLOC_CTX *_mem_save_delta_enum_1 = NULL;
    5749           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5750           0 :         if (ndr_flags & NDR_SCALARS) {
    5751           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5752           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_deltas));
    5753           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum));
    5754           0 :                 if (_ptr_delta_enum) {
    5755           0 :                         NDR_PULL_ALLOC(ndr, r->delta_enum);
    5756             :                 } else {
    5757           0 :                         r->delta_enum = NULL;
    5758             :                 }
    5759           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5760             :         }
    5761           0 :         if (ndr_flags & NDR_BUFFERS) {
    5762           0 :                 if (r->delta_enum) {
    5763           0 :                         _mem_save_delta_enum_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5764           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->delta_enum, 0);
    5765           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->delta_enum));
    5766           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->delta_enum, &size_delta_enum_1));
    5767           0 :                         NDR_PULL_ALLOC_N(ndr, r->delta_enum, size_delta_enum_1);
    5768           0 :                         _mem_save_delta_enum_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5769           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->delta_enum, 0);
    5770           0 :                         for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (size_delta_enum_1); cntr_delta_enum_1++) {
    5771           0 :                                 NDR_CHECK(ndr_pull_netr_DELTA_ENUM(ndr, NDR_SCALARS, &r->delta_enum[cntr_delta_enum_1]));
    5772             :                         }
    5773           0 :                         for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (size_delta_enum_1); cntr_delta_enum_1++) {
    5774           0 :                                 NDR_CHECK(ndr_pull_netr_DELTA_ENUM(ndr, NDR_BUFFERS, &r->delta_enum[cntr_delta_enum_1]));
    5775             :                         }
    5776           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_1, 0);
    5777           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_0, 0);
    5778             :                 }
    5779           0 :                 if (r->delta_enum) {
    5780           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->delta_enum, r->num_deltas));
    5781             :                 }
    5782           0 :                 for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (size_delta_enum_1); cntr_delta_enum_1++) {
    5783             :                 }
    5784             :         }
    5785           0 :         return NDR_ERR_SUCCESS;
    5786             : }
    5787             : 
    5788           0 : _PUBLIC_ void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM_ARRAY *r)
    5789             : {
    5790             :         uint32_t cntr_delta_enum_1;
    5791           0 :         ndr_print_struct(ndr, name, "netr_DELTA_ENUM_ARRAY");
    5792           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5793           0 :         ndr->depth++;
    5794           0 :         ndr_print_uint32(ndr, "num_deltas", r->num_deltas);
    5795           0 :         ndr_print_ptr(ndr, "delta_enum", r->delta_enum);
    5796           0 :         ndr->depth++;
    5797           0 :         if (r->delta_enum) {
    5798           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "delta_enum", (int)r->num_deltas);
    5799           0 :                 ndr->depth++;
    5800           0 :                 for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (r->num_deltas); cntr_delta_enum_1++) {
    5801           0 :                         ndr_print_netr_DELTA_ENUM(ndr, "delta_enum", &r->delta_enum[cntr_delta_enum_1]);
    5802             :                 }
    5803           0 :                 ndr->depth--;
    5804             :         }
    5805           0 :         ndr->depth--;
    5806           0 :         ndr->depth--;
    5807             : }
    5808             : 
    5809         108 : static enum ndr_err_code ndr_push_netr_UAS_INFO_0(struct ndr_push *ndr, int ndr_flags, const struct netr_UAS_INFO_0 *r)
    5810             : {
    5811             :         {
    5812         108 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    5813         108 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    5814         108 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5815         108 :                 if (ndr_flags & NDR_SCALARS) {
    5816         108 :                         NDR_CHECK(ndr_push_align(ndr, 4));
    5817         108 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->computer_name, 16));
    5818         108 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timecreated));
    5819         108 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number));
    5820         108 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    5821             :                 }
    5822          90 :                 if (ndr_flags & NDR_BUFFERS) {
    5823             :                 }
    5824         108 :                 ndr->flags = _flags_save_STRUCT;
    5825             :         }
    5826         108 :         return NDR_ERR_SUCCESS;
    5827             : }
    5828             : 
    5829          96 : static enum ndr_err_code ndr_pull_netr_UAS_INFO_0(struct ndr_pull *ndr, int ndr_flags, struct netr_UAS_INFO_0 *r)
    5830             : {
    5831          96 :         uint32_t size_computer_name_0 = 0;
    5832             :         {
    5833          96 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    5834          96 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    5835          96 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5836          96 :                 if (ndr_flags & NDR_SCALARS) {
    5837          96 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
    5838          96 :                         size_computer_name_0 = 16;
    5839          96 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->computer_name, size_computer_name_0));
    5840          96 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timecreated));
    5841          96 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number));
    5842          96 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    5843             :                 }
    5844          80 :                 if (ndr_flags & NDR_BUFFERS) {
    5845             :                 }
    5846          96 :                 ndr->flags = _flags_save_STRUCT;
    5847             :         }
    5848          96 :         return NDR_ERR_SUCCESS;
    5849             : }
    5850             : 
    5851          24 : _PUBLIC_ void ndr_print_netr_UAS_INFO_0(struct ndr_print *ndr, const char *name, const struct netr_UAS_INFO_0 *r)
    5852             : {
    5853          24 :         ndr_print_struct(ndr, name, "netr_UAS_INFO_0");
    5854          24 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5855             :         {
    5856          24 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    5857          24 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    5858          24 :                 ndr->depth++;
    5859          24 :                 ndr_print_array_uint8(ndr, "computer_name", r->computer_name, 16);
    5860          24 :                 ndr_print_uint32(ndr, "timecreated", r->timecreated);
    5861          24 :                 ndr_print_uint32(ndr, "serial_number", r->serial_number);
    5862          24 :                 ndr->depth--;
    5863          24 :                 ndr->flags = _flags_save_STRUCT;
    5864             :         }
    5865             : }
    5866             : 
    5867          60 : static enum ndr_err_code ndr_push_netr_AccountBuffer(struct ndr_push *ndr, int ndr_flags, const struct netr_AccountBuffer *r)
    5868             : {
    5869          60 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5870          60 :         if (ndr_flags & NDR_SCALARS) {
    5871          60 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    5872             :                 {
    5873          60 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
    5874          60 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    5875          60 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->blob));
    5876          60 :                         ndr->flags = _flags_save_DATA_BLOB;
    5877             :                 }
    5878          60 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    5879             :         }
    5880          50 :         if (ndr_flags & NDR_BUFFERS) {
    5881             :         }
    5882          60 :         return NDR_ERR_SUCCESS;
    5883             : }
    5884             : 
    5885          48 : static enum ndr_err_code ndr_pull_netr_AccountBuffer(struct ndr_pull *ndr, int ndr_flags, struct netr_AccountBuffer *r)
    5886             : {
    5887          48 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5888          48 :         if (ndr_flags & NDR_SCALARS) {
    5889          48 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    5890             :                 {
    5891          48 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
    5892          48 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    5893          48 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->blob));
    5894          48 :                         ndr->flags = _flags_save_DATA_BLOB;
    5895             :                 }
    5896          48 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    5897             :         }
    5898          40 :         if (ndr_flags & NDR_BUFFERS) {
    5899             :         }
    5900          48 :         return NDR_ERR_SUCCESS;
    5901             : }
    5902             : 
    5903          24 : _PUBLIC_ void ndr_print_netr_AccountBuffer(struct ndr_print *ndr, const char *name, const struct netr_AccountBuffer *r)
    5904             : {
    5905          24 :         ndr_print_struct(ndr, name, "netr_AccountBuffer");
    5906          24 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5907          24 :         ndr->depth++;
    5908             :         {
    5909          24 :                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
    5910          24 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    5911          24 :                 ndr_print_DATA_BLOB(ndr, "blob", r->blob);
    5912          24 :                 ndr->flags = _flags_save_DATA_BLOB;
    5913             :         }
    5914          24 :         ndr->depth--;
    5915             : }
    5916             : 
    5917         403 : static enum ndr_err_code ndr_push_netr_InfoFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    5918             : {
    5919         445 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    5920         403 :         return NDR_ERR_SUCCESS;
    5921             : }
    5922             : 
    5923         519 : static enum ndr_err_code ndr_pull_netr_InfoFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    5924             : {
    5925             :         uint32_t v;
    5926         570 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    5927         570 :         *r = v;
    5928         519 :         return NDR_ERR_SUCCESS;
    5929             : }
    5930             : 
    5931          84 : _PUBLIC_ void ndr_print_netr_InfoFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    5932             : {
    5933          84 :         ndr_print_uint32(ndr, name, r);
    5934          84 :         ndr->depth++;
    5935          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_REPLICATION_NEEDED", NETLOGON_REPLICATION_NEEDED, r);
    5936          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_REPLICATION_IN_PROGRESS", NETLOGON_REPLICATION_IN_PROGRESS, r);
    5937          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_FULL_SYNC_REPLICATION", NETLOGON_FULL_SYNC_REPLICATION, r);
    5938          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_REDO_NEEDED", NETLOGON_REDO_NEEDED, r);
    5939          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_HAS_IP", NETLOGON_HAS_IP, r);
    5940          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_HAS_TIMESERV", NETLOGON_HAS_TIMESERV, r);
    5941          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_DNS_UPDATE_FAILURE", NETLOGON_DNS_UPDATE_FAILURE, r);
    5942          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_VERIFY_STATUS_RETURNED", NETLOGON_VERIFY_STATUS_RETURNED, r);
    5943          84 :         ndr->depth--;
    5944          84 : }
    5945             : 
    5946         115 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_1(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_1 *r)
    5947             : {
    5948         115 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5949         115 :         if (ndr_flags & NDR_SCALARS) {
    5950         115 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    5951         133 :                 NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags));
    5952         115 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->pdc_connection_status));
    5953         115 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    5954             :         }
    5955          97 :         if (ndr_flags & NDR_BUFFERS) {
    5956             :         }
    5957         115 :         return NDR_ERR_SUCCESS;
    5958             : }
    5959             : 
    5960          99 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_1(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_1 *r)
    5961             : {
    5962          99 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5963          99 :         if (ndr_flags & NDR_SCALARS) {
    5964          99 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    5965         114 :                 NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags));
    5966          99 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->pdc_connection_status));
    5967          99 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    5968             :         }
    5969          84 :         if (ndr_flags & NDR_BUFFERS) {
    5970             :         }
    5971          99 :         return NDR_ERR_SUCCESS;
    5972             : }
    5973             : 
    5974          36 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_1(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_1 *r)
    5975             : {
    5976          36 :         ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_1");
    5977          36 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5978          36 :         ndr->depth++;
    5979          36 :         ndr_print_netr_InfoFlags(ndr, "flags", r->flags);
    5980          36 :         ndr_print_WERROR(ndr, "pdc_connection_status", r->pdc_connection_status);
    5981          36 :         ndr->depth--;
    5982             : }
    5983             : 
    5984         318 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_2(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_2 *r)
    5985             : {
    5986         318 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5987         318 :         if (ndr_flags & NDR_SCALARS) {
    5988         318 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5989         342 :                 NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags));
    5990         318 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->pdc_connection_status));
    5991         318 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_dc_name));
    5992         318 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->tc_connection_status));
    5993         318 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5994             :         }
    5995         318 :         if (ndr_flags & NDR_BUFFERS) {
    5996         318 :                 if (r->trusted_dc_name) {
    5997         306 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
    5998         306 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5999         306 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
    6000         306 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->trusted_dc_name, ndr_charset_length(r->trusted_dc_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6001             :                 }
    6002             :         }
    6003         294 :         return NDR_ERR_SUCCESS;
    6004             : }
    6005             : 
    6006         459 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_2(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_2 *r)
    6007             : {
    6008             :         uint32_t _ptr_trusted_dc_name;
    6009         459 :         uint32_t size_trusted_dc_name_1 = 0;
    6010         459 :         uint32_t length_trusted_dc_name_1 = 0;
    6011         459 :         TALLOC_CTX *_mem_save_trusted_dc_name_0 = NULL;
    6012         459 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6013         459 :         if (ndr_flags & NDR_SCALARS) {
    6014         459 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6015         495 :                 NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags));
    6016         459 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->pdc_connection_status));
    6017         459 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_dc_name));
    6018         459 :                 if (_ptr_trusted_dc_name) {
    6019         447 :                         NDR_PULL_ALLOC(ndr, r->trusted_dc_name);
    6020             :                 } else {
    6021          12 :                         r->trusted_dc_name = NULL;
    6022             :                 }
    6023         459 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->tc_connection_status));
    6024         459 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6025             :         }
    6026         459 :         if (ndr_flags & NDR_BUFFERS) {
    6027         459 :                 if (r->trusted_dc_name) {
    6028         447 :                         _mem_save_trusted_dc_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6029         447 :                         NDR_PULL_SET_MEM_CTX(ndr, r->trusted_dc_name, 0);
    6030         447 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_dc_name));
    6031         447 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->trusted_dc_name));
    6032         447 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->trusted_dc_name, &size_trusted_dc_name_1));
    6033         447 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->trusted_dc_name, &length_trusted_dc_name_1));
    6034         447 :                         if (length_trusted_dc_name_1 > size_trusted_dc_name_1) {
    6035           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_trusted_dc_name_1, length_trusted_dc_name_1);
    6036             :                         }
    6037         447 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_dc_name_1, sizeof(uint16_t)));
    6038         447 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->trusted_dc_name, length_trusted_dc_name_1, sizeof(uint16_t), CH_UTF16));
    6039         447 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_dc_name_0, 0);
    6040             :                 }
    6041             :         }
    6042         423 :         return NDR_ERR_SUCCESS;
    6043             : }
    6044             : 
    6045          48 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_2(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_2 *r)
    6046             : {
    6047          48 :         ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_2");
    6048          48 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6049          48 :         ndr->depth++;
    6050          48 :         ndr_print_netr_InfoFlags(ndr, "flags", r->flags);
    6051          48 :         ndr_print_WERROR(ndr, "pdc_connection_status", r->pdc_connection_status);
    6052          48 :         ndr_print_ptr(ndr, "trusted_dc_name", r->trusted_dc_name);
    6053          48 :         ndr->depth++;
    6054          48 :         if (r->trusted_dc_name) {
    6055          48 :                 ndr_print_string(ndr, "trusted_dc_name", r->trusted_dc_name);
    6056             :         }
    6057          48 :         ndr->depth--;
    6058          48 :         ndr_print_WERROR(ndr, "tc_connection_status", r->tc_connection_status);
    6059          48 :         ndr->depth--;
    6060             : }
    6061             : 
    6062          12 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_3(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_3 *r)
    6063             : {
    6064          12 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6065          12 :         if (ndr_flags & NDR_SCALARS) {
    6066          12 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    6067          12 :                 NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags));
    6068          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_attempts));
    6069          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
    6070          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
    6071          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
    6072          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
    6073          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    6074          12 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    6075             :         }
    6076          12 :         if (ndr_flags & NDR_BUFFERS) {
    6077             :         }
    6078          12 :         return NDR_ERR_SUCCESS;
    6079             : }
    6080             : 
    6081          12 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_3(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_3 *r)
    6082             : {
    6083          12 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6084          12 :         if (ndr_flags & NDR_SCALARS) {
    6085          12 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    6086          12 :                 NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags));
    6087          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_attempts));
    6088          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
    6089          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
    6090          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
    6091          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
    6092          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    6093          12 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    6094             :         }
    6095          12 :         if (ndr_flags & NDR_BUFFERS) {
    6096             :         }
    6097          12 :         return NDR_ERR_SUCCESS;
    6098             : }
    6099             : 
    6100           0 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_3(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_3 *r)
    6101             : {
    6102           0 :         ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_3");
    6103           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6104           0 :         ndr->depth++;
    6105           0 :         ndr_print_netr_InfoFlags(ndr, "flags", r->flags);
    6106           0 :         ndr_print_uint32(ndr, "logon_attempts", r->logon_attempts);
    6107           0 :         ndr_print_uint32(ndr, "unknown1", r->unknown1);
    6108           0 :         ndr_print_uint32(ndr, "unknown2", r->unknown2);
    6109           0 :         ndr_print_uint32(ndr, "unknown3", r->unknown3);
    6110           0 :         ndr_print_uint32(ndr, "unknown4", r->unknown4);
    6111           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    6112           0 :         ndr->depth--;
    6113             : }
    6114             : 
    6115           0 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_4(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_4 *r)
    6116             : {
    6117           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6118           0 :         if (ndr_flags & NDR_SCALARS) {
    6119           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6120           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_dc_name));
    6121           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_domain_name));
    6122           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6123             :         }
    6124           0 :         if (ndr_flags & NDR_BUFFERS) {
    6125           0 :                 if (r->trusted_dc_name) {
    6126           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
    6127           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6128           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
    6129           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->trusted_dc_name, ndr_charset_length(r->trusted_dc_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6130             :                 }
    6131           0 :                 if (r->trusted_domain_name) {
    6132           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_domain_name, CH_UTF16)));
    6133           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6134           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_domain_name, CH_UTF16)));
    6135           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->trusted_domain_name, ndr_charset_length(r->trusted_domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6136             :                 }
    6137             :         }
    6138           0 :         return NDR_ERR_SUCCESS;
    6139             : }
    6140             : 
    6141           0 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_4(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_4 *r)
    6142             : {
    6143             :         uint32_t _ptr_trusted_dc_name;
    6144           0 :         uint32_t size_trusted_dc_name_1 = 0;
    6145           0 :         uint32_t length_trusted_dc_name_1 = 0;
    6146           0 :         TALLOC_CTX *_mem_save_trusted_dc_name_0 = NULL;
    6147             :         uint32_t _ptr_trusted_domain_name;
    6148           0 :         uint32_t size_trusted_domain_name_1 = 0;
    6149           0 :         uint32_t length_trusted_domain_name_1 = 0;
    6150           0 :         TALLOC_CTX *_mem_save_trusted_domain_name_0 = NULL;
    6151           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6152           0 :         if (ndr_flags & NDR_SCALARS) {
    6153           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6154           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_dc_name));
    6155           0 :                 if (_ptr_trusted_dc_name) {
    6156           0 :                         NDR_PULL_ALLOC(ndr, r->trusted_dc_name);
    6157             :                 } else {
    6158           0 :                         r->trusted_dc_name = NULL;
    6159             :                 }
    6160           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domain_name));
    6161           0 :                 if (_ptr_trusted_domain_name) {
    6162           0 :                         NDR_PULL_ALLOC(ndr, r->trusted_domain_name);
    6163             :                 } else {
    6164           0 :                         r->trusted_domain_name = NULL;
    6165             :                 }
    6166           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6167             :         }
    6168           0 :         if (ndr_flags & NDR_BUFFERS) {
    6169           0 :                 if (r->trusted_dc_name) {
    6170           0 :                         _mem_save_trusted_dc_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6171           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->trusted_dc_name, 0);
    6172           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_dc_name));
    6173           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->trusted_dc_name));
    6174           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->trusted_dc_name, &size_trusted_dc_name_1));
    6175           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->trusted_dc_name, &length_trusted_dc_name_1));
    6176           0 :                         if (length_trusted_dc_name_1 > size_trusted_dc_name_1) {
    6177           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_trusted_dc_name_1, length_trusted_dc_name_1);
    6178             :                         }
    6179           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_dc_name_1, sizeof(uint16_t)));
    6180           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->trusted_dc_name, length_trusted_dc_name_1, sizeof(uint16_t), CH_UTF16));
    6181           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_dc_name_0, 0);
    6182             :                 }
    6183           0 :                 if (r->trusted_domain_name) {
    6184           0 :                         _mem_save_trusted_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6185           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domain_name, 0);
    6186           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_domain_name));
    6187           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->trusted_domain_name));
    6188           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->trusted_domain_name, &size_trusted_domain_name_1));
    6189           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->trusted_domain_name, &length_trusted_domain_name_1));
    6190           0 :                         if (length_trusted_domain_name_1 > size_trusted_domain_name_1) {
    6191           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_trusted_domain_name_1, length_trusted_domain_name_1);
    6192             :                         }
    6193           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_domain_name_1, sizeof(uint16_t)));
    6194           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->trusted_domain_name, length_trusted_domain_name_1, sizeof(uint16_t), CH_UTF16));
    6195           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_name_0, 0);
    6196             :                 }
    6197             :         }
    6198           0 :         return NDR_ERR_SUCCESS;
    6199             : }
    6200             : 
    6201           0 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_4(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_4 *r)
    6202             : {
    6203           0 :         ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_4");
    6204           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6205           0 :         ndr->depth++;
    6206           0 :         ndr_print_ptr(ndr, "trusted_dc_name", r->trusted_dc_name);
    6207           0 :         ndr->depth++;
    6208           0 :         if (r->trusted_dc_name) {
    6209           0 :                 ndr_print_string(ndr, "trusted_dc_name", r->trusted_dc_name);
    6210             :         }
    6211           0 :         ndr->depth--;
    6212           0 :         ndr_print_ptr(ndr, "trusted_domain_name", r->trusted_domain_name);
    6213           0 :         ndr->depth++;
    6214           0 :         if (r->trusted_domain_name) {
    6215           0 :                 ndr_print_string(ndr, "trusted_domain_name", r->trusted_domain_name);
    6216             :         }
    6217           0 :         ndr->depth--;
    6218           0 :         ndr->depth--;
    6219             : }
    6220             : 
    6221        9799 : _PUBLIC_ enum ndr_err_code ndr_push_netr_CONTROL_QUERY_INFORMATION(struct ndr_push *ndr, int ndr_flags, const union netr_CONTROL_QUERY_INFORMATION *r)
    6222             : {
    6223             :         uint32_t level;
    6224        9799 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6225        9799 :         if (ndr_flags & NDR_SCALARS) {
    6226             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6227        9799 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6228        9799 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6229        9799 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    6230             :                 /* ms_union is always aligned to the largest union arm*/
    6231        9799 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6232        9799 :                 switch (level) {
    6233        2472 :                         case 1: {
    6234        2472 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
    6235        2040 :                         break; }
    6236             : 
    6237        2692 :                         case 2: {
    6238        2692 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
    6239        2260 :                         break; }
    6240             : 
    6241        2678 :                         case 3: {
    6242        2678 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
    6243        2210 :                         break; }
    6244             : 
    6245        1648 :                         case 4: {
    6246        1648 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
    6247        1360 :                         break; }
    6248             : 
    6249         255 :                         default: {
    6250         255 :                         break; }
    6251             : 
    6252             :                 }
    6253           0 :         }
    6254        9799 :         if (ndr_flags & NDR_BUFFERS) {
    6255        9799 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6256             :                         /* We didn't get it above, and the token is not needed after this. */
    6257           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6258             :                 }
    6259        9799 :                 switch (level) {
    6260        2472 :                         case 1:
    6261        2472 :                                 if (r->info1) {
    6262         115 :                                         NDR_CHECK(ndr_push_netr_NETLOGON_INFO_1(ndr, NDR_SCALARS, r->info1));
    6263             :                                 }
    6264        2040 :                         break;
    6265             : 
    6266        2692 :                         case 2:
    6267        2692 :                                 if (r->info2) {
    6268         318 :                                         NDR_CHECK(ndr_push_netr_NETLOGON_INFO_2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
    6269             :                                 }
    6270        2260 :                         break;
    6271             : 
    6272        2678 :                         case 3:
    6273        2678 :                                 if (r->info3) {
    6274          12 :                                         NDR_CHECK(ndr_push_netr_NETLOGON_INFO_3(ndr, NDR_SCALARS, r->info3));
    6275             :                                 }
    6276        2210 :                         break;
    6277             : 
    6278        1648 :                         case 4:
    6279        1648 :                                 if (r->info4) {
    6280           0 :                                         NDR_CHECK(ndr_push_netr_NETLOGON_INFO_4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
    6281             :                                 }
    6282        1360 :                         break;
    6283             : 
    6284         255 :                         default:
    6285         255 :                         break;
    6286             : 
    6287             :                 }
    6288           0 :         }
    6289        8125 :         return NDR_ERR_SUCCESS;
    6290             : }
    6291             : 
    6292        8430 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_CONTROL_QUERY_INFORMATION(struct ndr_pull *ndr, int ndr_flags, union netr_CONTROL_QUERY_INFORMATION *r)
    6293             : {
    6294             :         uint32_t level;
    6295             :         uint32_t _level;
    6296        8430 :         TALLOC_CTX *_mem_save_info1_0 = NULL;
    6297             :         uint32_t _ptr_info1;
    6298        8430 :         TALLOC_CTX *_mem_save_info2_0 = NULL;
    6299             :         uint32_t _ptr_info2;
    6300        8430 :         TALLOC_CTX *_mem_save_info3_0 = NULL;
    6301             :         uint32_t _ptr_info3;
    6302        8430 :         TALLOC_CTX *_mem_save_info4_0 = NULL;
    6303             :         uint32_t _ptr_info4;
    6304        8430 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6305        8430 :         if (ndr_flags & NDR_SCALARS) {
    6306             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6307        8430 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6308        8430 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6309        8430 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    6310        8430 :                 if (_level != level) {
    6311           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    6312             :                 }
    6313             :                 /* ms_union is always aligned to the largest union arm*/
    6314        8430 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6315        8430 :                 switch (level) {
    6316        2088 :                         case 1: {
    6317        2088 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
    6318        2088 :                                 if (_ptr_info1) {
    6319          99 :                                         NDR_PULL_ALLOC(ndr, r->info1);
    6320             :                                 } else {
    6321        1989 :                                         r->info1 = NULL;
    6322             :                                 }
    6323        1728 :                         break; }
    6324             : 
    6325        2427 :                         case 2: {
    6326        2427 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
    6327        2427 :                                 if (_ptr_info2) {
    6328         459 :                                         NDR_PULL_ALLOC(ndr, r->info2);
    6329             :                                 } else {
    6330        1968 :                                         r->info2 = NULL;
    6331             :                                 }
    6332        2051 :                         break; }
    6333             : 
    6334        2262 :                         case 3: {
    6335        2262 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
    6336        2262 :                                 if (_ptr_info3) {
    6337          12 :                                         NDR_PULL_ALLOC(ndr, r->info3);
    6338             :                                 } else {
    6339        2250 :                                         r->info3 = NULL;
    6340             :                                 }
    6341        1872 :                         break; }
    6342             : 
    6343        1392 :                         case 4: {
    6344        1392 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
    6345        1392 :                                 if (_ptr_info4) {
    6346           0 :                                         NDR_PULL_ALLOC(ndr, r->info4);
    6347             :                                 } else {
    6348        1392 :                                         r->info4 = NULL;
    6349             :                                 }
    6350        1152 :                         break; }
    6351             : 
    6352         216 :                         default: {
    6353         216 :                         break; }
    6354             : 
    6355             :                 }
    6356           0 :         }
    6357        8430 :         if (ndr_flags & NDR_BUFFERS) {
    6358        8430 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6359             :                         /* We didn't get it above, and the token is not needed after this. */
    6360           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6361             :                 }
    6362        8430 :                 switch (level) {
    6363        2088 :                         case 1:
    6364        2088 :                                 if (r->info1) {
    6365          99 :                                         _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6366          99 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
    6367          99 :                                         NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_1(ndr, NDR_SCALARS, r->info1));
    6368          99 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
    6369             :                                 }
    6370        1728 :                         break;
    6371             : 
    6372        2427 :                         case 2:
    6373        2427 :                                 if (r->info2) {
    6374         459 :                                         _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6375         459 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
    6376         459 :                                         NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
    6377         459 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
    6378             :                                 }
    6379        2051 :                         break;
    6380             : 
    6381        2262 :                         case 3:
    6382        2262 :                                 if (r->info3) {
    6383          12 :                                         _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6384          12 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
    6385          12 :                                         NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_3(ndr, NDR_SCALARS, r->info3));
    6386          12 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
    6387             :                                 }
    6388        1872 :                         break;
    6389             : 
    6390        1392 :                         case 4:
    6391        1392 :                                 if (r->info4) {
    6392           0 :                                         _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6393           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
    6394           0 :                                         NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
    6395           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
    6396             :                                 }
    6397        1152 :                         break;
    6398             : 
    6399         216 :                         default:
    6400         216 :                         break;
    6401             : 
    6402             :                 }
    6403           0 :         }
    6404        7019 :         return NDR_ERR_SUCCESS;
    6405             : }
    6406             : 
    6407        3348 : _PUBLIC_ void ndr_print_netr_CONTROL_QUERY_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_QUERY_INFORMATION *r)
    6408             : {
    6409             :         uint32_t level;
    6410        3348 :         level = ndr_print_steal_switch_value(ndr, r);
    6411        3348 :         ndr_print_union(ndr, name, level, "netr_CONTROL_QUERY_INFORMATION");
    6412        3348 :         switch (level) {
    6413         864 :                 case 1:
    6414         864 :                         ndr_print_ptr(ndr, "info1", r->info1);
    6415         864 :                         ndr->depth++;
    6416         864 :                         if (r->info1) {
    6417          36 :                                 ndr_print_netr_NETLOGON_INFO_1(ndr, "info1", r->info1);
    6418             :                         }
    6419         864 :                         ndr->depth--;
    6420         864 :                 break;
    6421             : 
    6422         864 :                 case 2:
    6423         864 :                         ndr_print_ptr(ndr, "info2", r->info2);
    6424         864 :                         ndr->depth++;
    6425         864 :                         if (r->info2) {
    6426          48 :                                 ndr_print_netr_NETLOGON_INFO_2(ndr, "info2", r->info2);
    6427             :                         }
    6428         864 :                         ndr->depth--;
    6429         864 :                 break;
    6430             : 
    6431         936 :                 case 3:
    6432         936 :                         ndr_print_ptr(ndr, "info3", r->info3);
    6433         936 :                         ndr->depth++;
    6434         936 :                         if (r->info3) {
    6435           0 :                                 ndr_print_netr_NETLOGON_INFO_3(ndr, "info3", r->info3);
    6436             :                         }
    6437         936 :                         ndr->depth--;
    6438         936 :                 break;
    6439             : 
    6440         576 :                 case 4:
    6441         576 :                         ndr_print_ptr(ndr, "info4", r->info4);
    6442         576 :                         ndr->depth++;
    6443         576 :                         if (r->info4) {
    6444           0 :                                 ndr_print_netr_NETLOGON_INFO_4(ndr, "info4", r->info4);
    6445             :                         }
    6446         576 :                         ndr->depth--;
    6447         576 :                 break;
    6448             : 
    6449          90 :                 default:
    6450          90 :                 break;
    6451             : 
    6452             :         }
    6453        3348 : }
    6454             : 
    6455       11205 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonControlCode(struct ndr_push *ndr, int ndr_flags, enum netr_LogonControlCode r)
    6456             : {
    6457       11205 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    6458       11205 :         return NDR_ERR_SUCCESS;
    6459             : }
    6460             : 
    6461        8125 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonControlCode(struct ndr_pull *ndr, int ndr_flags, enum netr_LogonControlCode *r)
    6462             : {
    6463             :         uint32_t v;
    6464        8125 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    6465        8125 :         *r = v;
    6466        8125 :         return NDR_ERR_SUCCESS;
    6467             : }
    6468             : 
    6469           0 : _PUBLIC_ void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char *name, enum netr_LogonControlCode r)
    6470             : {
    6471           0 :         const char *val = NULL;
    6472             : 
    6473           0 :         switch (r) {
    6474           0 :                 case NETLOGON_CONTROL_QUERY: val = "NETLOGON_CONTROL_QUERY"; break;
    6475           0 :                 case NETLOGON_CONTROL_REPLICATE: val = "NETLOGON_CONTROL_REPLICATE"; break;
    6476           0 :                 case NETLOGON_CONTROL_SYNCHRONIZE: val = "NETLOGON_CONTROL_SYNCHRONIZE"; break;
    6477           0 :                 case NETLOGON_CONTROL_PDC_REPLICATE: val = "NETLOGON_CONTROL_PDC_REPLICATE"; break;
    6478           0 :                 case NETLOGON_CONTROL_REDISCOVER: val = "NETLOGON_CONTROL_REDISCOVER"; break;
    6479           0 :                 case NETLOGON_CONTROL_TC_QUERY: val = "NETLOGON_CONTROL_TC_QUERY"; break;
    6480           0 :                 case NETLOGON_CONTROL_TRANSPORT_NOTIFY: val = "NETLOGON_CONTROL_TRANSPORT_NOTIFY"; break;
    6481           0 :                 case NETLOGON_CONTROL_FIND_USER: val = "NETLOGON_CONTROL_FIND_USER"; break;
    6482           0 :                 case NETLOGON_CONTROL_CHANGE_PASSWORD: val = "NETLOGON_CONTROL_CHANGE_PASSWORD"; break;
    6483           0 :                 case NETLOGON_CONTROL_TC_VERIFY: val = "NETLOGON_CONTROL_TC_VERIFY"; break;
    6484           0 :                 case NETLOGON_CONTROL_FORCE_DNS_REG: val = "NETLOGON_CONTROL_FORCE_DNS_REG"; break;
    6485           0 :                 case NETLOGON_CONTROL_QUERY_DNS_REG: val = "NETLOGON_CONTROL_QUERY_DNS_REG"; break;
    6486           0 :                 case NETLOGON_CONTROL_BACKUP_CHANGE_LOG: val = "NETLOGON_CONTROL_BACKUP_CHANGE_LOG"; break;
    6487           0 :                 case NETLOGON_CONTROL_TRUNCATE_LOG: val = "NETLOGON_CONTROL_TRUNCATE_LOG"; break;
    6488           0 :                 case NETLOGON_CONTROL_SET_DBFLAG: val = "NETLOGON_CONTROL_SET_DBFLAG"; break;
    6489           0 :                 case NETLOGON_CONTROL_BREAKPOINT: val = "NETLOGON_CONTROL_BREAKPOINT"; break;
    6490             :         }
    6491           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    6492           0 : }
    6493             : 
    6494        2775 : _PUBLIC_ enum ndr_err_code ndr_push_netr_CONTROL_DATA_INFORMATION(struct ndr_push *ndr, int ndr_flags, const union netr_CONTROL_DATA_INFORMATION *r)
    6495             : {
    6496             :         uint32_t level;
    6497        2775 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6498        2775 :         if (ndr_flags & NDR_SCALARS) {
    6499             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6500        2775 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6501        2775 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6502        2775 :                 NDR_CHECK(ndr_push_netr_LogonControlCode(ndr, NDR_SCALARS, level));
    6503             :                 /* ms_union is always aligned to the largest union arm*/
    6504        2775 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6505        2775 :                 switch (level) {
    6506         660 :                         case NETLOGON_CONTROL_REDISCOVER: {
    6507         660 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    6508         562 :                         break; }
    6509             : 
    6510         590 :                         case NETLOGON_CONTROL_TC_QUERY: {
    6511         590 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    6512         492 :                         break; }
    6513             : 
    6514         522 :                         case NETLOGON_CONTROL_TRANSPORT_NOTIFY: {
    6515         522 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    6516         432 :                         break; }
    6517             : 
    6518           0 :                         case NETLOGON_CONTROL_CHANGE_PASSWORD: {
    6519           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    6520           0 :                         break; }
    6521             : 
    6522         133 :                         case NETLOGON_CONTROL_TC_VERIFY: {
    6523         133 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    6524         133 :                         break; }
    6525             : 
    6526           0 :                         case NETLOGON_CONTROL_FIND_USER: {
    6527           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
    6528           0 :                         break; }
    6529             : 
    6530         696 :                         case NETLOGON_CONTROL_SET_DBFLAG: {
    6531         696 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->debug_level));
    6532         576 :                         break; }
    6533             : 
    6534         144 :                         default: {
    6535         144 :                         break; }
    6536             : 
    6537             :                 }
    6538           0 :         }
    6539        2775 :         if (ndr_flags & NDR_BUFFERS) {
    6540        2775 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6541             :                         /* We didn't get it above, and the token is not needed after this. */
    6542           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6543             :                 }
    6544        2775 :                 switch (level) {
    6545         660 :                         case NETLOGON_CONTROL_REDISCOVER:
    6546         660 :                                 if (r->domain) {
    6547         660 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6548         660 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6549         660 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6550         660 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6551             :                                 }
    6552         562 :                         break;
    6553             : 
    6554         590 :                         case NETLOGON_CONTROL_TC_QUERY:
    6555         590 :                                 if (r->domain) {
    6556         590 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6557         590 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6558         590 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6559         590 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6560             :                                 }
    6561         492 :                         break;
    6562             : 
    6563         522 :                         case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
    6564         522 :                                 if (r->domain) {
    6565         522 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6566         522 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6567         522 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6568         522 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6569             :                                 }
    6570         432 :                         break;
    6571             : 
    6572           0 :                         case NETLOGON_CONTROL_CHANGE_PASSWORD:
    6573           0 :                                 if (r->domain) {
    6574           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6575           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6576           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6577           0 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6578             :                                 }
    6579           0 :                         break;
    6580             : 
    6581         133 :                         case NETLOGON_CONTROL_TC_VERIFY:
    6582         133 :                                 if (r->domain) {
    6583         133 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6584         133 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6585         133 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6586         133 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6587             :                                 }
    6588         133 :                         break;
    6589             : 
    6590           0 :                         case NETLOGON_CONTROL_FIND_USER:
    6591           0 :                                 if (r->user) {
    6592           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    6593           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6594           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    6595           0 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6596             :                                 }
    6597           0 :                         break;
    6598             : 
    6599         576 :                         case NETLOGON_CONTROL_SET_DBFLAG:
    6600         576 :                         break;
    6601             : 
    6602         144 :                         default:
    6603         144 :                         break;
    6604             : 
    6605             :                 }
    6606           0 :         }
    6607        2339 :         return NDR_ERR_SUCCESS;
    6608             : }
    6609             : 
    6610        2554 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_CONTROL_DATA_INFORMATION(struct ndr_pull *ndr, int ndr_flags, union netr_CONTROL_DATA_INFORMATION *r)
    6611             : {
    6612             :         uint32_t level;
    6613             :         uint32_t _level;
    6614        2554 :         TALLOC_CTX *_mem_save_domain_0 = NULL;
    6615             :         uint32_t _ptr_domain;
    6616        2554 :         uint32_t size_domain_1 = 0;
    6617        2554 :         uint32_t length_domain_1 = 0;
    6618        2554 :         TALLOC_CTX *_mem_save_user_0 = NULL;
    6619             :         uint32_t _ptr_user;
    6620        2554 :         uint32_t size_user_1 = 0;
    6621        2554 :         uint32_t length_user_1 = 0;
    6622        2554 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6623        2554 :         if (ndr_flags & NDR_SCALARS) {
    6624             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6625        2554 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6626        2554 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6627        2554 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    6628        2554 :                 if (_level != level) {
    6629           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    6630             :                 }
    6631             :                 /* ms_union is always aligned to the largest union arm*/
    6632        2554 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6633        2554 :                 switch (level) {
    6634         578 :                         case NETLOGON_CONTROL_REDISCOVER: {
    6635         578 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    6636         578 :                                 if (_ptr_domain) {
    6637         578 :                                         NDR_PULL_ALLOC(ndr, r->domain);
    6638             :                                 } else {
    6639           0 :                                         r->domain = NULL;
    6640             :                                 }
    6641         488 :                         break; }
    6642             : 
    6643         536 :                         case NETLOGON_CONTROL_TC_QUERY: {
    6644         536 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    6645         536 :                                 if (_ptr_domain) {
    6646         536 :                                         NDR_PULL_ALLOC(ndr, r->domain);
    6647             :                                 } else {
    6648           0 :                                         r->domain = NULL;
    6649             :                                 }
    6650         446 :                         break; }
    6651             : 
    6652         510 :                         case NETLOGON_CONTROL_TRANSPORT_NOTIFY: {
    6653         510 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    6654         510 :                                 if (_ptr_domain) {
    6655         510 :                                         NDR_PULL_ALLOC(ndr, r->domain);
    6656             :                                 } else {
    6657           0 :                                         r->domain = NULL;
    6658             :                                 }
    6659         420 :                         break; }
    6660             : 
    6661           0 :                         case NETLOGON_CONTROL_CHANGE_PASSWORD: {
    6662           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    6663           0 :                                 if (_ptr_domain) {
    6664           0 :                                         NDR_PULL_ALLOC(ndr, r->domain);
    6665             :                                 } else {
    6666           0 :                                         r->domain = NULL;
    6667             :                                 }
    6668           0 :                         break; }
    6669             : 
    6670          80 :                         case NETLOGON_CONTROL_TC_VERIFY: {
    6671          80 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    6672          80 :                                 if (_ptr_domain) {
    6673          80 :                                         NDR_PULL_ALLOC(ndr, r->domain);
    6674             :                                 } else {
    6675           0 :                                         r->domain = NULL;
    6676             :                                 }
    6677          80 :                         break; }
    6678             : 
    6679           0 :                         case NETLOGON_CONTROL_FIND_USER: {
    6680           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
    6681           0 :                                 if (_ptr_user) {
    6682           0 :                                         NDR_PULL_ALLOC(ndr, r->user);
    6683             :                                 } else {
    6684           0 :                                         r->user = NULL;
    6685             :                                 }
    6686           0 :                         break; }
    6687             : 
    6688         680 :                         case NETLOGON_CONTROL_SET_DBFLAG: {
    6689         680 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->debug_level));
    6690         560 :                         break; }
    6691             : 
    6692         140 :                         default: {
    6693         140 :                         break; }
    6694             : 
    6695             :                 }
    6696           0 :         }
    6697        2554 :         if (ndr_flags & NDR_BUFFERS) {
    6698        2554 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6699             :                         /* We didn't get it above, and the token is not needed after this. */
    6700           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6701             :                 }
    6702        2554 :                 switch (level) {
    6703         578 :                         case NETLOGON_CONTROL_REDISCOVER:
    6704         578 :                                 if (r->domain) {
    6705         578 :                                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6706         578 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    6707         578 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
    6708         578 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
    6709         578 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
    6710         578 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
    6711         578 :                                         if (length_domain_1 > size_domain_1) {
    6712           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
    6713             :                                         }
    6714         578 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
    6715         578 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
    6716         578 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    6717             :                                 }
    6718         488 :                         break;
    6719             : 
    6720         536 :                         case NETLOGON_CONTROL_TC_QUERY:
    6721         536 :                                 if (r->domain) {
    6722         536 :                                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6723         536 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    6724         536 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
    6725         536 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
    6726         536 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
    6727         536 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
    6728         536 :                                         if (length_domain_1 > size_domain_1) {
    6729           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
    6730             :                                         }
    6731         536 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
    6732         536 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
    6733         536 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    6734             :                                 }
    6735         446 :                         break;
    6736             : 
    6737         510 :                         case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
    6738         510 :                                 if (r->domain) {
    6739         510 :                                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6740         510 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    6741         510 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
    6742         510 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
    6743         510 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
    6744         510 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
    6745         510 :                                         if (length_domain_1 > size_domain_1) {
    6746           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
    6747             :                                         }
    6748         510 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
    6749         510 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
    6750         510 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    6751             :                                 }
    6752         420 :                         break;
    6753             : 
    6754           0 :                         case NETLOGON_CONTROL_CHANGE_PASSWORD:
    6755           0 :                                 if (r->domain) {
    6756           0 :                                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6757           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    6758           0 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
    6759           0 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
    6760           0 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
    6761           0 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
    6762           0 :                                         if (length_domain_1 > size_domain_1) {
    6763           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
    6764             :                                         }
    6765           0 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
    6766           0 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
    6767           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    6768             :                                 }
    6769           0 :                         break;
    6770             : 
    6771          80 :                         case NETLOGON_CONTROL_TC_VERIFY:
    6772          80 :                                 if (r->domain) {
    6773          80 :                                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6774          80 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    6775          80 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
    6776          80 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
    6777          80 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
    6778          80 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
    6779          80 :                                         if (length_domain_1 > size_domain_1) {
    6780           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
    6781             :                                         }
    6782          80 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
    6783          80 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
    6784          80 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    6785             :                                 }
    6786          80 :                         break;
    6787             : 
    6788           0 :                         case NETLOGON_CONTROL_FIND_USER:
    6789           0 :                                 if (r->user) {
    6790           0 :                                         _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6791           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
    6792           0 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
    6793           0 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
    6794           0 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user, &size_user_1));
    6795           0 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user, &length_user_1));
    6796           0 :                                         if (length_user_1 > size_user_1) {
    6797           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
    6798             :                                         }
    6799           0 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
    6800           0 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
    6801           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
    6802             :                                 }
    6803           0 :                         break;
    6804             : 
    6805         560 :                         case NETLOGON_CONTROL_SET_DBFLAG:
    6806         560 :                         break;
    6807             : 
    6808         140 :                         default:
    6809         140 :                         break;
    6810             : 
    6811             :                 }
    6812           0 :         }
    6813        2134 :         return NDR_ERR_SUCCESS;
    6814             : }
    6815             : 
    6816           0 : _PUBLIC_ void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_DATA_INFORMATION *r)
    6817             : {
    6818             :         uint32_t level;
    6819           0 :         level = ndr_print_steal_switch_value(ndr, r);
    6820           0 :         ndr_print_union(ndr, name, level, "netr_CONTROL_DATA_INFORMATION");
    6821           0 :         switch (level) {
    6822           0 :                 case NETLOGON_CONTROL_REDISCOVER:
    6823           0 :                         ndr_print_ptr(ndr, "domain", r->domain);
    6824           0 :                         ndr->depth++;
    6825           0 :                         if (r->domain) {
    6826           0 :                                 ndr_print_string(ndr, "domain", r->domain);
    6827             :                         }
    6828           0 :                         ndr->depth--;
    6829           0 :                 break;
    6830             : 
    6831           0 :                 case NETLOGON_CONTROL_TC_QUERY:
    6832           0 :                         ndr_print_ptr(ndr, "domain", r->domain);
    6833           0 :                         ndr->depth++;
    6834           0 :                         if (r->domain) {
    6835           0 :                                 ndr_print_string(ndr, "domain", r->domain);
    6836             :                         }
    6837           0 :                         ndr->depth--;
    6838           0 :                 break;
    6839             : 
    6840           0 :                 case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
    6841           0 :                         ndr_print_ptr(ndr, "domain", r->domain);
    6842           0 :                         ndr->depth++;
    6843           0 :                         if (r->domain) {
    6844           0 :                                 ndr_print_string(ndr, "domain", r->domain);
    6845             :                         }
    6846           0 :                         ndr->depth--;
    6847           0 :                 break;
    6848             : 
    6849           0 :                 case NETLOGON_CONTROL_CHANGE_PASSWORD:
    6850           0 :                         ndr_print_ptr(ndr, "domain", r->domain);
    6851           0 :                         ndr->depth++;
    6852           0 :                         if (r->domain) {
    6853           0 :                                 ndr_print_string(ndr, "domain", r->domain);
    6854             :                         }
    6855           0 :                         ndr->depth--;
    6856           0 :                 break;
    6857             : 
    6858           0 :                 case NETLOGON_CONTROL_TC_VERIFY:
    6859           0 :                         ndr_print_ptr(ndr, "domain", r->domain);
    6860           0 :                         ndr->depth++;
    6861           0 :                         if (r->domain) {
    6862           0 :                                 ndr_print_string(ndr, "domain", r->domain);
    6863             :                         }
    6864           0 :                         ndr->depth--;
    6865           0 :                 break;
    6866             : 
    6867           0 :                 case NETLOGON_CONTROL_FIND_USER:
    6868           0 :                         ndr_print_ptr(ndr, "user", r->user);
    6869           0 :                         ndr->depth++;
    6870           0 :                         if (r->user) {
    6871           0 :                                 ndr_print_string(ndr, "user", r->user);
    6872             :                         }
    6873           0 :                         ndr->depth--;
    6874           0 :                 break;
    6875             : 
    6876           0 :                 case NETLOGON_CONTROL_SET_DBFLAG:
    6877           0 :                         ndr_print_uint32(ndr, "debug_level", r->debug_level);
    6878           0 :                 break;
    6879             : 
    6880           0 :                 default:
    6881           0 :                 break;
    6882             : 
    6883             :         }
    6884           0 : }
    6885             : 
    6886       17846 : _PUBLIC_ enum ndr_err_code ndr_push_netr_NegotiateFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    6887             : {
    6888       17846 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    6889       17846 :         return NDR_ERR_SUCCESS;
    6890             : }
    6891             : 
    6892       24094 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_NegotiateFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    6893             : {
    6894             :         uint32_t v;
    6895       24094 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    6896       24094 :         *r = v;
    6897       24094 :         return NDR_ERR_SUCCESS;
    6898             : }
    6899             : 
    6900        1070 : _PUBLIC_ void ndr_print_netr_NegotiateFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    6901             : {
    6902        1070 :         ndr_print_uint32(ndr, name, r);
    6903        1070 :         ndr->depth++;
    6904        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_ACCOUNT_LOCKOUT", NETLOGON_NEG_ACCOUNT_LOCKOUT, r);
    6905        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PERSISTENT_SAMREPL", NETLOGON_NEG_PERSISTENT_SAMREPL, r);
    6906        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_ARCFOUR", NETLOGON_NEG_ARCFOUR, r);
    6907        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PROMOTION_COUNT", NETLOGON_NEG_PROMOTION_COUNT, r);
    6908        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_CHANGELOG_BDC", NETLOGON_NEG_CHANGELOG_BDC, r);
    6909        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_FULL_SYNC_REPL", NETLOGON_NEG_FULL_SYNC_REPL, r);
    6910        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_MULTIPLE_SIDS", NETLOGON_NEG_MULTIPLE_SIDS, r);
    6911        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_REDO", NETLOGON_NEG_REDO, r);
    6912        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL", NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL, r);
    6913        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_SEND_PASSWORD_INFO_PDC", NETLOGON_NEG_SEND_PASSWORD_INFO_PDC, r);
    6914        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_GENERIC_PASSTHROUGH", NETLOGON_NEG_GENERIC_PASSTHROUGH, r);
    6915        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_CONCURRENT_RPC", NETLOGON_NEG_CONCURRENT_RPC, r);
    6916        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL", NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL, r);
    6917        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL", NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL, r);
    6918        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_STRONG_KEYS", NETLOGON_NEG_STRONG_KEYS, r);
    6919        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_TRANSITIVE_TRUSTS", NETLOGON_NEG_TRANSITIVE_TRUSTS, r);
    6920        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_DNS_DOMAIN_TRUSTS", NETLOGON_NEG_DNS_DOMAIN_TRUSTS, r);
    6921        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PASSWORD_SET2", NETLOGON_NEG_PASSWORD_SET2, r);
    6922        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_GETDOMAININFO", NETLOGON_NEG_GETDOMAININFO, r);
    6923        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_CROSS_FOREST_TRUSTS", NETLOGON_NEG_CROSS_FOREST_TRUSTS, r);
    6924        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION", NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION, r);
    6925        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_RODC_PASSTHROUGH", NETLOGON_NEG_RODC_PASSTHROUGH, r);
    6926        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_SUPPORTS_AES_SHA2", NETLOGON_NEG_SUPPORTS_AES_SHA2, r);
    6927        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_SUPPORTS_AES", NETLOGON_NEG_SUPPORTS_AES, r);
    6928        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AUTHENTICATED_RPC_LSASS", NETLOGON_NEG_AUTHENTICATED_RPC_LSASS, r);
    6929        1070 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AUTHENTICATED_RPC", NETLOGON_NEG_AUTHENTICATED_RPC, r);
    6930        1070 :         ndr->depth--;
    6931        1070 : }
    6932             : 
    6933          12 : static enum ndr_err_code ndr_push_SyncStateEnum(struct ndr_push *ndr, int ndr_flags, enum SyncStateEnum r)
    6934             : {
    6935          12 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
    6936          12 :         return NDR_ERR_SUCCESS;
    6937             : }
    6938             : 
    6939          12 : static enum ndr_err_code ndr_pull_SyncStateEnum(struct ndr_pull *ndr, int ndr_flags, enum SyncStateEnum *r)
    6940             : {
    6941             :         uint16_t v;
    6942          12 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
    6943          12 :         *r = v;
    6944          12 :         return NDR_ERR_SUCCESS;
    6945             : }
    6946             : 
    6947           0 : _PUBLIC_ void ndr_print_SyncStateEnum(struct ndr_print *ndr, const char *name, enum SyncStateEnum r)
    6948             : {
    6949           0 :         const char *val = NULL;
    6950             : 
    6951           0 :         switch (r) {
    6952           0 :                 case SYNCSTATE_NORMAL_STATE: val = "SYNCSTATE_NORMAL_STATE"; break;
    6953           0 :                 case SYNCSTATE_DOMAIN_STATE: val = "SYNCSTATE_DOMAIN_STATE"; break;
    6954           0 :                 case SYNCSTATE_GROUP_STATE: val = "SYNCSTATE_GROUP_STATE"; break;
    6955           0 :                 case SYNCSTATE_UAS_BUILT_IN_GROUP_STATE: val = "SYNCSTATE_UAS_BUILT_IN_GROUP_STATE"; break;
    6956           0 :                 case SYNCSTATE_USER_STATE: val = "SYNCSTATE_USER_STATE"; break;
    6957           0 :                 case SYNCSTATE_GROUP_MEMBER_STATE: val = "SYNCSTATE_GROUP_MEMBER_STATE"; break;
    6958           0 :                 case SYNCSTATE_ALIAS_STATE: val = "SYNCSTATE_ALIAS_STATE"; break;
    6959           0 :                 case SYNCSTATE_ALIAS_MEMBER_STATE: val = "SYNCSTATE_ALIAS_MEMBER_STATE"; break;
    6960           0 :                 case SYNCSTATE_SAM_DONE_STATE: val = "SYNCSTATE_SAM_DONE_STATE"; break;
    6961             :         }
    6962           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    6963           0 : }
    6964             : 
    6965          40 : static enum ndr_err_code ndr_push_netr_ChangeLogFlags(struct ndr_push *ndr, int ndr_flags, uint16_t r)
    6966             : {
    6967          48 :         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
    6968          40 :         return NDR_ERR_SUCCESS;
    6969             : }
    6970             : 
    6971          20 : static enum ndr_err_code ndr_pull_netr_ChangeLogFlags(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
    6972             : {
    6973             :         uint16_t v;
    6974          24 :         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
    6975          24 :         *r = v;
    6976          20 :         return NDR_ERR_SUCCESS;
    6977             : }
    6978             : 
    6979           0 : _PUBLIC_ void ndr_print_netr_ChangeLogFlags(struct ndr_print *ndr, const char *name, uint16_t r)
    6980             : {
    6981           0 :         ndr_print_uint16(ndr, name, r);
    6982           0 :         ndr->depth++;
    6983           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED", NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED, r);
    6984           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_CHANGED_PASSWORD", NETR_CHANGELOG_CHANGED_PASSWORD, r);
    6985           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_SID_INCLUDED", NETR_CHANGELOG_SID_INCLUDED, r);
    6986           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_NAME_INCLUDED", NETR_CHANGELOG_NAME_INCLUDED, r);
    6987           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_FIRST_PROMOTION_OBJ", NETR_CHANGELOG_FIRST_PROMOTION_OBJ, r);
    6988           0 :         ndr->depth--;
    6989           0 : }
    6990             : 
    6991          96 : static enum ndr_err_code ndr_push_netr_ChangeLogObject(struct ndr_push *ndr, int ndr_flags, const union netr_ChangeLogObject *r)
    6992             : {
    6993             :         uint32_t level;
    6994          96 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6995          96 :         if (ndr_flags & NDR_SCALARS) {
    6996             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6997          48 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6998             :                 /* ms_union is always aligned to the largest union arm*/
    6999          48 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    7000          48 :                 switch (level) {
    7001           0 :                         case NETR_CHANGELOG_SID_INCLUDED: {
    7002           0 :                                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->object_sid));
    7003           0 :                         break; }
    7004             : 
    7005           0 :                         case NETR_CHANGELOG_NAME_INCLUDED: {
    7006             :                                 {
    7007           0 :                                         uint32_t _flags_save_string = ndr->flags;
    7008           0 :                                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    7009           0 :                                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->object_name));
    7010           0 :                                         ndr->flags = _flags_save_string;
    7011             :                                 }
    7012           0 :                         break; }
    7013             : 
    7014          40 :                         default: {
    7015          40 :                         break; }
    7016             : 
    7017             :                 }
    7018          40 :         }
    7019          80 :         return NDR_ERR_SUCCESS;
    7020             : }
    7021             : 
    7022          48 : static enum ndr_err_code ndr_pull_netr_ChangeLogObject(struct ndr_pull *ndr, int ndr_flags, union netr_ChangeLogObject *r)
    7023             : {
    7024             :         uint32_t level;
    7025          48 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7026          48 :         if (ndr_flags & NDR_SCALARS) {
    7027             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7028          24 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7029             :                 /* ms_union is always aligned to the largest union arm*/
    7030          24 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    7031          24 :                 switch (level) {
    7032           0 :                         case NETR_CHANGELOG_SID_INCLUDED: {
    7033           0 :                                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->object_sid));
    7034           0 :                         break; }
    7035             : 
    7036           0 :                         case NETR_CHANGELOG_NAME_INCLUDED: {
    7037             :                                 {
    7038           0 :                                         uint32_t _flags_save_string = ndr->flags;
    7039           0 :                                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    7040           0 :                                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->object_name));
    7041           0 :                                         ndr->flags = _flags_save_string;
    7042             :                                 }
    7043           0 :                         break; }
    7044             : 
    7045          20 :                         default: {
    7046          20 :                         break; }
    7047             : 
    7048             :                 }
    7049          20 :         }
    7050          40 :         return NDR_ERR_SUCCESS;
    7051             : }
    7052             : 
    7053           0 : _PUBLIC_ void ndr_print_netr_ChangeLogObject(struct ndr_print *ndr, const char *name, const union netr_ChangeLogObject *r)
    7054             : {
    7055             :         uint32_t level;
    7056           0 :         level = ndr_print_steal_switch_value(ndr, r);
    7057           0 :         ndr_print_union(ndr, name, level, "netr_ChangeLogObject");
    7058           0 :         switch (level) {
    7059           0 :                 case NETR_CHANGELOG_SID_INCLUDED:
    7060           0 :                         ndr_print_dom_sid(ndr, "object_sid", &r->object_sid);
    7061           0 :                 break;
    7062             : 
    7063           0 :                 case NETR_CHANGELOG_NAME_INCLUDED:
    7064             :                         {
    7065           0 :                                 uint32_t _flags_save_string = ndr->flags;
    7066           0 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    7067           0 :                                 ndr_print_string(ndr, "object_name", r->object_name);
    7068           0 :                                 ndr->flags = _flags_save_string;
    7069             :                         }
    7070           0 :                 break;
    7071             : 
    7072           0 :                 default:
    7073           0 :                 break;
    7074             : 
    7075             :         }
    7076           0 : }
    7077             : 
    7078          48 : _PUBLIC_ enum ndr_err_code ndr_push_netr_ChangeLogEntry(struct ndr_push *ndr, int ndr_flags, const struct netr_ChangeLogEntry *r)
    7079             : {
    7080          48 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7081          48 :         if (ndr_flags & NDR_SCALARS) {
    7082          48 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    7083          48 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number1));
    7084          48 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number2));
    7085          48 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_rid));
    7086          56 :                 NDR_CHECK(ndr_push_netr_ChangeLogFlags(ndr, NDR_SCALARS, r->flags));
    7087          48 :                 NDR_CHECK(ndr_push_netr_SamDatabaseID8Bit(ndr, NDR_SCALARS, r->db_index));
    7088          48 :                 NDR_CHECK(ndr_push_netr_DeltaEnum8Bit(ndr, NDR_SCALARS, r->delta_type));
    7089          48 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
    7090          48 :                 NDR_CHECK(ndr_push_netr_ChangeLogObject(ndr, NDR_SCALARS, &r->object));
    7091          48 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    7092             :         }
    7093          48 :         if (ndr_flags & NDR_BUFFERS) {
    7094          48 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
    7095          48 :                 NDR_CHECK(ndr_push_netr_ChangeLogObject(ndr, NDR_BUFFERS, &r->object));
    7096             :         }
    7097          40 :         return NDR_ERR_SUCCESS;
    7098             : }
    7099             : 
    7100          24 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_ChangeLogEntry(struct ndr_pull *ndr, int ndr_flags, struct netr_ChangeLogEntry *r)
    7101             : {
    7102          24 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7103          24 :         if (ndr_flags & NDR_SCALARS) {
    7104          24 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    7105          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number1));
    7106          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number2));
    7107          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->object_rid));
    7108          28 :                 NDR_CHECK(ndr_pull_netr_ChangeLogFlags(ndr, NDR_SCALARS, &r->flags));
    7109          24 :                 NDR_CHECK(ndr_pull_netr_SamDatabaseID8Bit(ndr, NDR_SCALARS, &r->db_index));
    7110          24 :                 NDR_CHECK(ndr_pull_netr_DeltaEnum8Bit(ndr, NDR_SCALARS, &r->delta_type));
    7111          24 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
    7112          24 :                 NDR_CHECK(ndr_pull_netr_ChangeLogObject(ndr, NDR_SCALARS, &r->object));
    7113          24 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    7114             :         }
    7115          24 :         if (ndr_flags & NDR_BUFFERS) {
    7116          24 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
    7117          24 :                 NDR_CHECK(ndr_pull_netr_ChangeLogObject(ndr, NDR_BUFFERS, &r->object));
    7118             :         }
    7119          20 :         return NDR_ERR_SUCCESS;
    7120             : }
    7121             : 
    7122           0 : static void ndr_print_flags_netr_ChangeLogEntry(struct ndr_print *ndr, const char *name, int unused, const struct netr_ChangeLogEntry *r)
    7123             : {
    7124           0 :         ndr_print_netr_ChangeLogEntry(ndr, name, r);
    7125           0 : }
    7126             : 
    7127           0 : _PUBLIC_ void ndr_print_netr_ChangeLogEntry(struct ndr_print *ndr, const char *name, const struct netr_ChangeLogEntry *r)
    7128             : {
    7129           0 :         ndr_print_struct(ndr, name, "netr_ChangeLogEntry");
    7130           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7131           0 :         ndr->depth++;
    7132           0 :         ndr_print_uint32(ndr, "serial_number1", r->serial_number1);
    7133           0 :         ndr_print_uint32(ndr, "serial_number2", r->serial_number2);
    7134           0 :         ndr_print_uint32(ndr, "object_rid", r->object_rid);
    7135           0 :         ndr_print_netr_ChangeLogFlags(ndr, "flags", r->flags);
    7136           0 :         ndr_print_netr_SamDatabaseID8Bit(ndr, "db_index", r->db_index);
    7137           0 :         ndr_print_netr_DeltaEnum8Bit(ndr, "delta_type", r->delta_type);
    7138           0 :         ndr_print_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED));
    7139           0 :         ndr_print_netr_ChangeLogObject(ndr, "object", &r->object);
    7140           0 :         ndr->depth--;
    7141             : }
    7142             : 
    7143          24 : _PUBLIC_ size_t ndr_size_netr_ChangeLogEntry(const struct netr_ChangeLogEntry *r, int flags)
    7144             : {
    7145          24 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_netr_ChangeLogEntry);
    7146             : }
    7147             : 
    7148           0 : static enum ndr_err_code ndr_push_netr_Blob(struct ndr_push *ndr, int ndr_flags, const struct netr_Blob *r)
    7149             : {
    7150           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7151           0 :         if (ndr_flags & NDR_SCALARS) {
    7152           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7153           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
    7154           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
    7155           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7156             :         }
    7157           0 :         if (ndr_flags & NDR_BUFFERS) {
    7158           0 :                 if (r->data) {
    7159           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
    7160           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
    7161             :                 }
    7162             :         }
    7163           0 :         return NDR_ERR_SUCCESS;
    7164             : }
    7165             : 
    7166           0 : static enum ndr_err_code ndr_pull_netr_Blob(struct ndr_pull *ndr, int ndr_flags, struct netr_Blob *r)
    7167             : {
    7168             :         uint32_t _ptr_data;
    7169           0 :         uint32_t size_data_1 = 0;
    7170           0 :         TALLOC_CTX *_mem_save_data_0 = NULL;
    7171           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7172           0 :         if (ndr_flags & NDR_SCALARS) {
    7173           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7174           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
    7175           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
    7176           0 :                 if (_ptr_data) {
    7177           0 :                         NDR_PULL_ALLOC(ndr, r->data);
    7178             :                 } else {
    7179           0 :                         r->data = NULL;
    7180             :                 }
    7181           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7182             :         }
    7183           0 :         if (ndr_flags & NDR_BUFFERS) {
    7184           0 :                 if (r->data) {
    7185           0 :                         _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7186           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
    7187           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
    7188           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
    7189           0 :                         NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
    7190           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
    7191           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
    7192             :                 }
    7193           0 :                 if (r->data) {
    7194           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
    7195             :                 }
    7196             :         }
    7197           0 :         return NDR_ERR_SUCCESS;
    7198             : }
    7199             : 
    7200           0 : _PUBLIC_ void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const struct netr_Blob *r)
    7201             : {
    7202           0 :         ndr_print_struct(ndr, name, "netr_Blob");
    7203           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7204           0 :         ndr->depth++;
    7205           0 :         ndr_print_uint32(ndr, "length", r->length);
    7206           0 :         ndr_print_ptr(ndr, "data", r->data);
    7207           0 :         ndr->depth++;
    7208           0 :         if (r->data) {
    7209           0 :                 ndr_print_array_uint8(ndr, "data", r->data, r->length);
    7210             :         }
    7211           0 :         ndr->depth--;
    7212           0 :         ndr->depth--;
    7213             : }
    7214             : 
    7215         321 : static enum ndr_err_code ndr_push_netr_DsRGetDCName_flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    7216             : {
    7217         355 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    7218         321 :         return NDR_ERR_SUCCESS;
    7219             : }
    7220             : 
    7221         337 : static enum ndr_err_code ndr_pull_netr_DsRGetDCName_flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    7222             : {
    7223             :         uint32_t v;
    7224         371 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    7225         371 :         *r = v;
    7226         337 :         return NDR_ERR_SUCCESS;
    7227             : }
    7228             : 
    7229           0 : _PUBLIC_ void ndr_print_netr_DsRGetDCName_flags(struct ndr_print *ndr, const char *name, uint32_t r)
    7230             : {
    7231           0 :         ndr_print_uint32(ndr, name, r);
    7232           0 :         ndr->depth++;
    7233           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_FORCE_REDISCOVERY", DS_FORCE_REDISCOVERY, r);
    7234           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_REQUIRED", DS_DIRECTORY_SERVICE_REQUIRED, r);
    7235           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_PREFERRED", DS_DIRECTORY_SERVICE_PREFERRED, r);
    7236           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_GC_SERVER_REQUIRED", DS_GC_SERVER_REQUIRED, r);
    7237           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_PDC_REQUIRED", DS_PDC_REQUIRED, r);
    7238           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_BACKGROUND_ONLY", DS_BACKGROUND_ONLY, r);
    7239           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IP_REQUIRED", DS_IP_REQUIRED, r);
    7240           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_KDC_REQUIRED", DS_KDC_REQUIRED, r);
    7241           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_TIMESERV_REQUIRED", DS_TIMESERV_REQUIRED, r);
    7242           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_WRITABLE_REQUIRED", DS_WRITABLE_REQUIRED, r);
    7243           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_GOOD_TIMESERV_PREFERRED", DS_GOOD_TIMESERV_PREFERRED, r);
    7244           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_AVOID_SELF", DS_AVOID_SELF, r);
    7245           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ONLY_LDAP_NEEDED", DS_ONLY_LDAP_NEEDED, r);
    7246           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IS_FLAT_NAME", DS_IS_FLAT_NAME, r);
    7247           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IS_DNS_NAME", DS_IS_DNS_NAME, r);
    7248           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_TRY_NEXTCLOSEST_SITE", DS_TRY_NEXTCLOSEST_SITE, r);
    7249           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_6_REQUIRED", DS_DIRECTORY_SERVICE_6_REQUIRED, r);
    7250           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_WEB_SERVICE_REQUIRED", DS_WEB_SERVICE_REQUIRED, r);
    7251           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_RETURN_DNS_NAME", DS_RETURN_DNS_NAME, r);
    7252           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_RETURN_FLAT_NAME", DS_RETURN_FLAT_NAME, r);
    7253           0 :         ndr->depth--;
    7254           0 : }
    7255             : 
    7256         939 : static enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo_AddressType(struct ndr_push *ndr, int ndr_flags, enum netr_DsRGetDCNameInfo_AddressType r)
    7257             : {
    7258         981 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    7259         939 :         return NDR_ERR_SUCCESS;
    7260             : }
    7261             : 
    7262         409 : static enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo_AddressType(struct ndr_pull *ndr, int ndr_flags, enum netr_DsRGetDCNameInfo_AddressType *r)
    7263             : {
    7264             :         uint32_t v;
    7265         447 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    7266         447 :         *r = v;
    7267         409 :         return NDR_ERR_SUCCESS;
    7268             : }
    7269             : 
    7270         174 : _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo_AddressType(struct ndr_print *ndr, const char *name, enum netr_DsRGetDCNameInfo_AddressType r)
    7271             : {
    7272         174 :         const char *val = NULL;
    7273             : 
    7274         174 :         switch (r) {
    7275         174 :                 case DS_ADDRESS_TYPE_INET: val = "DS_ADDRESS_TYPE_INET"; break;
    7276           0 :                 case DS_ADDRESS_TYPE_NETBIOS: val = "DS_ADDRESS_TYPE_NETBIOS"; break;
    7277             :         }
    7278         174 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    7279         174 : }
    7280             : 
    7281         939 : static enum ndr_err_code ndr_push_netr_DsR_DcFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    7282             : {
    7283         981 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    7284         939 :         return NDR_ERR_SUCCESS;
    7285             : }
    7286             : 
    7287         409 : static enum ndr_err_code ndr_pull_netr_DsR_DcFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    7288             : {
    7289             :         uint32_t v;
    7290         447 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    7291         447 :         *r = v;
    7292         409 :         return NDR_ERR_SUCCESS;
    7293             : }
    7294             : 
    7295         174 : _PUBLIC_ void ndr_print_netr_DsR_DcFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    7296             : {
    7297         174 :         ndr_print_uint32(ndr, name, r);
    7298         174 :         ndr->depth++;
    7299         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_PDC", DS_SERVER_PDC, r);
    7300         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_GC", DS_SERVER_GC, r);
    7301         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_LDAP", DS_SERVER_LDAP, r);
    7302         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_DS", DS_SERVER_DS, r);
    7303         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_KDC", DS_SERVER_KDC, r);
    7304         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_TIMESERV", DS_SERVER_TIMESERV, r);
    7305         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_CLOSEST", DS_SERVER_CLOSEST, r);
    7306         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_WRITABLE", DS_SERVER_WRITABLE, r);
    7307         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_GOOD_TIMESERV", DS_SERVER_GOOD_TIMESERV, r);
    7308         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_NDNC", DS_SERVER_NDNC, r);
    7309         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_SELECT_SECRET_DOMAIN_6", DS_SERVER_SELECT_SECRET_DOMAIN_6, r);
    7310         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_FULL_SECRET_DOMAIN_6", DS_SERVER_FULL_SECRET_DOMAIN_6, r);
    7311         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_WEBSERV", DS_SERVER_WEBSERV, r);
    7312         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_DS_8", DS_SERVER_DS_8, r);
    7313         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_CONTROLLER", DS_DNS_CONTROLLER, r);
    7314         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_DOMAIN", DS_DNS_DOMAIN, r);
    7315         174 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_FOREST_ROOT", DS_DNS_FOREST_ROOT, r);
    7316         174 :         ndr->depth--;
    7317         174 : }
    7318             : 
    7319        1521 : _PUBLIC_ enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRGetDCNameInfo *r)
    7320             : {
    7321        1521 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7322        1521 :         if (ndr_flags & NDR_SCALARS) {
    7323         981 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7324         981 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_unc));
    7325         981 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_address));
    7326        1023 :                 NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo_AddressType(ndr, NDR_SCALARS, r->dc_address_type));
    7327         981 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
    7328         981 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name));
    7329         981 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest_name));
    7330        1023 :                 NDR_CHECK(ndr_push_netr_DsR_DcFlags(ndr, NDR_SCALARS, r->dc_flags));
    7331         981 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_site_name));
    7332         981 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_site_name));
    7333         981 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7334             :         }
    7335        1521 :         if (ndr_flags & NDR_BUFFERS) {
    7336         981 :                 if (r->dc_unc) {
    7337         981 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_unc, CH_UTF16)));
    7338         981 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7339         981 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_unc, CH_UTF16)));
    7340         981 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dc_unc, ndr_charset_length(r->dc_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7341             :                 }
    7342         981 :                 if (r->dc_address) {
    7343         981 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_address, CH_UTF16)));
    7344         981 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7345         981 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_address, CH_UTF16)));
    7346         981 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dc_address, ndr_charset_length(r->dc_address, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7347             :                 }
    7348         981 :                 if (r->domain_name) {
    7349         981 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
    7350         981 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7351         981 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
    7352         981 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, ndr_charset_length(r->domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7353             :                 }
    7354         981 :                 if (r->forest_name) {
    7355         963 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->forest_name, CH_UTF16)));
    7356         963 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7357         963 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->forest_name, CH_UTF16)));
    7358         963 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->forest_name, ndr_charset_length(r->forest_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7359             :                 }
    7360         981 :                 if (r->dc_site_name) {
    7361         963 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_site_name, CH_UTF16)));
    7362         963 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7363         963 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_site_name, CH_UTF16)));
    7364         963 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dc_site_name, ndr_charset_length(r->dc_site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7365             :                 }
    7366         981 :                 if (r->client_site_name) {
    7367         963 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_site_name, CH_UTF16)));
    7368         963 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7369         963 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_site_name, CH_UTF16)));
    7370         963 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_site_name, ndr_charset_length(r->client_site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7371             :                 }
    7372             :         }
    7373        1479 :         return NDR_ERR_SUCCESS;
    7374             : }
    7375             : 
    7376         463 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRGetDCNameInfo *r)
    7377             : {
    7378             :         uint32_t _ptr_dc_unc;
    7379         463 :         uint32_t size_dc_unc_1 = 0;
    7380         463 :         uint32_t length_dc_unc_1 = 0;
    7381         463 :         TALLOC_CTX *_mem_save_dc_unc_0 = NULL;
    7382             :         uint32_t _ptr_dc_address;
    7383         463 :         uint32_t size_dc_address_1 = 0;
    7384         463 :         uint32_t length_dc_address_1 = 0;
    7385         463 :         TALLOC_CTX *_mem_save_dc_address_0 = NULL;
    7386             :         uint32_t _ptr_domain_name;
    7387         463 :         uint32_t size_domain_name_1 = 0;
    7388         463 :         uint32_t length_domain_name_1 = 0;
    7389         463 :         TALLOC_CTX *_mem_save_domain_name_0 = NULL;
    7390             :         uint32_t _ptr_forest_name;
    7391         463 :         uint32_t size_forest_name_1 = 0;
    7392         463 :         uint32_t length_forest_name_1 = 0;
    7393         463 :         TALLOC_CTX *_mem_save_forest_name_0 = NULL;
    7394             :         uint32_t _ptr_dc_site_name;
    7395         463 :         uint32_t size_dc_site_name_1 = 0;
    7396         463 :         uint32_t length_dc_site_name_1 = 0;
    7397         463 :         TALLOC_CTX *_mem_save_dc_site_name_0 = NULL;
    7398             :         uint32_t _ptr_client_site_name;
    7399         463 :         uint32_t size_client_site_name_1 = 0;
    7400         463 :         uint32_t length_client_site_name_1 = 0;
    7401         463 :         TALLOC_CTX *_mem_save_client_site_name_0 = NULL;
    7402         463 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7403         463 :         if (ndr_flags & NDR_SCALARS) {
    7404         447 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7405         447 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_unc));
    7406         447 :                 if (_ptr_dc_unc) {
    7407         447 :                         NDR_PULL_ALLOC(ndr, r->dc_unc);
    7408             :                 } else {
    7409           0 :                         r->dc_unc = NULL;
    7410             :                 }
    7411         447 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_address));
    7412         447 :                 if (_ptr_dc_address) {
    7413         447 :                         NDR_PULL_ALLOC(ndr, r->dc_address);
    7414             :                 } else {
    7415           0 :                         r->dc_address = NULL;
    7416             :                 }
    7417         485 :                 NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo_AddressType(ndr, NDR_SCALARS, &r->dc_address_type));
    7418         447 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
    7419         447 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
    7420         447 :                 if (_ptr_domain_name) {
    7421         447 :                         NDR_PULL_ALLOC(ndr, r->domain_name);
    7422             :                 } else {
    7423           0 :                         r->domain_name = NULL;
    7424             :                 }
    7425         447 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_name));
    7426         447 :                 if (_ptr_forest_name) {
    7427         415 :                         NDR_PULL_ALLOC(ndr, r->forest_name);
    7428             :                 } else {
    7429          32 :                         r->forest_name = NULL;
    7430             :                 }
    7431         485 :                 NDR_CHECK(ndr_pull_netr_DsR_DcFlags(ndr, NDR_SCALARS, &r->dc_flags));
    7432         447 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_site_name));
    7433         447 :                 if (_ptr_dc_site_name) {
    7434         417 :                         NDR_PULL_ALLOC(ndr, r->dc_site_name);
    7435             :                 } else {
    7436          30 :                         r->dc_site_name = NULL;
    7437             :                 }
    7438         447 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_site_name));
    7439         447 :                 if (_ptr_client_site_name) {
    7440         417 :                         NDR_PULL_ALLOC(ndr, r->client_site_name);
    7441             :                 } else {
    7442          30 :                         r->client_site_name = NULL;
    7443             :                 }
    7444         447 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7445             :         }
    7446         463 :         if (ndr_flags & NDR_BUFFERS) {
    7447         447 :                 if (r->dc_unc) {
    7448         447 :                         _mem_save_dc_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7449         447 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dc_unc, 0);
    7450         447 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_unc));
    7451         447 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_unc));
    7452         447 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dc_unc, &size_dc_unc_1));
    7453         447 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dc_unc, &length_dc_unc_1));
    7454         447 :                         if (length_dc_unc_1 > size_dc_unc_1) {
    7455           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dc_unc_1, length_dc_unc_1);
    7456             :                         }
    7457         447 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dc_unc_1, sizeof(uint16_t)));
    7458         447 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_unc, length_dc_unc_1, sizeof(uint16_t), CH_UTF16));
    7459         447 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_unc_0, 0);
    7460             :                 }
    7461         447 :                 if (r->dc_address) {
    7462         447 :                         _mem_save_dc_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7463         447 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dc_address, 0);
    7464         447 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_address));
    7465         447 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_address));
    7466         447 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dc_address, &size_dc_address_1));
    7467         447 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dc_address, &length_dc_address_1));
    7468         447 :                         if (length_dc_address_1 > size_dc_address_1) {
    7469           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dc_address_1, length_dc_address_1);
    7470             :                         }
    7471         447 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dc_address_1, sizeof(uint16_t)));
    7472         447 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_address, length_dc_address_1, sizeof(uint16_t), CH_UTF16));
    7473         447 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_address_0, 0);
    7474             :                 }
    7475         447 :                 if (r->domain_name) {
    7476         447 :                         _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7477         447 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain_name, 0);
    7478         447 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_name));
    7479         447 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_name));
    7480         447 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_name, &size_domain_name_1));
    7481         447 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_name, &length_domain_name_1));
    7482         447 :                         if (length_domain_name_1 > size_domain_name_1) {
    7483           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_name_1, length_domain_name_1);
    7484             :                         }
    7485         447 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
    7486         447 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
    7487         447 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
    7488             :                 }
    7489         447 :                 if (r->forest_name) {
    7490         415 :                         _mem_save_forest_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7491         415 :                         NDR_PULL_SET_MEM_CTX(ndr, r->forest_name, 0);
    7492         415 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->forest_name));
    7493         415 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->forest_name));
    7494         415 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->forest_name, &size_forest_name_1));
    7495         415 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->forest_name, &length_forest_name_1));
    7496         415 :                         if (length_forest_name_1 > size_forest_name_1) {
    7497           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_forest_name_1, length_forest_name_1);
    7498             :                         }
    7499         415 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_forest_name_1, sizeof(uint16_t)));
    7500         415 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->forest_name, length_forest_name_1, sizeof(uint16_t), CH_UTF16));
    7501         415 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_name_0, 0);
    7502             :                 }
    7503         447 :                 if (r->dc_site_name) {
    7504         417 :                         _mem_save_dc_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7505         417 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dc_site_name, 0);
    7506         417 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_site_name));
    7507         417 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_site_name));
    7508         417 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dc_site_name, &size_dc_site_name_1));
    7509         417 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dc_site_name, &length_dc_site_name_1));
    7510         417 :                         if (length_dc_site_name_1 > size_dc_site_name_1) {
    7511           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dc_site_name_1, length_dc_site_name_1);
    7512             :                         }
    7513         417 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dc_site_name_1, sizeof(uint16_t)));
    7514         417 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_site_name, length_dc_site_name_1, sizeof(uint16_t), CH_UTF16));
    7515         417 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_site_name_0, 0);
    7516             :                 }
    7517         447 :                 if (r->client_site_name) {
    7518         417 :                         _mem_save_client_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7519         417 :                         NDR_PULL_SET_MEM_CTX(ndr, r->client_site_name, 0);
    7520         417 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->client_site_name));
    7521         417 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->client_site_name));
    7522         417 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client_site_name, &size_client_site_name_1));
    7523         417 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client_site_name, &length_client_site_name_1));
    7524         417 :                         if (length_client_site_name_1 > size_client_site_name_1) {
    7525           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_site_name_1, length_client_site_name_1);
    7526             :                         }
    7527         417 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_client_site_name_1, sizeof(uint16_t)));
    7528         417 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_site_name, length_client_site_name_1, sizeof(uint16_t), CH_UTF16));
    7529         417 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_site_name_0, 0);
    7530             :                 }
    7531             :         }
    7532         421 :         return NDR_ERR_SUCCESS;
    7533             : }
    7534             : 
    7535           0 : static void ndr_print_flags_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, int unused, const struct netr_DsRGetDCNameInfo *r)
    7536             : {
    7537           0 :         ndr_print_netr_DsRGetDCNameInfo(ndr, name, r);
    7538           0 : }
    7539             : 
    7540         174 : _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r)
    7541             : {
    7542         174 :         ndr_print_struct(ndr, name, "netr_DsRGetDCNameInfo");
    7543         174 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7544         174 :         ndr->depth++;
    7545         174 :         ndr_print_ptr(ndr, "dc_unc", r->dc_unc);
    7546         174 :         ndr->depth++;
    7547         174 :         if (r->dc_unc) {
    7548         174 :                 ndr_print_string(ndr, "dc_unc", r->dc_unc);
    7549             :         }
    7550         174 :         ndr->depth--;
    7551         174 :         ndr_print_ptr(ndr, "dc_address", r->dc_address);
    7552         174 :         ndr->depth++;
    7553         174 :         if (r->dc_address) {
    7554         174 :                 ndr_print_string(ndr, "dc_address", r->dc_address);
    7555             :         }
    7556         174 :         ndr->depth--;
    7557         174 :         ndr_print_netr_DsRGetDCNameInfo_AddressType(ndr, "dc_address_type", r->dc_address_type);
    7558         174 :         ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
    7559         174 :         ndr_print_ptr(ndr, "domain_name", r->domain_name);
    7560         174 :         ndr->depth++;
    7561         174 :         if (r->domain_name) {
    7562         174 :                 ndr_print_string(ndr, "domain_name", r->domain_name);
    7563             :         }
    7564         174 :         ndr->depth--;
    7565         174 :         ndr_print_ptr(ndr, "forest_name", r->forest_name);
    7566         174 :         ndr->depth++;
    7567         174 :         if (r->forest_name) {
    7568         158 :                 ndr_print_string(ndr, "forest_name", r->forest_name);
    7569             :         }
    7570         174 :         ndr->depth--;
    7571         174 :         ndr_print_netr_DsR_DcFlags(ndr, "dc_flags", r->dc_flags);
    7572         174 :         ndr_print_ptr(ndr, "dc_site_name", r->dc_site_name);
    7573         174 :         ndr->depth++;
    7574         174 :         if (r->dc_site_name) {
    7575         158 :                 ndr_print_string(ndr, "dc_site_name", r->dc_site_name);
    7576             :         }
    7577         174 :         ndr->depth--;
    7578         174 :         ndr_print_ptr(ndr, "client_site_name", r->client_site_name);
    7579         174 :         ndr->depth++;
    7580         174 :         if (r->client_site_name) {
    7581         158 :                 ndr_print_string(ndr, "client_site_name", r->client_site_name);
    7582             :         }
    7583         174 :         ndr->depth--;
    7584         174 :         ndr->depth--;
    7585             : }
    7586             : 
    7587        1088 : static enum ndr_err_code ndr_push_netr_Capabilities(struct ndr_push *ndr, int ndr_flags, const union netr_Capabilities *r)
    7588             : {
    7589             :         uint32_t level;
    7590        1088 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7591        1088 :         if (ndr_flags & NDR_SCALARS) {
    7592             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7593        1088 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7594        1088 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    7595        1088 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    7596             :                 /* ms_union is always aligned to the largest union arm*/
    7597        1088 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    7598        1088 :                 switch (level) {
    7599        1088 :                         case 1: {
    7600        1088 :                                 NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, r->server_capabilities));
    7601         932 :                         break; }
    7602             : 
    7603           0 :                         default:
    7604           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    7605             :                 }
    7606           0 :         }
    7607        1088 :         if (ndr_flags & NDR_BUFFERS) {
    7608           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7609             :                         /* We didn't get it above, and the token is not needed after this. */
    7610           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7611             :                 }
    7612           0 :                 switch (level) {
    7613           0 :                         case 1:
    7614           0 :                         break;
    7615             : 
    7616           0 :                         default:
    7617           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    7618             :                 }
    7619         863 :         }
    7620         932 :         return NDR_ERR_SUCCESS;
    7621             : }
    7622             : 
    7623         896 : static enum ndr_err_code ndr_pull_netr_Capabilities(struct ndr_pull *ndr, int ndr_flags, union netr_Capabilities *r)
    7624             : {
    7625             :         uint32_t level;
    7626             :         uint32_t _level;
    7627         896 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7628         896 :         if (ndr_flags & NDR_SCALARS) {
    7629             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7630         896 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7631         896 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    7632         896 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    7633         896 :                 if (_level != level) {
    7634           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    7635             :                 }
    7636             :                 /* ms_union is always aligned to the largest union arm*/
    7637         896 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    7638         896 :                 switch (level) {
    7639         896 :                         case 1: {
    7640         896 :                                 NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, &r->server_capabilities));
    7641         766 :                         break; }
    7642             : 
    7643           0 :                         default:
    7644           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    7645             :                 }
    7646           0 :         }
    7647         896 :         if (ndr_flags & NDR_BUFFERS) {
    7648           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7649             :                         /* We didn't get it above, and the token is not needed after this. */
    7650           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7651             :                 }
    7652           0 :                 switch (level) {
    7653           0 :                         case 1:
    7654           0 :                         break;
    7655             : 
    7656           0 :                         default:
    7657           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    7658             :                 }
    7659         742 :         }
    7660         766 :         return NDR_ERR_SUCCESS;
    7661             : }
    7662             : 
    7663         312 : _PUBLIC_ void ndr_print_netr_Capabilities(struct ndr_print *ndr, const char *name, const union netr_Capabilities *r)
    7664             : {
    7665             :         uint32_t level;
    7666         312 :         level = ndr_print_steal_switch_value(ndr, r);
    7667         312 :         ndr_print_union(ndr, name, level, "netr_Capabilities");
    7668         312 :         switch (level) {
    7669         312 :                 case 1:
    7670         312 :                         ndr_print_netr_NegotiateFlags(ndr, "server_capabilities", r->server_capabilities);
    7671         312 :                 break;
    7672             : 
    7673           0 :                 default:
    7674           0 :                         ndr_print_bad_level(ndr, name, level);
    7675             :         }
    7676         312 : }
    7677             : 
    7678         437 : _PUBLIC_ enum ndr_err_code ndr_push_netr_TrustFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    7679             : {
    7680         437 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    7681         437 :         return NDR_ERR_SUCCESS;
    7682             : }
    7683             : 
    7684        3300 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_TrustFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    7685             : {
    7686             :         uint32_t v;
    7687        3300 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    7688        3300 :         *r = v;
    7689        3300 :         return NDR_ERR_SUCCESS;
    7690             : }
    7691             : 
    7692         192 : _PUBLIC_ void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    7693             : {
    7694         192 :         ndr_print_uint32(ndr, name, r);
    7695         192 :         ndr->depth++;
    7696         192 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_IN_FOREST", NETR_TRUST_FLAG_IN_FOREST, r);
    7697         192 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_OUTBOUND", NETR_TRUST_FLAG_OUTBOUND, r);
    7698         192 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_TREEROOT", NETR_TRUST_FLAG_TREEROOT, r);
    7699         192 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_PRIMARY", NETR_TRUST_FLAG_PRIMARY, r);
    7700         192 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_NATIVE", NETR_TRUST_FLAG_NATIVE, r);
    7701         192 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_INBOUND", NETR_TRUST_FLAG_INBOUND, r);
    7702         192 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_MIT_KRB5", NETR_TRUST_FLAG_MIT_KRB5, r);
    7703         192 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_AES", NETR_TRUST_FLAG_AES, r);
    7704         192 :         ndr->depth--;
    7705         192 : }
    7706             : 
    7707         326 : static enum ndr_err_code ndr_push_netr_WorkstationFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    7708             : {
    7709         389 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    7710         326 :         return NDR_ERR_SUCCESS;
    7711             : }
    7712             : 
    7713         291 : static enum ndr_err_code ndr_pull_netr_WorkstationFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    7714             : {
    7715             :         uint32_t v;
    7716         361 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    7717         361 :         *r = v;
    7718         291 :         return NDR_ERR_SUCCESS;
    7719             : }
    7720             : 
    7721          98 : _PUBLIC_ void ndr_print_netr_WorkstationFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    7722             : {
    7723          98 :         ndr_print_uint32(ndr, name, r);
    7724          98 :         ndr->depth++;
    7725          98 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS", NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS, r);
    7726          98 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_WS_FLAG_HANDLES_SPN_UPDATE", NETR_WS_FLAG_HANDLES_SPN_UPDATE, r);
    7727          98 :         ndr->depth--;
    7728          98 : }
    7729             : 
    7730          20 : static enum ndr_err_code ndr_push_netr_SuiteMask(struct ndr_push *ndr, int ndr_flags, uint16_t r)
    7731             : {
    7732          24 :         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
    7733          20 :         return NDR_ERR_SUCCESS;
    7734             : }
    7735             : 
    7736          20 : static enum ndr_err_code ndr_pull_netr_SuiteMask(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
    7737             : {
    7738             :         uint16_t v;
    7739          26 :         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
    7740          26 :         *r = v;
    7741          20 :         return NDR_ERR_SUCCESS;
    7742             : }
    7743             : 
    7744           2 : _PUBLIC_ void ndr_print_netr_SuiteMask(struct ndr_print *ndr, const char *name, uint16_t r)
    7745             : {
    7746           2 :         ndr_print_uint16(ndr, name, r);
    7747           2 :         ndr->depth++;
    7748           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_BACKOFFICE", NETR_VER_SUITE_BACKOFFICE, r);
    7749           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_BLADE", NETR_VER_SUITE_BLADE, r);
    7750           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_COMPUTE_SERVER", NETR_VER_SUITE_COMPUTE_SERVER, r);
    7751           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_DATACENTER", NETR_VER_SUITE_DATACENTER, r);
    7752           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_ENTERPRISE", NETR_VER_SUITE_ENTERPRISE, r);
    7753           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_EMBEDDEDNT", NETR_VER_SUITE_EMBEDDEDNT, r);
    7754           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_PERSONAL", NETR_VER_SUITE_PERSONAL, r);
    7755           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_SINGLEUSERTS", NETR_VER_SUITE_SINGLEUSERTS, r);
    7756           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_SMALLBUSINESS", NETR_VER_SUITE_SMALLBUSINESS, r);
    7757           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED", NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED, r);
    7758           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_STORAGE_SERVER", NETR_VER_SUITE_STORAGE_SERVER, r);
    7759           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_TERMINAL", NETR_VER_SUITE_TERMINAL, r);
    7760           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_WH_SERVER", NETR_VER_SUITE_WH_SERVER, r);
    7761           2 :         ndr->depth--;
    7762           2 : }
    7763             : 
    7764          20 : static enum ndr_err_code ndr_push_netr_ProductType(struct ndr_push *ndr, int ndr_flags, uint8_t r)
    7765             : {
    7766          24 :         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
    7767          20 :         return NDR_ERR_SUCCESS;
    7768             : }
    7769             : 
    7770          20 : static enum ndr_err_code ndr_pull_netr_ProductType(struct ndr_pull *ndr, int ndr_flags, uint8_t *r)
    7771             : {
    7772             :         uint8_t v;
    7773          26 :         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
    7774          26 :         *r = v;
    7775          20 :         return NDR_ERR_SUCCESS;
    7776             : }
    7777             : 
    7778           2 : _PUBLIC_ void ndr_print_netr_ProductType(struct ndr_print *ndr, const char *name, uint8_t r)
    7779             : {
    7780           2 :         ndr_print_uint8(ndr, name, r);
    7781           2 :         ndr->depth++;
    7782           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "NETR_VER_NT_DOMAIN_CONTROLLER", NETR_VER_NT_DOMAIN_CONTROLLER, r);
    7783           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "NETR_VER_NT_SERVER", NETR_VER_NT_SERVER, r);
    7784           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "NETR_VER_NT_WORKSTATION", NETR_VER_NT_WORKSTATION, r);
    7785           2 :         ndr->depth--;
    7786           2 : }
    7787             : 
    7788         789 : static enum ndr_err_code ndr_push_netr_LsaPolicyInformation(struct ndr_push *ndr, int ndr_flags, const struct netr_LsaPolicyInformation *r)
    7789             : {
    7790         789 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7791         789 :         if (ndr_flags & NDR_SCALARS) {
    7792         400 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7793         400 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->policy_size));
    7794         400 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->policy));
    7795         400 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7796             :         }
    7797         789 :         if (ndr_flags & NDR_BUFFERS) {
    7798         400 :                 if (r->policy) {
    7799           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->policy_size));
    7800           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->policy, r->policy_size));
    7801             :                 }
    7802             :         }
    7803         663 :         return NDR_ERR_SUCCESS;
    7804             : }
    7805             : 
    7806         733 : static enum ndr_err_code ndr_pull_netr_LsaPolicyInformation(struct ndr_pull *ndr, int ndr_flags, struct netr_LsaPolicyInformation *r)
    7807             : {
    7808             :         uint32_t _ptr_policy;
    7809         733 :         uint32_t size_policy_1 = 0;
    7810         733 :         TALLOC_CTX *_mem_save_policy_0 = NULL;
    7811         733 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7812         733 :         if (ndr_flags & NDR_SCALARS) {
    7813         372 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7814         372 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->policy_size));
    7815         372 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_policy));
    7816         372 :                 if (_ptr_policy) {
    7817           0 :                         NDR_PULL_ALLOC(ndr, r->policy);
    7818             :                 } else {
    7819         372 :                         r->policy = NULL;
    7820             :                 }
    7821         372 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7822             :         }
    7823         733 :         if (ndr_flags & NDR_BUFFERS) {
    7824         372 :                 if (r->policy) {
    7825           0 :                         _mem_save_policy_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7826           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->policy, 0);
    7827           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->policy));
    7828           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->policy, &size_policy_1));
    7829           0 :                         NDR_PULL_ALLOC_N(ndr, r->policy, size_policy_1);
    7830           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->policy, size_policy_1));
    7831           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_0, 0);
    7832             :                 }
    7833         372 :                 if (r->policy) {
    7834           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->policy, r->policy_size));
    7835             :                 }
    7836             :         }
    7837         593 :         return NDR_ERR_SUCCESS;
    7838             : }
    7839             : 
    7840          98 : _PUBLIC_ void ndr_print_netr_LsaPolicyInformation(struct ndr_print *ndr, const char *name, const struct netr_LsaPolicyInformation *r)
    7841             : {
    7842          98 :         ndr_print_struct(ndr, name, "netr_LsaPolicyInformation");
    7843          98 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7844          98 :         ndr->depth++;
    7845          98 :         ndr_print_uint32(ndr, "policy_size", r->policy_size);
    7846          98 :         ndr_print_ptr(ndr, "policy", r->policy);
    7847          98 :         ndr->depth++;
    7848          98 :         if (r->policy) {
    7849           0 :                 ndr_print_array_uint8(ndr, "policy", r->policy, r->policy_size);
    7850             :         }
    7851          98 :         ndr->depth--;
    7852          98 :         ndr->depth--;
    7853             : }
    7854             : 
    7855          24 : static enum ndr_err_code ndr_push_netr_OsVersionInfoEx(struct ndr_push *ndr, int ndr_flags, const struct netr_OsVersionInfoEx *r)
    7856             : {
    7857          24 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7858          24 :         if (ndr_flags & NDR_SCALARS) {
    7859          24 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    7860          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 284));
    7861          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MajorVersion));
    7862          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MinorVersion));
    7863          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->BuildNumber));
    7864          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->PlatformId));
    7865             :                 {
    7866          24 :                         uint32_t _flags_save_string = ndr->flags;
    7867          24 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    7868             :                         {
    7869             :                                 struct ndr_push *_ndr_CSDVersion;
    7870          24 :                                 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_CSDVersion, 0, 256));
    7871          24 :                                 NDR_CHECK(ndr_push_string(_ndr_CSDVersion, NDR_SCALARS, r->CSDVersion));
    7872          24 :                                 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_CSDVersion, 0, 256));
    7873             :                         }
    7874          24 :                         ndr->flags = _flags_save_string;
    7875             :                 }
    7876          24 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ServicePackMajor));
    7877          24 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ServicePackMinor));
    7878          28 :                 NDR_CHECK(ndr_push_netr_SuiteMask(ndr, NDR_SCALARS, r->SuiteMask));
    7879          28 :                 NDR_CHECK(ndr_push_netr_ProductType(ndr, NDR_SCALARS, r->ProductType));
    7880          24 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Reserved));
    7881          24 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    7882             :         }
    7883          20 :         if (ndr_flags & NDR_BUFFERS) {
    7884             :         }
    7885          24 :         return NDR_ERR_SUCCESS;
    7886             : }
    7887             : 
    7888          26 : static enum ndr_err_code ndr_pull_netr_OsVersionInfoEx(struct ndr_pull *ndr, int ndr_flags, struct netr_OsVersionInfoEx *r)
    7889             : {
    7890          26 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7891          26 :         if (ndr_flags & NDR_SCALARS) {
    7892          26 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    7893          26 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->OSVersionInfoSize));
    7894          26 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MajorVersion));
    7895          26 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MinorVersion));
    7896          26 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->BuildNumber));
    7897          26 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->PlatformId));
    7898             :                 {
    7899          26 :                         uint32_t _flags_save_string = ndr->flags;
    7900          26 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    7901             :                         {
    7902             :                                 struct ndr_pull *_ndr_CSDVersion;
    7903          26 :                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_CSDVersion, 0, 256));
    7904          26 :                                 NDR_CHECK(ndr_pull_string(_ndr_CSDVersion, NDR_SCALARS, &r->CSDVersion));
    7905          26 :                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_CSDVersion, 0, 256));
    7906             :                         }
    7907          26 :                         ndr->flags = _flags_save_string;
    7908             :                 }
    7909          26 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ServicePackMajor));
    7910          26 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ServicePackMinor));
    7911          32 :                 NDR_CHECK(ndr_pull_netr_SuiteMask(ndr, NDR_SCALARS, &r->SuiteMask));
    7912          32 :                 NDR_CHECK(ndr_pull_netr_ProductType(ndr, NDR_SCALARS, &r->ProductType));
    7913          26 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Reserved));
    7914          26 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    7915             :         }
    7916          20 :         if (ndr_flags & NDR_BUFFERS) {
    7917             :         }
    7918          26 :         return NDR_ERR_SUCCESS;
    7919             : }
    7920             : 
    7921           2 : _PUBLIC_ void ndr_print_netr_OsVersionInfoEx(struct ndr_print *ndr, const char *name, const struct netr_OsVersionInfoEx *r)
    7922             : {
    7923           2 :         ndr_print_struct(ndr, name, "netr_OsVersionInfoEx");
    7924           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7925           2 :         ndr->depth++;
    7926           2 :         ndr_print_uint32(ndr, "OSVersionInfoSize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?284:r->OSVersionInfoSize);
    7927           2 :         ndr_print_uint32(ndr, "MajorVersion", r->MajorVersion);
    7928           2 :         ndr_print_uint32(ndr, "MinorVersion", r->MinorVersion);
    7929           2 :         ndr_print_uint32(ndr, "BuildNumber", r->BuildNumber);
    7930           2 :         ndr_print_uint32(ndr, "PlatformId", r->PlatformId);
    7931             :         {
    7932           2 :                 uint32_t _flags_save_string = ndr->flags;
    7933           2 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    7934           2 :                 ndr_print_string(ndr, "CSDVersion", r->CSDVersion);
    7935           2 :                 ndr->flags = _flags_save_string;
    7936             :         }
    7937           2 :         ndr_print_uint16(ndr, "ServicePackMajor", r->ServicePackMajor);
    7938           2 :         ndr_print_uint16(ndr, "ServicePackMinor", r->ServicePackMinor);
    7939           2 :         ndr_print_netr_SuiteMask(ndr, "SuiteMask", r->SuiteMask);
    7940           2 :         ndr_print_netr_ProductType(ndr, "ProductType", r->ProductType);
    7941           2 :         ndr_print_uint8(ndr, "Reserved", r->Reserved);
    7942           2 :         ndr->depth--;
    7943             : }
    7944             : 
    7945          24 : static enum ndr_err_code ndr_push_netr_OsVersion(struct ndr_push *ndr, int ndr_flags, const struct netr_OsVersion *r)
    7946             : {
    7947          24 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7948          24 :         if (ndr_flags & NDR_SCALARS) {
    7949          24 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7950          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 142));
    7951          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7952          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 142));
    7953             :                 {
    7954             :                         struct ndr_push *_ndr_os;
    7955          24 :                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_os, 0, 142 * 2));
    7956          24 :                         NDR_CHECK(ndr_push_netr_OsVersionInfoEx(_ndr_os, NDR_SCALARS, &r->os));
    7957          24 :                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_os, 0, 142 * 2));
    7958             :                 }
    7959          24 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7960             :         }
    7961          20 :         if (ndr_flags & NDR_BUFFERS) {
    7962             :         }
    7963          24 :         return NDR_ERR_SUCCESS;
    7964             : }
    7965             : 
    7966          26 : static enum ndr_err_code ndr_pull_netr_OsVersion(struct ndr_pull *ndr, int ndr_flags, struct netr_OsVersion *r)
    7967             : {
    7968          26 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7969          26 :         if (ndr_flags & NDR_SCALARS) {
    7970          26 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7971          26 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->length));
    7972          26 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->dummy));
    7973          26 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->size));
    7974             :                 {
    7975             :                         struct ndr_pull *_ndr_os;
    7976          26 :                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_os, 0, r->size * 2));
    7977          26 :                         NDR_CHECK(ndr_pull_netr_OsVersionInfoEx(_ndr_os, NDR_SCALARS, &r->os));
    7978          26 :                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_os, 0, r->size * 2));
    7979             :                 }
    7980          26 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7981             :         }
    7982          20 :         if (ndr_flags & NDR_BUFFERS) {
    7983             :         }
    7984          26 :         return NDR_ERR_SUCCESS;
    7985             : }
    7986             : 
    7987           2 : _PUBLIC_ void ndr_print_netr_OsVersion(struct ndr_print *ndr, const char *name, const struct netr_OsVersion *r)
    7988             : {
    7989           2 :         ndr_print_struct(ndr, name, "netr_OsVersion");
    7990           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7991           2 :         ndr->depth++;
    7992           2 :         ndr_print_uint3264(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?142:r->length);
    7993           2 :         ndr_print_uint3264(ndr, "dummy", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->dummy);
    7994           2 :         ndr_print_uint3264(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?142:r->size);
    7995           2 :         ndr_print_netr_OsVersionInfoEx(ndr, "os", &r->os);
    7996           2 :         ndr->depth--;
    7997             : }
    7998             : 
    7999         358 : static enum ndr_err_code ndr_push_netr_OsVersionContainer(struct ndr_push *ndr, int ndr_flags, const struct netr_OsVersionContainer *r)
    8000             : {
    8001         358 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8002         358 :         if (ndr_flags & NDR_SCALARS) {
    8003         179 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8004         179 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->os == NULL?0:284));
    8005         179 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->os == NULL?0:284));
    8006         179 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->os));
    8007         179 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    8008             :         }
    8009         358 :         if (ndr_flags & NDR_BUFFERS) {
    8010         179 :                 if (r->os) {
    8011          24 :                         NDR_CHECK(ndr_push_netr_OsVersion(ndr, NDR_SCALARS, r->os));
    8012             :                 }
    8013             :         }
    8014         302 :         return NDR_ERR_SUCCESS;
    8015             : }
    8016             : 
    8017         378 : static enum ndr_err_code ndr_pull_netr_OsVersionContainer(struct ndr_pull *ndr, int ndr_flags, struct netr_OsVersionContainer *r)
    8018             : {
    8019             :         uint32_t _ptr_os;
    8020         378 :         TALLOC_CTX *_mem_save_os_0 = NULL;
    8021         378 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8022         378 :         if (ndr_flags & NDR_SCALARS) {
    8023         189 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8024         189 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
    8025         189 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
    8026         189 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_os));
    8027         189 :                 if (_ptr_os) {
    8028          26 :                         NDR_PULL_ALLOC(ndr, r->os);
    8029             :                 } else {
    8030         163 :                         r->os = NULL;
    8031             :                 }
    8032         189 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8033             :         }
    8034         378 :         if (ndr_flags & NDR_BUFFERS) {
    8035         189 :                 if (r->os) {
    8036          26 :                         _mem_save_os_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8037          26 :                         NDR_PULL_SET_MEM_CTX(ndr, r->os, 0);
    8038          26 :                         NDR_CHECK(ndr_pull_netr_OsVersion(ndr, NDR_SCALARS, r->os));
    8039          26 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_os_0, 0);
    8040             :                 }
    8041             :         }
    8042         302 :         return NDR_ERR_SUCCESS;
    8043             : }
    8044             : 
    8045          10 : _PUBLIC_ void ndr_print_netr_OsVersionContainer(struct ndr_print *ndr, const char *name, const struct netr_OsVersionContainer *r)
    8046             : {
    8047          10 :         ndr_print_struct(ndr, name, "netr_OsVersionContainer");
    8048          10 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8049          10 :         ndr->depth++;
    8050          10 :         ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->os == NULL?0:284:r->length);
    8051          10 :         ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->os == NULL?0:284:r->size);
    8052          10 :         ndr_print_ptr(ndr, "os", r->os);
    8053          10 :         ndr->depth++;
    8054          10 :         if (r->os) {
    8055           2 :                 ndr_print_netr_OsVersion(ndr, "os", r->os);
    8056             :         }
    8057          10 :         ndr->depth--;
    8058          10 :         ndr->depth--;
    8059             : }
    8060             : 
    8061         179 : static enum ndr_err_code ndr_push_netr_WorkstationInformation(struct ndr_push *ndr, int ndr_flags, const struct netr_WorkstationInformation *r)
    8062             : {
    8063         179 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8064         179 :         if (ndr_flags & NDR_SCALARS) {
    8065         179 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8066         179 :                 NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_SCALARS, &r->lsa_policy));
    8067         179 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_hostname));
    8068         179 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sitename));
    8069         179 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy1));
    8070         179 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy2));
    8071         179 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy3));
    8072         179 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy4));
    8073         179 :                 NDR_CHECK(ndr_push_netr_OsVersionContainer(ndr, NDR_SCALARS, &r->os_version));
    8074         179 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->os_name));
    8075         179 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dummy_string3));
    8076         179 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dummy_string4));
    8077         207 :                 NDR_CHECK(ndr_push_netr_WorkstationFlags(ndr, NDR_SCALARS, r->workstation_flags));
    8078         179 :                 NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->supported_enc_types));
    8079         179 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long3));
    8080         179 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long4));
    8081         179 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    8082             :         }
    8083         179 :         if (ndr_flags & NDR_BUFFERS) {
    8084         179 :                 NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->ls