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 master 2f515e9b Lines: 8114 14384 56.4 %
Date: 2024-04-21 15:09:00 Functions: 303 472 64.2 %

          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             : #include "librpc/gen_ndr/ndr_nbt.h"
      11           0 : static enum ndr_err_code ndr_push_netr_UasInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_UasInfo *r)
      12             : {
      13           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      14           0 :         if (ndr_flags & NDR_SCALARS) {
      15           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
      16           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->account_name));
      17           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priv));
      18           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auth_flags));
      19           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_count));
      20           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_pw_count));
      21           0 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->last_logon));
      22           0 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->last_logoff));
      23           0 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->logoff_time));
      24           0 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->kickoff_time));
      25           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->password_age));
      26           0 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->pw_can_change));
      27           0 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->pw_must_change));
      28           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer));
      29           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
      30           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->script_path));
      31           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
      32           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
      33             :         }
      34           0 :         if (ndr_flags & NDR_BUFFERS) {
      35           0 :                 if (r->account_name) {
      36           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
      37           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      38           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
      39           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));
      40             :                 }
      41           0 :                 if (r->computer) {
      42           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer, CH_UTF16)));
      43           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      44           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer, CH_UTF16)));
      45           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer, ndr_charset_length(r->computer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
      46             :                 }
      47           0 :                 if (r->domain) {
      48           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
      49           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      50           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
      51           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
      52             :                 }
      53           0 :                 if (r->script_path) {
      54           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->script_path, CH_UTF16)));
      55           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      56           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->script_path, CH_UTF16)));
      57           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));
      58             :                 }
      59             :         }
      60           0 :         return NDR_ERR_SUCCESS;
      61             : }
      62             : 
      63           0 : static enum ndr_err_code ndr_pull_netr_UasInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_UasInfo *r)
      64             : {
      65           0 :         uint32_t _ptr_account_name;
      66           0 :         uint32_t size_account_name_1 = 0;
      67           0 :         uint32_t length_account_name_1 = 0;
      68           0 :         TALLOC_CTX *_mem_save_account_name_0 = NULL;
      69           0 :         uint32_t _ptr_computer;
      70           0 :         uint32_t size_computer_1 = 0;
      71           0 :         uint32_t length_computer_1 = 0;
      72           0 :         TALLOC_CTX *_mem_save_computer_0 = NULL;
      73           0 :         uint32_t _ptr_domain;
      74           0 :         uint32_t size_domain_1 = 0;
      75           0 :         uint32_t length_domain_1 = 0;
      76           0 :         TALLOC_CTX *_mem_save_domain_0 = NULL;
      77           0 :         uint32_t _ptr_script_path;
      78           0 :         uint32_t size_script_path_1 = 0;
      79           0 :         uint32_t length_script_path_1 = 0;
      80           0 :         TALLOC_CTX *_mem_save_script_path_0 = NULL;
      81           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      82           0 :         if (ndr_flags & NDR_SCALARS) {
      83           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
      84           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
      85           0 :                 if (_ptr_account_name) {
      86           0 :                         NDR_PULL_ALLOC(ndr, r->account_name);
      87             :                 } else {
      88           0 :                         r->account_name = NULL;
      89             :                 }
      90           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priv));
      91           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auth_flags));
      92           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_count));
      93           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bad_pw_count));
      94           0 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->last_logon));
      95           0 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->last_logoff));
      96           0 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->logoff_time));
      97           0 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->kickoff_time));
      98           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->password_age));
      99           0 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->pw_can_change));
     100           0 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->pw_must_change));
     101           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer));
     102           0 :                 if (_ptr_computer) {
     103           0 :                         NDR_PULL_ALLOC(ndr, r->computer);
     104             :                 } else {
     105           0 :                         r->computer = NULL;
     106             :                 }
     107           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
     108           0 :                 if (_ptr_domain) {
     109           0 :                         NDR_PULL_ALLOC(ndr, r->domain);
     110             :                 } else {
     111           0 :                         r->domain = NULL;
     112             :                 }
     113           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_script_path));
     114           0 :                 if (_ptr_script_path) {
     115           0 :                         NDR_PULL_ALLOC(ndr, r->script_path);
     116             :                 } else {
     117           0 :                         r->script_path = NULL;
     118             :                 }
     119           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
     120           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     121             :         }
     122           0 :         if (ndr_flags & NDR_BUFFERS) {
     123           0 :                 if (r->account_name) {
     124           0 :                         _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
     125           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->account_name, 0);
     126           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
     127           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
     128           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->account_name, &size_account_name_1));
     129           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->account_name, &length_account_name_1));
     130           0 :                         if (length_account_name_1 > size_account_name_1) {
     131           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
     132             :                         }
     133           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
     134           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
     135           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0);
     136             :                 }
     137           0 :                 if (r->computer) {
     138           0 :                         _mem_save_computer_0 = NDR_PULL_GET_MEM_CTX(ndr);
     139           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->computer, 0);
     140           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->computer));
     141           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->computer));
     142           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer, &size_computer_1));
     143           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer, &length_computer_1));
     144           0 :                         if (length_computer_1 > size_computer_1) {
     145           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_1, length_computer_1);
     146             :                         }
     147           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_1, sizeof(uint16_t)));
     148           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer, length_computer_1, sizeof(uint16_t), CH_UTF16));
     149           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_0, 0);
     150             :                 }
     151           0 :                 if (r->domain) {
     152           0 :                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
     153           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
     154           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
     155           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
     156           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
     157           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
     158           0 :                         if (length_domain_1 > size_domain_1) {
     159           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_1, length_domain_1);
     160             :                         }
     161           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
     162           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
     163           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
     164             :                 }
     165           0 :                 if (r->script_path) {
     166           0 :                         _mem_save_script_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
     167           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->script_path, 0);
     168           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->script_path));
     169           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->script_path));
     170           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->script_path, &size_script_path_1));
     171           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->script_path, &length_script_path_1));
     172           0 :                         if (length_script_path_1 > size_script_path_1) {
     173           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_script_path_1, length_script_path_1);
     174             :                         }
     175           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_script_path_1, sizeof(uint16_t)));
     176           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->script_path, length_script_path_1, sizeof(uint16_t), CH_UTF16));
     177           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_script_path_0, 0);
     178             :                 }
     179             :         }
     180           0 :         return NDR_ERR_SUCCESS;
     181             : }
     182             : 
     183           0 : _PUBLIC_ void ndr_print_netr_UasInfo(struct ndr_print *ndr, const char *name, const struct netr_UasInfo *r)
     184             : {
     185           0 :         ndr_print_struct(ndr, name, "netr_UasInfo");
     186           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     187           0 :         ndr->depth++;
     188           0 :         ndr_print_ptr(ndr, "account_name", r->account_name);
     189           0 :         ndr->depth++;
     190           0 :         if (r->account_name) {
     191           0 :                 ndr_print_string(ndr, "account_name", r->account_name);
     192             :         }
     193           0 :         ndr->depth--;
     194           0 :         ndr_print_uint32(ndr, "priv", r->priv);
     195           0 :         ndr_print_uint32(ndr, "auth_flags", r->auth_flags);
     196           0 :         ndr_print_uint32(ndr, "logon_count", r->logon_count);
     197           0 :         ndr_print_uint32(ndr, "bad_pw_count", r->bad_pw_count);
     198           0 :         ndr_print_time_t(ndr, "last_logon", r->last_logon);
     199           0 :         ndr_print_time_t(ndr, "last_logoff", r->last_logoff);
     200           0 :         ndr_print_time_t(ndr, "logoff_time", r->logoff_time);
     201           0 :         ndr_print_time_t(ndr, "kickoff_time", r->kickoff_time);
     202           0 :         ndr_print_uint32(ndr, "password_age", r->password_age);
     203           0 :         ndr_print_time_t(ndr, "pw_can_change", r->pw_can_change);
     204           0 :         ndr_print_time_t(ndr, "pw_must_change", r->pw_must_change);
     205           0 :         ndr_print_ptr(ndr, "computer", r->computer);
     206           0 :         ndr->depth++;
     207           0 :         if (r->computer) {
     208           0 :                 ndr_print_string(ndr, "computer", r->computer);
     209             :         }
     210           0 :         ndr->depth--;
     211           0 :         ndr_print_ptr(ndr, "domain", r->domain);
     212           0 :         ndr->depth++;
     213           0 :         if (r->domain) {
     214           0 :                 ndr_print_string(ndr, "domain", r->domain);
     215             :         }
     216           0 :         ndr->depth--;
     217           0 :         ndr_print_ptr(ndr, "script_path", r->script_path);
     218           0 :         ndr->depth++;
     219           0 :         if (r->script_path) {
     220           0 :                 ndr_print_string(ndr, "script_path", r->script_path);
     221             :         }
     222           0 :         ndr->depth--;
     223           0 :         ndr_print_uint32(ndr, "unknown", r->unknown);
     224           0 :         ndr->depth--;
     225             : }
     226             : 
     227           0 : static enum ndr_err_code ndr_push_netr_UasLogoffInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_UasLogoffInfo *r)
     228             : {
     229           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     230           0 :         if (ndr_flags & NDR_SCALARS) {
     231           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     232           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->duration));
     233           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
     234           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     235             :         }
     236           0 :         if (ndr_flags & NDR_BUFFERS) {
     237           0 :         }
     238           0 :         return NDR_ERR_SUCCESS;
     239             : }
     240             : 
     241           0 : static enum ndr_err_code ndr_pull_netr_UasLogoffInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_UasLogoffInfo *r)
     242             : {
     243           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     244           0 :         if (ndr_flags & NDR_SCALARS) {
     245           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     246           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->duration));
     247           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
     248           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     249             :         }
     250           0 :         if (ndr_flags & NDR_BUFFERS) {
     251           0 :         }
     252           0 :         return NDR_ERR_SUCCESS;
     253             : }
     254             : 
     255           0 : _PUBLIC_ void ndr_print_netr_UasLogoffInfo(struct ndr_print *ndr, const char *name, const struct netr_UasLogoffInfo *r)
     256             : {
     257           0 :         ndr_print_struct(ndr, name, "netr_UasLogoffInfo");
     258           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     259           0 :         ndr->depth++;
     260           0 :         ndr_print_uint32(ndr, "duration", r->duration);
     261           0 :         ndr_print_uint16(ndr, "logon_count", r->logon_count);
     262           0 :         ndr->depth--;
     263             : }
     264             : 
     265           0 : _PUBLIC_ enum ndr_err_code ndr_push_netr_AcctLockStr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_AcctLockStr *r)
     266             : {
     267           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     268           0 :         if (ndr_flags & NDR_SCALARS) {
     269           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     270           0 :                 NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->lockout_duration));
     271           0 :                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->reset_count));
     272           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_attempt_lockout));
     273           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy));
     274           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     275             :         }
     276           0 :         if (ndr_flags & NDR_BUFFERS) {
     277           0 :         }
     278           0 :         return NDR_ERR_SUCCESS;
     279             : }
     280             : 
     281           0 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_AcctLockStr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_AcctLockStr *r)
     282             : {
     283           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     284           0 :         if (ndr_flags & NDR_SCALARS) {
     285           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     286           0 :                 NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->lockout_duration));
     287           0 :                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->reset_count));
     288           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bad_attempt_lockout));
     289           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy));
     290           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     291             :         }
     292           0 :         if (ndr_flags & NDR_BUFFERS) {
     293           0 :         }
     294           0 :         return NDR_ERR_SUCCESS;
     295             : }
     296             : 
     297           0 : static void ndr_print_flags_netr_AcctLockStr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_AcctLockStr *r)
     298             : {
     299           0 :         ndr_print_netr_AcctLockStr(ndr, name, r);
     300           0 : }
     301             : 
     302           0 : _PUBLIC_ void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name, const struct netr_AcctLockStr *r)
     303             : {
     304           0 :         ndr_print_struct(ndr, name, "netr_AcctLockStr");
     305           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     306           0 :         ndr->depth++;
     307           0 :         ndr_print_dlong(ndr, "lockout_duration", r->lockout_duration);
     308           0 :         ndr_print_udlong(ndr, "reset_count", r->reset_count);
     309           0 :         ndr_print_uint32(ndr, "bad_attempt_lockout", r->bad_attempt_lockout);
     310           0 :         ndr_print_uint32(ndr, "dummy", r->dummy);
     311           0 :         ndr->depth--;
     312             : }
     313             : 
     314       20144 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonParameterControl(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
     315             : {
     316       20144 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
     317       18300 :         return NDR_ERR_SUCCESS;
     318             : }
     319             : 
     320       18669 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonParameterControl(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
     321             : {
     322        1840 :         uint32_t v;
     323       18669 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     324       18669 :         *r = v;
     325       18669 :         return NDR_ERR_SUCCESS;
     326             : }
     327             : 
     328           2 : _PUBLIC_ void ndr_print_netr_LogonParameterControl(struct ndr_print *ndr, const char *name, uint32_t r)
     329             : {
     330           2 :         ndr_print_uint32(ndr, name, r);
     331           2 :         ndr->depth++;
     332           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_CLEARTEXT_PASSWORD_ALLOWED", MSV1_0_CLEARTEXT_PASSWORD_ALLOWED, r);
     333           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_UPDATE_LOGON_STATISTICS", MSV1_0_UPDATE_LOGON_STATISTICS, r);
     334           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_RETURN_USER_PARAMETERS", MSV1_0_RETURN_USER_PARAMETERS, r);
     335           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_DONT_TRY_GUEST_ACCOUNT", MSV1_0_DONT_TRY_GUEST_ACCOUNT, r);
     336           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT", MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT, r);
     337           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_RETURN_PASSWORD_EXPIRY", MSV1_0_RETURN_PASSWORD_EXPIRY, r);
     338           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_USE_CLIENT_CHALLENGE", MSV1_0_USE_CLIENT_CHALLENGE, r);
     339           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_TRY_GUEST_ACCOUNT_ONLY", MSV1_0_TRY_GUEST_ACCOUNT_ONLY, r);
     340           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_RETURN_PROFILE_PATH", MSV1_0_RETURN_PROFILE_PATH, r);
     341           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY", MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY, r);
     342           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT", MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT, r);
     343           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_DISABLE_PERSONAL_FALLBACK", MSV1_0_DISABLE_PERSONAL_FALLBACK, r);
     344           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_FORCE_GUEST", MSV1_0_ALLOW_FORCE_GUEST, r);
     345           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED", MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED, r);
     346           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY", MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY, r);
     347           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_MSVCHAPV2", MSV1_0_ALLOW_MSVCHAPV2, r);
     348           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_S4U2SELF", MSV1_0_S4U2SELF, r);
     349           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_CHECK_LOGONHOURS_FOR_S4U", MSV1_0_CHECK_LOGONHOURS_FOR_S4U, r);
     350           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_SUBAUTHENTICATION_DLL_EX", MSV1_0_SUBAUTHENTICATION_DLL_EX, r);
     351           2 :         ndr->depth--;
     352           2 : }
     353             : 
     354       40288 : static enum ndr_err_code ndr_push_netr_IdentityInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_IdentityInfo *r)
     355             : {
     356       40288 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     357       40288 :         if (ndr_flags & NDR_SCALARS) {
     358       20144 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     359       20144 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
     360       20144 :                 NDR_CHECK(ndr_push_netr_LogonParameterControl(ndr, NDR_SCALARS, r->parameter_control));
     361       20144 :                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->logon_id));
     362       20144 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
     363       20144 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstation));
     364       20144 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     365             :         }
     366       40288 :         if (ndr_flags & NDR_BUFFERS) {
     367       20144 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
     368       20144 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
     369       20144 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstation));
     370             :         }
     371       36600 :         return NDR_ERR_SUCCESS;
     372             : }
     373             : 
     374       37338 : static enum ndr_err_code ndr_pull_netr_IdentityInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_IdentityInfo *r)
     375             : {
     376       37338 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     377       37338 :         if (ndr_flags & NDR_SCALARS) {
     378       18669 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     379       18669 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
     380       18669 :                 NDR_CHECK(ndr_pull_netr_LogonParameterControl(ndr, NDR_SCALARS, &r->parameter_control));
     381       18669 :                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->logon_id));
     382       18669 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
     383       18669 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstation));
     384       18669 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     385             :         }
     386       37338 :         if (ndr_flags & NDR_BUFFERS) {
     387       18669 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
     388       18669 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
     389       18669 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstation));
     390             :         }
     391       33658 :         return NDR_ERR_SUCCESS;
     392             : }
     393             : 
     394           2 : _PUBLIC_ void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *name, const struct netr_IdentityInfo *r)
     395             : {
     396           2 :         ndr_print_struct(ndr, name, "netr_IdentityInfo");
     397           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
     398           2 :         ndr->depth++;
     399           2 :         ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
     400           2 :         ndr_print_netr_LogonParameterControl(ndr, "parameter_control", r->parameter_control);
     401           2 :         ndr_print_udlong(ndr, "logon_id", r->logon_id);
     402           2 :         ndr_print_lsa_String(ndr, "account_name", &r->account_name);
     403           2 :         ndr_print_lsa_String(ndr, "workstation", &r->workstation);
     404           2 :         ndr->depth--;
     405             : }
     406             : 
     407         516 : static enum ndr_err_code ndr_push_netr_PasswordInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_PasswordInfo *r)
     408             : {
     409         516 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     410         516 :         if (ndr_flags & NDR_SCALARS) {
     411         516 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     412         516 :                 NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
     413         516 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
     414         516 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
     415         516 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     416             :         }
     417         516 :         if (ndr_flags & NDR_BUFFERS) {
     418         516 :                 NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
     419             :         }
     420         516 :         return NDR_ERR_SUCCESS;
     421             : }
     422             : 
     423         676 : static enum ndr_err_code ndr_pull_netr_PasswordInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_PasswordInfo *r)
     424             : {
     425         676 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     426         676 :         if (ndr_flags & NDR_SCALARS) {
     427         676 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     428         676 :                 NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
     429         676 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
     430         676 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
     431         676 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     432             :         }
     433         676 :         if (ndr_flags & NDR_BUFFERS) {
     434         676 :                 NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
     435             :         }
     436         674 :         return NDR_ERR_SUCCESS;
     437             : }
     438             : 
     439           2 : _PUBLIC_ void ndr_print_netr_PasswordInfo(struct ndr_print *ndr, const char *name, const struct netr_PasswordInfo *r)
     440             : {
     441           2 :         ndr_print_struct(ndr, name, "netr_PasswordInfo");
     442           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
     443           2 :         ndr->depth++;
     444           2 :         ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info);
     445           2 :         ndr_print_samr_Password(ndr, "lmpassword", &r->lmpassword);
     446           2 :         ndr_print_samr_Password(ndr, "ntpassword", &r->ntpassword);
     447           2 :         ndr->depth--;
     448             : }
     449             : 
     450       77512 : static enum ndr_err_code ndr_push_netr_ChallengeResponse(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_ChallengeResponse *r)
     451             : {
     452             :         {
     453       77512 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     454       77512 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     455       77512 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     456       77512 :                 if (ndr_flags & NDR_SCALARS) {
     457       38756 :                         NDR_CHECK(ndr_push_align(ndr, 5));
     458       38756 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
     459       38756 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
     460       38756 :                         NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
     461       38756 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     462             :                 }
     463       77512 :                 if (ndr_flags & NDR_BUFFERS) {
     464       38756 :                         if (r->data) {
     465       36560 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
     466       36560 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     467       36560 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
     468       36560 :                                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
     469             :                         }
     470             :                 }
     471       77512 :                 ndr->flags = _flags_save_STRUCT;
     472             :         }
     473       77512 :         return NDR_ERR_SUCCESS;
     474             : }
     475             : 
     476       70972 : static enum ndr_err_code ndr_pull_netr_ChallengeResponse(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_ChallengeResponse *r)
     477             : {
     478        7352 :         uint32_t _ptr_data;
     479       70972 :         uint32_t size_data_1 = 0;
     480       70972 :         uint32_t length_data_1 = 0;
     481       70972 :         TALLOC_CTX *_mem_save_data_0 = NULL;
     482             :         {
     483       70972 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     484       70972 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     485       70972 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     486       70972 :                 if (ndr_flags & NDR_SCALARS) {
     487       35486 :                         NDR_CHECK(ndr_pull_align(ndr, 5));
     488       35486 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
     489       35486 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
     490       35486 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
     491       35486 :                         if (_ptr_data) {
     492       33224 :                                 NDR_PULL_ALLOC(ndr, r->data);
     493             :                         } else {
     494        2262 :                                 r->data = NULL;
     495             :                         }
     496       35486 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     497             :                 }
     498       70972 :                 if (ndr_flags & NDR_BUFFERS) {
     499       35486 :                         if (r->data) {
     500       33224 :                                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
     501       33224 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
     502       33224 :                                 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
     503       33224 :                                 NDR_CHECK(ndr_pull_array_length(ndr, &r->data));
     504       33224 :                                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
     505       33224 :                                 NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->data, &length_data_1));
     506       33224 :                                 if (length_data_1 > size_data_1) {
     507           0 :                                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_data_1, length_data_1);
     508             :                                 }
     509       33224 :                                 NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
     510       33224 :                                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, length_data_1));
     511       33224 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
     512             :                         }
     513       35486 :                         if (r->data) {
     514       33224 :                                 NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
     515             :                         }
     516       35486 :                         if (r->data) {
     517       33224 :                                 NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->data, r->length));
     518             :                         }
     519             :                 }
     520       70972 :                 ndr->flags = _flags_save_STRUCT;
     521             :         }
     522       70972 :         return NDR_ERR_SUCCESS;
     523             : }
     524             : 
     525           0 : _PUBLIC_ void ndr_print_netr_ChallengeResponse(struct ndr_print *ndr, const char *name, const struct netr_ChallengeResponse *r)
     526             : {
     527           0 :         ndr_print_struct(ndr, name, "netr_ChallengeResponse");
     528           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     529             :         {
     530           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     531           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     532           0 :                 ndr->depth++;
     533           0 :                 ndr_print_uint16(ndr, "length", r->length);
     534           0 :                 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->length:r->size);
     535           0 :                 ndr_print_ptr(ndr, "data", r->data);
     536           0 :                 ndr->depth++;
     537           0 :                 if (r->data) {
     538           0 :                         ndr_print_array_uint8(ndr, "data", r->data, r->length);
     539             :                 }
     540           0 :                 ndr->depth--;
     541           0 :                 ndr->depth--;
     542           0 :                 ndr->flags = _flags_save_STRUCT;
     543             :         }
     544             : }
     545             : 
     546       19378 : static enum ndr_err_code ndr_push_netr_NetworkInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_NetworkInfo *r)
     547             : {
     548             :         {
     549       19378 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     550       19378 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     551       19378 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     552       19378 :                 if (ndr_flags & NDR_SCALARS) {
     553       19378 :                         NDR_CHECK(ndr_push_align(ndr, 5));
     554       19378 :                         NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
     555       19378 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->challenge, 8));
     556       19378 :                         NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->nt));
     557       19378 :                         NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->lm));
     558       19378 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     559             :                 }
     560       19378 :                 if (ndr_flags & NDR_BUFFERS) {
     561       19378 :                         NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
     562       19378 :                         NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->nt));
     563       19378 :                         NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->lm));
     564             :                 }
     565       19378 :                 ndr->flags = _flags_save_STRUCT;
     566             :         }
     567       19378 :         return NDR_ERR_SUCCESS;
     568             : }
     569             : 
     570       17743 : static enum ndr_err_code ndr_pull_netr_NetworkInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_NetworkInfo *r)
     571             : {
     572       17743 :         uint32_t size_challenge_0 = 0;
     573             :         {
     574       17743 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     575       17743 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     576       17743 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     577       17743 :                 if (ndr_flags & NDR_SCALARS) {
     578       17743 :                         NDR_CHECK(ndr_pull_align(ndr, 5));
     579       17743 :                         NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
     580       17743 :                         size_challenge_0 = 8;
     581       17743 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->challenge, size_challenge_0));
     582       17743 :                         NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->nt));
     583       17743 :                         NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->lm));
     584       17743 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     585             :                 }
     586       17743 :                 if (ndr_flags & NDR_BUFFERS) {
     587       17743 :                         NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
     588       17743 :                         NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->nt));
     589       17743 :                         NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->lm));
     590             :                 }
     591       17743 :                 ndr->flags = _flags_save_STRUCT;
     592             :         }
     593       17743 :         return NDR_ERR_SUCCESS;
     594             : }
     595             : 
     596           0 : _PUBLIC_ void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name, const struct netr_NetworkInfo *r)
     597             : {
     598           0 :         ndr_print_struct(ndr, name, "netr_NetworkInfo");
     599           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     600             :         {
     601           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     602           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     603           0 :                 ndr->depth++;
     604           0 :                 ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info);
     605           0 :                 ndr_print_array_uint8(ndr, "challenge", r->challenge, 8);
     606           0 :                 ndr_print_netr_ChallengeResponse(ndr, "nt", &r->nt);
     607           0 :                 ndr_print_netr_ChallengeResponse(ndr, "lm", &r->lm);
     608           0 :                 ndr->depth--;
     609           0 :                 ndr->flags = _flags_save_STRUCT;
     610             :         }
     611             : }
     612             : 
     613         250 : static enum ndr_err_code ndr_push_netr_GenericInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_GenericInfo *r)
     614             : {
     615             :         {
     616         250 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     617         250 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     618         250 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     619         250 :                 if (ndr_flags & NDR_SCALARS) {
     620         250 :                         NDR_CHECK(ndr_push_align(ndr, 5));
     621         250 :                         NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
     622         250 :                         NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->package_name));
     623         250 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
     624         250 :                         NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
     625         250 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     626             :                 }
     627         250 :                 if (ndr_flags & NDR_BUFFERS) {
     628         250 :                         NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
     629         250 :                         NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->package_name));
     630         250 :                         if (r->data) {
     631         250 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
     632         250 :                                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
     633             :                         }
     634             :                 }
     635         250 :                 ndr->flags = _flags_save_STRUCT;
     636             :         }
     637         250 :         return NDR_ERR_SUCCESS;
     638             : }
     639             : 
     640         250 : static enum ndr_err_code ndr_pull_netr_GenericInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_GenericInfo *r)
     641             : {
     642           0 :         uint32_t _ptr_data;
     643         250 :         uint32_t size_data_1 = 0;
     644         250 :         TALLOC_CTX *_mem_save_data_0 = NULL;
     645             :         {
     646         250 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     647         250 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     648         250 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     649         250 :                 if (ndr_flags & NDR_SCALARS) {
     650         250 :                         NDR_CHECK(ndr_pull_align(ndr, 5));
     651         250 :                         NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
     652         250 :                         NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->package_name));
     653         250 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
     654         250 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
     655         250 :                         if (_ptr_data) {
     656         250 :                                 NDR_PULL_ALLOC(ndr, r->data);
     657             :                         } else {
     658           0 :                                 r->data = NULL;
     659             :                         }
     660         250 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     661             :                 }
     662         250 :                 if (ndr_flags & NDR_BUFFERS) {
     663         250 :                         NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
     664         250 :                         NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->package_name));
     665         250 :                         if (r->data) {
     666         250 :                                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
     667         250 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
     668         250 :                                 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
     669         250 :                                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
     670         250 :                                 NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
     671         250 :                                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
     672         250 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
     673             :                         }
     674         250 :                         if (r->data) {
     675         250 :                                 NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
     676             :                         }
     677             :                 }
     678         250 :                 ndr->flags = _flags_save_STRUCT;
     679             :         }
     680         250 :         return NDR_ERR_SUCCESS;
     681             : }
     682             : 
     683           0 : _PUBLIC_ void ndr_print_netr_GenericInfo(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo *r)
     684             : {
     685           0 :         ndr_print_struct(ndr, name, "netr_GenericInfo");
     686           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     687             :         {
     688           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     689           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     690           0 :                 ndr->depth++;
     691           0 :                 ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info);
     692           0 :                 ndr_print_lsa_String(ndr, "package_name", &r->package_name);
     693           0 :                 ndr_print_uint32(ndr, "length", r->length);
     694           0 :                 ndr_print_ptr(ndr, "data", r->data);
     695           0 :                 ndr->depth++;
     696           0 :                 if (r->data) {
     697           0 :                         ndr_print_array_uint8(ndr, "data", r->data, r->length);
     698             :                 }
     699           0 :                 ndr->depth--;
     700           0 :                 ndr->depth--;
     701           0 :                 ndr->flags = _flags_save_STRUCT;
     702             :         }
     703             : }
     704             : 
     705       47324 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfoClass(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_LogonInfoClass r)
     706             : {
     707       47324 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
     708       42170 :         return NDR_ERR_SUCCESS;
     709             : }
     710             : 
     711       22821 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfoClass(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_LogonInfoClass *r)
     712             : {
     713        2576 :         uint16_t v;
     714       22821 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
     715       22821 :         *r = v;
     716       22821 :         return NDR_ERR_SUCCESS;
     717             : }
     718             : 
     719           2 : _PUBLIC_ void ndr_print_netr_LogonInfoClass(struct ndr_print *ndr, const char *name, enum netr_LogonInfoClass r)
     720             : {
     721           2 :         const char *val = NULL;
     722             : 
     723           2 :         switch (r) {
     724           2 :                 case NetlogonInteractiveInformation: val = "NetlogonInteractiveInformation"; break;
     725           0 :                 case NetlogonNetworkInformation: val = "NetlogonNetworkInformation"; break;
     726           0 :                 case NetlogonServiceInformation: val = "NetlogonServiceInformation"; break;
     727           0 :                 case NetlogonGenericInformation: val = "NetlogonGenericInformation"; break;
     728           0 :                 case NetlogonInteractiveTransitiveInformation: val = "NetlogonInteractiveTransitiveInformation"; break;
     729           0 :                 case NetlogonNetworkTransitiveInformation: val = "NetlogonNetworkTransitiveInformation"; break;
     730           0 :                 case NetlogonServiceTransitiveInformation: val = "NetlogonServiceTransitiveInformation"; break;
     731             :         }
     732           2 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     733           2 : }
     734             : 
     735       24448 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_LogonLevel *r)
     736             : {
     737        2580 :         uint32_t level;
     738       24448 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     739       24448 :         if (ndr_flags & NDR_SCALARS) {
     740             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     741       24448 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     742       24448 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
     743       24448 :                 NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, level));
     744             :                 /* ms_union is always aligned to the largest union arm*/
     745       24448 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     746       24448 :                 switch (level) {
     747         497 :                         case NetlogonInteractiveInformation: {
     748         497 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
     749         497 :                         break; }
     750             : 
     751       16299 :                         case NetlogonNetworkInformation: {
     752       16299 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->network));
     753       14455 :                         break; }
     754             : 
     755           0 :                         case NetlogonServiceInformation: {
     756           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
     757           0 :                         break; }
     758             : 
     759         250 :                         case NetlogonGenericInformation: {
     760         250 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->generic));
     761         250 :                         break; }
     762             : 
     763          19 :                         case NetlogonInteractiveTransitiveInformation: {
     764          19 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
     765          19 :                         break; }
     766             : 
     767        3079 :                         case NetlogonNetworkTransitiveInformation: {
     768        3079 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->network));
     769        3079 :                         break; }
     770             : 
     771           0 :                         case NetlogonServiceTransitiveInformation: {
     772           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
     773           0 :                         break; }
     774             : 
     775        3568 :                         default: {
     776        3568 :                         break; }
     777             : 
     778             :                 }
     779             :         }
     780       24448 :         if (ndr_flags & NDR_BUFFERS) {
     781       24448 :                 if (!(ndr_flags & NDR_SCALARS)) {
     782             :                         /* We didn't get it above, and the token is not needed after this. */
     783           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     784             :                 }
     785       24448 :                 switch (level) {
     786         497 :                         case NetlogonInteractiveInformation:
     787         497 :                                 if (r->password) {
     788         497 :                                         NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     789             :                                 }
     790         497 :                         break;
     791             : 
     792       16299 :                         case NetlogonNetworkInformation:
     793       16299 :                                 if (r->network) {
     794       16299 :                                         NDR_CHECK(ndr_push_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
     795             :                                 }
     796       14455 :                         break;
     797             : 
     798           0 :                         case NetlogonServiceInformation:
     799           0 :                                 if (r->password) {
     800           0 :                                         NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     801             :                                 }
     802           0 :                         break;
     803             : 
     804         250 :                         case NetlogonGenericInformation:
     805         250 :                                 if (r->generic) {
     806         250 :                                         NDR_CHECK(ndr_push_netr_GenericInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
     807             :                                 }
     808         250 :                         break;
     809             : 
     810          19 :                         case NetlogonInteractiveTransitiveInformation:
     811          19 :                                 if (r->password) {
     812          19 :                                         NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     813             :                                 }
     814          19 :                         break;
     815             : 
     816        3079 :                         case NetlogonNetworkTransitiveInformation:
     817        3079 :                                 if (r->network) {
     818        3079 :                                         NDR_CHECK(ndr_push_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
     819             :                                 }
     820        3079 :                         break;
     821             : 
     822           0 :                         case NetlogonServiceTransitiveInformation:
     823           0 :                                 if (r->password) {
     824           0 :                                         NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     825             :                                 }
     826           0 :                         break;
     827             : 
     828        3568 :                         default:
     829        3568 :                         break;
     830             : 
     831             :                 }
     832             :         }
     833       21868 :         return NDR_ERR_SUCCESS;
     834             : }
     835             : 
     836       22821 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_LogonLevel *r)
     837             : {
     838        2576 :         uint32_t level;
     839        2576 :         uint16_t _level;
     840       22821 :         TALLOC_CTX *_mem_save_password_0 = NULL;
     841        2576 :         uint32_t _ptr_password;
     842       22821 :         TALLOC_CTX *_mem_save_network_0 = NULL;
     843        2576 :         uint32_t _ptr_network;
     844       22821 :         TALLOC_CTX *_mem_save_generic_0 = NULL;
     845        2576 :         uint32_t _ptr_generic;
     846       22821 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     847       22821 :         if (ndr_flags & NDR_SCALARS) {
     848             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     849       22821 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     850       22821 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
     851       22821 :                 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
     852       22821 :                 if (_level != level) {
     853           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
     854             :                 }
     855             :                 /* ms_union is always aligned to the largest union arm*/
     856       22821 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     857       22821 :                 switch (level) {
     858         582 :                         case NetlogonInteractiveInformation: {
     859         582 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
     860         582 :                                 if (_ptr_password) {
     861         582 :                                         NDR_PULL_ALLOC(ndr, r->password);
     862             :                                 } else {
     863           0 :                                         r->password = NULL;
     864             :                                 }
     865         580 :                         break; }
     866             : 
     867       14430 :                         case NetlogonNetworkInformation: {
     868       14430 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_network));
     869       14430 :                                 if (_ptr_network) {
     870       14430 :                                         NDR_PULL_ALLOC(ndr, r->network);
     871             :                                 } else {
     872           0 :                                         r->network = NULL;
     873             :                                 }
     874       12592 :                         break; }
     875             : 
     876           0 :                         case NetlogonServiceInformation: {
     877           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
     878           0 :                                 if (_ptr_password) {
     879           0 :                                         NDR_PULL_ALLOC(ndr, r->password);
     880             :                                 } else {
     881           0 :                                         r->password = NULL;
     882             :                                 }
     883           0 :                         break; }
     884             : 
     885         250 :                         case NetlogonGenericInformation: {
     886         250 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_generic));
     887         250 :                                 if (_ptr_generic) {
     888         250 :                                         NDR_PULL_ALLOC(ndr, r->generic);
     889             :                                 } else {
     890           0 :                                         r->generic = NULL;
     891             :                                 }
     892         250 :                         break; }
     893             : 
     894          94 :                         case NetlogonInteractiveTransitiveInformation: {
     895          94 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
     896          94 :                                 if (_ptr_password) {
     897          94 :                                         NDR_PULL_ALLOC(ndr, r->password);
     898             :                                 } else {
     899           0 :                                         r->password = NULL;
     900             :                                 }
     901          94 :                         break; }
     902             : 
     903        3313 :                         case NetlogonNetworkTransitiveInformation: {
     904        3313 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_network));
     905        3313 :                                 if (_ptr_network) {
     906        3313 :                                         NDR_PULL_ALLOC(ndr, r->network);
     907             :                                 } else {
     908           0 :                                         r->network = NULL;
     909             :                                 }
     910        3313 :                         break; }
     911             : 
     912           0 :                         case NetlogonServiceTransitiveInformation: {
     913           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
     914           0 :                                 if (_ptr_password) {
     915           0 :                                         NDR_PULL_ALLOC(ndr, r->password);
     916             :                                 } else {
     917           0 :                                         r->password = NULL;
     918             :                                 }
     919           0 :                         break; }
     920             : 
     921        3416 :                         default: {
     922        3416 :                         break; }
     923             : 
     924             :                 }
     925             :         }
     926       22821 :         if (ndr_flags & NDR_BUFFERS) {
     927       22821 :                 if (!(ndr_flags & NDR_SCALARS)) {
     928             :                         /* We didn't get it above, and the token is not needed after this. */
     929           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     930             :                 }
     931       22821 :                 switch (level) {
     932         582 :                         case NetlogonInteractiveInformation:
     933         582 :                                 if (r->password) {
     934         582 :                                         _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
     935         582 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
     936         582 :                                         NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     937         582 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
     938             :                                 }
     939         580 :                         break;
     940             : 
     941       14430 :                         case NetlogonNetworkInformation:
     942       14430 :                                 if (r->network) {
     943       14430 :                                         _mem_save_network_0 = NDR_PULL_GET_MEM_CTX(ndr);
     944       14430 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->network, 0);
     945       14430 :                                         NDR_CHECK(ndr_pull_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
     946       14430 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_network_0, 0);
     947             :                                 }
     948       12592 :                         break;
     949             : 
     950           0 :                         case NetlogonServiceInformation:
     951           0 :                                 if (r->password) {
     952           0 :                                         _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
     953           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
     954           0 :                                         NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     955           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
     956             :                                 }
     957           0 :                         break;
     958             : 
     959         250 :                         case NetlogonGenericInformation:
     960         250 :                                 if (r->generic) {
     961         250 :                                         _mem_save_generic_0 = NDR_PULL_GET_MEM_CTX(ndr);
     962         250 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->generic, 0);
     963         250 :                                         NDR_CHECK(ndr_pull_netr_GenericInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
     964         250 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_generic_0, 0);
     965             :                                 }
     966         250 :                         break;
     967             : 
     968          94 :                         case NetlogonInteractiveTransitiveInformation:
     969          94 :                                 if (r->password) {
     970          94 :                                         _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
     971          94 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
     972          94 :                                         NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     973          94 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
     974             :                                 }
     975          94 :                         break;
     976             : 
     977        3313 :                         case NetlogonNetworkTransitiveInformation:
     978        3313 :                                 if (r->network) {
     979        3313 :                                         _mem_save_network_0 = NDR_PULL_GET_MEM_CTX(ndr);
     980        3313 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->network, 0);
     981        3313 :                                         NDR_CHECK(ndr_pull_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
     982        3313 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_network_0, 0);
     983             :                                 }
     984        3313 :                         break;
     985             : 
     986           0 :                         case NetlogonServiceTransitiveInformation:
     987           0 :                                 if (r->password) {
     988           0 :                                         _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
     989           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
     990           0 :                                         NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
     991           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
     992             :                                 }
     993           0 :                         break;
     994             : 
     995        3416 :                         default:
     996        3416 :                         break;
     997             : 
     998             :                 }
     999             :         }
    1000       20245 :         return NDR_ERR_SUCCESS;
    1001             : }
    1002             : 
    1003           2 : _PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, const union netr_LogonLevel *r)
    1004             : {
    1005           2 :         uint32_t level;
    1006           2 :         level = ndr_print_steal_switch_value(ndr, r);
    1007           2 :         ndr_print_union(ndr, name, level, "netr_LogonLevel");
    1008           2 :         switch (level) {
    1009           2 :                 case NetlogonInteractiveInformation:
    1010           2 :                         ndr_print_ptr(ndr, "password", r->password);
    1011           2 :                         ndr->depth++;
    1012           2 :                         if (r->password) {
    1013           2 :                                 ndr_print_netr_PasswordInfo(ndr, "password", r->password);
    1014             :                         }
    1015           2 :                         ndr->depth--;
    1016           2 :                 break;
    1017             : 
    1018           0 :                 case NetlogonNetworkInformation:
    1019           0 :                         ndr_print_ptr(ndr, "network", r->network);
    1020           0 :                         ndr->depth++;
    1021           0 :                         if (r->network) {
    1022           0 :                                 ndr_print_netr_NetworkInfo(ndr, "network", r->network);
    1023             :                         }
    1024           0 :                         ndr->depth--;
    1025           0 :                 break;
    1026             : 
    1027           0 :                 case NetlogonServiceInformation:
    1028           0 :                         ndr_print_ptr(ndr, "password", r->password);
    1029           0 :                         ndr->depth++;
    1030           0 :                         if (r->password) {
    1031           0 :                                 ndr_print_netr_PasswordInfo(ndr, "password", r->password);
    1032             :                         }
    1033           0 :                         ndr->depth--;
    1034           0 :                 break;
    1035             : 
    1036           0 :                 case NetlogonGenericInformation:
    1037           0 :                         ndr_print_ptr(ndr, "generic", r->generic);
    1038           0 :                         ndr->depth++;
    1039           0 :                         if (r->generic) {
    1040           0 :                                 ndr_print_netr_GenericInfo(ndr, "generic", r->generic);
    1041             :                         }
    1042           0 :                         ndr->depth--;
    1043           0 :                 break;
    1044             : 
    1045           0 :                 case NetlogonInteractiveTransitiveInformation:
    1046           0 :                         ndr_print_ptr(ndr, "password", r->password);
    1047           0 :                         ndr->depth++;
    1048           0 :                         if (r->password) {
    1049           0 :                                 ndr_print_netr_PasswordInfo(ndr, "password", r->password);
    1050             :                         }
    1051           0 :                         ndr->depth--;
    1052           0 :                 break;
    1053             : 
    1054           0 :                 case NetlogonNetworkTransitiveInformation:
    1055           0 :                         ndr_print_ptr(ndr, "network", r->network);
    1056           0 :                         ndr->depth++;
    1057           0 :                         if (r->network) {
    1058           0 :                                 ndr_print_netr_NetworkInfo(ndr, "network", r->network);
    1059             :                         }
    1060           0 :                         ndr->depth--;
    1061           0 :                 break;
    1062             : 
    1063           0 :                 case NetlogonServiceTransitiveInformation:
    1064           0 :                         ndr_print_ptr(ndr, "password", r->password);
    1065           0 :                         ndr->depth++;
    1066           0 :                         if (r->password) {
    1067           0 :                                 ndr_print_netr_PasswordInfo(ndr, "password", r->password);
    1068             :                         }
    1069           0 :                         ndr->depth--;
    1070           0 :                 break;
    1071             : 
    1072           0 :                 default:
    1073           0 :                 break;
    1074             : 
    1075             :         }
    1076           2 : }
    1077             : 
    1078      105600 : _PUBLIC_ enum ndr_err_code ndr_push_netr_UserSessionKey(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_UserSessionKey *r)
    1079             : {
    1080             :         {
    1081      105600 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1082      105600 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1083      105600 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1084      105600 :                 if (ndr_flags & NDR_SCALARS) {
    1085      105600 :                         NDR_CHECK(ndr_push_align(ndr, 1));
    1086      105600 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->key, 16));
    1087      105600 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    1088             :                 }
    1089      105600 :                 if (ndr_flags & NDR_BUFFERS) {
    1090        4784 :                 }
    1091      105600 :                 ndr->flags = _flags_save_STRUCT;
    1092             :         }
    1093      105600 :         return NDR_ERR_SUCCESS;
    1094             : }
    1095             : 
    1096      216660 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserSessionKey(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_UserSessionKey *r)
    1097             : {
    1098      216660 :         uint32_t size_key_0 = 0;
    1099             :         {
    1100      216660 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1101      216660 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1102      216660 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1103      216660 :                 if (ndr_flags & NDR_SCALARS) {
    1104      216660 :                         NDR_CHECK(ndr_pull_align(ndr, 1));
    1105      216660 :                         size_key_0 = 16;
    1106      216660 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->key, size_key_0));
    1107      216660 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    1108             :                 }
    1109      216660 :                 if (ndr_flags & NDR_BUFFERS) {
    1110        4166 :                 }
    1111      216660 :                 ndr->flags = _flags_save_STRUCT;
    1112             :         }
    1113      216660 :         return NDR_ERR_SUCCESS;
    1114             : }
    1115             : 
    1116           0 : static void ndr_print_flags_netr_UserSessionKey(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_UserSessionKey *r)
    1117             : {
    1118           0 :         ndr_print_netr_UserSessionKey(ndr, name, r);
    1119           0 : }
    1120             : 
    1121        3883 : _PUBLIC_ void ndr_print_netr_UserSessionKey(struct ndr_print *ndr, const char *name, const struct netr_UserSessionKey *r)
    1122             : {
    1123        3883 :         ndr_print_struct(ndr, name, "netr_UserSessionKey");
    1124        3883 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1125             :         {
    1126        3883 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1127        3883 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1128        3883 :                 ndr->depth++;
    1129        3883 :                 ndr_print_array_uint8(ndr, "key", r->key, 16);
    1130        3883 :                 ndr->depth--;
    1131        3883 :                 ndr->flags = _flags_save_STRUCT;
    1132             :         }
    1133             : }
    1134             : 
    1135      105600 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LMSessionKey(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_LMSessionKey *r)
    1136             : {
    1137             :         {
    1138      105600 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1139      105600 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1140      105600 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1141      105600 :                 if (ndr_flags & NDR_SCALARS) {
    1142      105600 :                         NDR_CHECK(ndr_push_align(ndr, 1));
    1143      105600 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->key, 8));
    1144      105600 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    1145             :                 }
    1146      105600 :                 if (ndr_flags & NDR_BUFFERS) {
    1147        4784 :                 }
    1148      105600 :                 ndr->flags = _flags_save_STRUCT;
    1149             :         }
    1150      105600 :         return NDR_ERR_SUCCESS;
    1151             : }
    1152             : 
    1153      216660 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LMSessionKey(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_LMSessionKey *r)
    1154             : {
    1155      216660 :         uint32_t size_key_0 = 0;
    1156             :         {
    1157      216660 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1158      216660 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1159      216660 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1160      216660 :                 if (ndr_flags & NDR_SCALARS) {
    1161      216660 :                         NDR_CHECK(ndr_pull_align(ndr, 1));
    1162      216660 :                         size_key_0 = 8;
    1163      216660 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->key, size_key_0));
    1164      216660 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    1165             :                 }
    1166      216660 :                 if (ndr_flags & NDR_BUFFERS) {
    1167        4166 :                 }
    1168      216660 :                 ndr->flags = _flags_save_STRUCT;
    1169             :         }
    1170      216660 :         return NDR_ERR_SUCCESS;
    1171             : }
    1172             : 
    1173           0 : static void ndr_print_flags_netr_LMSessionKey(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_LMSessionKey *r)
    1174             : {
    1175           0 :         ndr_print_netr_LMSessionKey(ndr, name, r);
    1176           0 : }
    1177             : 
    1178        3883 : _PUBLIC_ void ndr_print_netr_LMSessionKey(struct ndr_print *ndr, const char *name, const struct netr_LMSessionKey *r)
    1179             : {
    1180        3883 :         ndr_print_struct(ndr, name, "netr_LMSessionKey");
    1181        3883 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1182             :         {
    1183        3883 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1184        3883 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1185        3883 :                 ndr->depth++;
    1186        3883 :                 ndr_print_array_uint8(ndr, "key", r->key, 8);
    1187        3883 :                 ndr->depth--;
    1188        3883 :                 ndr->flags = _flags_save_STRUCT;
    1189             :         }
    1190             : }
    1191             : 
    1192      105600 : _PUBLIC_ enum ndr_err_code ndr_push_netr_UserFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
    1193             : {
    1194      105600 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    1195      100816 :         return NDR_ERR_SUCCESS;
    1196             : }
    1197             : 
    1198      216660 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
    1199             : {
    1200        4166 :         uint32_t v;
    1201      216660 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    1202      216660 :         *r = v;
    1203      216660 :         return NDR_ERR_SUCCESS;
    1204             : }
    1205             : 
    1206        3883 : _PUBLIC_ void ndr_print_netr_UserFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    1207             : {
    1208        3883 :         ndr_print_uint32(ndr, name, r);
    1209        3883 :         ndr->depth++;
    1210        3883 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_GUEST", NETLOGON_GUEST, r);
    1211        3883 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NOENCRYPTION", NETLOGON_NOENCRYPTION, r);
    1212        3883 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_CACHED_ACCOUNT", NETLOGON_CACHED_ACCOUNT, r);
    1213        3883 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_USED_LM_PASSWORD", NETLOGON_USED_LM_PASSWORD, r);
    1214        3883 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_EXTRA_SIDS", NETLOGON_EXTRA_SIDS, r);
    1215        3883 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SUBAUTH_SESSION_KEY", NETLOGON_SUBAUTH_SESSION_KEY, r);
    1216        3883 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SERVER_TRUST_ACCOUNT", NETLOGON_SERVER_TRUST_ACCOUNT, r);
    1217        3883 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NTLMV2_ENABLED", NETLOGON_NTLMV2_ENABLED, r);
    1218        3883 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_RESOURCE_GROUPS", NETLOGON_RESOURCE_GROUPS, r);
    1219        3883 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_PROFILE_PATH_RETURNED", NETLOGON_PROFILE_PATH_RETURNED, r);
    1220        3883 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_GRACE_LOGON", NETLOGON_GRACE_LOGON, r);
    1221        3883 :         ndr->depth--;
    1222        3883 : }
    1223             : 
    1224      211200 : static enum ndr_err_code ndr_push_netr_SamBaseInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_SamBaseInfo *r)
    1225             : {
    1226      211200 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1227      211200 :         if (ndr_flags & NDR_SCALARS) {
    1228      105600 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1229      105600 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->logon_time));
    1230      105600 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->logoff_time));
    1231      105600 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->kickoff_time));
    1232      105600 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
    1233      105600 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->allow_password_change));
    1234      105600 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_password_change));
    1235      105600 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
    1236      105600 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
    1237      105600 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
    1238      105600 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
    1239      105600 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
    1240      105600 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
    1241      105600 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
    1242      105600 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
    1243      105600 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    1244      105600 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
    1245      105600 :                 NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->groups));
    1246      105600 :                 NDR_CHECK(ndr_push_netr_UserFlags(ndr, NDR_SCALARS, r->user_flags));
    1247             :                 {
    1248      105600 :                         libndr_flags _flags_save_netr_UserSessionKey = ndr->flags;
    1249      105600 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
    1250      105600 :                         NDR_CHECK(ndr_push_netr_UserSessionKey(ndr, NDR_SCALARS, &r->key));
    1251      105600 :                         ndr->flags = _flags_save_netr_UserSessionKey;
    1252             :                 }
    1253      105600 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_server));
    1254      105600 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_domain));
    1255      105600 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid));
    1256             :                 {
    1257      105600 :                         libndr_flags _flags_save_netr_LMSessionKey = ndr->flags;
    1258      105600 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
    1259      105600 :                         NDR_CHECK(ndr_push_netr_LMSessionKey(ndr, NDR_SCALARS, &r->LMSessKey));
    1260      105600 :                         ndr->flags = _flags_save_netr_LMSessionKey;
    1261             :                 }
    1262      105600 :                 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
    1263      105600 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sub_auth_status));
    1264      105600 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_successful_logon));
    1265      105600 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_failed_logon));
    1266      105600 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->failed_logon_count));
    1267      105600 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
    1268      105600 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1269             :         }
    1270      211200 :         if (ndr_flags & NDR_BUFFERS) {
    1271      105600 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
    1272      105600 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
    1273      105600 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
    1274      105600 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
    1275      105600 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
    1276      105600 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
    1277      105600 :                 NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->groups));
    1278      105600 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_server));
    1279      105600 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_domain));
    1280      105600 :                 if (r->domain_sid) {
    1281      105600 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
    1282             :                 }
    1283             :         }
    1284      201632 :         return NDR_ERR_SUCCESS;
    1285             : }
    1286             : 
    1287      433320 : static enum ndr_err_code ndr_pull_netr_SamBaseInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_SamBaseInfo *r)
    1288             : {
    1289        8332 :         uint32_t _ptr_domain_sid;
    1290      433320 :         TALLOC_CTX *_mem_save_domain_sid_0 = NULL;
    1291      433320 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1292      433320 :         if (ndr_flags & NDR_SCALARS) {
    1293      216660 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1294      216660 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->logon_time));
    1295      216660 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->logoff_time));
    1296      216660 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->kickoff_time));
    1297      216660 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
    1298      216660 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->allow_password_change));
    1299      216660 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_password_change));
    1300      216660 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
    1301      216660 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
    1302      216660 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
    1303      216660 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
    1304      216660 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
    1305      216660 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
    1306      216660 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
    1307      216660 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
    1308      216660 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    1309      216660 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
    1310      216660 :                 NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->groups));
    1311      216660 :                 NDR_CHECK(ndr_pull_netr_UserFlags(ndr, NDR_SCALARS, &r->user_flags));
    1312             :                 {
    1313      216660 :                         libndr_flags _flags_save_netr_UserSessionKey = ndr->flags;
    1314      216660 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
    1315      216660 :                         NDR_CHECK(ndr_pull_netr_UserSessionKey(ndr, NDR_SCALARS, &r->key));
    1316      216660 :                         ndr->flags = _flags_save_netr_UserSessionKey;
    1317             :                 }
    1318      216660 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_server));
    1319      216660 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_domain));
    1320      216660 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_sid));
    1321      216660 :                 if (_ptr_domain_sid) {
    1322      216424 :                         NDR_PULL_ALLOC(ndr, r->domain_sid);
    1323             :                 } else {
    1324         236 :                         r->domain_sid = NULL;
    1325             :                 }
    1326             :                 {
    1327      216660 :                         libndr_flags _flags_save_netr_LMSessionKey = ndr->flags;
    1328      216660 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
    1329      216660 :                         NDR_CHECK(ndr_pull_netr_LMSessionKey(ndr, NDR_SCALARS, &r->LMSessKey));
    1330      216660 :                         ndr->flags = _flags_save_netr_LMSessionKey;
    1331             :                 }
    1332      216660 :                 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
    1333      216660 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sub_auth_status));
    1334      216660 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_successful_logon));
    1335      216660 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_failed_logon));
    1336      216660 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->failed_logon_count));
    1337      216660 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
    1338      216660 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1339             :         }
    1340      433320 :         if (ndr_flags & NDR_BUFFERS) {
    1341      216660 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
    1342      216660 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
    1343      216660 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
    1344      216660 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
    1345      216660 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
    1346      216660 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
    1347      216660 :                 NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->groups));
    1348      216660 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_server));
    1349      216660 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_domain));
    1350      216660 :                 if (r->domain_sid) {
    1351      216424 :                         _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1352      216424 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain_sid, 0);
    1353      216424 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
    1354      216424 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, 0);
    1355             :                 }
    1356             :         }
    1357      424988 :         return NDR_ERR_SUCCESS;
    1358             : }
    1359             : 
    1360        3883 : _PUBLIC_ void ndr_print_netr_SamBaseInfo(struct ndr_print *ndr, const char *name, const struct netr_SamBaseInfo *r)
    1361             : {
    1362        3883 :         ndr_print_struct(ndr, name, "netr_SamBaseInfo");
    1363        3883 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1364        3883 :         ndr->depth++;
    1365        3883 :         ndr_print_NTTIME(ndr, "logon_time", r->logon_time);
    1366        3883 :         ndr_print_NTTIME(ndr, "logoff_time", r->logoff_time);
    1367        3883 :         ndr_print_NTTIME(ndr, "kickoff_time", r->kickoff_time);
    1368        3883 :         ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
    1369        3883 :         ndr_print_NTTIME(ndr, "allow_password_change", r->allow_password_change);
    1370        3883 :         ndr_print_NTTIME(ndr, "force_password_change", r->force_password_change);
    1371        3883 :         ndr_print_lsa_String(ndr, "account_name", &r->account_name);
    1372        3883 :         ndr_print_lsa_String(ndr, "full_name", &r->full_name);
    1373        3883 :         ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
    1374        3883 :         ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
    1375        3883 :         ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
    1376        3883 :         ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
    1377        3883 :         ndr_print_uint16(ndr, "logon_count", r->logon_count);
    1378        3883 :         ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
    1379        3883 :         ndr_print_uint32(ndr, "rid", r->rid);
    1380        3883 :         ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
    1381        3883 :         ndr_print_samr_RidWithAttributeArray(ndr, "groups", &r->groups);
    1382        3883 :         ndr_print_netr_UserFlags(ndr, "user_flags", r->user_flags);
    1383             :         {
    1384        3883 :                 libndr_flags _flags_save_netr_UserSessionKey = ndr->flags;
    1385        3883 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
    1386        3883 :                 ndr_print_netr_UserSessionKey(ndr, "key", &r->key);
    1387        3883 :                 ndr->flags = _flags_save_netr_UserSessionKey;
    1388             :         }
    1389        3883 :         ndr_print_lsa_StringLarge(ndr, "logon_server", &r->logon_server);
    1390        3883 :         ndr_print_lsa_StringLarge(ndr, "logon_domain", &r->logon_domain);
    1391        3883 :         ndr_print_ptr(ndr, "domain_sid", r->domain_sid);
    1392        3883 :         ndr->depth++;
    1393        3883 :         if (r->domain_sid) {
    1394        3883 :                 ndr_print_dom_sid2(ndr, "domain_sid", r->domain_sid);
    1395             :         }
    1396        3883 :         ndr->depth--;
    1397             :         {
    1398        3883 :                 libndr_flags _flags_save_netr_LMSessionKey = ndr->flags;
    1399        3883 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
    1400        3883 :                 ndr_print_netr_LMSessionKey(ndr, "LMSessKey", &r->LMSessKey);
    1401        3883 :                 ndr->flags = _flags_save_netr_LMSessionKey;
    1402             :         }
    1403        3883 :         ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
    1404        3883 :         ndr_print_uint32(ndr, "sub_auth_status", r->sub_auth_status);
    1405        3883 :         ndr_print_NTTIME(ndr, "last_successful_logon", r->last_successful_logon);
    1406        3883 :         ndr_print_NTTIME(ndr, "last_failed_logon", r->last_failed_logon);
    1407        3883 :         ndr_print_uint32(ndr, "failed_logon_count", r->failed_logon_count);
    1408        3883 :         ndr_print_uint32(ndr, "reserved", r->reserved);
    1409        3883 :         ndr->depth--;
    1410             : }
    1411             : 
    1412        6230 : static enum ndr_err_code ndr_push_netr_SamInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_SamInfo2 *r)
    1413             : {
    1414        6230 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1415        6230 :         if (ndr_flags & NDR_SCALARS) {
    1416        6230 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1417        6230 :                 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
    1418        6230 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1419             :         }
    1420        6230 :         if (ndr_flags & NDR_BUFFERS) {
    1421        6230 :                 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
    1422             :         }
    1423        5327 :         return NDR_ERR_SUCCESS;
    1424             : }
    1425             : 
    1426        5478 : static enum ndr_err_code ndr_pull_netr_SamInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_SamInfo2 *r)
    1427             : {
    1428        5478 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1429        5478 :         if (ndr_flags & NDR_SCALARS) {
    1430        5478 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1431        5478 :                 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
    1432        5478 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1433             :         }
    1434        5478 :         if (ndr_flags & NDR_BUFFERS) {
    1435        5478 :                 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
    1436             :         }
    1437        4726 :         return NDR_ERR_SUCCESS;
    1438             : }
    1439             : 
    1440        1824 : _PUBLIC_ void ndr_print_netr_SamInfo2(struct ndr_print *ndr, const char *name, const struct netr_SamInfo2 *r)
    1441             : {
    1442        1824 :         ndr_print_struct(ndr, name, "netr_SamInfo2");
    1443        1824 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1444        1824 :         ndr->depth++;
    1445        1824 :         ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
    1446        1824 :         ndr->depth--;
    1447             : }
    1448             : 
    1449      387990 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SidAttr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_SidAttr *r)
    1450             : {
    1451      387990 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1452      387990 :         if (ndr_flags & NDR_SCALARS) {
    1453      193995 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1454      193995 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    1455      193995 :                 NDR_CHECK(ndr_push_security_GroupAttrs(ndr, NDR_SCALARS, r->attributes));
    1456      193995 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1457             :         }
    1458      387990 :         if (ndr_flags & NDR_BUFFERS) {
    1459      193995 :                 if (r->sid) {
    1460      193995 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    1461             :                 }
    1462             :         }
    1463      374046 :         return NDR_ERR_SUCCESS;
    1464             : }
    1465             : 
    1466      457414 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SidAttr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_SidAttr *r)
    1467             : {
    1468       12626 :         uint32_t _ptr_sid;
    1469      457414 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    1470      457414 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1471      457414 :         if (ndr_flags & NDR_SCALARS) {
    1472      228707 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1473      228707 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    1474      228707 :                 if (_ptr_sid) {
    1475      228707 :                         NDR_PULL_ALLOC(ndr, r->sid);
    1476             :                 } else {
    1477           0 :                         r->sid = NULL;
    1478             :                 }
    1479      228707 :                 NDR_CHECK(ndr_pull_security_GroupAttrs(ndr, NDR_SCALARS, &r->attributes));
    1480      228707 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1481             :         }
    1482      457414 :         if (ndr_flags & NDR_BUFFERS) {
    1483      228707 :                 if (r->sid) {
    1484      228707 :                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1485      228707 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    1486      228707 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    1487      228707 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    1488             :                 }
    1489             :         }
    1490      444788 :         return NDR_ERR_SUCCESS;
    1491             : }
    1492             : 
    1493           0 : static void ndr_print_flags_netr_SidAttr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_SidAttr *r)
    1494             : {
    1495           0 :         ndr_print_netr_SidAttr(ndr, name, r);
    1496           0 : }
    1497             : 
    1498        2052 : _PUBLIC_ void ndr_print_netr_SidAttr(struct ndr_print *ndr, const char *name, const struct netr_SidAttr *r)
    1499             : {
    1500        2052 :         ndr_print_struct(ndr, name, "netr_SidAttr");
    1501        2052 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1502        2052 :         ndr->depth++;
    1503        2052 :         ndr_print_ptr(ndr, "sid", r->sid);
    1504        2052 :         ndr->depth++;
    1505        2052 :         if (r->sid) {
    1506        2052 :                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    1507             :         }
    1508        2052 :         ndr->depth--;
    1509        2052 :         ndr_print_security_GroupAttrs(ndr, "attributes", r->attributes);
    1510        2052 :         ndr->depth--;
    1511             : }
    1512             : 
    1513      187138 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SamInfo3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_SamInfo3 *r)
    1514             : {
    1515        6643 :         uint32_t cntr_sids_1;
    1516      187138 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1517      187138 :         if (ndr_flags & NDR_SCALARS) {
    1518       96739 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1519       96739 :                 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
    1520       96739 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sidcount));
    1521       96739 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
    1522       96739 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1523             :         }
    1524      187138 :         if (ndr_flags & NDR_BUFFERS) {
    1525       96739 :                 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
    1526       96739 :                 if (r->sids) {
    1527       95089 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->sidcount));
    1528      286617 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
    1529      191528 :                                 NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    1530             :                         }
    1531      286617 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
    1532      191528 :                                 NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
    1533             :                         }
    1534             :                 }
    1535             :         }
    1536      180495 :         return NDR_ERR_SUCCESS;
    1537             : }
    1538             : 
    1539      411290 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamInfo3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_SamInfo3 *r)
    1540             : {
    1541        5896 :         uint32_t _ptr_sids;
    1542      411290 :         uint32_t size_sids_1 = 0;
    1543        5896 :         uint32_t cntr_sids_1;
    1544      411290 :         TALLOC_CTX *_mem_save_sids_0 = NULL;
    1545      411290 :         TALLOC_CTX *_mem_save_sids_1 = NULL;
    1546      411290 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1547      411290 :         if (ndr_flags & NDR_SCALARS) {
    1548      208731 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1549      208731 :                 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
    1550      208731 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sidcount));
    1551      208731 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
    1552      208731 :                 if (_ptr_sids) {
    1553      111593 :                         NDR_PULL_ALLOC(ndr, r->sids);
    1554             :                 } else {
    1555       97138 :                         r->sids = NULL;
    1556             :                 }
    1557      208731 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1558             :         }
    1559      411290 :         if (ndr_flags & NDR_BUFFERS) {
    1560      208731 :                 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
    1561      208731 :                 if (r->sids) {
    1562      111593 :                         _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1563      111593 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    1564      111593 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
    1565      111593 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
    1566      111593 :                         NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
    1567      111593 :                         _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
    1568      111593 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    1569      338447 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    1570      226854 :                                 NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    1571             :                         }
    1572      338447 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    1573      226854 :                                 NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
    1574             :                         }
    1575      111593 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
    1576      111593 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
    1577             :                 }
    1578      208731 :                 if (r->sids) {
    1579      111593 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->sidcount));
    1580             :                 }
    1581      435585 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    1582        6223 :                 }
    1583             :         }
    1584      405394 :         return NDR_ERR_SUCCESS;
    1585             : }
    1586             : 
    1587           0 : static void ndr_print_flags_netr_SamInfo3(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_SamInfo3 *r)
    1588             : {
    1589           0 :         ndr_print_netr_SamInfo3(ndr, name, r);
    1590           0 : }
    1591             : 
    1592        1843 : _PUBLIC_ void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, const struct netr_SamInfo3 *r)
    1593             : {
    1594         317 :         uint32_t cntr_sids_1;
    1595        1843 :         ndr_print_struct(ndr, name, "netr_SamInfo3");
    1596        1843 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1597        1843 :         ndr->depth++;
    1598        1843 :         ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
    1599        1843 :         ndr_print_uint32(ndr, "sidcount", r->sidcount);
    1600        1843 :         ndr_print_ptr(ndr, "sids", r->sids);
    1601        1843 :         ndr->depth++;
    1602        1843 :         if (r->sids) {
    1603        1834 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sids", (uint32_t)(r->sidcount));
    1604        1834 :                 ndr->depth++;
    1605        3670 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
    1606        1836 :                         ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]);
    1607             :                 }
    1608        1834 :                 ndr->depth--;
    1609             :         }
    1610        1843 :         ndr->depth--;
    1611        1843 :         ndr->depth--;
    1612             : }
    1613             : 
    1614        2631 : static enum ndr_err_code ndr_push_netr_SamInfo6(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_SamInfo6 *r)
    1615             : {
    1616         108 :         uint32_t cntr_sids_1;
    1617         108 :         uint32_t cntr_unknown4_0;
    1618        2631 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1619        2631 :         if (ndr_flags & NDR_SCALARS) {
    1620        2631 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1621        2631 :                 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
    1622        2631 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sidcount));
    1623        2631 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
    1624        2631 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dns_domainname));
    1625        2631 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
    1626       55251 :                 for (cntr_unknown4_0 = 0; cntr_unknown4_0 < (20); cntr_unknown4_0++) {
    1627       52620 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4[cntr_unknown4_0]));
    1628             :                 }
    1629        2631 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1630             :         }
    1631        2631 :         if (ndr_flags & NDR_BUFFERS) {
    1632        2631 :                 NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
    1633        2631 :                 if (r->sids) {
    1634        1769 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->sidcount));
    1635        3556 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
    1636        1787 :                                 NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    1637             :                         }
    1638        3556 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
    1639        1787 :                                 NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
    1640             :                         }
    1641             :                 }
    1642        2631 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dns_domainname));
    1643        2631 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
    1644             :         }
    1645        2523 :         return NDR_ERR_SUCCESS;
    1646             : }
    1647             : 
    1648        2451 : static enum ndr_err_code ndr_pull_netr_SamInfo6(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_SamInfo6 *r)
    1649             : {
    1650          90 :         uint32_t _ptr_sids;
    1651        2451 :         uint32_t size_sids_1 = 0;
    1652          90 :         uint32_t cntr_sids_1;
    1653        2451 :         TALLOC_CTX *_mem_save_sids_0 = NULL;
    1654        2451 :         TALLOC_CTX *_mem_save_sids_1 = NULL;
    1655        2451 :         uint32_t size_unknown4_0 = 0;
    1656          90 :         uint32_t cntr_unknown4_0;
    1657        2451 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1658        2451 :         if (ndr_flags & NDR_SCALARS) {
    1659        2451 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1660        2451 :                 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
    1661        2451 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sidcount));
    1662        2451 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
    1663        2451 :                 if (_ptr_sids) {
    1664        1589 :                         NDR_PULL_ALLOC(ndr, r->sids);
    1665             :                 } else {
    1666         862 :                         r->sids = NULL;
    1667             :                 }
    1668        2451 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dns_domainname));
    1669        2451 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
    1670        4251 :                 size_unknown4_0 = 20;
    1671       51471 :                 for (cntr_unknown4_0 = 0; cntr_unknown4_0 < (size_unknown4_0); cntr_unknown4_0++) {
    1672       49020 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4[cntr_unknown4_0]));
    1673             :                 }
    1674        2451 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1675             :         }
    1676        2451 :         if (ndr_flags & NDR_BUFFERS) {
    1677        2451 :                 NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
    1678        2451 :                 if (r->sids) {
    1679        1589 :                         _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1680        1589 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    1681        1589 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
    1682        1589 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
    1683        1589 :                         NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
    1684        1589 :                         _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
    1685        1589 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    1686        3248 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    1687        1659 :                                 NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
    1688             :                         }
    1689        3248 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    1690        1659 :                                 NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
    1691             :                         }
    1692        1589 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
    1693        1589 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
    1694             :                 }
    1695        2451 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dns_domainname));
    1696        2451 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
    1697        2451 :                 if (r->sids) {
    1698        1589 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->sidcount));
    1699             :                 }
    1700        4110 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    1701          90 :                 }
    1702             :         }
    1703        2361 :         return NDR_ERR_SUCCESS;
    1704             : }
    1705             : 
    1706         216 : _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, const struct netr_SamInfo6 *r)
    1707             : {
    1708          36 :         uint32_t cntr_sids_1;
    1709          36 :         uint32_t cntr_unknown4_0;
    1710         216 :         ndr_print_struct(ndr, name, "netr_SamInfo6");
    1711         216 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1712         216 :         ndr->depth++;
    1713         216 :         ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
    1714         216 :         ndr_print_uint32(ndr, "sidcount", r->sidcount);
    1715         216 :         ndr_print_ptr(ndr, "sids", r->sids);
    1716         216 :         ndr->depth++;
    1717         216 :         if (r->sids) {
    1718         216 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sids", (uint32_t)(r->sidcount));
    1719         216 :                 ndr->depth++;
    1720         432 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (r->sidcount); cntr_sids_1++) {
    1721         216 :                         ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]);
    1722             :                 }
    1723         216 :                 ndr->depth--;
    1724             :         }
    1725         216 :         ndr->depth--;
    1726         216 :         ndr_print_lsa_String(ndr, "dns_domainname", &r->dns_domainname);
    1727         216 :         ndr_print_lsa_String(ndr, "principal_name", &r->principal_name);
    1728         216 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "unknown4", (uint32_t)(20));
    1729         216 :         ndr->depth++;
    1730        4536 :         for (cntr_unknown4_0 = 0; cntr_unknown4_0 < (20); cntr_unknown4_0++) {
    1731        4320 :                 ndr_print_uint32(ndr, "unknown4", r->unknown4[cntr_unknown4_0]);
    1732             :         }
    1733         216 :         ndr->depth--;
    1734         216 :         ndr->depth--;
    1735             : }
    1736             : 
    1737           0 : static enum ndr_err_code ndr_push_netr_PacInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_PacInfo *r)
    1738             : {
    1739           0 :         uint32_t cntr_expansionroom_0;
    1740           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1741           0 :         if (ndr_flags & NDR_SCALARS) {
    1742           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1743           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pac_size));
    1744           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac));
    1745           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_domain));
    1746           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_server));
    1747           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
    1748           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auth_size));
    1749           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->auth));
    1750           0 :                 NDR_CHECK(ndr_push_netr_UserSessionKey(ndr, NDR_SCALARS, &r->user_session_key));
    1751           0 :                 for (cntr_expansionroom_0 = 0; cntr_expansionroom_0 < (10); cntr_expansionroom_0++) {
    1752           0 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->expansionroom[cntr_expansionroom_0]));
    1753             :                 }
    1754           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    1755           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    1756           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    1757           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    1758           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1759             :         }
    1760           0 :         if (ndr_flags & NDR_BUFFERS) {
    1761           0 :                 if (r->pac) {
    1762           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->pac_size));
    1763           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->pac, r->pac_size));
    1764             :                 }
    1765           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_domain));
    1766           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_server));
    1767           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
    1768           0 :                 if (r->auth) {
    1769           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->auth_size));
    1770           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->auth, r->auth_size));
    1771             :                 }
    1772           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    1773           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    1774           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    1775           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    1776             :         }
    1777           0 :         return NDR_ERR_SUCCESS;
    1778             : }
    1779             : 
    1780           0 : static enum ndr_err_code ndr_pull_netr_PacInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_PacInfo *r)
    1781             : {
    1782           0 :         uint32_t _ptr_pac;
    1783           0 :         uint32_t size_pac_1 = 0;
    1784           0 :         TALLOC_CTX *_mem_save_pac_0 = NULL;
    1785           0 :         uint32_t _ptr_auth;
    1786           0 :         uint32_t size_auth_1 = 0;
    1787           0 :         TALLOC_CTX *_mem_save_auth_0 = NULL;
    1788           0 :         uint32_t size_expansionroom_0 = 0;
    1789           0 :         uint32_t cntr_expansionroom_0;
    1790           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1791           0 :         if (ndr_flags & NDR_SCALARS) {
    1792           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1793           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pac_size));
    1794           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pac));
    1795           0 :                 if (_ptr_pac) {
    1796           0 :                         NDR_PULL_ALLOC(ndr, r->pac);
    1797             :                 } else {
    1798           0 :                         r->pac = NULL;
    1799             :                 }
    1800           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_domain));
    1801           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_server));
    1802           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
    1803           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auth_size));
    1804           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_auth));
    1805           0 :                 if (_ptr_auth) {
    1806           0 :                         NDR_PULL_ALLOC(ndr, r->auth);
    1807             :                 } else {
    1808           0 :                         r->auth = NULL;
    1809             :                 }
    1810           0 :                 NDR_CHECK(ndr_pull_netr_UserSessionKey(ndr, NDR_SCALARS, &r->user_session_key));
    1811           0 :                 size_expansionroom_0 = 10;
    1812           0 :                 for (cntr_expansionroom_0 = 0; cntr_expansionroom_0 < (size_expansionroom_0); cntr_expansionroom_0++) {
    1813           0 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->expansionroom[cntr_expansionroom_0]));
    1814             :                 }
    1815           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    1816           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    1817           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    1818           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    1819           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1820             :         }
    1821           0 :         if (ndr_flags & NDR_BUFFERS) {
    1822           0 :                 if (r->pac) {
    1823           0 :                         _mem_save_pac_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1824           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->pac, 0);
    1825           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->pac));
    1826           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->pac, &size_pac_1));
    1827           0 :                         NDR_PULL_ALLOC_N(ndr, r->pac, size_pac_1);
    1828           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->pac, size_pac_1));
    1829           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pac_0, 0);
    1830             :                 }
    1831           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_domain));
    1832           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_server));
    1833           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
    1834           0 :                 if (r->auth) {
    1835           0 :                         _mem_save_auth_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1836           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->auth, 0);
    1837           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->auth));
    1838           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->auth, &size_auth_1));
    1839           0 :                         NDR_PULL_ALLOC_N(ndr, r->auth, size_auth_1);
    1840           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->auth, size_auth_1));
    1841           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_0, 0);
    1842             :                 }
    1843           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    1844           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    1845           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    1846           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    1847           0 :                 if (r->pac) {
    1848           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->pac, r->pac_size));
    1849             :                 }
    1850           0 :                 if (r->auth) {
    1851           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->auth, r->auth_size));
    1852             :                 }
    1853             :         }
    1854           0 :         return NDR_ERR_SUCCESS;
    1855             : }
    1856             : 
    1857           0 : _PUBLIC_ void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, const struct netr_PacInfo *r)
    1858             : {
    1859           0 :         uint32_t cntr_expansionroom_0;
    1860           0 :         ndr_print_struct(ndr, name, "netr_PacInfo");
    1861           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1862           0 :         ndr->depth++;
    1863           0 :         ndr_print_uint32(ndr, "pac_size", r->pac_size);
    1864           0 :         ndr_print_ptr(ndr, "pac", r->pac);
    1865           0 :         ndr->depth++;
    1866           0 :         if (r->pac) {
    1867           0 :                 ndr_print_array_uint8(ndr, "pac", r->pac, r->pac_size);
    1868             :         }
    1869           0 :         ndr->depth--;
    1870           0 :         ndr_print_lsa_String(ndr, "logon_domain", &r->logon_domain);
    1871           0 :         ndr_print_lsa_String(ndr, "logon_server", &r->logon_server);
    1872           0 :         ndr_print_lsa_String(ndr, "principal_name", &r->principal_name);
    1873           0 :         ndr_print_uint32(ndr, "auth_size", r->auth_size);
    1874           0 :         ndr_print_ptr(ndr, "auth", r->auth);
    1875           0 :         ndr->depth++;
    1876           0 :         if (r->auth) {
    1877           0 :                 ndr_print_array_uint8(ndr, "auth", r->auth, r->auth_size);
    1878             :         }
    1879           0 :         ndr->depth--;
    1880           0 :         ndr_print_netr_UserSessionKey(ndr, "user_session_key", &r->user_session_key);
    1881           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "expansionroom", (uint32_t)(10));
    1882           0 :         ndr->depth++;
    1883           0 :         for (cntr_expansionroom_0 = 0; cntr_expansionroom_0 < (10); cntr_expansionroom_0++) {
    1884           0 :                 ndr_print_uint32(ndr, "expansionroom", r->expansionroom[cntr_expansionroom_0]);
    1885             :         }
    1886           0 :         ndr->depth--;
    1887           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    1888           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    1889           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    1890           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    1891           0 :         ndr->depth--;
    1892             : }
    1893             : 
    1894         250 : static enum ndr_err_code ndr_push_netr_GenericInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_GenericInfo2 *r)
    1895             : {
    1896             :         {
    1897         250 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1898         250 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1899         250 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1900         250 :                 if (ndr_flags & NDR_SCALARS) {
    1901         250 :                         NDR_CHECK(ndr_push_align(ndr, 5));
    1902         250 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
    1903         250 :                         NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
    1904         250 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1905             :                 }
    1906         250 :                 if (ndr_flags & NDR_BUFFERS) {
    1907         250 :                         if (r->data) {
    1908           0 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
    1909           0 :                                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
    1910             :                         }
    1911             :                 }
    1912         250 :                 ndr->flags = _flags_save_STRUCT;
    1913             :         }
    1914         250 :         return NDR_ERR_SUCCESS;
    1915             : }
    1916             : 
    1917         250 : static enum ndr_err_code ndr_pull_netr_GenericInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_GenericInfo2 *r)
    1918             : {
    1919           0 :         uint32_t _ptr_data;
    1920         250 :         uint32_t size_data_1 = 0;
    1921         250 :         TALLOC_CTX *_mem_save_data_0 = NULL;
    1922             :         {
    1923         250 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1924         250 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1925         250 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1926         250 :                 if (ndr_flags & NDR_SCALARS) {
    1927         250 :                         NDR_CHECK(ndr_pull_align(ndr, 5));
    1928         250 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
    1929         250 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
    1930         250 :                         if (_ptr_data) {
    1931           0 :                                 NDR_PULL_ALLOC(ndr, r->data);
    1932             :                         } else {
    1933         250 :                                 r->data = NULL;
    1934             :                         }
    1935         250 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1936             :                 }
    1937         250 :                 if (ndr_flags & NDR_BUFFERS) {
    1938         250 :                         if (r->data) {
    1939           0 :                                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1940           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
    1941           0 :                                 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
    1942           0 :                                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
    1943           0 :                                 NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
    1944           0 :                                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
    1945           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
    1946             :                         }
    1947         250 :                         if (r->data) {
    1948           0 :                                 NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
    1949             :                         }
    1950             :                 }
    1951         250 :                 ndr->flags = _flags_save_STRUCT;
    1952             :         }
    1953         250 :         return NDR_ERR_SUCCESS;
    1954             : }
    1955             : 
    1956           0 : _PUBLIC_ void ndr_print_netr_GenericInfo2(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo2 *r)
    1957             : {
    1958           0 :         ndr_print_struct(ndr, name, "netr_GenericInfo2");
    1959           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1960             :         {
    1961           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1962           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1963           0 :                 ndr->depth++;
    1964           0 :                 ndr_print_uint32(ndr, "length", r->length);
    1965           0 :                 ndr_print_ptr(ndr, "data", r->data);
    1966           0 :                 ndr->depth++;
    1967           0 :                 if (r->data) {
    1968           0 :                         ndr_print_array_uint8(ndr, "data", r->data, r->length);
    1969             :                 }
    1970           0 :                 ndr->depth--;
    1971           0 :                 ndr->depth--;
    1972           0 :                 ndr->flags = _flags_save_STRUCT;
    1973             :         }
    1974             : }
    1975             : 
    1976       25943 : _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_Validation *r)
    1977             : {
    1978        3091 :         uint32_t level;
    1979       25943 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1980       25943 :         if (ndr_flags & NDR_SCALARS) {
    1981             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1982       25943 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1983       25943 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    1984       25943 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
    1985             :                 /* ms_union is always aligned to the largest union arm*/
    1986       25943 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1987       25943 :                 switch (level) {
    1988       10146 :                         case NetlogonValidationSamInfo: {
    1989       10146 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam2));
    1990        8729 :                         break; }
    1991             : 
    1992        9956 :                         case NetlogonValidationSamInfo2: {
    1993        9956 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam3));
    1994        8611 :                         break; }
    1995             : 
    1996           0 :                         case 4: {
    1997           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac));
    1998           0 :                         break; }
    1999             : 
    2000         250 :                         case NetlogonValidationGenericInfo2: {
    2001         250 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->generic));
    2002         250 :                         break; }
    2003             : 
    2004        4329 :                         case NetlogonValidationSamInfo4: {
    2005        4329 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam6));
    2006        4221 :                         break; }
    2007             : 
    2008        1041 :                         default: {
    2009        1041 :                         break; }
    2010             : 
    2011             :                 }
    2012             :         }
    2013       25943 :         if (ndr_flags & NDR_BUFFERS) {
    2014       25943 :                 if (!(ndr_flags & NDR_SCALARS)) {
    2015             :                         /* We didn't get it above, and the token is not needed after this. */
    2016           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    2017             :                 }
    2018       25943 :                 switch (level) {
    2019       10146 :                         case NetlogonValidationSamInfo:
    2020       10146 :                                 if (r->sam2) {
    2021        6230 :                                         NDR_CHECK(ndr_push_netr_SamInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam2));
    2022             :                                 }
    2023        8729 :                         break;
    2024             : 
    2025        9956 :                         case NetlogonValidationSamInfo2:
    2026        9956 :                                 if (r->sam3) {
    2027        6340 :                                         NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam3));
    2028             :                                 }
    2029        8611 :                         break;
    2030             : 
    2031           0 :                         case 4:
    2032           0 :                                 if (r->pac) {
    2033           0 :                                         NDR_CHECK(ndr_push_netr_PacInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pac));
    2034             :                                 }
    2035           0 :                         break;
    2036             : 
    2037         250 :                         case NetlogonValidationGenericInfo2:
    2038         250 :                                 if (r->generic) {
    2039         250 :                                         NDR_CHECK(ndr_push_netr_GenericInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
    2040             :                                 }
    2041         250 :                         break;
    2042             : 
    2043        4329 :                         case NetlogonValidationSamInfo4:
    2044        4329 :                                 if (r->sam6) {
    2045        2631 :                                         NDR_CHECK(ndr_push_netr_SamInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam6));
    2046             :                                 }
    2047        4221 :                         break;
    2048             : 
    2049        1041 :                         default:
    2050        1041 :                         break;
    2051             : 
    2052             :                 }
    2053             :         }
    2054       22852 :         return NDR_ERR_SUCCESS;
    2055             : }
    2056             : 
    2057       25215 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_Validation *r)
    2058             : {
    2059        2580 :         uint32_t level;
    2060        2580 :         uint16_t _level;
    2061       25215 :         TALLOC_CTX *_mem_save_sam2_0 = NULL;
    2062        2580 :         uint32_t _ptr_sam2;
    2063       25215 :         TALLOC_CTX *_mem_save_sam3_0 = NULL;
    2064        2580 :         uint32_t _ptr_sam3;
    2065       25215 :         TALLOC_CTX *_mem_save_pac_0 = NULL;
    2066        2580 :         uint32_t _ptr_pac;
    2067       25215 :         TALLOC_CTX *_mem_save_generic_0 = NULL;
    2068        2580 :         uint32_t _ptr_generic;
    2069       25215 :         TALLOC_CTX *_mem_save_sam6_0 = NULL;
    2070        2580 :         uint32_t _ptr_sam6;
    2071       25215 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2072       25215 :         if (ndr_flags & NDR_SCALARS) {
    2073             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    2074       25215 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    2075       25215 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    2076       25215 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
    2077       25215 :                 if (_level != level) {
    2078           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
    2079             :                 }
    2080             :                 /* ms_union is always aligned to the largest union arm*/
    2081       25215 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2082       25215 :                 switch (level) {
    2083        8962 :                         case NetlogonValidationSamInfo: {
    2084        8962 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam2));
    2085        8962 :                                 if (_ptr_sam2) {
    2086        5478 :                                         NDR_PULL_ALLOC(ndr, r->sam2);
    2087             :                                 } else {
    2088        3484 :                                         r->sam2 = NULL;
    2089             :                                 }
    2090        7782 :                         break; }
    2091             : 
    2092        9416 :                         case NetlogonValidationSamInfo2: {
    2093        9416 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam3));
    2094        9416 :                                 if (_ptr_sam3) {
    2095        6172 :                                         NDR_PULL_ALLOC(ndr, r->sam3);
    2096             :                                 } else {
    2097        3244 :                                         r->sam3 = NULL;
    2098             :                                 }
    2099        8296 :                         break; }
    2100             : 
    2101           0 :                         case 4: {
    2102           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pac));
    2103           0 :                                 if (_ptr_pac) {
    2104           0 :                                         NDR_PULL_ALLOC(ndr, r->pac);
    2105             :                                 } else {
    2106           0 :                                         r->pac = NULL;
    2107             :                                 }
    2108           0 :                         break; }
    2109             : 
    2110         250 :                         case NetlogonValidationGenericInfo2: {
    2111         250 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_generic));
    2112         250 :                                 if (_ptr_generic) {
    2113         250 :                                         NDR_PULL_ALLOC(ndr, r->generic);
    2114             :                                 } else {
    2115           0 :                                         r->generic = NULL;
    2116             :                                 }
    2117         250 :                         break; }
    2118             : 
    2119        5511 :                         case NetlogonValidationSamInfo4: {
    2120        5511 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam6));
    2121        5511 :                                 if (_ptr_sam6) {
    2122        2451 :                                         NDR_PULL_ALLOC(ndr, r->sam6);
    2123             :                                 } else {
    2124        3060 :                                         r->sam6 = NULL;
    2125             :                                 }
    2126        5415 :                         break; }
    2127             : 
    2128         892 :                         default: {
    2129         892 :                         break; }
    2130             : 
    2131             :                 }
    2132             :         }
    2133       25215 :         if (ndr_flags & NDR_BUFFERS) {
    2134       25215 :                 if (!(ndr_flags & NDR_SCALARS)) {
    2135             :                         /* We didn't get it above, and the token is not needed after this. */
    2136           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    2137             :                 }
    2138       25215 :                 switch (level) {
    2139        8962 :                         case NetlogonValidationSamInfo:
    2140        8962 :                                 if (r->sam2) {
    2141        5478 :                                         _mem_save_sam2_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2142        5478 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sam2, 0);
    2143        5478 :                                         NDR_CHECK(ndr_pull_netr_SamInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam2));
    2144        5478 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam2_0, 0);
    2145             :                                 }
    2146        7782 :                         break;
    2147             : 
    2148        9416 :                         case NetlogonValidationSamInfo2:
    2149        9416 :                                 if (r->sam3) {
    2150        6172 :                                         _mem_save_sam3_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2151        6172 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sam3, 0);
    2152        6172 :                                         NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam3));
    2153        6172 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam3_0, 0);
    2154             :                                 }
    2155        8296 :                         break;
    2156             : 
    2157           0 :                         case 4:
    2158           0 :                                 if (r->pac) {
    2159           0 :                                         _mem_save_pac_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2160           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->pac, 0);
    2161           0 :                                         NDR_CHECK(ndr_pull_netr_PacInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pac));
    2162           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pac_0, 0);
    2163             :                                 }
    2164           0 :                         break;
    2165             : 
    2166         250 :                         case NetlogonValidationGenericInfo2:
    2167         250 :                                 if (r->generic) {
    2168         250 :                                         _mem_save_generic_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2169         250 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->generic, 0);
    2170         250 :                                         NDR_CHECK(ndr_pull_netr_GenericInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
    2171         250 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_generic_0, 0);
    2172             :                                 }
    2173         250 :                         break;
    2174             : 
    2175        5511 :                         case NetlogonValidationSamInfo4:
    2176        5511 :                                 if (r->sam6) {
    2177        2451 :                                         _mem_save_sam6_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2178        2451 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sam6, 0);
    2179        2451 :                                         NDR_CHECK(ndr_pull_netr_SamInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam6));
    2180        2451 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam6_0, 0);
    2181             :                                 }
    2182        5415 :                         break;
    2183             : 
    2184         892 :                         default:
    2185         892 :                         break;
    2186             : 
    2187             :                 }
    2188             :         }
    2189       22635 :         return NDR_ERR_SUCCESS;
    2190             : }
    2191             : 
    2192        6248 : _PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name, const union netr_Validation *r)
    2193             : {
    2194        1034 :         uint32_t level;
    2195        6248 :         level = ndr_print_steal_switch_value(ndr, r);
    2196        6248 :         ndr_print_union(ndr, name, level, "netr_Validation");
    2197        6248 :         switch (level) {
    2198        2864 :                 case NetlogonValidationSamInfo:
    2199        2864 :                         ndr_print_ptr(ndr, "sam2", r->sam2);
    2200        2864 :                         ndr->depth++;
    2201        2864 :                         if (r->sam2) {
    2202        1824 :                                 ndr_print_netr_SamInfo2(ndr, "sam2", r->sam2);
    2203             :                         }
    2204        2864 :                         ndr->depth--;
    2205        2864 :                 break;
    2206             : 
    2207        2720 :                 case NetlogonValidationSamInfo2:
    2208        2720 :                         ndr_print_ptr(ndr, "sam3", r->sam3);
    2209        2720 :                         ndr->depth++;
    2210        2720 :                         if (r->sam3) {
    2211        1824 :                                 ndr_print_netr_SamInfo3(ndr, "sam3", r->sam3);
    2212             :                         }
    2213        2720 :                         ndr->depth--;
    2214        2720 :                 break;
    2215             : 
    2216           0 :                 case 4:
    2217           0 :                         ndr_print_ptr(ndr, "pac", r->pac);
    2218           0 :                         ndr->depth++;
    2219           0 :                         if (r->pac) {
    2220           0 :                                 ndr_print_netr_PacInfo(ndr, "pac", r->pac);
    2221             :                         }
    2222           0 :                         ndr->depth--;
    2223           0 :                 break;
    2224             : 
    2225           0 :                 case NetlogonValidationGenericInfo2:
    2226           0 :                         ndr_print_ptr(ndr, "generic", r->generic);
    2227           0 :                         ndr->depth++;
    2228           0 :                         if (r->generic) {
    2229           0 :                                 ndr_print_netr_GenericInfo2(ndr, "generic", r->generic);
    2230             :                         }
    2231           0 :                         ndr->depth--;
    2232           0 :                 break;
    2233             : 
    2234         216 :                 case NetlogonValidationSamInfo4:
    2235         216 :                         ndr_print_ptr(ndr, "sam6", r->sam6);
    2236         216 :                         ndr->depth++;
    2237         216 :                         if (r->sam6) {
    2238         216 :                                 ndr_print_netr_SamInfo6(ndr, "sam6", r->sam6);
    2239             :                         }
    2240         216 :                         ndr->depth--;
    2241         216 :                 break;
    2242             : 
    2243         374 :                 default:
    2244         374 :                 break;
    2245             : 
    2246             :         }
    2247        6248 : }
    2248             : 
    2249      151896 : _PUBLIC_ enum ndr_err_code ndr_push_netr_Credential(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_Credential *r)
    2250             : {
    2251             :         {
    2252      151896 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    2253      151896 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2254      151896 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2255      151896 :                 if (ndr_flags & NDR_SCALARS) {
    2256      151896 :                         NDR_CHECK(ndr_push_align(ndr, 1));
    2257      151896 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 8));
    2258      151896 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    2259             :                 }
    2260      151896 :                 if (ndr_flags & NDR_BUFFERS) {
    2261       13917 :                 }
    2262      151896 :                 ndr->flags = _flags_save_STRUCT;
    2263             :         }
    2264      151896 :         return NDR_ERR_SUCCESS;
    2265             : }
    2266             : 
    2267      147841 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_Credential(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_Credential *r)
    2268             : {
    2269      147841 :         uint32_t size_data_0 = 0;
    2270             :         {
    2271      147841 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    2272      147841 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2273      147841 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2274      147841 :                 if (ndr_flags & NDR_SCALARS) {
    2275      147841 :                         NDR_CHECK(ndr_pull_align(ndr, 1));
    2276      147841 :                         size_data_0 = 8;
    2277      147841 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
    2278      147841 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    2279             :                 }
    2280      147841 :                 if (ndr_flags & NDR_BUFFERS) {
    2281       13895 :                 }
    2282      147841 :                 ndr->flags = _flags_save_STRUCT;
    2283             :         }
    2284      147841 :         return NDR_ERR_SUCCESS;
    2285             : }
    2286             : 
    2287           0 : static void ndr_print_flags_netr_Credential(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_Credential *r)
    2288             : {
    2289           0 :         ndr_print_netr_Credential(ndr, name, r);
    2290           0 : }
    2291             : 
    2292       12598 : _PUBLIC_ void ndr_print_netr_Credential(struct ndr_print *ndr, const char *name, const struct netr_Credential *r)
    2293             : {
    2294       12598 :         ndr_print_struct(ndr, name, "netr_Credential");
    2295       12598 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2296             :         {
    2297       12598 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    2298       12598 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2299       12598 :                 ndr->depth++;
    2300       12598 :                 ndr_print_array_uint8(ndr, "data", r->data, 8);
    2301       12598 :                 ndr->depth--;
    2302       12598 :                 ndr->flags = _flags_save_STRUCT;
    2303             :         }
    2304             : }
    2305             : 
    2306           0 : _PUBLIC_ enum ndr_err_code ndr_push_netlogon_server_pipe_state(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netlogon_server_pipe_state *r)
    2307             : {
    2308           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2309           0 :         if (ndr_flags & NDR_SCALARS) {
    2310           0 :                 NDR_CHECK(ndr_push_align(ndr, 1));
    2311           0 :                 NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->client_challenge));
    2312           0 :                 NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->server_challenge));
    2313           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    2314             :         }
    2315           0 :         if (ndr_flags & NDR_BUFFERS) {
    2316           0 :         }
    2317           0 :         return NDR_ERR_SUCCESS;
    2318             : }
    2319             : 
    2320           0 : _PUBLIC_ enum ndr_err_code ndr_pull_netlogon_server_pipe_state(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netlogon_server_pipe_state *r)
    2321             : {
    2322           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2323           0 :         if (ndr_flags & NDR_SCALARS) {
    2324           0 :                 NDR_CHECK(ndr_pull_align(ndr, 1));
    2325           0 :                 NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->client_challenge));
    2326           0 :                 NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->server_challenge));
    2327           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    2328             :         }
    2329           0 :         if (ndr_flags & NDR_BUFFERS) {
    2330           0 :         }
    2331           0 :         return NDR_ERR_SUCCESS;
    2332             : }
    2333             : 
    2334           0 : static void ndr_print_flags_netlogon_server_pipe_state(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netlogon_server_pipe_state *r)
    2335             : {
    2336           0 :         ndr_print_netlogon_server_pipe_state(ndr, name, r);
    2337           0 : }
    2338             : 
    2339           0 : _PUBLIC_ void ndr_print_netlogon_server_pipe_state(struct ndr_print *ndr, const char *name, const struct netlogon_server_pipe_state *r)
    2340             : {
    2341           0 :         ndr_print_struct(ndr, name, "netlogon_server_pipe_state");
    2342           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2343           0 :         ndr->depth++;
    2344           0 :         ndr_print_netr_Credential(ndr, "client_challenge", &r->client_challenge);
    2345           0 :         ndr_print_netr_Credential(ndr, "server_challenge", &r->server_challenge);
    2346           0 :         ndr->depth--;
    2347             : }
    2348             : 
    2349       52657 : _PUBLIC_ enum ndr_err_code ndr_push_netr_Authenticator(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_Authenticator *r)
    2350             : {
    2351       52657 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2352       52657 :         if (ndr_flags & NDR_SCALARS) {
    2353       52657 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2354       52657 :                 NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->cred));
    2355       52657 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->timestamp));
    2356       52657 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2357             :         }
    2358       52657 :         if (ndr_flags & NDR_BUFFERS) {
    2359        6444 :         }
    2360       52657 :         return NDR_ERR_SUCCESS;
    2361             : }
    2362             : 
    2363       50505 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_Authenticator(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_Authenticator *r)
    2364             : {
    2365       50505 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2366       50505 :         if (ndr_flags & NDR_SCALARS) {
    2367       50505 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2368       50505 :                 NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->cred));
    2369       50505 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->timestamp));
    2370       50505 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2371             :         }
    2372       50505 :         if (ndr_flags & NDR_BUFFERS) {
    2373        6198 :         }
    2374       50505 :         return NDR_ERR_SUCCESS;
    2375             : }
    2376             : 
    2377           0 : static void ndr_print_flags_netr_Authenticator(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_Authenticator *r)
    2378             : {
    2379           0 :         ndr_print_netr_Authenticator(ndr, name, r);
    2380           0 : }
    2381             : 
    2382        3474 : _PUBLIC_ void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *name, const struct netr_Authenticator *r)
    2383             : {
    2384        3474 :         ndr_print_struct(ndr, name, "netr_Authenticator");
    2385        3474 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2386        3474 :         ndr->depth++;
    2387        3474 :         ndr_print_netr_Credential(ndr, "cred", &r->cred);
    2388        3474 :         ndr_print_time_t(ndr, "timestamp", r->timestamp);
    2389        3474 :         ndr->depth--;
    2390             : }
    2391             : 
    2392           0 : static enum ndr_err_code ndr_push_netr_DELTA_DELETE_USER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_DELETE_USER *r)
    2393             : {
    2394           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2395           0 :         if (ndr_flags & NDR_SCALARS) {
    2396           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2397           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->account_name));
    2398           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    2399           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    2400           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    2401           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    2402           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    2403           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    2404           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    2405           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    2406           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2407             :         }
    2408           0 :         if (ndr_flags & NDR_BUFFERS) {
    2409           0 :                 if (r->account_name) {
    2410           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
    2411           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    2412           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
    2413           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));
    2414             :                 }
    2415           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    2416           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    2417           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    2418           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    2419             :         }
    2420           0 :         return NDR_ERR_SUCCESS;
    2421             : }
    2422             : 
    2423           0 : static enum ndr_err_code ndr_pull_netr_DELTA_DELETE_USER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_DELETE_USER *r)
    2424             : {
    2425           0 :         uint32_t _ptr_account_name;
    2426           0 :         uint32_t size_account_name_1 = 0;
    2427           0 :         uint32_t length_account_name_1 = 0;
    2428           0 :         TALLOC_CTX *_mem_save_account_name_0 = NULL;
    2429           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2430           0 :         if (ndr_flags & NDR_SCALARS) {
    2431           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2432           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
    2433           0 :                 if (_ptr_account_name) {
    2434           0 :                         NDR_PULL_ALLOC(ndr, r->account_name);
    2435             :                 } else {
    2436           0 :                         r->account_name = NULL;
    2437             :                 }
    2438           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    2439           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    2440           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    2441           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    2442           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    2443           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    2444           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    2445           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    2446           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2447             :         }
    2448           0 :         if (ndr_flags & NDR_BUFFERS) {
    2449           0 :                 if (r->account_name) {
    2450           0 :                         _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2451           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->account_name, 0);
    2452           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
    2453           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
    2454           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->account_name, &size_account_name_1));
    2455           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->account_name, &length_account_name_1));
    2456           0 :                         if (length_account_name_1 > size_account_name_1) {
    2457           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
    2458             :                         }
    2459           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
    2460           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
    2461           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0);
    2462             :                 }
    2463           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    2464           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    2465           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    2466           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    2467             :         }
    2468           0 :         return NDR_ERR_SUCCESS;
    2469             : }
    2470             : 
    2471           0 : _PUBLIC_ void ndr_print_netr_DELTA_DELETE_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_USER *r)
    2472             : {
    2473           0 :         ndr_print_struct(ndr, name, "netr_DELTA_DELETE_USER");
    2474           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2475           0 :         ndr->depth++;
    2476           0 :         ndr_print_ptr(ndr, "account_name", r->account_name);
    2477           0 :         ndr->depth++;
    2478           0 :         if (r->account_name) {
    2479           0 :                 ndr_print_string(ndr, "account_name", r->account_name);
    2480             :         }
    2481           0 :         ndr->depth--;
    2482           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    2483           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    2484           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    2485           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    2486           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    2487           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    2488           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    2489           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    2490           0 :         ndr->depth--;
    2491             : }
    2492             : 
    2493           0 : static enum ndr_err_code ndr_push_netr_USER_KEY16(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_USER_KEY16 *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->length));
    2499           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
    2500           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
    2501           0 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->pwd));
    2502           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2503             :         }
    2504           0 :         if (ndr_flags & NDR_BUFFERS) {
    2505           0 :         }
    2506           0 :         return NDR_ERR_SUCCESS;
    2507             : }
    2508             : 
    2509           0 : static enum ndr_err_code ndr_pull_netr_USER_KEY16(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_USER_KEY16 *r)
    2510             : {
    2511           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2512           0 :         if (ndr_flags & NDR_SCALARS) {
    2513           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2514           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
    2515           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
    2516           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
    2517           0 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->pwd));
    2518           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2519             :         }
    2520           0 :         if (ndr_flags & NDR_BUFFERS) {
    2521           0 :         }
    2522           0 :         return NDR_ERR_SUCCESS;
    2523             : }
    2524             : 
    2525           0 : _PUBLIC_ void ndr_print_netr_USER_KEY16(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY16 *r)
    2526             : {
    2527           0 :         ndr_print_struct(ndr, name, "netr_USER_KEY16");
    2528           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2529           0 :         ndr->depth++;
    2530           0 :         ndr_print_uint16(ndr, "length", r->length);
    2531           0 :         ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->length:r->size);
    2532           0 :         ndr_print_uint32(ndr, "flags", r->flags);
    2533           0 :         ndr_print_samr_Password(ndr, "pwd", &r->pwd);
    2534           0 :         ndr->depth--;
    2535             : }
    2536             : 
    2537           0 : static enum ndr_err_code ndr_push_netr_PasswordHistory(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_PasswordHistory *r)
    2538             : {
    2539           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2540           0 :         if (ndr_flags & NDR_SCALARS) {
    2541           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2542           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nt_length));
    2543           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nt_length));
    2544           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nt_flags));
    2545           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm_length));
    2546           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm_length));
    2547           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lm_flags));
    2548           0 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->nt_history, r->nt_length));
    2549           0 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->lm_history, r->lm_length));
    2550           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2551             :         }
    2552           0 :         if (ndr_flags & NDR_BUFFERS) {
    2553           0 :         }
    2554           0 :         return NDR_ERR_SUCCESS;
    2555             : }
    2556             : 
    2557           0 : static enum ndr_err_code ndr_pull_netr_PasswordHistory(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_PasswordHistory *r)
    2558             : {
    2559           0 :         uint32_t size_nt_history_0 = 0;
    2560           0 :         uint32_t size_lm_history_0 = 0;
    2561           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2562           0 :         if (ndr_flags & NDR_SCALARS) {
    2563           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2564           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nt_length));
    2565           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nt_size));
    2566           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nt_flags));
    2567           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm_length));
    2568           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm_size));
    2569           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lm_flags));
    2570           0 :                 size_nt_history_0 = r->nt_length;
    2571           0 :                 NDR_PULL_ALLOC_N(ndr, r->nt_history, size_nt_history_0);
    2572           0 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->nt_history, size_nt_history_0));
    2573           0 :                 size_lm_history_0 = r->lm_length;
    2574           0 :                 NDR_PULL_ALLOC_N(ndr, r->lm_history, size_lm_history_0);
    2575           0 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->lm_history, size_lm_history_0));
    2576           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2577             :         }
    2578           0 :         if (ndr_flags & NDR_BUFFERS) {
    2579           0 :         }
    2580           0 :         return NDR_ERR_SUCCESS;
    2581             : }
    2582             : 
    2583           0 : _PUBLIC_ void ndr_print_netr_PasswordHistory(struct ndr_print *ndr, const char *name, const struct netr_PasswordHistory *r)
    2584             : {
    2585           0 :         ndr_print_struct(ndr, name, "netr_PasswordHistory");
    2586           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2587           0 :         ndr->depth++;
    2588           0 :         ndr_print_uint16(ndr, "nt_length", r->nt_length);
    2589           0 :         ndr_print_uint16(ndr, "nt_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->nt_length:r->nt_size);
    2590           0 :         ndr_print_uint32(ndr, "nt_flags", r->nt_flags);
    2591           0 :         ndr_print_uint16(ndr, "lm_length", r->lm_length);
    2592           0 :         ndr_print_uint16(ndr, "lm_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->lm_length:r->lm_size);
    2593           0 :         ndr_print_uint32(ndr, "lm_flags", r->lm_flags);
    2594           0 :         ndr_print_array_uint8(ndr, "nt_history", r->nt_history, r->nt_length);
    2595           0 :         ndr_print_array_uint8(ndr, "lm_history", r->lm_history, r->lm_length);
    2596           0 :         ndr->depth--;
    2597             : }
    2598             : 
    2599           0 : static enum ndr_err_code ndr_push_netr_USER_KEYS2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_USER_KEYS2 *r)
    2600             : {
    2601           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2602           0 :         if (ndr_flags & NDR_SCALARS) {
    2603           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2604           0 :                 NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_SCALARS, &r->lmpassword));
    2605           0 :                 NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_SCALARS, &r->ntpassword));
    2606           0 :                 NDR_CHECK(ndr_push_netr_PasswordHistory(ndr, NDR_SCALARS, &r->history));
    2607           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2608             :         }
    2609           0 :         if (ndr_flags & NDR_BUFFERS) {
    2610           0 :         }
    2611           0 :         return NDR_ERR_SUCCESS;
    2612             : }
    2613             : 
    2614           0 : static enum ndr_err_code ndr_pull_netr_USER_KEYS2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_USER_KEYS2 *r)
    2615             : {
    2616           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2617           0 :         if (ndr_flags & NDR_SCALARS) {
    2618           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2619           0 :                 NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_SCALARS, &r->lmpassword));
    2620           0 :                 NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_SCALARS, &r->ntpassword));
    2621           0 :                 NDR_CHECK(ndr_pull_netr_PasswordHistory(ndr, NDR_SCALARS, &r->history));
    2622           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2623             :         }
    2624           0 :         if (ndr_flags & NDR_BUFFERS) {
    2625           0 :         }
    2626           0 :         return NDR_ERR_SUCCESS;
    2627             : }
    2628             : 
    2629           0 : _PUBLIC_ void ndr_print_netr_USER_KEYS2(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS2 *r)
    2630             : {
    2631           0 :         ndr_print_struct(ndr, name, "netr_USER_KEYS2");
    2632           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2633           0 :         ndr->depth++;
    2634           0 :         ndr_print_netr_USER_KEY16(ndr, "lmpassword", &r->lmpassword);
    2635           0 :         ndr_print_netr_USER_KEY16(ndr, "ntpassword", &r->ntpassword);
    2636           0 :         ndr_print_netr_PasswordHistory(ndr, "history", &r->history);
    2637           0 :         ndr->depth--;
    2638             : }
    2639             : 
    2640           0 : static enum ndr_err_code ndr_push_netr_USER_KEY_UNION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_USER_KEY_UNION *r)
    2641             : {
    2642           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2643           0 :         if (ndr_flags & NDR_SCALARS) {
    2644           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2645           0 :                 NDR_CHECK(ndr_push_netr_USER_KEYS2(ndr, NDR_SCALARS, &r->keys2));
    2646           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2647             :         }
    2648           0 :         if (ndr_flags & NDR_BUFFERS) {
    2649           0 :         }
    2650           0 :         return NDR_ERR_SUCCESS;
    2651             : }
    2652             : 
    2653           0 : static enum ndr_err_code ndr_pull_netr_USER_KEY_UNION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_USER_KEY_UNION *r)
    2654             : {
    2655           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2656           0 :         if (ndr_flags & NDR_SCALARS) {
    2657           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2658           0 :                 NDR_CHECK(ndr_pull_netr_USER_KEYS2(ndr, NDR_SCALARS, &r->keys2));
    2659           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2660             :         }
    2661           0 :         if (ndr_flags & NDR_BUFFERS) {
    2662           0 :         }
    2663           0 :         return NDR_ERR_SUCCESS;
    2664             : }
    2665             : 
    2666           0 : _PUBLIC_ void ndr_print_netr_USER_KEY_UNION(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY_UNION *r)
    2667             : {
    2668           0 :         ndr_print_struct(ndr, name, "netr_USER_KEY_UNION");
    2669           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2670           0 :         ndr->depth++;
    2671           0 :         ndr_print_netr_USER_KEYS2(ndr, "keys2", &r->keys2);
    2672           0 :         ndr->depth--;
    2673             : }
    2674             : 
    2675           0 : _PUBLIC_ enum ndr_err_code ndr_push_netr_USER_KEYS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_USER_KEYS *r)
    2676             : {
    2677           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2678           0 :         if (ndr_flags & NDR_SCALARS) {
    2679           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2680           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
    2681           0 :                 NDR_CHECK(ndr_push_netr_USER_KEY_UNION(ndr, NDR_SCALARS, &r->keys));
    2682           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2683             :         }
    2684           0 :         if (ndr_flags & NDR_BUFFERS) {
    2685           0 :         }
    2686           0 :         return NDR_ERR_SUCCESS;
    2687             : }
    2688             : 
    2689           0 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_USER_KEYS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_USER_KEYS *r)
    2690             : {
    2691           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2692           0 :         if (ndr_flags & NDR_SCALARS) {
    2693           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2694           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
    2695           0 :                 NDR_CHECK(ndr_pull_netr_USER_KEY_UNION(ndr, NDR_SCALARS, &r->keys));
    2696           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2697             :         }
    2698           0 :         if (ndr_flags & NDR_BUFFERS) {
    2699           0 :         }
    2700           0 :         return NDR_ERR_SUCCESS;
    2701             : }
    2702             : 
    2703           0 : static void ndr_print_flags_netr_USER_KEYS(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_USER_KEYS *r)
    2704             : {
    2705           0 :         ndr_print_netr_USER_KEYS(ndr, name, r);
    2706           0 : }
    2707             : 
    2708           0 : _PUBLIC_ void ndr_print_netr_USER_KEYS(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS *r)
    2709             : {
    2710           0 :         ndr_print_struct(ndr, name, "netr_USER_KEYS");
    2711           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2712           0 :         ndr->depth++;
    2713           0 :         ndr_print_uint32(ndr, "version", r->version);
    2714           0 :         ndr_print_netr_USER_KEY_UNION(ndr, "keys", &r->keys);
    2715           0 :         ndr->depth--;
    2716             : }
    2717             : 
    2718           0 : static enum ndr_err_code ndr_push_netr_USER_PRIVATE_INFO(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_USER_PRIVATE_INFO *r)
    2719             : {
    2720           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2721           0 :         if (ndr_flags & NDR_SCALARS) {
    2722           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2723           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->SensitiveDataFlag));
    2724           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DataLength));
    2725             :                 {
    2726           0 :                         libndr_flags _flags_save_uint8 = ndr->flags;
    2727           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2728           0 :                         NDR_CHECK(ndr_push_unique_ptr(ndr, r->SensitiveData));
    2729           0 :                         ndr->flags = _flags_save_uint8;
    2730             :                 }
    2731           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2732             :         }
    2733           0 :         if (ndr_flags & NDR_BUFFERS) {
    2734             :                 {
    2735           0 :                         libndr_flags _flags_save_uint8 = ndr->flags;
    2736           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2737           0 :                         if (r->SensitiveData) {
    2738           0 :                                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->DataLength));
    2739           0 :                                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->SensitiveData, r->DataLength));
    2740             :                         }
    2741           0 :                         ndr->flags = _flags_save_uint8;
    2742             :                 }
    2743             :         }
    2744           0 :         return NDR_ERR_SUCCESS;
    2745             : }
    2746             : 
    2747           0 : static enum ndr_err_code ndr_pull_netr_USER_PRIVATE_INFO(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_USER_PRIVATE_INFO *r)
    2748             : {
    2749           0 :         uint32_t _ptr_SensitiveData;
    2750           0 :         uint32_t size_SensitiveData_1 = 0;
    2751           0 :         TALLOC_CTX *_mem_save_SensitiveData_0 = NULL;
    2752           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2753           0 :         if (ndr_flags & NDR_SCALARS) {
    2754           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2755           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->SensitiveDataFlag));
    2756           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DataLength));
    2757             :                 {
    2758           0 :                         libndr_flags _flags_save_uint8 = ndr->flags;
    2759           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2760           0 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_SensitiveData));
    2761           0 :                         if (_ptr_SensitiveData) {
    2762           0 :                                 NDR_PULL_ALLOC(ndr, r->SensitiveData);
    2763             :                         } else {
    2764           0 :                                 r->SensitiveData = NULL;
    2765             :                         }
    2766           0 :                         ndr->flags = _flags_save_uint8;
    2767             :                 }
    2768           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2769             :         }
    2770           0 :         if (ndr_flags & NDR_BUFFERS) {
    2771             :                 {
    2772           0 :                         libndr_flags _flags_save_uint8 = ndr->flags;
    2773           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2774           0 :                         if (r->SensitiveData) {
    2775           0 :                                 _mem_save_SensitiveData_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2776           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->SensitiveData, 0);
    2777           0 :                                 NDR_CHECK(ndr_pull_array_size(ndr, &r->SensitiveData));
    2778           0 :                                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->SensitiveData, &size_SensitiveData_1));
    2779           0 :                                 NDR_PULL_ALLOC_N(ndr, r->SensitiveData, size_SensitiveData_1);
    2780           0 :                                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->SensitiveData, size_SensitiveData_1));
    2781           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_SensitiveData_0, 0);
    2782             :                         }
    2783           0 :                         ndr->flags = _flags_save_uint8;
    2784             :                 }
    2785           0 :                 if (r->SensitiveData) {
    2786           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->SensitiveData, r->DataLength));
    2787             :                 }
    2788             :         }
    2789           0 :         return NDR_ERR_SUCCESS;
    2790             : }
    2791             : 
    2792           0 : _PUBLIC_ void ndr_print_netr_USER_PRIVATE_INFO(struct ndr_print *ndr, const char *name, const struct netr_USER_PRIVATE_INFO *r)
    2793             : {
    2794           0 :         ndr_print_struct(ndr, name, "netr_USER_PRIVATE_INFO");
    2795           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2796           0 :         ndr->depth++;
    2797           0 :         ndr_print_uint8(ndr, "SensitiveDataFlag", r->SensitiveDataFlag);
    2798           0 :         ndr_print_uint32(ndr, "DataLength", r->DataLength);
    2799             :         {
    2800           0 :                 libndr_flags _flags_save_uint8 = ndr->flags;
    2801           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2802           0 :                 ndr_print_ptr(ndr, "SensitiveData", r->SensitiveData);
    2803           0 :                 ndr->depth++;
    2804           0 :                 if (r->SensitiveData) {
    2805           0 :                         ndr_print_array_uint8(ndr, "SensitiveData", r->SensitiveData, r->DataLength);
    2806             :                 }
    2807           0 :                 ndr->depth--;
    2808           0 :                 ndr->flags = _flags_save_uint8;
    2809             :         }
    2810           0 :         ndr->depth--;
    2811             : }
    2812             : 
    2813           0 : static enum ndr_err_code ndr_push_netr_DELTA_USER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_USER *r)
    2814             : {
    2815           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2816           0 :         if (ndr_flags & NDR_SCALARS) {
    2817           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2818           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
    2819           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
    2820           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    2821           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
    2822           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
    2823           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
    2824           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
    2825           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
    2826           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
    2827           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
    2828           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
    2829           0 :                 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
    2830           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
    2831           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
    2832           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
    2833           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
    2834           0 :                 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
    2835           0 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
    2836           0 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
    2837           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_password_present));
    2838           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_password_present));
    2839           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
    2840           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
    2841           0 :                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
    2842           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code));
    2843           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page));
    2844           0 :                 NDR_CHECK(ndr_push_netr_USER_PRIVATE_INFO(ndr, NDR_SCALARS, &r->user_private_info));
    2845           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    2846           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    2847           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
    2848           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    2849           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    2850           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    2851           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    2852           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    2853           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    2854           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    2855           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2856             :         }
    2857           0 :         if (ndr_flags & NDR_BUFFERS) {
    2858           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
    2859           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
    2860           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
    2861           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
    2862           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
    2863           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
    2864           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
    2865           0 :                 NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
    2866           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
    2867           0 :                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
    2868           0 :                 NDR_CHECK(ndr_push_netr_USER_PRIVATE_INFO(ndr, NDR_BUFFERS, &r->user_private_info));
    2869           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    2870           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
    2871           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    2872           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    2873           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    2874             :         }
    2875           0 :         return NDR_ERR_SUCCESS;
    2876             : }
    2877             : 
    2878           0 : static enum ndr_err_code ndr_pull_netr_DELTA_USER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_USER *r)
    2879             : {
    2880           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2881           0 :         if (ndr_flags & NDR_SCALARS) {
    2882           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2883           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
    2884           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
    2885           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    2886           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
    2887           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
    2888           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
    2889           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
    2890           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
    2891           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
    2892           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
    2893           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
    2894           0 :                 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
    2895           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
    2896           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
    2897           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
    2898           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
    2899           0 :                 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
    2900           0 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
    2901           0 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
    2902           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_password_present));
    2903           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_password_present));
    2904           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
    2905           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
    2906           0 :                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
    2907           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code));
    2908           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page));
    2909           0 :                 NDR_CHECK(ndr_pull_netr_USER_PRIVATE_INFO(ndr, NDR_SCALARS, &r->user_private_info));
    2910           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    2911           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    2912           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
    2913           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    2914           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    2915           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    2916           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    2917           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    2918           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    2919           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    2920           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2921             :         }
    2922           0 :         if (ndr_flags & NDR_BUFFERS) {
    2923           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
    2924           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
    2925           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
    2926           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
    2927           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
    2928           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
    2929           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
    2930           0 :                 NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
    2931           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
    2932           0 :                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
    2933           0 :                 NDR_CHECK(ndr_pull_netr_USER_PRIVATE_INFO(ndr, NDR_BUFFERS, &r->user_private_info));
    2934           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    2935           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
    2936           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    2937           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    2938           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    2939             :         }
    2940           0 :         return NDR_ERR_SUCCESS;
    2941             : }
    2942             : 
    2943           0 : _PUBLIC_ void ndr_print_netr_DELTA_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_USER *r)
    2944             : {
    2945           0 :         ndr_print_struct(ndr, name, "netr_DELTA_USER");
    2946           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2947           0 :         ndr->depth++;
    2948           0 :         ndr_print_lsa_String(ndr, "account_name", &r->account_name);
    2949           0 :         ndr_print_lsa_String(ndr, "full_name", &r->full_name);
    2950           0 :         ndr_print_uint32(ndr, "rid", r->rid);
    2951           0 :         ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
    2952           0 :         ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
    2953           0 :         ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
    2954           0 :         ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
    2955           0 :         ndr_print_lsa_String(ndr, "description", &r->description);
    2956           0 :         ndr_print_lsa_String(ndr, "workstations", &r->workstations);
    2957           0 :         ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
    2958           0 :         ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
    2959           0 :         ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
    2960           0 :         ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
    2961           0 :         ndr_print_uint16(ndr, "logon_count", r->logon_count);
    2962           0 :         ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
    2963           0 :         ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
    2964           0 :         ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
    2965           0 :         ndr_print_samr_Password(ndr, "lmpassword", &r->lmpassword);
    2966           0 :         ndr_print_samr_Password(ndr, "ntpassword", &r->ntpassword);
    2967           0 :         ndr_print_uint8(ndr, "nt_password_present", r->nt_password_present);
    2968           0 :         ndr_print_uint8(ndr, "lm_password_present", r->lm_password_present);
    2969           0 :         ndr_print_uint8(ndr, "password_expired", r->password_expired);
    2970           0 :         ndr_print_lsa_String(ndr, "comment", &r->comment);
    2971           0 :         ndr_print_lsa_BinaryString(ndr, "parameters", &r->parameters);
    2972           0 :         ndr_print_uint16(ndr, "country_code", r->country_code);
    2973           0 :         ndr_print_uint16(ndr, "code_page", r->code_page);
    2974           0 :         ndr_print_netr_USER_PRIVATE_INFO(ndr, "user_private_info", &r->user_private_info);
    2975           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    2976           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    2977           0 :         ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
    2978           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    2979           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    2980           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    2981           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    2982           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    2983           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    2984           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    2985           0 :         ndr->depth--;
    2986             : }
    2987             : 
    2988           0 : static enum ndr_err_code ndr_push_netr_DELTA_DOMAIN(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_DOMAIN *r)
    2989             : {
    2990           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2991           0 :         if (ndr_flags & NDR_SCALARS) {
    2992           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2993           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
    2994           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
    2995           0 :                 NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->force_logoff_time));
    2996           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length));
    2997           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->password_history_length));
    2998           0 :                 NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->max_password_age));
    2999           0 :                 NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->min_password_age));
    3000           0 :                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
    3001           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time));
    3002           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    3003           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3004           0 :                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->account_lockout));
    3005           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3006           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3007           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3008           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_to_chgpass));
    3009           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    3010           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    3011           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    3012           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3013             :         }
    3014           0 :         if (ndr_flags & NDR_BUFFERS) {
    3015           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
    3016           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
    3017           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3018           0 :                 NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->account_lockout));
    3019           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3020           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3021           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3022             :         }
    3023           0 :         return NDR_ERR_SUCCESS;
    3024             : }
    3025             : 
    3026           0 : static enum ndr_err_code ndr_pull_netr_DELTA_DOMAIN(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_DOMAIN *r)
    3027             : {
    3028           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3029           0 :         if (ndr_flags & NDR_SCALARS) {
    3030           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3031           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
    3032           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
    3033           0 :                 NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->force_logoff_time));
    3034           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length));
    3035           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->password_history_length));
    3036           0 :                 NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->max_password_age));
    3037           0 :                 NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->min_password_age));
    3038           0 :                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
    3039           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time));
    3040           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    3041           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3042           0 :                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->account_lockout));
    3043           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3044           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3045           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3046           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_to_chgpass));
    3047           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    3048           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    3049           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    3050           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3051             :         }
    3052           0 :         if (ndr_flags & NDR_BUFFERS) {
    3053           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
    3054           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
    3055           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3056           0 :                 NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->account_lockout));
    3057           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3058           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3059           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3060             :         }
    3061           0 :         return NDR_ERR_SUCCESS;
    3062             : }
    3063             : 
    3064           0 : _PUBLIC_ void ndr_print_netr_DELTA_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DOMAIN *r)
    3065             : {
    3066           0 :         ndr_print_struct(ndr, name, "netr_DELTA_DOMAIN");
    3067           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3068           0 :         ndr->depth++;
    3069           0 :         ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
    3070           0 :         ndr_print_lsa_String(ndr, "oem_information", &r->oem_information);
    3071           0 :         ndr_print_dlong(ndr, "force_logoff_time", r->force_logoff_time);
    3072           0 :         ndr_print_uint16(ndr, "min_password_length", r->min_password_length);
    3073           0 :         ndr_print_uint16(ndr, "password_history_length", r->password_history_length);
    3074           0 :         ndr_print_dlong(ndr, "max_password_age", r->max_password_age);
    3075           0 :         ndr_print_dlong(ndr, "min_password_age", r->min_password_age);
    3076           0 :         ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
    3077           0 :         ndr_print_NTTIME(ndr, "domain_create_time", r->domain_create_time);
    3078           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    3079           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    3080           0 :         ndr_print_lsa_BinaryString(ndr, "account_lockout", &r->account_lockout);
    3081           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    3082           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    3083           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    3084           0 :         ndr_print_uint32(ndr, "logon_to_chgpass", r->logon_to_chgpass);
    3085           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    3086           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    3087           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    3088           0 :         ndr->depth--;
    3089             : }
    3090             : 
    3091           0 : static enum ndr_err_code ndr_push_netr_DELTA_GROUP(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_GROUP *r)
    3092             : {
    3093           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3094           0 :         if (ndr_flags & NDR_SCALARS) {
    3095           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3096           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->group_name));
    3097           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    3098           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attributes));
    3099           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
    3100           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    3101           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3102           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3103           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3104           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3105           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3106           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    3107           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    3108           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    3109           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    3110           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3111             :         }
    3112           0 :         if (ndr_flags & NDR_BUFFERS) {
    3113           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->group_name));
    3114           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
    3115           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3116           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3117           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3118           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3119           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3120             :         }
    3121           0 :         return NDR_ERR_SUCCESS;
    3122             : }
    3123             : 
    3124           0 : static enum ndr_err_code ndr_pull_netr_DELTA_GROUP(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_GROUP *r)
    3125             : {
    3126           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3127           0 :         if (ndr_flags & NDR_SCALARS) {
    3128           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3129           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->group_name));
    3130           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    3131           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attributes));
    3132           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
    3133           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    3134           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3135           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3136           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3137           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3138           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3139           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    3140           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    3141           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    3142           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    3143           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3144             :         }
    3145           0 :         if (ndr_flags & NDR_BUFFERS) {
    3146           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->group_name));
    3147           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
    3148           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3149           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3150           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3151           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3152           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3153             :         }
    3154           0 :         return NDR_ERR_SUCCESS;
    3155             : }
    3156             : 
    3157           0 : _PUBLIC_ void ndr_print_netr_DELTA_GROUP(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP *r)
    3158             : {
    3159           0 :         ndr_print_struct(ndr, name, "netr_DELTA_GROUP");
    3160           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3161           0 :         ndr->depth++;
    3162           0 :         ndr_print_lsa_String(ndr, "group_name", &r->group_name);
    3163           0 :         ndr_print_uint32(ndr, "rid", r->rid);
    3164           0 :         ndr_print_uint32(ndr, "attributes", r->attributes);
    3165           0 :         ndr_print_lsa_String(ndr, "description", &r->description);
    3166           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    3167           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    3168           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    3169           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    3170           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    3171           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    3172           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    3173           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    3174           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    3175           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    3176           0 :         ndr->depth--;
    3177             : }
    3178             : 
    3179           0 : static enum ndr_err_code ndr_push_netr_DELTA_RENAME(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_RENAME *r)
    3180             : {
    3181           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3182           0 :         if (ndr_flags & NDR_SCALARS) {
    3183           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3184           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->OldName));
    3185           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->NewName));
    3186           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3187           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3188           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3189           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3190           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    3191           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    3192           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    3193           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    3194           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3195             :         }
    3196           0 :         if (ndr_flags & NDR_BUFFERS) {
    3197           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->OldName));
    3198           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->NewName));
    3199           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3200           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3201           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3202           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3203             :         }
    3204           0 :         return NDR_ERR_SUCCESS;
    3205             : }
    3206             : 
    3207           0 : static enum ndr_err_code ndr_pull_netr_DELTA_RENAME(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_RENAME *r)
    3208             : {
    3209           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3210           0 :         if (ndr_flags & NDR_SCALARS) {
    3211           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3212           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->OldName));
    3213           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->NewName));
    3214           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3215           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3216           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3217           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3218           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    3219           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    3220           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    3221           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    3222           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3223             :         }
    3224           0 :         if (ndr_flags & NDR_BUFFERS) {
    3225           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->OldName));
    3226           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->NewName));
    3227           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3228           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3229           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3230           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3231             :         }
    3232           0 :         return NDR_ERR_SUCCESS;
    3233             : }
    3234             : 
    3235           0 : _PUBLIC_ void ndr_print_netr_DELTA_RENAME(struct ndr_print *ndr, const char *name, const struct netr_DELTA_RENAME *r)
    3236             : {
    3237           0 :         ndr_print_struct(ndr, name, "netr_DELTA_RENAME");
    3238           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3239           0 :         ndr->depth++;
    3240           0 :         ndr_print_lsa_String(ndr, "OldName", &r->OldName);
    3241           0 :         ndr_print_lsa_String(ndr, "NewName", &r->NewName);
    3242           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    3243           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    3244           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    3245           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    3246           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    3247           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    3248           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    3249           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    3250           0 :         ndr->depth--;
    3251             : }
    3252             : 
    3253           0 : static enum ndr_err_code ndr_push_netr_DELTA_GROUP_MEMBER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_GROUP_MEMBER *r)
    3254             : {
    3255           0 :         uint32_t cntr_rids_1;
    3256           0 :         uint32_t cntr_attribs_1;
    3257           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3258           0 :         if (ndr_flags & NDR_SCALARS) {
    3259           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3260           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids));
    3261           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribs));
    3262           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_rids));
    3263           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
    3264           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
    3265           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
    3266           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
    3267           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3268             :         }
    3269           0 :         if (ndr_flags & NDR_BUFFERS) {
    3270           0 :                 if (r->rids) {
    3271           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_rids));
    3272           0 :                         for (cntr_rids_1 = 0; cntr_rids_1 < (r->num_rids); cntr_rids_1++) {
    3273           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rids[cntr_rids_1]));
    3274             :                         }
    3275             :                 }
    3276           0 :                 if (r->attribs) {
    3277           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_rids));
    3278           0 :                         for (cntr_attribs_1 = 0; cntr_attribs_1 < (r->num_rids); cntr_attribs_1++) {
    3279           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attribs[cntr_attribs_1]));
    3280             :                         }
    3281             :                 }
    3282             :         }
    3283           0 :         return NDR_ERR_SUCCESS;
    3284             : }
    3285             : 
    3286           0 : static enum ndr_err_code ndr_pull_netr_DELTA_GROUP_MEMBER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_GROUP_MEMBER *r)
    3287             : {
    3288           0 :         uint32_t _ptr_rids;
    3289           0 :         uint32_t size_rids_1 = 0;
    3290           0 :         uint32_t cntr_rids_1;
    3291           0 :         TALLOC_CTX *_mem_save_rids_0 = NULL;
    3292           0 :         TALLOC_CTX *_mem_save_rids_1 = NULL;
    3293           0 :         uint32_t _ptr_attribs;
    3294           0 :         uint32_t size_attribs_1 = 0;
    3295           0 :         uint32_t cntr_attribs_1;
    3296           0 :         TALLOC_CTX *_mem_save_attribs_0 = NULL;
    3297           0 :         TALLOC_CTX *_mem_save_attribs_1 = NULL;
    3298           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3299           0 :         if (ndr_flags & NDR_SCALARS) {
    3300           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3301           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
    3302           0 :                 if (_ptr_rids) {
    3303           0 :                         NDR_PULL_ALLOC(ndr, r->rids);
    3304             :                 } else {
    3305           0 :                         r->rids = NULL;
    3306             :                 }
    3307           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribs));
    3308           0 :                 if (_ptr_attribs) {
    3309           0 :                         NDR_PULL_ALLOC(ndr, r->attribs);
    3310             :                 } else {
    3311           0 :                         r->attribs = NULL;
    3312             :                 }
    3313           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_rids));
    3314           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
    3315           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
    3316           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
    3317           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
    3318           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3319             :         }
    3320           0 :         if (ndr_flags & NDR_BUFFERS) {
    3321           0 :                 if (r->rids) {
    3322           0 :                         _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3323           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
    3324           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
    3325           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->rids, &size_rids_1));
    3326           0 :                         NDR_PULL_ALLOC_N(ndr, r->rids, size_rids_1);
    3327           0 :                         _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3328           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
    3329           0 :                         for (cntr_rids_1 = 0; cntr_rids_1 < (size_rids_1); cntr_rids_1++) {
    3330           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
    3331             :                         }
    3332           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
    3333           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
    3334             :                 }
    3335           0 :                 if (r->attribs) {
    3336           0 :                         _mem_save_attribs_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3337           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->attribs, 0);
    3338           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->attribs));
    3339           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->attribs, &size_attribs_1));
    3340           0 :                         NDR_PULL_ALLOC_N(ndr, r->attribs, size_attribs_1);
    3341           0 :                         _mem_save_attribs_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3342           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->attribs, 0);
    3343           0 :                         for (cntr_attribs_1 = 0; cntr_attribs_1 < (size_attribs_1); cntr_attribs_1++) {
    3344           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attribs[cntr_attribs_1]));
    3345             :                         }
    3346           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribs_1, 0);
    3347           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribs_0, 0);
    3348             :                 }
    3349           0 :                 if (r->rids) {
    3350           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->rids, r->num_rids));
    3351             :                 }
    3352           0 :                 if (r->attribs) {
    3353           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->attribs, r->num_rids));
    3354             :                 }
    3355             :         }
    3356           0 :         return NDR_ERR_SUCCESS;
    3357             : }
    3358             : 
    3359           0 : _PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP_MEMBER *r)
    3360             : {
    3361           0 :         uint32_t cntr_rids_1;
    3362           0 :         uint32_t cntr_attribs_1;
    3363           0 :         ndr_print_struct(ndr, name, "netr_DELTA_GROUP_MEMBER");
    3364           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3365           0 :         ndr->depth++;
    3366           0 :         ndr_print_ptr(ndr, "rids", r->rids);
    3367           0 :         ndr->depth++;
    3368           0 :         if (r->rids) {
    3369           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "rids", (uint32_t)(r->num_rids));
    3370           0 :                 ndr->depth++;
    3371           0 :                 for (cntr_rids_1 = 0; cntr_rids_1 < (r->num_rids); cntr_rids_1++) {
    3372           0 :                         ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_1]);
    3373             :                 }
    3374           0 :                 ndr->depth--;
    3375             :         }
    3376           0 :         ndr->depth--;
    3377           0 :         ndr_print_ptr(ndr, "attribs", r->attribs);
    3378           0 :         ndr->depth++;
    3379           0 :         if (r->attribs) {
    3380           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "attribs", (uint32_t)(r->num_rids));
    3381           0 :                 ndr->depth++;
    3382           0 :                 for (cntr_attribs_1 = 0; cntr_attribs_1 < (r->num_rids); cntr_attribs_1++) {
    3383           0 :                         ndr_print_uint32(ndr, "attribs", r->attribs[cntr_attribs_1]);
    3384             :                 }
    3385           0 :                 ndr->depth--;
    3386             :         }
    3387           0 :         ndr->depth--;
    3388           0 :         ndr_print_uint32(ndr, "num_rids", r->num_rids);
    3389           0 :         ndr_print_uint32(ndr, "unknown1", r->unknown1);
    3390           0 :         ndr_print_uint32(ndr, "unknown2", r->unknown2);
    3391           0 :         ndr_print_uint32(ndr, "unknown3", r->unknown3);
    3392           0 :         ndr_print_uint32(ndr, "unknown4", r->unknown4);
    3393           0 :         ndr->depth--;
    3394             : }
    3395             : 
    3396           0 : static enum ndr_err_code ndr_push_netr_DELTA_ALIAS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_ALIAS *r)
    3397             : {
    3398           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3399           0 :         if (ndr_flags & NDR_SCALARS) {
    3400           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3401           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->alias_name));
    3402           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    3403           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    3404           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3405           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
    3406           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3407           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3408           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3409           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    3410           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    3411           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    3412           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    3413           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3414             :         }
    3415           0 :         if (ndr_flags & NDR_BUFFERS) {
    3416           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->alias_name));
    3417           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3418           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
    3419           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3420           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3421           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3422             :         }
    3423           0 :         return NDR_ERR_SUCCESS;
    3424             : }
    3425             : 
    3426           0 : static enum ndr_err_code ndr_pull_netr_DELTA_ALIAS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_ALIAS *r)
    3427             : {
    3428           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3429           0 :         if (ndr_flags & NDR_SCALARS) {
    3430           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3431           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->alias_name));
    3432           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    3433           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    3434           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3435           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
    3436           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3437           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3438           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3439           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    3440           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    3441           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    3442           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    3443           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3444             :         }
    3445           0 :         if (ndr_flags & NDR_BUFFERS) {
    3446           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->alias_name));
    3447           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3448           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
    3449           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3450           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3451           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3452             :         }
    3453           0 :         return NDR_ERR_SUCCESS;
    3454             : }
    3455             : 
    3456           0 : _PUBLIC_ void ndr_print_netr_DELTA_ALIAS(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS *r)
    3457             : {
    3458           0 :         ndr_print_struct(ndr, name, "netr_DELTA_ALIAS");
    3459           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3460           0 :         ndr->depth++;
    3461           0 :         ndr_print_lsa_String(ndr, "alias_name", &r->alias_name);
    3462           0 :         ndr_print_uint32(ndr, "rid", r->rid);
    3463           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    3464           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    3465           0 :         ndr_print_lsa_String(ndr, "description", &r->description);
    3466           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    3467           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    3468           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    3469           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    3470           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    3471           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    3472           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    3473           0 :         ndr->depth--;
    3474             : }
    3475             : 
    3476           0 : static enum ndr_err_code ndr_push_netr_DELTA_ALIAS_MEMBER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_ALIAS_MEMBER *r)
    3477             : {
    3478           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3479           0 :         if (ndr_flags & NDR_SCALARS) {
    3480           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3481           0 :                 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS, &r->sids));
    3482           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
    3483           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
    3484           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
    3485           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
    3486           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3487             :         }
    3488           0 :         if (ndr_flags & NDR_BUFFERS) {
    3489           0 :                 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_BUFFERS, &r->sids));
    3490             :         }
    3491           0 :         return NDR_ERR_SUCCESS;
    3492             : }
    3493             : 
    3494           0 : static enum ndr_err_code ndr_pull_netr_DELTA_ALIAS_MEMBER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_ALIAS_MEMBER *r)
    3495             : {
    3496           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3497           0 :         if (ndr_flags & NDR_SCALARS) {
    3498           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3499           0 :                 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS, &r->sids));
    3500           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
    3501           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
    3502           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
    3503           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
    3504           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3505             :         }
    3506           0 :         if (ndr_flags & NDR_BUFFERS) {
    3507           0 :                 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_BUFFERS, &r->sids));
    3508             :         }
    3509           0 :         return NDR_ERR_SUCCESS;
    3510             : }
    3511             : 
    3512           0 : _PUBLIC_ void ndr_print_netr_DELTA_ALIAS_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS_MEMBER *r)
    3513             : {
    3514           0 :         ndr_print_struct(ndr, name, "netr_DELTA_ALIAS_MEMBER");
    3515           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3516           0 :         ndr->depth++;
    3517           0 :         ndr_print_lsa_SidArray(ndr, "sids", &r->sids);
    3518           0 :         ndr_print_uint32(ndr, "unknown1", r->unknown1);
    3519           0 :         ndr_print_uint32(ndr, "unknown2", r->unknown2);
    3520           0 :         ndr_print_uint32(ndr, "unknown3", r->unknown3);
    3521           0 :         ndr_print_uint32(ndr, "unknown4", r->unknown4);
    3522           0 :         ndr->depth--;
    3523             : }
    3524             : 
    3525           0 : static enum ndr_err_code ndr_push_netr_QUOTA_LIMITS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_QUOTA_LIMITS *r)
    3526             : {
    3527           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3528           0 :         if (ndr_flags & NDR_SCALARS) {
    3529           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    3530           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagedpoollimit));
    3531           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nonpagedpoollimit));
    3532           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minimumworkingsetsize));
    3533           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximumworkingsetsize));
    3534           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagefilelimit));
    3535           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->timelimit));
    3536           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    3537             :         }
    3538           0 :         if (ndr_flags & NDR_BUFFERS) {
    3539           0 :         }
    3540           0 :         return NDR_ERR_SUCCESS;
    3541             : }
    3542             : 
    3543           0 : static enum ndr_err_code ndr_pull_netr_QUOTA_LIMITS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_QUOTA_LIMITS *r)
    3544             : {
    3545           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3546           0 :         if (ndr_flags & NDR_SCALARS) {
    3547           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    3548           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagedpoollimit));
    3549           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nonpagedpoollimit));
    3550           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minimumworkingsetsize));
    3551           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximumworkingsetsize));
    3552           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagefilelimit));
    3553           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->timelimit));
    3554           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    3555             :         }
    3556           0 :         if (ndr_flags & NDR_BUFFERS) {
    3557           0 :         }
    3558           0 :         return NDR_ERR_SUCCESS;
    3559             : }
    3560             : 
    3561           0 : _PUBLIC_ void ndr_print_netr_QUOTA_LIMITS(struct ndr_print *ndr, const char *name, const struct netr_QUOTA_LIMITS *r)
    3562             : {
    3563           0 :         ndr_print_struct(ndr, name, "netr_QUOTA_LIMITS");
    3564           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3565           0 :         ndr->depth++;
    3566           0 :         ndr_print_uint32(ndr, "pagedpoollimit", r->pagedpoollimit);
    3567           0 :         ndr_print_uint32(ndr, "nonpagedpoollimit", r->nonpagedpoollimit);
    3568           0 :         ndr_print_uint32(ndr, "minimumworkingsetsize", r->minimumworkingsetsize);
    3569           0 :         ndr_print_uint32(ndr, "maximumworkingsetsize", r->maximumworkingsetsize);
    3570           0 :         ndr_print_uint32(ndr, "pagefilelimit", r->pagefilelimit);
    3571           0 :         ndr_print_NTTIME(ndr, "timelimit", r->timelimit);
    3572           0 :         ndr->depth--;
    3573             : }
    3574             : 
    3575           0 : static enum ndr_err_code ndr_push_netr_DELTA_POLICY(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_POLICY *r)
    3576             : {
    3577           0 :         uint32_t cntr_eventauditoptions_1;
    3578           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3579           0 :         if (ndr_flags & NDR_SCALARS) {
    3580           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3581           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlogsize));
    3582           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->auditretentionperiod));
    3583           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->auditingmode));
    3584           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxauditeventcount));
    3585           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->eventauditoptions));
    3586           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary_domain_name));
    3587           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    3588           0 :                 NDR_CHECK(ndr_push_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quota_limits));
    3589           0 :                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
    3590           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->db_create_time));
    3591           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    3592           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3593           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3594           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3595           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3596           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3597           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    3598           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    3599           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    3600           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    3601           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3602             :         }
    3603           0 :         if (ndr_flags & NDR_BUFFERS) {
    3604           0 :                 if (r->eventauditoptions) {
    3605           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->maxauditeventcount + 1));
    3606           0 :                         for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < (r->maxauditeventcount + 1); cntr_eventauditoptions_1++) {
    3607           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->eventauditoptions[cntr_eventauditoptions_1]));
    3608             :                         }
    3609             :                 }
    3610           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary_domain_name));
    3611           0 :                 if (r->sid) {
    3612           0 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    3613             :                 }
    3614           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3615           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3616           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3617           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3618           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3619             :         }
    3620           0 :         return NDR_ERR_SUCCESS;
    3621             : }
    3622             : 
    3623           0 : static enum ndr_err_code ndr_pull_netr_DELTA_POLICY(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_POLICY *r)
    3624             : {
    3625           0 :         uint32_t _ptr_eventauditoptions;
    3626           0 :         uint32_t size_eventauditoptions_1 = 0;
    3627           0 :         uint32_t cntr_eventauditoptions_1;
    3628           0 :         TALLOC_CTX *_mem_save_eventauditoptions_0 = NULL;
    3629           0 :         TALLOC_CTX *_mem_save_eventauditoptions_1 = NULL;
    3630           0 :         uint32_t _ptr_sid;
    3631           0 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    3632           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3633           0 :         if (ndr_flags & NDR_SCALARS) {
    3634           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3635           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlogsize));
    3636           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->auditretentionperiod));
    3637           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->auditingmode));
    3638           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxauditeventcount));
    3639           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_eventauditoptions));
    3640           0 :                 if (_ptr_eventauditoptions) {
    3641           0 :                         NDR_PULL_ALLOC(ndr, r->eventauditoptions);
    3642             :                 } else {
    3643           0 :                         r->eventauditoptions = NULL;
    3644             :                 }
    3645           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary_domain_name));
    3646           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    3647           0 :                 if (_ptr_sid) {
    3648           0 :                         NDR_PULL_ALLOC(ndr, r->sid);
    3649             :                 } else {
    3650           0 :                         r->sid = NULL;
    3651             :                 }
    3652           0 :                 NDR_CHECK(ndr_pull_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quota_limits));
    3653           0 :                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
    3654           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->db_create_time));
    3655           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    3656           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3657           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3658           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3659           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3660           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3661           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    3662           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    3663           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    3664           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    3665           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3666             :         }
    3667           0 :         if (ndr_flags & NDR_BUFFERS) {
    3668           0 :                 if (r->eventauditoptions) {
    3669           0 :                         _mem_save_eventauditoptions_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3670           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->eventauditoptions, 0);
    3671           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->eventauditoptions));
    3672           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->eventauditoptions, &size_eventauditoptions_1));
    3673           0 :                         NDR_PULL_ALLOC_N(ndr, r->eventauditoptions, size_eventauditoptions_1);
    3674           0 :                         _mem_save_eventauditoptions_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3675           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->eventauditoptions, 0);
    3676           0 :                         for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < (size_eventauditoptions_1); cntr_eventauditoptions_1++) {
    3677           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->eventauditoptions[cntr_eventauditoptions_1]));
    3678             :                         }
    3679           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventauditoptions_1, 0);
    3680           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventauditoptions_0, 0);
    3681             :                 }
    3682           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary_domain_name));
    3683           0 :                 if (r->sid) {
    3684           0 :                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3685           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    3686           0 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    3687           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    3688             :                 }
    3689           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3690           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3691           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3692           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3693           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3694           0 :                 if (r->eventauditoptions) {
    3695           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->eventauditoptions, r->maxauditeventcount + 1));
    3696             :                 }
    3697             :         }
    3698           0 :         return NDR_ERR_SUCCESS;
    3699             : }
    3700             : 
    3701           0 : _PUBLIC_ void ndr_print_netr_DELTA_POLICY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_POLICY *r)
    3702             : {
    3703           0 :         uint32_t cntr_eventauditoptions_1;
    3704           0 :         ndr_print_struct(ndr, name, "netr_DELTA_POLICY");
    3705           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3706           0 :         ndr->depth++;
    3707           0 :         ndr_print_uint32(ndr, "maxlogsize", r->maxlogsize);
    3708           0 :         ndr_print_NTTIME(ndr, "auditretentionperiod", r->auditretentionperiod);
    3709           0 :         ndr_print_uint8(ndr, "auditingmode", r->auditingmode);
    3710           0 :         ndr_print_uint32(ndr, "maxauditeventcount", r->maxauditeventcount);
    3711           0 :         ndr_print_ptr(ndr, "eventauditoptions", r->eventauditoptions);
    3712           0 :         ndr->depth++;
    3713           0 :         if (r->eventauditoptions) {
    3714           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "eventauditoptions", (uint32_t)(r->maxauditeventcount + 1));
    3715           0 :                 ndr->depth++;
    3716           0 :                 for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < (r->maxauditeventcount + 1); cntr_eventauditoptions_1++) {
    3717           0 :                         ndr_print_uint32(ndr, "eventauditoptions", r->eventauditoptions[cntr_eventauditoptions_1]);
    3718             :                 }
    3719           0 :                 ndr->depth--;
    3720             :         }
    3721           0 :         ndr->depth--;
    3722           0 :         ndr_print_lsa_String(ndr, "primary_domain_name", &r->primary_domain_name);
    3723           0 :         ndr_print_ptr(ndr, "sid", r->sid);
    3724           0 :         ndr->depth++;
    3725           0 :         if (r->sid) {
    3726           0 :                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    3727             :         }
    3728           0 :         ndr->depth--;
    3729           0 :         ndr_print_netr_QUOTA_LIMITS(ndr, "quota_limits", &r->quota_limits);
    3730           0 :         ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
    3731           0 :         ndr_print_NTTIME(ndr, "db_create_time", r->db_create_time);
    3732           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    3733           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    3734           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    3735           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    3736           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    3737           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    3738           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    3739           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    3740           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    3741           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    3742           0 :         ndr->depth--;
    3743             : }
    3744             : 
    3745           0 : static enum ndr_err_code ndr_push_netr_DELTA_TRUSTED_DOMAIN(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_TRUSTED_DOMAIN *r)
    3746             : {
    3747           0 :         uint32_t cntr_controller_names_1;
    3748           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3749           0 :         if (ndr_flags & NDR_SCALARS) {
    3750           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3751           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
    3752           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_controllers));
    3753           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->controller_names));
    3754           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    3755           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3756           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3757           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3758           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3759           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3760           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->posix_offset));
    3761           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    3762           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    3763           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    3764           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3765             :         }
    3766           0 :         if (ndr_flags & NDR_BUFFERS) {
    3767           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
    3768           0 :                 if (r->controller_names) {
    3769           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_controllers));
    3770           0 :                         for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (r->num_controllers); cntr_controller_names_1++) {
    3771           0 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->controller_names[cntr_controller_names_1]));
    3772             :                         }
    3773           0 :                         for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (r->num_controllers); cntr_controller_names_1++) {
    3774           0 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->controller_names[cntr_controller_names_1]));
    3775             :                         }
    3776             :                 }
    3777           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3778           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3779           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3780           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3781           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3782             :         }
    3783           0 :         return NDR_ERR_SUCCESS;
    3784             : }
    3785             : 
    3786           0 : static enum ndr_err_code ndr_pull_netr_DELTA_TRUSTED_DOMAIN(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_TRUSTED_DOMAIN *r)
    3787             : {
    3788           0 :         uint32_t _ptr_controller_names;
    3789           0 :         uint32_t size_controller_names_1 = 0;
    3790           0 :         uint32_t cntr_controller_names_1;
    3791           0 :         TALLOC_CTX *_mem_save_controller_names_0 = NULL;
    3792           0 :         TALLOC_CTX *_mem_save_controller_names_1 = NULL;
    3793           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3794           0 :         if (ndr_flags & NDR_SCALARS) {
    3795           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3796           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
    3797           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_controllers));
    3798           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_controller_names));
    3799           0 :                 if (_ptr_controller_names) {
    3800           0 :                         NDR_PULL_ALLOC(ndr, r->controller_names);
    3801             :                 } else {
    3802           0 :                         r->controller_names = NULL;
    3803             :                 }
    3804           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    3805           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3806           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3807           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3808           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3809           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3810           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->posix_offset));
    3811           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    3812           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    3813           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    3814           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3815             :         }
    3816           0 :         if (ndr_flags & NDR_BUFFERS) {
    3817           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
    3818           0 :                 if (r->controller_names) {
    3819           0 :                         _mem_save_controller_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3820           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->controller_names, 0);
    3821           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->controller_names));
    3822           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->controller_names, &size_controller_names_1));
    3823           0 :                         NDR_PULL_ALLOC_N(ndr, r->controller_names, size_controller_names_1);
    3824           0 :                         _mem_save_controller_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3825           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->controller_names, 0);
    3826           0 :                         for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (size_controller_names_1); cntr_controller_names_1++) {
    3827           0 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->controller_names[cntr_controller_names_1]));
    3828             :                         }
    3829           0 :                         for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (size_controller_names_1); cntr_controller_names_1++) {
    3830           0 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->controller_names[cntr_controller_names_1]));
    3831             :                         }
    3832           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_controller_names_1, 0);
    3833           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_controller_names_0, 0);
    3834             :                 }
    3835           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3836           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3837           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3838           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3839           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3840           0 :                 if (r->controller_names) {
    3841           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->controller_names, r->num_controllers));
    3842             :                 }
    3843           0 :                 for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (size_controller_names_1); cntr_controller_names_1++) {
    3844           0 :                 }
    3845             :         }
    3846           0 :         return NDR_ERR_SUCCESS;
    3847             : }
    3848             : 
    3849           0 : _PUBLIC_ void ndr_print_netr_DELTA_TRUSTED_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_TRUSTED_DOMAIN *r)
    3850             : {
    3851           0 :         uint32_t cntr_controller_names_1;
    3852           0 :         ndr_print_struct(ndr, name, "netr_DELTA_TRUSTED_DOMAIN");
    3853           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3854           0 :         ndr->depth++;
    3855           0 :         ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
    3856           0 :         ndr_print_uint32(ndr, "num_controllers", r->num_controllers);
    3857           0 :         ndr_print_ptr(ndr, "controller_names", r->controller_names);
    3858           0 :         ndr->depth++;
    3859           0 :         if (r->controller_names) {
    3860           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "controller_names", (uint32_t)(r->num_controllers));
    3861           0 :                 ndr->depth++;
    3862           0 :                 for (cntr_controller_names_1 = 0; cntr_controller_names_1 < (r->num_controllers); cntr_controller_names_1++) {
    3863           0 :                         ndr_print_lsa_String(ndr, "controller_names", &r->controller_names[cntr_controller_names_1]);
    3864             :                 }
    3865           0 :                 ndr->depth--;
    3866             :         }
    3867           0 :         ndr->depth--;
    3868           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    3869           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    3870           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    3871           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    3872           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    3873           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    3874           0 :         ndr_print_uint32(ndr, "posix_offset", r->posix_offset);
    3875           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    3876           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    3877           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    3878           0 :         ndr->depth--;
    3879             : }
    3880             : 
    3881           0 : static enum ndr_err_code ndr_push_netr_DELTA_ACCOUNT(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_ACCOUNT *r)
    3882             : {
    3883           0 :         uint32_t cntr_privilege_attrib_1;
    3884           0 :         uint32_t cntr_privilege_name_1;
    3885           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3886           0 :         if (ndr_flags & NDR_SCALARS) {
    3887           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3888           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_entries));
    3889           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_control));
    3890           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->privilege_attrib));
    3891           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->privilege_name));
    3892           0 :                 NDR_CHECK(ndr_push_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quotalimits));
    3893           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->system_flags));
    3894           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    3895           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3896           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3897           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3898           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3899           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3900           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    3901           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    3902           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    3903           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    3904           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3905             :         }
    3906           0 :         if (ndr_flags & NDR_BUFFERS) {
    3907           0 :                 if (r->privilege_attrib) {
    3908           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->privilege_entries));
    3909           0 :                         for (cntr_privilege_attrib_1 = 0; cntr_privilege_attrib_1 < (r->privilege_entries); cntr_privilege_attrib_1++) {
    3910           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_attrib[cntr_privilege_attrib_1]));
    3911             :                         }
    3912             :                 }
    3913           0 :                 if (r->privilege_name) {
    3914           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->privilege_entries));
    3915           0 :                         for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (r->privilege_entries); cntr_privilege_name_1++) {
    3916           0 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->privilege_name[cntr_privilege_name_1]));
    3917             :                         }
    3918           0 :                         for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (r->privilege_entries); cntr_privilege_name_1++) {
    3919           0 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->privilege_name[cntr_privilege_name_1]));
    3920             :                         }
    3921             :                 }
    3922           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    3923           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    3924           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    3925           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    3926           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    3927             :         }
    3928           0 :         return NDR_ERR_SUCCESS;
    3929             : }
    3930             : 
    3931           0 : static enum ndr_err_code ndr_pull_netr_DELTA_ACCOUNT(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_ACCOUNT *r)
    3932             : {
    3933           0 :         uint32_t _ptr_privilege_attrib;
    3934           0 :         uint32_t size_privilege_attrib_1 = 0;
    3935           0 :         uint32_t cntr_privilege_attrib_1;
    3936           0 :         TALLOC_CTX *_mem_save_privilege_attrib_0 = NULL;
    3937           0 :         TALLOC_CTX *_mem_save_privilege_attrib_1 = NULL;
    3938           0 :         uint32_t _ptr_privilege_name;
    3939           0 :         uint32_t size_privilege_name_1 = 0;
    3940           0 :         uint32_t cntr_privilege_name_1;
    3941           0 :         TALLOC_CTX *_mem_save_privilege_name_0 = NULL;
    3942           0 :         TALLOC_CTX *_mem_save_privilege_name_1 = NULL;
    3943           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3944           0 :         if (ndr_flags & NDR_SCALARS) {
    3945           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3946           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_entries));
    3947           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_control));
    3948           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privilege_attrib));
    3949           0 :                 if (_ptr_privilege_attrib) {
    3950           0 :                         NDR_PULL_ALLOC(ndr, r->privilege_attrib);
    3951             :                 } else {
    3952           0 :                         r->privilege_attrib = NULL;
    3953             :                 }
    3954           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privilege_name));
    3955           0 :                 if (_ptr_privilege_name) {
    3956           0 :                         NDR_PULL_ALLOC(ndr, r->privilege_name);
    3957             :                 } else {
    3958           0 :                         r->privilege_name = NULL;
    3959             :                 }
    3960           0 :                 NDR_CHECK(ndr_pull_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quotalimits));
    3961           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->system_flags));
    3962           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    3963           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    3964           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    3965           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    3966           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    3967           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    3968           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    3969           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    3970           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    3971           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    3972           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3973             :         }
    3974           0 :         if (ndr_flags & NDR_BUFFERS) {
    3975           0 :                 if (r->privilege_attrib) {
    3976           0 :                         _mem_save_privilege_attrib_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3977           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->privilege_attrib, 0);
    3978           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->privilege_attrib));
    3979           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->privilege_attrib, &size_privilege_attrib_1));
    3980           0 :                         NDR_PULL_ALLOC_N(ndr, r->privilege_attrib, size_privilege_attrib_1);
    3981           0 :                         _mem_save_privilege_attrib_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3982           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->privilege_attrib, 0);
    3983           0 :                         for (cntr_privilege_attrib_1 = 0; cntr_privilege_attrib_1 < (size_privilege_attrib_1); cntr_privilege_attrib_1++) {
    3984           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_attrib[cntr_privilege_attrib_1]));
    3985             :                         }
    3986           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_attrib_1, 0);
    3987           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_attrib_0, 0);
    3988             :                 }
    3989           0 :                 if (r->privilege_name) {
    3990           0 :                         _mem_save_privilege_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3991           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->privilege_name, 0);
    3992           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->privilege_name));
    3993           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->privilege_name, &size_privilege_name_1));
    3994           0 :                         NDR_PULL_ALLOC_N(ndr, r->privilege_name, size_privilege_name_1);
    3995           0 :                         _mem_save_privilege_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3996           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->privilege_name, 0);
    3997           0 :                         for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (size_privilege_name_1); cntr_privilege_name_1++) {
    3998           0 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->privilege_name[cntr_privilege_name_1]));
    3999             :                         }
    4000           0 :                         for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (size_privilege_name_1); cntr_privilege_name_1++) {
    4001           0 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->privilege_name[cntr_privilege_name_1]));
    4002             :                         }
    4003           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_name_1, 0);
    4004           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_name_0, 0);
    4005             :                 }
    4006           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    4007           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    4008           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    4009           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    4010           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    4011           0 :                 if (r->privilege_attrib) {
    4012           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->privilege_attrib, r->privilege_entries));
    4013             :                 }
    4014           0 :                 if (r->privilege_name) {
    4015           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->privilege_name, r->privilege_entries));
    4016             :                 }
    4017           0 :                 for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (size_privilege_name_1); cntr_privilege_name_1++) {
    4018           0 :                 }
    4019             :         }
    4020           0 :         return NDR_ERR_SUCCESS;
    4021             : }
    4022             : 
    4023           0 : _PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ACCOUNT *r)
    4024             : {
    4025           0 :         uint32_t cntr_privilege_attrib_1;
    4026           0 :         uint32_t cntr_privilege_name_1;
    4027           0 :         ndr_print_struct(ndr, name, "netr_DELTA_ACCOUNT");
    4028           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4029           0 :         ndr->depth++;
    4030           0 :         ndr_print_uint32(ndr, "privilege_entries", r->privilege_entries);
    4031           0 :         ndr_print_uint32(ndr, "privilege_control", r->privilege_control);
    4032           0 :         ndr_print_ptr(ndr, "privilege_attrib", r->privilege_attrib);
    4033           0 :         ndr->depth++;
    4034           0 :         if (r->privilege_attrib) {
    4035           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "privilege_attrib", (uint32_t)(r->privilege_entries));
    4036           0 :                 ndr->depth++;
    4037           0 :                 for (cntr_privilege_attrib_1 = 0; cntr_privilege_attrib_1 < (r->privilege_entries); cntr_privilege_attrib_1++) {
    4038           0 :                         ndr_print_uint32(ndr, "privilege_attrib", r->privilege_attrib[cntr_privilege_attrib_1]);
    4039             :                 }
    4040           0 :                 ndr->depth--;
    4041             :         }
    4042           0 :         ndr->depth--;
    4043           0 :         ndr_print_ptr(ndr, "privilege_name", r->privilege_name);
    4044           0 :         ndr->depth++;
    4045           0 :         if (r->privilege_name) {
    4046           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "privilege_name", (uint32_t)(r->privilege_entries));
    4047           0 :                 ndr->depth++;
    4048           0 :                 for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < (r->privilege_entries); cntr_privilege_name_1++) {
    4049           0 :                         ndr_print_lsa_String(ndr, "privilege_name", &r->privilege_name[cntr_privilege_name_1]);
    4050             :                 }
    4051           0 :                 ndr->depth--;
    4052             :         }
    4053           0 :         ndr->depth--;
    4054           0 :         ndr_print_netr_QUOTA_LIMITS(ndr, "quotalimits", &r->quotalimits);
    4055           0 :         ndr_print_uint32(ndr, "system_flags", r->system_flags);
    4056           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    4057           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    4058           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    4059           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    4060           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    4061           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    4062           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    4063           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    4064           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    4065           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    4066           0 :         ndr->depth--;
    4067             : }
    4068             : 
    4069           0 : static enum ndr_err_code ndr_push_netr_CIPHER_VALUE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_CIPHER_VALUE *r)
    4070             : {
    4071           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4072           0 :         if (ndr_flags & NDR_SCALARS) {
    4073           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4074           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
    4075           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlen));
    4076           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->cipher_data));
    4077           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4078             :         }
    4079           0 :         if (ndr_flags & NDR_BUFFERS) {
    4080           0 :                 if (r->cipher_data) {
    4081           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->maxlen));
    4082           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4083           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->len));
    4084           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->cipher_data, r->len));
    4085             :                 }
    4086             :         }
    4087           0 :         return NDR_ERR_SUCCESS;
    4088             : }
    4089             : 
    4090           0 : static enum ndr_err_code ndr_pull_netr_CIPHER_VALUE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_CIPHER_VALUE *r)
    4091             : {
    4092           0 :         uint32_t _ptr_cipher_data;
    4093           0 :         uint32_t size_cipher_data_1 = 0;
    4094           0 :         uint32_t length_cipher_data_1 = 0;
    4095           0 :         TALLOC_CTX *_mem_save_cipher_data_0 = NULL;
    4096           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4097           0 :         if (ndr_flags & NDR_SCALARS) {
    4098           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4099           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
    4100           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlen));
    4101           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_cipher_data));
    4102           0 :                 if (_ptr_cipher_data) {
    4103           0 :                         NDR_PULL_ALLOC(ndr, r->cipher_data);
    4104             :                 } else {
    4105           0 :                         r->cipher_data = NULL;
    4106             :                 }
    4107           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4108             :         }
    4109           0 :         if (ndr_flags & NDR_BUFFERS) {
    4110           0 :                 if (r->cipher_data) {
    4111           0 :                         _mem_save_cipher_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4112           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->cipher_data, 0);
    4113           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->cipher_data));
    4114           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->cipher_data));
    4115           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->cipher_data, &size_cipher_data_1));
    4116           0 :                         NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->cipher_data, &length_cipher_data_1));
    4117           0 :                         if (length_cipher_data_1 > size_cipher_data_1) {
    4118           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_cipher_data_1, length_cipher_data_1);
    4119             :                         }
    4120           0 :                         NDR_PULL_ALLOC_N(ndr, r->cipher_data, size_cipher_data_1);
    4121           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->cipher_data, length_cipher_data_1));
    4122           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cipher_data_0, 0);
    4123             :                 }
    4124           0 :                 if (r->cipher_data) {
    4125           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->cipher_data, r->maxlen));
    4126             :                 }
    4127           0 :                 if (r->cipher_data) {
    4128           0 :                         NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->cipher_data, r->len));
    4129             :                 }
    4130             :         }
    4131           0 :         return NDR_ERR_SUCCESS;
    4132             : }
    4133             : 
    4134           0 : _PUBLIC_ void ndr_print_netr_CIPHER_VALUE(struct ndr_print *ndr, const char *name, const struct netr_CIPHER_VALUE *r)
    4135             : {
    4136           0 :         ndr_print_struct(ndr, name, "netr_CIPHER_VALUE");
    4137           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4138           0 :         ndr->depth++;
    4139           0 :         ndr_print_uint32(ndr, "len", r->len);
    4140           0 :         ndr_print_uint32(ndr, "maxlen", r->maxlen);
    4141           0 :         ndr_print_ptr(ndr, "cipher_data", r->cipher_data);
    4142           0 :         ndr->depth++;
    4143           0 :         if (r->cipher_data) {
    4144           0 :                 ndr_print_array_uint8(ndr, "cipher_data", r->cipher_data, r->len);
    4145             :         }
    4146           0 :         ndr->depth--;
    4147           0 :         ndr->depth--;
    4148             : }
    4149             : 
    4150           0 : static enum ndr_err_code ndr_push_netr_DELTA_SECRET(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_SECRET *r)
    4151             : {
    4152           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4153           0 :         if (ndr_flags & NDR_SCALARS) {
    4154           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4155           0 :                 NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->current_cipher));
    4156           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->current_cipher_set_time));
    4157           0 :                 NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->old_cipher));
    4158           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->old_cipher_set_time));
    4159           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
    4160           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    4161           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    4162           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    4163           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    4164           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    4165           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    4166           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    4167           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
    4168           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
    4169           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4170             :         }
    4171           0 :         if (ndr_flags & NDR_BUFFERS) {
    4172           0 :                 NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->current_cipher));
    4173           0 :                 NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->old_cipher));
    4174           0 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    4175           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    4176           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    4177           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    4178           0 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    4179             :         }
    4180           0 :         return NDR_ERR_SUCCESS;
    4181             : }
    4182             : 
    4183           0 : static enum ndr_err_code ndr_pull_netr_DELTA_SECRET(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_SECRET *r)
    4184             : {
    4185           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4186           0 :         if (ndr_flags & NDR_SCALARS) {
    4187           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4188           0 :                 NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->current_cipher));
    4189           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->current_cipher_set_time));
    4190           0 :                 NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->old_cipher));
    4191           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->old_cipher_set_time));
    4192           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
    4193           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
    4194           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
    4195           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
    4196           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
    4197           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
    4198           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    4199           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    4200           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
    4201           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
    4202           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4203             :         }
    4204           0 :         if (ndr_flags & NDR_BUFFERS) {
    4205           0 :                 NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->current_cipher));
    4206           0 :                 NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->old_cipher));
    4207           0 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
    4208           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
    4209           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
    4210           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
    4211           0 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
    4212             :         }
    4213           0 :         return NDR_ERR_SUCCESS;
    4214             : }
    4215             : 
    4216           0 : _PUBLIC_ void ndr_print_netr_DELTA_SECRET(struct ndr_print *ndr, const char *name, const struct netr_DELTA_SECRET *r)
    4217             : {
    4218           0 :         ndr_print_struct(ndr, name, "netr_DELTA_SECRET");
    4219           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4220           0 :         ndr->depth++;
    4221           0 :         ndr_print_netr_CIPHER_VALUE(ndr, "current_cipher", &r->current_cipher);
    4222           0 :         ndr_print_NTTIME(ndr, "current_cipher_set_time", r->current_cipher_set_time);
    4223           0 :         ndr_print_netr_CIPHER_VALUE(ndr, "old_cipher", &r->old_cipher);
    4224           0 :         ndr_print_NTTIME(ndr, "old_cipher_set_time", r->old_cipher_set_time);
    4225           0 :         ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
    4226           0 :         ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
    4227           0 :         ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
    4228           0 :         ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
    4229           0 :         ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
    4230           0 :         ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
    4231           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    4232           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    4233           0 :         ndr_print_uint32(ndr, "unknown7", r->unknown7);
    4234           0 :         ndr_print_uint32(ndr, "unknown8", r->unknown8);
    4235           0 :         ndr->depth--;
    4236             : }
    4237             : 
    4238           0 : static enum ndr_err_code ndr_push_netr_DeltaEnum(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_DeltaEnum r)
    4239             : {
    4240           0 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
    4241           0 :         return NDR_ERR_SUCCESS;
    4242             : }
    4243             : 
    4244           0 : static enum ndr_err_code ndr_pull_netr_DeltaEnum(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_DeltaEnum *r)
    4245             : {
    4246           0 :         uint16_t v;
    4247           0 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
    4248           0 :         *r = v;
    4249           0 :         return NDR_ERR_SUCCESS;
    4250             : }
    4251             : 
    4252           0 : _PUBLIC_ void ndr_print_netr_DeltaEnum(struct ndr_print *ndr, const char *name, enum netr_DeltaEnum r)
    4253             : {
    4254           0 :         const char *val = NULL;
    4255             : 
    4256           0 :         switch (r) {
    4257           0 :                 case NETR_DELTA_DOMAIN: val = "NETR_DELTA_DOMAIN"; break;
    4258           0 :                 case NETR_DELTA_GROUP: val = "NETR_DELTA_GROUP"; break;
    4259           0 :                 case NETR_DELTA_DELETE_GROUP: val = "NETR_DELTA_DELETE_GROUP"; break;
    4260           0 :                 case NETR_DELTA_RENAME_GROUP: val = "NETR_DELTA_RENAME_GROUP"; break;
    4261           0 :                 case NETR_DELTA_USER: val = "NETR_DELTA_USER"; break;
    4262           0 :                 case NETR_DELTA_DELETE_USER: val = "NETR_DELTA_DELETE_USER"; break;
    4263           0 :                 case NETR_DELTA_RENAME_USER: val = "NETR_DELTA_RENAME_USER"; break;
    4264           0 :                 case NETR_DELTA_GROUP_MEMBER: val = "NETR_DELTA_GROUP_MEMBER"; break;
    4265           0 :                 case NETR_DELTA_ALIAS: val = "NETR_DELTA_ALIAS"; break;
    4266           0 :                 case NETR_DELTA_DELETE_ALIAS: val = "NETR_DELTA_DELETE_ALIAS"; break;
    4267           0 :                 case NETR_DELTA_RENAME_ALIAS: val = "NETR_DELTA_RENAME_ALIAS"; break;
    4268           0 :                 case NETR_DELTA_ALIAS_MEMBER: val = "NETR_DELTA_ALIAS_MEMBER"; break;
    4269           0 :                 case NETR_DELTA_POLICY: val = "NETR_DELTA_POLICY"; break;
    4270           0 :                 case NETR_DELTA_TRUSTED_DOMAIN: val = "NETR_DELTA_TRUSTED_DOMAIN"; break;
    4271           0 :                 case NETR_DELTA_DELETE_TRUST: val = "NETR_DELTA_DELETE_TRUST"; break;
    4272           0 :                 case NETR_DELTA_ACCOUNT: val = "NETR_DELTA_ACCOUNT"; break;
    4273           0 :                 case NETR_DELTA_DELETE_ACCOUNT: val = "NETR_DELTA_DELETE_ACCOUNT"; break;
    4274           0 :                 case NETR_DELTA_SECRET: val = "NETR_DELTA_SECRET"; break;
    4275           0 :                 case NETR_DELTA_DELETE_SECRET: val = "NETR_DELTA_DELETE_SECRET"; break;
    4276           0 :                 case NETR_DELTA_DELETE_GROUP2: val = "NETR_DELTA_DELETE_GROUP2"; break;
    4277           0 :                 case NETR_DELTA_DELETE_USER2: val = "NETR_DELTA_DELETE_USER2"; break;
    4278           0 :                 case NETR_DELTA_MODIFY_COUNT: val = "NETR_DELTA_MODIFY_COUNT"; break;
    4279             :         }
    4280           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    4281           0 : }
    4282             : 
    4283           0 : static enum ndr_err_code ndr_push_netr_DELTA_UNION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_DELTA_UNION *r)
    4284             : {
    4285           0 :         uint32_t level;
    4286           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4287           0 :         if (ndr_flags & NDR_SCALARS) {
    4288             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4289           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4290           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4291           0 :                 NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, level));
    4292             :                 /* ms_union is always aligned to the largest union arm*/
    4293           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4294           0 :                 switch (level) {
    4295           0 :                         case NETR_DELTA_DOMAIN: {
    4296           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    4297           0 :                         break; }
    4298             : 
    4299           0 :                         case NETR_DELTA_GROUP: {
    4300           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->group));
    4301           0 :                         break; }
    4302             : 
    4303           0 :                         case NETR_DELTA_DELETE_GROUP: {
    4304           0 :                         break; }
    4305             : 
    4306           0 :                         case NETR_DELTA_RENAME_GROUP: {
    4307           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_group));
    4308           0 :                         break; }
    4309             : 
    4310           0 :                         case NETR_DELTA_USER: {
    4311           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
    4312           0 :                         break; }
    4313             : 
    4314           0 :                         case NETR_DELTA_DELETE_USER: {
    4315           0 :                         break; }
    4316             : 
    4317           0 :                         case NETR_DELTA_RENAME_USER: {
    4318           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_user));
    4319           0 :                         break; }
    4320             : 
    4321           0 :                         case NETR_DELTA_GROUP_MEMBER: {
    4322           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->group_member));
    4323           0 :                         break; }
    4324             : 
    4325           0 :                         case NETR_DELTA_ALIAS: {
    4326           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alias));
    4327           0 :                         break; }
    4328             : 
    4329           0 :                         case NETR_DELTA_DELETE_ALIAS: {
    4330           0 :                         break; }
    4331             : 
    4332           0 :                         case NETR_DELTA_RENAME_ALIAS: {
    4333           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_alias));
    4334           0 :                         break; }
    4335             : 
    4336           0 :                         case NETR_DELTA_ALIAS_MEMBER: {
    4337           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alias_member));
    4338           0 :                         break; }
    4339             : 
    4340           0 :                         case NETR_DELTA_POLICY: {
    4341           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->policy));
    4342           0 :                         break; }
    4343             : 
    4344           0 :                         case NETR_DELTA_TRUSTED_DOMAIN: {
    4345           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_domain));
    4346           0 :                         break; }
    4347             : 
    4348           0 :                         case NETR_DELTA_DELETE_TRUST: {
    4349           0 :                         break; }
    4350             : 
    4351           0 :                         case NETR_DELTA_ACCOUNT: {
    4352           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->account));
    4353           0 :                         break; }
    4354             : 
    4355           0 :                         case NETR_DELTA_DELETE_ACCOUNT: {
    4356           0 :                         break; }
    4357             : 
    4358           0 :                         case NETR_DELTA_SECRET: {
    4359           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->secret));
    4360           0 :                         break; }
    4361             : 
    4362           0 :                         case NETR_DELTA_DELETE_SECRET: {
    4363           0 :                         break; }
    4364             : 
    4365           0 :                         case NETR_DELTA_DELETE_GROUP2: {
    4366           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_group));
    4367           0 :                         break; }
    4368             : 
    4369           0 :                         case NETR_DELTA_DELETE_USER2: {
    4370           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_user));
    4371           0 :                         break; }
    4372             : 
    4373           0 :                         case NETR_DELTA_MODIFY_COUNT: {
    4374           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->modified_count));
    4375           0 :                         break; }
    4376             : 
    4377           0 :                         default: {
    4378           0 :                         break; }
    4379             : 
    4380             :                 }
    4381             :         }
    4382           0 :         if (ndr_flags & NDR_BUFFERS) {
    4383           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4384             :                         /* We didn't get it above, and the token is not needed after this. */
    4385           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4386             :                 }
    4387           0 :                 switch (level) {
    4388           0 :                         case NETR_DELTA_DOMAIN:
    4389           0 :                                 if (r->domain) {
    4390           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
    4391             :                                 }
    4392           0 :                         break;
    4393             : 
    4394           0 :                         case NETR_DELTA_GROUP:
    4395           0 :                                 if (r->group) {
    4396           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_GROUP(ndr, NDR_SCALARS|NDR_BUFFERS, r->group));
    4397             :                                 }
    4398           0 :                         break;
    4399             : 
    4400           0 :                         case NETR_DELTA_DELETE_GROUP:
    4401           0 :                         break;
    4402             : 
    4403           0 :                         case NETR_DELTA_RENAME_GROUP:
    4404           0 :                                 if (r->rename_group) {
    4405           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_group));
    4406             :                                 }
    4407           0 :                         break;
    4408             : 
    4409           0 :                         case NETR_DELTA_USER:
    4410           0 :                                 if (r->user) {
    4411           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->user));
    4412             :                                 }
    4413           0 :                         break;
    4414             : 
    4415           0 :                         case NETR_DELTA_DELETE_USER:
    4416           0 :                         break;
    4417             : 
    4418           0 :                         case NETR_DELTA_RENAME_USER:
    4419           0 :                                 if (r->rename_user) {
    4420           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_user));
    4421             :                                 }
    4422           0 :                         break;
    4423             : 
    4424           0 :                         case NETR_DELTA_GROUP_MEMBER:
    4425           0 :                                 if (r->group_member) {
    4426           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_GROUP_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->group_member));
    4427             :                                 }
    4428           0 :                         break;
    4429             : 
    4430           0 :                         case NETR_DELTA_ALIAS:
    4431           0 :                                 if (r->alias) {
    4432           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_ALIAS(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias));
    4433             :                                 }
    4434           0 :                         break;
    4435             : 
    4436           0 :                         case NETR_DELTA_DELETE_ALIAS:
    4437           0 :                         break;
    4438             : 
    4439           0 :                         case NETR_DELTA_RENAME_ALIAS:
    4440           0 :                                 if (r->rename_alias) {
    4441           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_alias));
    4442             :                                 }
    4443           0 :                         break;
    4444             : 
    4445           0 :                         case NETR_DELTA_ALIAS_MEMBER:
    4446           0 :                                 if (r->alias_member) {
    4447           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_ALIAS_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias_member));
    4448             :                                 }
    4449           0 :                         break;
    4450             : 
    4451           0 :                         case NETR_DELTA_POLICY:
    4452           0 :                                 if (r->policy) {
    4453           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_POLICY(ndr, NDR_SCALARS|NDR_BUFFERS, r->policy));
    4454             :                                 }
    4455           0 :                         break;
    4456             : 
    4457           0 :                         case NETR_DELTA_TRUSTED_DOMAIN:
    4458           0 :                                 if (r->trusted_domain) {
    4459           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_TRUSTED_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->trusted_domain));
    4460             :                                 }
    4461           0 :                         break;
    4462             : 
    4463           0 :                         case NETR_DELTA_DELETE_TRUST:
    4464           0 :                         break;
    4465             : 
    4466           0 :                         case NETR_DELTA_ACCOUNT:
    4467           0 :                                 if (r->account) {
    4468           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_ACCOUNT(ndr, NDR_SCALARS|NDR_BUFFERS, r->account));
    4469             :                                 }
    4470           0 :                         break;
    4471             : 
    4472           0 :                         case NETR_DELTA_DELETE_ACCOUNT:
    4473           0 :                         break;
    4474             : 
    4475           0 :                         case NETR_DELTA_SECRET:
    4476           0 :                                 if (r->secret) {
    4477           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_SECRET(ndr, NDR_SCALARS|NDR_BUFFERS, r->secret));
    4478             :                                 }
    4479           0 :                         break;
    4480             : 
    4481           0 :                         case NETR_DELTA_DELETE_SECRET:
    4482           0 :                         break;
    4483             : 
    4484           0 :                         case NETR_DELTA_DELETE_GROUP2:
    4485           0 :                                 if (r->delete_group) {
    4486           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_group));
    4487             :                                 }
    4488           0 :                         break;
    4489             : 
    4490           0 :                         case NETR_DELTA_DELETE_USER2:
    4491           0 :                                 if (r->delete_user) {
    4492           0 :                                         NDR_CHECK(ndr_push_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_user));
    4493             :                                 }
    4494           0 :                         break;
    4495             : 
    4496           0 :                         case NETR_DELTA_MODIFY_COUNT:
    4497           0 :                                 if (r->modified_count) {
    4498           0 :                                         NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, *r->modified_count));
    4499             :                                 }
    4500           0 :                         break;
    4501             : 
    4502           0 :                         default:
    4503           0 :                         break;
    4504             : 
    4505             :                 }
    4506             :         }
    4507           0 :         return NDR_ERR_SUCCESS;
    4508             : }
    4509             : 
    4510           0 : static enum ndr_err_code ndr_pull_netr_DELTA_UNION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_DELTA_UNION *r)
    4511             : {
    4512           0 :         uint32_t level;
    4513           0 :         uint16_t _level;
    4514           0 :         TALLOC_CTX *_mem_save_domain_0 = NULL;
    4515           0 :         uint32_t _ptr_domain;
    4516           0 :         TALLOC_CTX *_mem_save_group_0 = NULL;
    4517           0 :         uint32_t _ptr_group;
    4518           0 :         TALLOC_CTX *_mem_save_rename_group_0 = NULL;
    4519           0 :         uint32_t _ptr_rename_group;
    4520           0 :         TALLOC_CTX *_mem_save_user_0 = NULL;
    4521           0 :         uint32_t _ptr_user;
    4522           0 :         TALLOC_CTX *_mem_save_rename_user_0 = NULL;
    4523           0 :         uint32_t _ptr_rename_user;
    4524           0 :         TALLOC_CTX *_mem_save_group_member_0 = NULL;
    4525           0 :         uint32_t _ptr_group_member;
    4526           0 :         TALLOC_CTX *_mem_save_alias_0 = NULL;
    4527           0 :         uint32_t _ptr_alias;
    4528           0 :         TALLOC_CTX *_mem_save_rename_alias_0 = NULL;
    4529           0 :         uint32_t _ptr_rename_alias;
    4530           0 :         TALLOC_CTX *_mem_save_alias_member_0 = NULL;
    4531           0 :         uint32_t _ptr_alias_member;
    4532           0 :         TALLOC_CTX *_mem_save_policy_0 = NULL;
    4533           0 :         uint32_t _ptr_policy;
    4534           0 :         TALLOC_CTX *_mem_save_trusted_domain_0 = NULL;
    4535           0 :         uint32_t _ptr_trusted_domain;
    4536           0 :         TALLOC_CTX *_mem_save_account_0 = NULL;
    4537           0 :         uint32_t _ptr_account;
    4538           0 :         TALLOC_CTX *_mem_save_secret_0 = NULL;
    4539           0 :         uint32_t _ptr_secret;
    4540           0 :         TALLOC_CTX *_mem_save_delete_group_0 = NULL;
    4541           0 :         uint32_t _ptr_delete_group;
    4542           0 :         TALLOC_CTX *_mem_save_delete_user_0 = NULL;
    4543           0 :         uint32_t _ptr_delete_user;
    4544           0 :         TALLOC_CTX *_mem_save_modified_count_0 = NULL;
    4545           0 :         uint32_t _ptr_modified_count;
    4546           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4547           0 :         if (ndr_flags & NDR_SCALARS) {
    4548             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4549           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4550           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4551           0 :                 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
    4552           0 :                 if (_level != level) {
    4553           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
    4554             :                 }
    4555             :                 /* ms_union is always aligned to the largest union arm*/
    4556           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4557           0 :                 switch (level) {
    4558           0 :                         case NETR_DELTA_DOMAIN: {
    4559           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    4560           0 :                                 if (_ptr_domain) {
    4561           0 :                                         NDR_PULL_ALLOC(ndr, r->domain);
    4562             :                                 } else {
    4563           0 :                                         r->domain = NULL;
    4564             :                                 }
    4565           0 :                         break; }
    4566             : 
    4567           0 :                         case NETR_DELTA_GROUP: {
    4568           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group));
    4569           0 :                                 if (_ptr_group) {
    4570           0 :                                         NDR_PULL_ALLOC(ndr, r->group);
    4571             :                                 } else {
    4572           0 :                                         r->group = NULL;
    4573             :                                 }
    4574           0 :                         break; }
    4575             : 
    4576           0 :                         case NETR_DELTA_DELETE_GROUP: {
    4577           0 :                         break; }
    4578             : 
    4579           0 :                         case NETR_DELTA_RENAME_GROUP: {
    4580           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_group));
    4581           0 :                                 if (_ptr_rename_group) {
    4582           0 :                                         NDR_PULL_ALLOC(ndr, r->rename_group);
    4583             :                                 } else {
    4584           0 :                                         r->rename_group = NULL;
    4585             :                                 }
    4586           0 :                         break; }
    4587             : 
    4588           0 :                         case NETR_DELTA_USER: {
    4589           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
    4590           0 :                                 if (_ptr_user) {
    4591           0 :                                         NDR_PULL_ALLOC(ndr, r->user);
    4592             :                                 } else {
    4593           0 :                                         r->user = NULL;
    4594             :                                 }
    4595           0 :                         break; }
    4596             : 
    4597           0 :                         case NETR_DELTA_DELETE_USER: {
    4598           0 :                         break; }
    4599             : 
    4600           0 :                         case NETR_DELTA_RENAME_USER: {
    4601           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_user));
    4602           0 :                                 if (_ptr_rename_user) {
    4603           0 :                                         NDR_PULL_ALLOC(ndr, r->rename_user);
    4604             :                                 } else {
    4605           0 :                                         r->rename_user = NULL;
    4606             :                                 }
    4607           0 :                         break; }
    4608             : 
    4609           0 :                         case NETR_DELTA_GROUP_MEMBER: {
    4610           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_member));
    4611           0 :                                 if (_ptr_group_member) {
    4612           0 :                                         NDR_PULL_ALLOC(ndr, r->group_member);
    4613             :                                 } else {
    4614           0 :                                         r->group_member = NULL;
    4615             :                                 }
    4616           0 :                         break; }
    4617             : 
    4618           0 :                         case NETR_DELTA_ALIAS: {
    4619           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alias));
    4620           0 :                                 if (_ptr_alias) {
    4621           0 :                                         NDR_PULL_ALLOC(ndr, r->alias);
    4622             :                                 } else {
    4623           0 :                                         r->alias = NULL;
    4624             :                                 }
    4625           0 :                         break; }
    4626             : 
    4627           0 :                         case NETR_DELTA_DELETE_ALIAS: {
    4628           0 :                         break; }
    4629             : 
    4630           0 :                         case NETR_DELTA_RENAME_ALIAS: {
    4631           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_alias));
    4632           0 :                                 if (_ptr_rename_alias) {
    4633           0 :                                         NDR_PULL_ALLOC(ndr, r->rename_alias);
    4634             :                                 } else {
    4635           0 :                                         r->rename_alias = NULL;
    4636             :                                 }
    4637           0 :                         break; }
    4638             : 
    4639           0 :                         case NETR_DELTA_ALIAS_MEMBER: {
    4640           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alias_member));
    4641           0 :                                 if (_ptr_alias_member) {
    4642           0 :                                         NDR_PULL_ALLOC(ndr, r->alias_member);
    4643             :                                 } else {
    4644           0 :                                         r->alias_member = NULL;
    4645             :                                 }
    4646           0 :                         break; }
    4647             : 
    4648           0 :                         case NETR_DELTA_POLICY: {
    4649           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_policy));
    4650           0 :                                 if (_ptr_policy) {
    4651           0 :                                         NDR_PULL_ALLOC(ndr, r->policy);
    4652             :                                 } else {
    4653           0 :                                         r->policy = NULL;
    4654             :                                 }
    4655           0 :                         break; }
    4656             : 
    4657           0 :                         case NETR_DELTA_TRUSTED_DOMAIN: {
    4658           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domain));
    4659           0 :                                 if (_ptr_trusted_domain) {
    4660           0 :                                         NDR_PULL_ALLOC(ndr, r->trusted_domain);
    4661             :                                 } else {
    4662           0 :                                         r->trusted_domain = NULL;
    4663             :                                 }
    4664           0 :                         break; }
    4665             : 
    4666           0 :                         case NETR_DELTA_DELETE_TRUST: {
    4667           0 :                         break; }
    4668             : 
    4669           0 :                         case NETR_DELTA_ACCOUNT: {
    4670           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account));
    4671           0 :                                 if (_ptr_account) {
    4672           0 :                                         NDR_PULL_ALLOC(ndr, r->account);
    4673             :                                 } else {
    4674           0 :                                         r->account = NULL;
    4675             :                                 }
    4676           0 :                         break; }
    4677             : 
    4678           0 :                         case NETR_DELTA_DELETE_ACCOUNT: {
    4679           0 :                         break; }
    4680             : 
    4681           0 :                         case NETR_DELTA_SECRET: {
    4682           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secret));
    4683           0 :                                 if (_ptr_secret) {
    4684           0 :                                         NDR_PULL_ALLOC(ndr, r->secret);
    4685             :                                 } else {
    4686           0 :                                         r->secret = NULL;
    4687             :                                 }
    4688           0 :                         break; }
    4689             : 
    4690           0 :                         case NETR_DELTA_DELETE_SECRET: {
    4691           0 :                         break; }
    4692             : 
    4693           0 :                         case NETR_DELTA_DELETE_GROUP2: {
    4694           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delete_group));
    4695           0 :                                 if (_ptr_delete_group) {
    4696           0 :                                         NDR_PULL_ALLOC(ndr, r->delete_group);
    4697             :                                 } else {
    4698           0 :                                         r->delete_group = NULL;
    4699             :                                 }
    4700           0 :                         break; }
    4701             : 
    4702           0 :                         case NETR_DELTA_DELETE_USER2: {
    4703           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delete_user));
    4704           0 :                                 if (_ptr_delete_user) {
    4705           0 :                                         NDR_PULL_ALLOC(ndr, r->delete_user);
    4706             :                                 } else {
    4707           0 :                                         r->delete_user = NULL;
    4708             :                                 }
    4709           0 :                         break; }
    4710             : 
    4711           0 :                         case NETR_DELTA_MODIFY_COUNT: {
    4712           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_modified_count));
    4713           0 :                                 if (_ptr_modified_count) {
    4714           0 :                                         NDR_PULL_ALLOC(ndr, r->modified_count);
    4715             :                                 } else {
    4716           0 :                                         r->modified_count = NULL;
    4717             :                                 }
    4718           0 :                         break; }
    4719             : 
    4720           0 :                         default: {
    4721           0 :                         break; }
    4722             : 
    4723             :                 }
    4724             :         }
    4725           0 :         if (ndr_flags & NDR_BUFFERS) {
    4726           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4727             :                         /* We didn't get it above, and the token is not needed after this. */
    4728           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4729             :                 }
    4730           0 :                 switch (level) {
    4731           0 :                         case NETR_DELTA_DOMAIN:
    4732           0 :                                 if (r->domain) {
    4733           0 :                                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4734           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    4735           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
    4736           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    4737             :                                 }
    4738           0 :                         break;
    4739             : 
    4740           0 :                         case NETR_DELTA_GROUP:
    4741           0 :                                 if (r->group) {
    4742           0 :                                         _mem_save_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4743           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->group, 0);
    4744           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_GROUP(ndr, NDR_SCALARS|NDR_BUFFERS, r->group));
    4745           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_0, 0);
    4746             :                                 }
    4747           0 :                         break;
    4748             : 
    4749           0 :                         case NETR_DELTA_DELETE_GROUP:
    4750           0 :                         break;
    4751             : 
    4752           0 :                         case NETR_DELTA_RENAME_GROUP:
    4753           0 :                                 if (r->rename_group) {
    4754           0 :                                         _mem_save_rename_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4755           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->rename_group, 0);
    4756           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_group));
    4757           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_group_0, 0);
    4758             :                                 }
    4759           0 :                         break;
    4760             : 
    4761           0 :                         case NETR_DELTA_USER:
    4762           0 :                                 if (r->user) {
    4763           0 :                                         _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4764           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
    4765           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->user));
    4766           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
    4767             :                                 }
    4768           0 :                         break;
    4769             : 
    4770           0 :                         case NETR_DELTA_DELETE_USER:
    4771           0 :                         break;
    4772             : 
    4773           0 :                         case NETR_DELTA_RENAME_USER:
    4774           0 :                                 if (r->rename_user) {
    4775           0 :                                         _mem_save_rename_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4776           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->rename_user, 0);
    4777           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_user));
    4778           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_user_0, 0);
    4779             :                                 }
    4780           0 :                         break;
    4781             : 
    4782           0 :                         case NETR_DELTA_GROUP_MEMBER:
    4783           0 :                                 if (r->group_member) {
    4784           0 :                                         _mem_save_group_member_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4785           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->group_member, 0);
    4786           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_GROUP_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->group_member));
    4787           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_member_0, 0);
    4788             :                                 }
    4789           0 :                         break;
    4790             : 
    4791           0 :                         case NETR_DELTA_ALIAS:
    4792           0 :                                 if (r->alias) {
    4793           0 :                                         _mem_save_alias_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4794           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->alias, 0);
    4795           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_ALIAS(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias));
    4796           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_0, 0);
    4797             :                                 }
    4798           0 :                         break;
    4799             : 
    4800           0 :                         case NETR_DELTA_DELETE_ALIAS:
    4801           0 :                         break;
    4802             : 
    4803           0 :                         case NETR_DELTA_RENAME_ALIAS:
    4804           0 :                                 if (r->rename_alias) {
    4805           0 :                                         _mem_save_rename_alias_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4806           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->rename_alias, 0);
    4807           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_alias));
    4808           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_alias_0, 0);
    4809             :                                 }
    4810           0 :                         break;
    4811             : 
    4812           0 :                         case NETR_DELTA_ALIAS_MEMBER:
    4813           0 :                                 if (r->alias_member) {
    4814           0 :                                         _mem_save_alias_member_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4815           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->alias_member, 0);
    4816           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_ALIAS_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias_member));
    4817           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_member_0, 0);
    4818             :                                 }
    4819           0 :                         break;
    4820             : 
    4821           0 :                         case NETR_DELTA_POLICY:
    4822           0 :                                 if (r->policy) {
    4823           0 :                                         _mem_save_policy_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4824           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->policy, 0);
    4825           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_POLICY(ndr, NDR_SCALARS|NDR_BUFFERS, r->policy));
    4826           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_0, 0);
    4827             :                                 }
    4828           0 :                         break;
    4829             : 
    4830           0 :                         case NETR_DELTA_TRUSTED_DOMAIN:
    4831           0 :                                 if (r->trusted_domain) {
    4832           0 :                                         _mem_save_trusted_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4833           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domain, 0);
    4834           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_TRUSTED_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->trusted_domain));
    4835           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_0, 0);
    4836             :                                 }
    4837           0 :                         break;
    4838             : 
    4839           0 :                         case NETR_DELTA_DELETE_TRUST:
    4840           0 :                         break;
    4841             : 
    4842           0 :                         case NETR_DELTA_ACCOUNT:
    4843           0 :                                 if (r->account) {
    4844           0 :                                         _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4845           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->account, 0);
    4846           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_ACCOUNT(ndr, NDR_SCALARS|NDR_BUFFERS, r->account));
    4847           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, 0);
    4848             :                                 }
    4849           0 :                         break;
    4850             : 
    4851           0 :                         case NETR_DELTA_DELETE_ACCOUNT:
    4852           0 :                         break;
    4853             : 
    4854           0 :                         case NETR_DELTA_SECRET:
    4855           0 :                                 if (r->secret) {
    4856           0 :                                         _mem_save_secret_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4857           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->secret, 0);
    4858           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_SECRET(ndr, NDR_SCALARS|NDR_BUFFERS, r->secret));
    4859           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secret_0, 0);
    4860             :                                 }
    4861           0 :                         break;
    4862             : 
    4863           0 :                         case NETR_DELTA_DELETE_SECRET:
    4864           0 :                         break;
    4865             : 
    4866           0 :                         case NETR_DELTA_DELETE_GROUP2:
    4867           0 :                                 if (r->delete_group) {
    4868           0 :                                         _mem_save_delete_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4869           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->delete_group, 0);
    4870           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_group));
    4871           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_group_0, 0);
    4872             :                                 }
    4873           0 :                         break;
    4874             : 
    4875           0 :                         case NETR_DELTA_DELETE_USER2:
    4876           0 :                                 if (r->delete_user) {
    4877           0 :                                         _mem_save_delete_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4878           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->delete_user, 0);
    4879           0 :                                         NDR_CHECK(ndr_pull_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_user));
    4880           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_user_0, 0);
    4881             :                                 }
    4882           0 :                         break;
    4883             : 
    4884           0 :                         case NETR_DELTA_MODIFY_COUNT:
    4885           0 :                                 if (r->modified_count) {
    4886           0 :                                         _mem_save_modified_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4887           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->modified_count, 0);
    4888           0 :                                         NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, r->modified_count));
    4889           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_modified_count_0, 0);
    4890             :                                 }
    4891           0 :                         break;
    4892             : 
    4893           0 :                         default:
    4894           0 :                         break;
    4895             : 
    4896             :                 }
    4897             :         }
    4898           0 :         return NDR_ERR_SUCCESS;
    4899             : }
    4900             : 
    4901           0 : _PUBLIC_ void ndr_print_netr_DELTA_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_UNION *r)
    4902             : {
    4903           0 :         uint32_t level;
    4904           0 :         level = ndr_print_steal_switch_value(ndr, r);
    4905           0 :         ndr_print_union(ndr, name, level, "netr_DELTA_UNION");
    4906           0 :         switch (level) {
    4907           0 :                 case NETR_DELTA_DOMAIN:
    4908           0 :                         ndr_print_ptr(ndr, "domain", r->domain);
    4909           0 :                         ndr->depth++;
    4910           0 :                         if (r->domain) {
    4911           0 :                                 ndr_print_netr_DELTA_DOMAIN(ndr, "domain", r->domain);
    4912             :                         }
    4913           0 :                         ndr->depth--;
    4914           0 :                 break;
    4915             : 
    4916           0 :                 case NETR_DELTA_GROUP:
    4917           0 :                         ndr_print_ptr(ndr, "group", r->group);
    4918           0 :                         ndr->depth++;
    4919           0 :                         if (r->group) {
    4920           0 :                                 ndr_print_netr_DELTA_GROUP(ndr, "group", r->group);
    4921             :                         }
    4922           0 :                         ndr->depth--;
    4923           0 :                 break;
    4924             : 
    4925           0 :                 case NETR_DELTA_DELETE_GROUP:
    4926           0 :                 break;
    4927             : 
    4928           0 :                 case NETR_DELTA_RENAME_GROUP:
    4929           0 :                         ndr_print_ptr(ndr, "rename_group", r->rename_group);
    4930           0 :                         ndr->depth++;
    4931           0 :                         if (r->rename_group) {
    4932           0 :                                 ndr_print_netr_DELTA_RENAME(ndr, "rename_group", r->rename_group);
    4933             :                         }
    4934           0 :                         ndr->depth--;
    4935           0 :                 break;
    4936             : 
    4937           0 :                 case NETR_DELTA_USER:
    4938           0 :                         ndr_print_ptr(ndr, "user", r->user);
    4939           0 :                         ndr->depth++;
    4940           0 :                         if (r->user) {
    4941           0 :                                 ndr_print_netr_DELTA_USER(ndr, "user", r->user);
    4942             :                         }
    4943           0 :                         ndr->depth--;
    4944           0 :                 break;
    4945             : 
    4946           0 :                 case NETR_DELTA_DELETE_USER:
    4947           0 :                 break;
    4948             : 
    4949           0 :                 case NETR_DELTA_RENAME_USER:
    4950           0 :                         ndr_print_ptr(ndr, "rename_user", r->rename_user);
    4951           0 :                         ndr->depth++;
    4952           0 :                         if (r->rename_user) {
    4953           0 :                                 ndr_print_netr_DELTA_RENAME(ndr, "rename_user", r->rename_user);
    4954             :                         }
    4955           0 :                         ndr->depth--;
    4956           0 :                 break;
    4957             : 
    4958           0 :                 case NETR_DELTA_GROUP_MEMBER:
    4959           0 :                         ndr_print_ptr(ndr, "group_member", r->group_member);
    4960           0 :                         ndr->depth++;
    4961           0 :                         if (r->group_member) {
    4962           0 :                                 ndr_print_netr_DELTA_GROUP_MEMBER(ndr, "group_member", r->group_member);
    4963             :                         }
    4964           0 :                         ndr->depth--;
    4965           0 :                 break;
    4966             : 
    4967           0 :                 case NETR_DELTA_ALIAS:
    4968           0 :                         ndr_print_ptr(ndr, "alias", r->alias);
    4969           0 :                         ndr->depth++;
    4970           0 :                         if (r->alias) {
    4971           0 :                                 ndr_print_netr_DELTA_ALIAS(ndr, "alias", r->alias);
    4972             :                         }
    4973           0 :                         ndr->depth--;
    4974           0 :                 break;
    4975             : 
    4976           0 :                 case NETR_DELTA_DELETE_ALIAS:
    4977           0 :                 break;
    4978             : 
    4979           0 :                 case NETR_DELTA_RENAME_ALIAS:
    4980           0 :                         ndr_print_ptr(ndr, "rename_alias", r->rename_alias);
    4981           0 :                         ndr->depth++;
    4982           0 :                         if (r->rename_alias) {
    4983           0 :                                 ndr_print_netr_DELTA_RENAME(ndr, "rename_alias", r->rename_alias);
    4984             :                         }
    4985           0 :                         ndr->depth--;
    4986           0 :                 break;
    4987             : 
    4988           0 :                 case NETR_DELTA_ALIAS_MEMBER:
    4989           0 :                         ndr_print_ptr(ndr, "alias_member", r->alias_member);
    4990           0 :                         ndr->depth++;
    4991           0 :                         if (r->alias_member) {
    4992           0 :                                 ndr_print_netr_DELTA_ALIAS_MEMBER(ndr, "alias_member", r->alias_member);
    4993             :                         }
    4994           0 :                         ndr->depth--;
    4995           0 :                 break;
    4996             : 
    4997           0 :                 case NETR_DELTA_POLICY:
    4998           0 :                         ndr_print_ptr(ndr, "policy", r->policy);
    4999           0 :                         ndr->depth++;
    5000           0 :                         if (r->policy) {
    5001           0 :                                 ndr_print_netr_DELTA_POLICY(ndr, "policy", r->policy);
    5002             :                         }
    5003           0 :                         ndr->depth--;
    5004           0 :                 break;
    5005             : 
    5006           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
    5007           0 :                         ndr_print_ptr(ndr, "trusted_domain", r->trusted_domain);
    5008           0 :                         ndr->depth++;
    5009           0 :                         if (r->trusted_domain) {
    5010           0 :                                 ndr_print_netr_DELTA_TRUSTED_DOMAIN(ndr, "trusted_domain", r->trusted_domain);
    5011             :                         }
    5012           0 :                         ndr->depth--;
    5013           0 :                 break;
    5014             : 
    5015           0 :                 case NETR_DELTA_DELETE_TRUST:
    5016           0 :                 break;
    5017             : 
    5018           0 :                 case NETR_DELTA_ACCOUNT:
    5019           0 :                         ndr_print_ptr(ndr, "account", r->account);
    5020           0 :                         ndr->depth++;
    5021           0 :                         if (r->account) {
    5022           0 :                                 ndr_print_netr_DELTA_ACCOUNT(ndr, "account", r->account);
    5023             :                         }
    5024           0 :                         ndr->depth--;
    5025           0 :                 break;
    5026             : 
    5027           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
    5028           0 :                 break;
    5029             : 
    5030           0 :                 case NETR_DELTA_SECRET:
    5031           0 :                         ndr_print_ptr(ndr, "secret", r->secret);
    5032           0 :                         ndr->depth++;
    5033           0 :                         if (r->secret) {
    5034           0 :                                 ndr_print_netr_DELTA_SECRET(ndr, "secret", r->secret);
    5035             :                         }
    5036           0 :                         ndr->depth--;
    5037           0 :                 break;
    5038             : 
    5039           0 :                 case NETR_DELTA_DELETE_SECRET:
    5040           0 :                 break;
    5041             : 
    5042           0 :                 case NETR_DELTA_DELETE_GROUP2:
    5043           0 :                         ndr_print_ptr(ndr, "delete_group", r->delete_group);
    5044           0 :                         ndr->depth++;
    5045           0 :                         if (r->delete_group) {
    5046           0 :                                 ndr_print_netr_DELTA_DELETE_USER(ndr, "delete_group", r->delete_group);
    5047             :                         }
    5048           0 :                         ndr->depth--;
    5049           0 :                 break;
    5050             : 
    5051           0 :                 case NETR_DELTA_DELETE_USER2:
    5052           0 :                         ndr_print_ptr(ndr, "delete_user", r->delete_user);
    5053           0 :                         ndr->depth++;
    5054           0 :                         if (r->delete_user) {
    5055           0 :                                 ndr_print_netr_DELTA_DELETE_USER(ndr, "delete_user", r->delete_user);
    5056             :                         }
    5057           0 :                         ndr->depth--;
    5058           0 :                 break;
    5059             : 
    5060           0 :                 case NETR_DELTA_MODIFY_COUNT:
    5061           0 :                         ndr_print_ptr(ndr, "modified_count", r->modified_count);
    5062           0 :                         ndr->depth++;
    5063           0 :                         if (r->modified_count) {
    5064           0 :                                 ndr_print_udlong(ndr, "modified_count", *r->modified_count);
    5065             :                         }
    5066           0 :                         ndr->depth--;
    5067           0 :                 break;
    5068             : 
    5069           0 :                 default:
    5070           0 :                 break;
    5071             : 
    5072             :         }
    5073           0 : }
    5074             : 
    5075           0 : static enum ndr_err_code ndr_push_netr_DELTA_ID_UNION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_DELTA_ID_UNION *r)
    5076             : {
    5077           0 :         uint32_t level;
    5078           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5079           0 :         if (ndr_flags & NDR_SCALARS) {
    5080             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5081           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5082           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5083           0 :                 NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, level));
    5084             :                 /* ms_union is always aligned to the largest union arm*/
    5085           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5086           0 :                 switch (level) {
    5087           0 :                         case NETR_DELTA_DOMAIN: {
    5088           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5089           0 :                         break; }
    5090             : 
    5091           0 :                         case NETR_DELTA_GROUP: {
    5092           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5093           0 :                         break; }
    5094             : 
    5095           0 :                         case NETR_DELTA_DELETE_GROUP: {
    5096           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5097           0 :                         break; }
    5098             : 
    5099           0 :                         case NETR_DELTA_RENAME_GROUP: {
    5100           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5101           0 :                         break; }
    5102             : 
    5103           0 :                         case NETR_DELTA_USER: {
    5104           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5105           0 :                         break; }
    5106             : 
    5107           0 :                         case NETR_DELTA_DELETE_USER: {
    5108           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5109           0 :                         break; }
    5110             : 
    5111           0 :                         case NETR_DELTA_RENAME_USER: {
    5112           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5113           0 :                         break; }
    5114             : 
    5115           0 :                         case NETR_DELTA_GROUP_MEMBER: {
    5116           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5117           0 :                         break; }
    5118             : 
    5119           0 :                         case NETR_DELTA_ALIAS: {
    5120           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5121           0 :                         break; }
    5122             : 
    5123           0 :                         case NETR_DELTA_DELETE_ALIAS: {
    5124           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5125           0 :                         break; }
    5126             : 
    5127           0 :                         case NETR_DELTA_RENAME_ALIAS: {
    5128           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5129           0 :                         break; }
    5130             : 
    5131           0 :                         case NETR_DELTA_ALIAS_MEMBER: {
    5132           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5133           0 :                         break; }
    5134             : 
    5135           0 :                         case NETR_DELTA_POLICY: {
    5136           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    5137           0 :                         break; }
    5138             : 
    5139           0 :                         case NETR_DELTA_TRUSTED_DOMAIN: {
    5140           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    5141           0 :                         break; }
    5142             : 
    5143           0 :                         case NETR_DELTA_DELETE_TRUST: {
    5144           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    5145           0 :                         break; }
    5146             : 
    5147           0 :                         case NETR_DELTA_ACCOUNT: {
    5148           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    5149           0 :                         break; }
    5150             : 
    5151           0 :                         case NETR_DELTA_DELETE_ACCOUNT: {
    5152           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    5153           0 :                         break; }
    5154             : 
    5155           0 :                         case NETR_DELTA_SECRET: {
    5156           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
    5157           0 :                         break; }
    5158             : 
    5159           0 :                         case NETR_DELTA_DELETE_SECRET: {
    5160           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
    5161           0 :                         break; }
    5162             : 
    5163           0 :                         case NETR_DELTA_DELETE_GROUP2: {
    5164           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5165           0 :                         break; }
    5166             : 
    5167           0 :                         case NETR_DELTA_DELETE_USER2: {
    5168           0 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
    5169           0 :                         break; }
    5170             : 
    5171           0 :                         case NETR_DELTA_MODIFY_COUNT: {
    5172           0 :                         break; }
    5173             : 
    5174           0 :                         default: {
    5175           0 :                         break; }
    5176             : 
    5177             :                 }
    5178             :         }
    5179           0 :         if (ndr_flags & NDR_BUFFERS) {
    5180           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5181             :                         /* We didn't get it above, and the token is not needed after this. */
    5182           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5183             :                 }
    5184           0 :                 switch (level) {
    5185           0 :                         case NETR_DELTA_DOMAIN:
    5186           0 :                         break;
    5187             : 
    5188           0 :                         case NETR_DELTA_GROUP:
    5189           0 :                         break;
    5190             : 
    5191           0 :                         case NETR_DELTA_DELETE_GROUP:
    5192           0 :                         break;
    5193             : 
    5194           0 :                         case NETR_DELTA_RENAME_GROUP:
    5195           0 :                         break;
    5196             : 
    5197           0 :                         case NETR_DELTA_USER:
    5198           0 :                         break;
    5199             : 
    5200           0 :                         case NETR_DELTA_DELETE_USER:
    5201           0 :                         break;
    5202             : 
    5203           0 :                         case NETR_DELTA_RENAME_USER:
    5204           0 :                         break;
    5205             : 
    5206           0 :                         case NETR_DELTA_GROUP_MEMBER:
    5207           0 :                         break;
    5208             : 
    5209           0 :                         case NETR_DELTA_ALIAS:
    5210           0 :                         break;
    5211             : 
    5212           0 :                         case NETR_DELTA_DELETE_ALIAS:
    5213           0 :                         break;
    5214             : 
    5215           0 :                         case NETR_DELTA_RENAME_ALIAS:
    5216           0 :                         break;
    5217             : 
    5218           0 :                         case NETR_DELTA_ALIAS_MEMBER:
    5219           0 :                         break;
    5220             : 
    5221           0 :                         case NETR_DELTA_POLICY:
    5222           0 :                                 if (r->sid) {
    5223           0 :                                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5224             :                                 }
    5225           0 :                         break;
    5226             : 
    5227           0 :                         case NETR_DELTA_TRUSTED_DOMAIN:
    5228           0 :                                 if (r->sid) {
    5229           0 :                                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5230             :                                 }
    5231           0 :                         break;
    5232             : 
    5233           0 :                         case NETR_DELTA_DELETE_TRUST:
    5234           0 :                                 if (r->sid) {
    5235           0 :                                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5236             :                                 }
    5237           0 :                         break;
    5238             : 
    5239           0 :                         case NETR_DELTA_ACCOUNT:
    5240           0 :                                 if (r->sid) {
    5241           0 :                                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5242             :                                 }
    5243           0 :                         break;
    5244             : 
    5245           0 :                         case NETR_DELTA_DELETE_ACCOUNT:
    5246           0 :                                 if (r->sid) {
    5247           0 :                                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5248             :                                 }
    5249           0 :                         break;
    5250             : 
    5251           0 :                         case NETR_DELTA_SECRET:
    5252           0 :                                 if (r->name) {
    5253           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    5254           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5255           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    5256           0 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5257             :                                 }
    5258           0 :                         break;
    5259             : 
    5260           0 :                         case NETR_DELTA_DELETE_SECRET:
    5261           0 :                                 if (r->name) {
    5262           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    5263           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5264           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    5265           0 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5266             :                                 }
    5267           0 :                         break;
    5268             : 
    5269           0 :                         case NETR_DELTA_DELETE_GROUP2:
    5270           0 :                         break;
    5271             : 
    5272           0 :                         case NETR_DELTA_DELETE_USER2:
    5273           0 :                         break;
    5274             : 
    5275           0 :                         case NETR_DELTA_MODIFY_COUNT:
    5276           0 :                         break;
    5277             : 
    5278           0 :                         default:
    5279           0 :                         break;
    5280             : 
    5281             :                 }
    5282             :         }
    5283           0 :         return NDR_ERR_SUCCESS;
    5284             : }
    5285             : 
    5286           0 : static enum ndr_err_code ndr_pull_netr_DELTA_ID_UNION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_DELTA_ID_UNION *r)
    5287             : {
    5288           0 :         uint32_t level;
    5289           0 :         uint16_t _level;
    5290           0 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    5291           0 :         uint32_t _ptr_sid;
    5292           0 :         TALLOC_CTX *_mem_save_name_0 = NULL;
    5293           0 :         uint32_t _ptr_name;
    5294           0 :         uint32_t size_name_1 = 0;
    5295           0 :         uint32_t length_name_1 = 0;
    5296           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5297           0 :         if (ndr_flags & NDR_SCALARS) {
    5298             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5299           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5300           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5301           0 :                 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
    5302           0 :                 if (_level != level) {
    5303           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
    5304             :                 }
    5305             :                 /* ms_union is always aligned to the largest union arm*/
    5306           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5307           0 :                 switch (level) {
    5308           0 :                         case NETR_DELTA_DOMAIN: {
    5309           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5310           0 :                         break; }
    5311             : 
    5312           0 :                         case NETR_DELTA_GROUP: {
    5313           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5314           0 :                         break; }
    5315             : 
    5316           0 :                         case NETR_DELTA_DELETE_GROUP: {
    5317           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5318           0 :                         break; }
    5319             : 
    5320           0 :                         case NETR_DELTA_RENAME_GROUP: {
    5321           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5322           0 :                         break; }
    5323             : 
    5324           0 :                         case NETR_DELTA_USER: {
    5325           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5326           0 :                         break; }
    5327             : 
    5328           0 :                         case NETR_DELTA_DELETE_USER: {
    5329           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5330           0 :                         break; }
    5331             : 
    5332           0 :                         case NETR_DELTA_RENAME_USER: {
    5333           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5334           0 :                         break; }
    5335             : 
    5336           0 :                         case NETR_DELTA_GROUP_MEMBER: {
    5337           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5338           0 :                         break; }
    5339             : 
    5340           0 :                         case NETR_DELTA_ALIAS: {
    5341           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5342           0 :                         break; }
    5343             : 
    5344           0 :                         case NETR_DELTA_DELETE_ALIAS: {
    5345           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5346           0 :                         break; }
    5347             : 
    5348           0 :                         case NETR_DELTA_RENAME_ALIAS: {
    5349           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5350           0 :                         break; }
    5351             : 
    5352           0 :                         case NETR_DELTA_ALIAS_MEMBER: {
    5353           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5354           0 :                         break; }
    5355             : 
    5356           0 :                         case NETR_DELTA_POLICY: {
    5357           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    5358           0 :                                 if (_ptr_sid) {
    5359           0 :                                         NDR_PULL_ALLOC(ndr, r->sid);
    5360             :                                 } else {
    5361           0 :                                         r->sid = NULL;
    5362             :                                 }
    5363           0 :                         break; }
    5364             : 
    5365           0 :                         case NETR_DELTA_TRUSTED_DOMAIN: {
    5366           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    5367           0 :                                 if (_ptr_sid) {
    5368           0 :                                         NDR_PULL_ALLOC(ndr, r->sid);
    5369             :                                 } else {
    5370           0 :                                         r->sid = NULL;
    5371             :                                 }
    5372           0 :                         break; }
    5373             : 
    5374           0 :                         case NETR_DELTA_DELETE_TRUST: {
    5375           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    5376           0 :                                 if (_ptr_sid) {
    5377           0 :                                         NDR_PULL_ALLOC(ndr, r->sid);
    5378             :                                 } else {
    5379           0 :                                         r->sid = NULL;
    5380             :                                 }
    5381           0 :                         break; }
    5382             : 
    5383           0 :                         case NETR_DELTA_ACCOUNT: {
    5384           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    5385           0 :                                 if (_ptr_sid) {
    5386           0 :                                         NDR_PULL_ALLOC(ndr, r->sid);
    5387             :                                 } else {
    5388           0 :                                         r->sid = NULL;
    5389             :                                 }
    5390           0 :                         break; }
    5391             : 
    5392           0 :                         case NETR_DELTA_DELETE_ACCOUNT: {
    5393           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    5394           0 :                                 if (_ptr_sid) {
    5395           0 :                                         NDR_PULL_ALLOC(ndr, r->sid);
    5396             :                                 } else {
    5397           0 :                                         r->sid = NULL;
    5398             :                                 }
    5399           0 :                         break; }
    5400             : 
    5401           0 :                         case NETR_DELTA_SECRET: {
    5402           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
    5403           0 :                                 if (_ptr_name) {
    5404           0 :                                         NDR_PULL_ALLOC(ndr, r->name);
    5405             :                                 } else {
    5406           0 :                                         r->name = NULL;
    5407             :                                 }
    5408           0 :                         break; }
    5409             : 
    5410           0 :                         case NETR_DELTA_DELETE_SECRET: {
    5411           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
    5412           0 :                                 if (_ptr_name) {
    5413           0 :                                         NDR_PULL_ALLOC(ndr, r->name);
    5414             :                                 } else {
    5415           0 :                                         r->name = NULL;
    5416             :                                 }
    5417           0 :                         break; }
    5418             : 
    5419           0 :                         case NETR_DELTA_DELETE_GROUP2: {
    5420           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5421           0 :                         break; }
    5422             : 
    5423           0 :                         case NETR_DELTA_DELETE_USER2: {
    5424           0 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
    5425           0 :                         break; }
    5426             : 
    5427           0 :                         case NETR_DELTA_MODIFY_COUNT: {
    5428           0 :                         break; }
    5429             : 
    5430           0 :                         default: {
    5431           0 :                         break; }
    5432             : 
    5433             :                 }
    5434             :         }
    5435           0 :         if (ndr_flags & NDR_BUFFERS) {
    5436           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5437             :                         /* We didn't get it above, and the token is not needed after this. */
    5438           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5439             :                 }
    5440           0 :                 switch (level) {
    5441           0 :                         case NETR_DELTA_DOMAIN:
    5442           0 :                         break;
    5443             : 
    5444           0 :                         case NETR_DELTA_GROUP:
    5445           0 :                         break;
    5446             : 
    5447           0 :                         case NETR_DELTA_DELETE_GROUP:
    5448           0 :                         break;
    5449             : 
    5450           0 :                         case NETR_DELTA_RENAME_GROUP:
    5451           0 :                         break;
    5452             : 
    5453           0 :                         case NETR_DELTA_USER:
    5454           0 :                         break;
    5455             : 
    5456           0 :                         case NETR_DELTA_DELETE_USER:
    5457           0 :                         break;
    5458             : 
    5459           0 :                         case NETR_DELTA_RENAME_USER:
    5460           0 :                         break;
    5461             : 
    5462           0 :                         case NETR_DELTA_GROUP_MEMBER:
    5463           0 :                         break;
    5464             : 
    5465           0 :                         case NETR_DELTA_ALIAS:
    5466           0 :                         break;
    5467             : 
    5468           0 :                         case NETR_DELTA_DELETE_ALIAS:
    5469           0 :                         break;
    5470             : 
    5471           0 :                         case NETR_DELTA_RENAME_ALIAS:
    5472           0 :                         break;
    5473             : 
    5474           0 :                         case NETR_DELTA_ALIAS_MEMBER:
    5475           0 :                         break;
    5476             : 
    5477           0 :                         case NETR_DELTA_POLICY:
    5478           0 :                                 if (r->sid) {
    5479           0 :                                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5480           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    5481           0 :                                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5482           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    5483             :                                 }
    5484           0 :                         break;
    5485             : 
    5486           0 :                         case NETR_DELTA_TRUSTED_DOMAIN:
    5487           0 :                                 if (r->sid) {
    5488           0 :                                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5489           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    5490           0 :                                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5491           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    5492             :                                 }
    5493           0 :                         break;
    5494             : 
    5495           0 :                         case NETR_DELTA_DELETE_TRUST:
    5496           0 :                                 if (r->sid) {
    5497           0 :                                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5498           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    5499           0 :                                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5500           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    5501             :                                 }
    5502           0 :                         break;
    5503             : 
    5504           0 :                         case NETR_DELTA_ACCOUNT:
    5505           0 :                                 if (r->sid) {
    5506           0 :                                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5507           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    5508           0 :                                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5509           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    5510             :                                 }
    5511           0 :                         break;
    5512             : 
    5513           0 :                         case NETR_DELTA_DELETE_ACCOUNT:
    5514           0 :                                 if (r->sid) {
    5515           0 :                                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5516           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    5517           0 :                                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    5518           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    5519             :                                 }
    5520           0 :                         break;
    5521             : 
    5522           0 :                         case NETR_DELTA_SECRET:
    5523           0 :                                 if (r->name) {
    5524           0 :                                         _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5525           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
    5526           0 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
    5527           0 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
    5528           0 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
    5529           0 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
    5530           0 :                                         if (length_name_1 > size_name_1) {
    5531           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_name_1, length_name_1);
    5532             :                                         }
    5533           0 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
    5534           0 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
    5535           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
    5536             :                                 }
    5537           0 :                         break;
    5538             : 
    5539           0 :                         case NETR_DELTA_DELETE_SECRET:
    5540           0 :                                 if (r->name) {
    5541           0 :                                         _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5542           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
    5543           0 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
    5544           0 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
    5545           0 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
    5546           0 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
    5547           0 :                                         if (length_name_1 > size_name_1) {
    5548           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_name_1, length_name_1);
    5549             :                                         }
    5550           0 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
    5551           0 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
    5552           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
    5553             :                                 }
    5554           0 :                         break;
    5555             : 
    5556           0 :                         case NETR_DELTA_DELETE_GROUP2:
    5557           0 :                         break;
    5558             : 
    5559           0 :                         case NETR_DELTA_DELETE_USER2:
    5560           0 :                         break;
    5561             : 
    5562           0 :                         case NETR_DELTA_MODIFY_COUNT:
    5563           0 :                         break;
    5564             : 
    5565           0 :                         default:
    5566           0 :                         break;
    5567             : 
    5568             :                 }
    5569             :         }
    5570           0 :         return NDR_ERR_SUCCESS;
    5571             : }
    5572             : 
    5573           0 : _PUBLIC_ void ndr_print_netr_DELTA_ID_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_ID_UNION *r)
    5574             : {
    5575           0 :         uint32_t level;
    5576           0 :         level = ndr_print_steal_switch_value(ndr, r);
    5577           0 :         ndr_print_union(ndr, name, level, "netr_DELTA_ID_UNION");
    5578           0 :         switch (level) {
    5579           0 :                 case NETR_DELTA_DOMAIN:
    5580           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5581           0 :                 break;
    5582             : 
    5583           0 :                 case NETR_DELTA_GROUP:
    5584           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5585           0 :                 break;
    5586             : 
    5587           0 :                 case NETR_DELTA_DELETE_GROUP:
    5588           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5589           0 :                 break;
    5590             : 
    5591           0 :                 case NETR_DELTA_RENAME_GROUP:
    5592           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5593           0 :                 break;
    5594             : 
    5595           0 :                 case NETR_DELTA_USER:
    5596           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5597           0 :                 break;
    5598             : 
    5599           0 :                 case NETR_DELTA_DELETE_USER:
    5600           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5601           0 :                 break;
    5602             : 
    5603           0 :                 case NETR_DELTA_RENAME_USER:
    5604           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5605           0 :                 break;
    5606             : 
    5607           0 :                 case NETR_DELTA_GROUP_MEMBER:
    5608           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5609           0 :                 break;
    5610             : 
    5611           0 :                 case NETR_DELTA_ALIAS:
    5612           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5613           0 :                 break;
    5614             : 
    5615           0 :                 case NETR_DELTA_DELETE_ALIAS:
    5616           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5617           0 :                 break;
    5618             : 
    5619           0 :                 case NETR_DELTA_RENAME_ALIAS:
    5620           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5621           0 :                 break;
    5622             : 
    5623           0 :                 case NETR_DELTA_ALIAS_MEMBER:
    5624           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5625           0 :                 break;
    5626             : 
    5627           0 :                 case NETR_DELTA_POLICY:
    5628           0 :                         ndr_print_ptr(ndr, "sid", r->sid);
    5629           0 :                         ndr->depth++;
    5630           0 :                         if (r->sid) {
    5631           0 :                                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    5632             :                         }
    5633           0 :                         ndr->depth--;
    5634           0 :                 break;
    5635             : 
    5636           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
    5637           0 :                         ndr_print_ptr(ndr, "sid", r->sid);
    5638           0 :                         ndr->depth++;
    5639           0 :                         if (r->sid) {
    5640           0 :                                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    5641             :                         }
    5642           0 :                         ndr->depth--;
    5643           0 :                 break;
    5644             : 
    5645           0 :                 case NETR_DELTA_DELETE_TRUST:
    5646           0 :                         ndr_print_ptr(ndr, "sid", r->sid);
    5647           0 :                         ndr->depth++;
    5648           0 :                         if (r->sid) {
    5649           0 :                                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    5650             :                         }
    5651           0 :                         ndr->depth--;
    5652           0 :                 break;
    5653             : 
    5654           0 :                 case NETR_DELTA_ACCOUNT:
    5655           0 :                         ndr_print_ptr(ndr, "sid", r->sid);
    5656           0 :                         ndr->depth++;
    5657           0 :                         if (r->sid) {
    5658           0 :                                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    5659             :                         }
    5660           0 :                         ndr->depth--;
    5661           0 :                 break;
    5662             : 
    5663           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
    5664           0 :                         ndr_print_ptr(ndr, "sid", r->sid);
    5665           0 :                         ndr->depth++;
    5666           0 :                         if (r->sid) {
    5667           0 :                                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    5668             :                         }
    5669           0 :                         ndr->depth--;
    5670           0 :                 break;
    5671             : 
    5672           0 :                 case NETR_DELTA_SECRET:
    5673           0 :                         ndr_print_ptr(ndr, "name", r->name);
    5674           0 :                         ndr->depth++;
    5675           0 :                         if (r->name) {
    5676           0 :                                 ndr_print_string(ndr, "name", r->name);
    5677             :                         }
    5678           0 :                         ndr->depth--;
    5679           0 :                 break;
    5680             : 
    5681           0 :                 case NETR_DELTA_DELETE_SECRET:
    5682           0 :                         ndr_print_ptr(ndr, "name", r->name);
    5683           0 :                         ndr->depth++;
    5684           0 :                         if (r->name) {
    5685           0 :                                 ndr_print_string(ndr, "name", r->name);
    5686             :                         }
    5687           0 :                         ndr->depth--;
    5688           0 :                 break;
    5689             : 
    5690           0 :                 case NETR_DELTA_DELETE_GROUP2:
    5691           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5692           0 :                 break;
    5693             : 
    5694           0 :                 case NETR_DELTA_DELETE_USER2:
    5695           0 :                         ndr_print_uint32(ndr, "rid", r->rid);
    5696           0 :                 break;
    5697             : 
    5698           0 :                 case NETR_DELTA_MODIFY_COUNT:
    5699           0 :                 break;
    5700             : 
    5701           0 :                 default:
    5702           0 :                 break;
    5703             : 
    5704             :         }
    5705           0 : }
    5706             : 
    5707           0 : static enum ndr_err_code ndr_push_netr_DELTA_ENUM(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_ENUM *r)
    5708             : {
    5709           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5710           0 :         if (ndr_flags & NDR_SCALARS) {
    5711           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5712           0 :                 NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, r->delta_type));
    5713           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
    5714           0 :                 NDR_CHECK(ndr_push_netr_DELTA_ID_UNION(ndr, NDR_SCALARS, &r->delta_id_union));
    5715           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_union, r->delta_type));
    5716           0 :                 NDR_CHECK(ndr_push_netr_DELTA_UNION(ndr, NDR_SCALARS, &r->delta_union));
    5717           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5718             :         }
    5719           0 :         if (ndr_flags & NDR_BUFFERS) {
    5720           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
    5721           0 :                 NDR_CHECK(ndr_push_netr_DELTA_ID_UNION(ndr, NDR_BUFFERS, &r->delta_id_union));
    5722           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_union, r->delta_type));
    5723           0 :                 NDR_CHECK(ndr_push_netr_DELTA_UNION(ndr, NDR_BUFFERS, &r->delta_union));
    5724             :         }
    5725           0 :         return NDR_ERR_SUCCESS;
    5726             : }
    5727             : 
    5728           0 : static enum ndr_err_code ndr_pull_netr_DELTA_ENUM(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_ENUM *r)
    5729             : {
    5730           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5731           0 :         if (ndr_flags & NDR_SCALARS) {
    5732           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5733           0 :                 NDR_CHECK(ndr_pull_netr_DeltaEnum(ndr, NDR_SCALARS, &r->delta_type));
    5734           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
    5735           0 :                 NDR_CHECK(ndr_pull_netr_DELTA_ID_UNION(ndr, NDR_SCALARS, &r->delta_id_union));
    5736           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_union, r->delta_type));
    5737           0 :                 NDR_CHECK(ndr_pull_netr_DELTA_UNION(ndr, NDR_SCALARS, &r->delta_union));
    5738           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5739             :         }
    5740           0 :         if (ndr_flags & NDR_BUFFERS) {
    5741           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
    5742           0 :                 NDR_CHECK(ndr_pull_netr_DELTA_ID_UNION(ndr, NDR_BUFFERS, &r->delta_id_union));
    5743           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_union, r->delta_type));
    5744           0 :                 NDR_CHECK(ndr_pull_netr_DELTA_UNION(ndr, NDR_BUFFERS, &r->delta_union));
    5745             :         }
    5746           0 :         return NDR_ERR_SUCCESS;
    5747             : }
    5748             : 
    5749           0 : _PUBLIC_ void ndr_print_netr_DELTA_ENUM(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM *r)
    5750             : {
    5751           0 :         ndr_print_struct(ndr, name, "netr_DELTA_ENUM");
    5752           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5753           0 :         ndr->depth++;
    5754           0 :         ndr_print_netr_DeltaEnum(ndr, "delta_type", r->delta_type);
    5755           0 :         ndr_print_set_switch_value(ndr, &r->delta_id_union, r->delta_type);
    5756           0 :         ndr_print_netr_DELTA_ID_UNION(ndr, "delta_id_union", &r->delta_id_union);
    5757           0 :         ndr_print_set_switch_value(ndr, &r->delta_union, r->delta_type);
    5758           0 :         ndr_print_netr_DELTA_UNION(ndr, "delta_union", &r->delta_union);
    5759           0 :         ndr->depth--;
    5760             : }
    5761             : 
    5762           0 : static enum ndr_err_code ndr_push_netr_DELTA_ENUM_ARRAY(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DELTA_ENUM_ARRAY *r)
    5763             : {
    5764           0 :         uint32_t cntr_delta_enum_1;
    5765           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5766           0 :         if (ndr_flags & NDR_SCALARS) {
    5767           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5768           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_deltas));
    5769           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->delta_enum));
    5770           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5771             :         }
    5772           0 :         if (ndr_flags & NDR_BUFFERS) {
    5773           0 :                 if (r->delta_enum) {
    5774           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_deltas));
    5775           0 :                         for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (r->num_deltas); cntr_delta_enum_1++) {
    5776           0 :                                 NDR_CHECK(ndr_push_netr_DELTA_ENUM(ndr, NDR_SCALARS, &r->delta_enum[cntr_delta_enum_1]));
    5777             :                         }
    5778           0 :                         for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (r->num_deltas); cntr_delta_enum_1++) {
    5779           0 :                                 NDR_CHECK(ndr_push_netr_DELTA_ENUM(ndr, NDR_BUFFERS, &r->delta_enum[cntr_delta_enum_1]));
    5780             :                         }
    5781             :                 }
    5782             :         }
    5783           0 :         return NDR_ERR_SUCCESS;
    5784             : }
    5785             : 
    5786           0 : static enum ndr_err_code ndr_pull_netr_DELTA_ENUM_ARRAY(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DELTA_ENUM_ARRAY *r)
    5787             : {
    5788           0 :         uint32_t _ptr_delta_enum;
    5789           0 :         uint32_t size_delta_enum_1 = 0;
    5790           0 :         uint32_t cntr_delta_enum_1;
    5791           0 :         TALLOC_CTX *_mem_save_delta_enum_0 = NULL;
    5792           0 :         TALLOC_CTX *_mem_save_delta_enum_1 = NULL;
    5793           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5794           0 :         if (ndr_flags & NDR_SCALARS) {
    5795           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5796           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_deltas));
    5797           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum));
    5798           0 :                 if (_ptr_delta_enum) {
    5799           0 :                         NDR_PULL_ALLOC(ndr, r->delta_enum);
    5800             :                 } else {
    5801           0 :                         r->delta_enum = NULL;
    5802             :                 }
    5803           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5804             :         }
    5805           0 :         if (ndr_flags & NDR_BUFFERS) {
    5806           0 :                 if (r->delta_enum) {
    5807           0 :                         _mem_save_delta_enum_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5808           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->delta_enum, 0);
    5809           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->delta_enum));
    5810           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->delta_enum, &size_delta_enum_1));
    5811           0 :                         NDR_PULL_ALLOC_N(ndr, r->delta_enum, size_delta_enum_1);
    5812           0 :                         _mem_save_delta_enum_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5813           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->delta_enum, 0);
    5814           0 :                         for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (size_delta_enum_1); cntr_delta_enum_1++) {
    5815           0 :                                 NDR_CHECK(ndr_pull_netr_DELTA_ENUM(ndr, NDR_SCALARS, &r->delta_enum[cntr_delta_enum_1]));
    5816             :                         }
    5817           0 :                         for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (size_delta_enum_1); cntr_delta_enum_1++) {
    5818           0 :                                 NDR_CHECK(ndr_pull_netr_DELTA_ENUM(ndr, NDR_BUFFERS, &r->delta_enum[cntr_delta_enum_1]));
    5819             :                         }
    5820           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_1, 0);
    5821           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_0, 0);
    5822             :                 }
    5823           0 :                 if (r->delta_enum) {
    5824           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->delta_enum, r->num_deltas));
    5825             :                 }
    5826           0 :                 for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (size_delta_enum_1); cntr_delta_enum_1++) {
    5827           0 :                 }
    5828             :         }
    5829           0 :         return NDR_ERR_SUCCESS;
    5830             : }
    5831             : 
    5832           0 : _PUBLIC_ void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM_ARRAY *r)
    5833             : {
    5834           0 :         uint32_t cntr_delta_enum_1;
    5835           0 :         ndr_print_struct(ndr, name, "netr_DELTA_ENUM_ARRAY");
    5836           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5837           0 :         ndr->depth++;
    5838           0 :         ndr_print_uint32(ndr, "num_deltas", r->num_deltas);
    5839           0 :         ndr_print_ptr(ndr, "delta_enum", r->delta_enum);
    5840           0 :         ndr->depth++;
    5841           0 :         if (r->delta_enum) {
    5842           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "delta_enum", (uint32_t)(r->num_deltas));
    5843           0 :                 ndr->depth++;
    5844           0 :                 for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < (r->num_deltas); cntr_delta_enum_1++) {
    5845           0 :                         ndr_print_netr_DELTA_ENUM(ndr, "delta_enum", &r->delta_enum[cntr_delta_enum_1]);
    5846             :                 }
    5847           0 :                 ndr->depth--;
    5848             :         }
    5849           0 :         ndr->depth--;
    5850           0 :         ndr->depth--;
    5851             : }
    5852             : 
    5853         108 : static enum ndr_err_code ndr_push_netr_UAS_INFO_0(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_UAS_INFO_0 *r)
    5854             : {
    5855             :         {
    5856         108 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    5857         108 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    5858         108 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5859         108 :                 if (ndr_flags & NDR_SCALARS) {
    5860         108 :                         NDR_CHECK(ndr_push_align(ndr, 4));
    5861         108 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->computer_name, 16));
    5862         108 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timecreated));
    5863         108 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number));
    5864         108 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    5865             :                 }
    5866         108 :                 if (ndr_flags & NDR_BUFFERS) {
    5867          18 :                 }
    5868         108 :                 ndr->flags = _flags_save_STRUCT;
    5869             :         }
    5870         108 :         return NDR_ERR_SUCCESS;
    5871             : }
    5872             : 
    5873          96 : static enum ndr_err_code ndr_pull_netr_UAS_INFO_0(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_UAS_INFO_0 *r)
    5874             : {
    5875          96 :         uint32_t size_computer_name_0 = 0;
    5876             :         {
    5877          96 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    5878          96 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    5879          96 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5880          96 :                 if (ndr_flags & NDR_SCALARS) {
    5881          96 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
    5882          96 :                         size_computer_name_0 = 16;
    5883          96 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->computer_name, size_computer_name_0));
    5884          96 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timecreated));
    5885          96 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number));
    5886          96 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    5887             :                 }
    5888          96 :                 if (ndr_flags & NDR_BUFFERS) {
    5889          16 :                 }
    5890          96 :                 ndr->flags = _flags_save_STRUCT;
    5891             :         }
    5892          96 :         return NDR_ERR_SUCCESS;
    5893             : }
    5894             : 
    5895          24 : _PUBLIC_ void ndr_print_netr_UAS_INFO_0(struct ndr_print *ndr, const char *name, const struct netr_UAS_INFO_0 *r)
    5896             : {
    5897          24 :         ndr_print_struct(ndr, name, "netr_UAS_INFO_0");
    5898          24 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5899             :         {
    5900          24 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    5901          24 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    5902          24 :                 ndr->depth++;
    5903          24 :                 ndr_print_array_uint8(ndr, "computer_name", r->computer_name, 16);
    5904          24 :                 ndr_print_uint32(ndr, "timecreated", r->timecreated);
    5905          24 :                 ndr_print_uint32(ndr, "serial_number", r->serial_number);
    5906          24 :                 ndr->depth--;
    5907          24 :                 ndr->flags = _flags_save_STRUCT;
    5908             :         }
    5909             : }
    5910             : 
    5911          60 : static enum ndr_err_code ndr_push_netr_AccountBuffer(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_AccountBuffer *r)
    5912             : {
    5913          60 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5914          60 :         if (ndr_flags & NDR_SCALARS) {
    5915          60 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    5916             :                 {
    5917          60 :                         libndr_flags _flags_save_DATA_BLOB = ndr->flags;
    5918          60 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    5919          60 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->blob));
    5920          60 :                         ndr->flags = _flags_save_DATA_BLOB;
    5921             :                 }
    5922          60 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    5923             :         }
    5924          60 :         if (ndr_flags & NDR_BUFFERS) {
    5925          10 :         }
    5926          60 :         return NDR_ERR_SUCCESS;
    5927             : }
    5928             : 
    5929          48 : static enum ndr_err_code ndr_pull_netr_AccountBuffer(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_AccountBuffer *r)
    5930             : {
    5931          48 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5932          48 :         if (ndr_flags & NDR_SCALARS) {
    5933          48 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    5934             :                 {
    5935          48 :                         libndr_flags _flags_save_DATA_BLOB = ndr->flags;
    5936          48 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    5937          48 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->blob));
    5938          48 :                         ndr->flags = _flags_save_DATA_BLOB;
    5939             :                 }
    5940          48 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    5941             :         }
    5942          48 :         if (ndr_flags & NDR_BUFFERS) {
    5943           8 :         }
    5944          48 :         return NDR_ERR_SUCCESS;
    5945             : }
    5946             : 
    5947          24 : _PUBLIC_ void ndr_print_netr_AccountBuffer(struct ndr_print *ndr, const char *name, const struct netr_AccountBuffer *r)
    5948             : {
    5949          24 :         ndr_print_struct(ndr, name, "netr_AccountBuffer");
    5950          24 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5951          24 :         ndr->depth++;
    5952             :         {
    5953          24 :                 libndr_flags _flags_save_DATA_BLOB = ndr->flags;
    5954          24 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    5955          24 :                 ndr_print_DATA_BLOB(ndr, "blob", r->blob);
    5956          24 :                 ndr->flags = _flags_save_DATA_BLOB;
    5957             :         }
    5958          24 :         ndr->depth--;
    5959             : }
    5960             : 
    5961         352 : static enum ndr_err_code ndr_push_netr_InfoFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
    5962             : {
    5963         352 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    5964         310 :         return NDR_ERR_SUCCESS;
    5965             : }
    5966             : 
    5967         477 : static enum ndr_err_code ndr_pull_netr_InfoFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
    5968             : {
    5969          51 :         uint32_t v;
    5970         477 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    5971         477 :         *r = v;
    5972         477 :         return NDR_ERR_SUCCESS;
    5973             : }
    5974             : 
    5975          84 : _PUBLIC_ void ndr_print_netr_InfoFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    5976             : {
    5977          84 :         ndr_print_uint32(ndr, name, r);
    5978          84 :         ndr->depth++;
    5979          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_REPLICATION_NEEDED", NETLOGON_REPLICATION_NEEDED, r);
    5980          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_REPLICATION_IN_PROGRESS", NETLOGON_REPLICATION_IN_PROGRESS, r);
    5981          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_FULL_SYNC_REPLICATION", NETLOGON_FULL_SYNC_REPLICATION, r);
    5982          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_REDO_NEEDED", NETLOGON_REDO_NEEDED, r);
    5983          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_HAS_IP", NETLOGON_HAS_IP, r);
    5984          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_HAS_TIMESERV", NETLOGON_HAS_TIMESERV, r);
    5985          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_DNS_UPDATE_FAILURE", NETLOGON_DNS_UPDATE_FAILURE, r);
    5986          84 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_VERIFY_STATUS_RETURNED", NETLOGON_VERIFY_STATUS_RETURNED, r);
    5987          84 :         ndr->depth--;
    5988          84 : }
    5989             : 
    5990         115 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_NETLOGON_INFO_1 *r)
    5991             : {
    5992         115 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5993         115 :         if (ndr_flags & NDR_SCALARS) {
    5994         115 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    5995         133 :                 NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags));
    5996         115 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->pdc_connection_status));
    5997         115 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    5998             :         }
    5999         115 :         if (ndr_flags & NDR_BUFFERS) {
    6000          18 :         }
    6001         115 :         return NDR_ERR_SUCCESS;
    6002             : }
    6003             : 
    6004          99 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_NETLOGON_INFO_1 *r)
    6005             : {
    6006          99 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6007          99 :         if (ndr_flags & NDR_SCALARS) {
    6008          99 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    6009         114 :                 NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags));
    6010          99 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->pdc_connection_status));
    6011          99 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    6012             :         }
    6013          99 :         if (ndr_flags & NDR_BUFFERS) {
    6014          15 :         }
    6015          99 :         return NDR_ERR_SUCCESS;
    6016             : }
    6017             : 
    6018          36 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_1(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_1 *r)
    6019             : {
    6020          36 :         ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_1");
    6021          36 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6022          36 :         ndr->depth++;
    6023          36 :         ndr_print_netr_InfoFlags(ndr, "flags", r->flags);
    6024          36 :         ndr_print_WERROR(ndr, "pdc_connection_status", r->pdc_connection_status);
    6025          36 :         ndr->depth--;
    6026             : }
    6027             : 
    6028         225 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_NETLOGON_INFO_2 *r)
    6029             : {
    6030         225 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6031         225 :         if (ndr_flags & NDR_SCALARS) {
    6032         225 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6033         249 :                 NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags));
    6034         225 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->pdc_connection_status));
    6035         225 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_dc_name));
    6036         225 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->tc_connection_status));
    6037         225 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6038             :         }
    6039         225 :         if (ndr_flags & NDR_BUFFERS) {
    6040         225 :                 if (r->trusted_dc_name) {
    6041         213 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
    6042         213 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6043         213 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
    6044         213 :                         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));
    6045             :                 }
    6046             :         }
    6047         201 :         return NDR_ERR_SUCCESS;
    6048             : }
    6049             : 
    6050         366 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_NETLOGON_INFO_2 *r)
    6051             : {
    6052          36 :         uint32_t _ptr_trusted_dc_name;
    6053         366 :         uint32_t size_trusted_dc_name_1 = 0;
    6054         366 :         uint32_t length_trusted_dc_name_1 = 0;
    6055         366 :         TALLOC_CTX *_mem_save_trusted_dc_name_0 = NULL;
    6056         366 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6057         366 :         if (ndr_flags & NDR_SCALARS) {
    6058         366 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6059         402 :                 NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags));
    6060         366 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->pdc_connection_status));
    6061         366 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_dc_name));
    6062         366 :                 if (_ptr_trusted_dc_name) {
    6063         354 :                         NDR_PULL_ALLOC(ndr, r->trusted_dc_name);
    6064             :                 } else {
    6065          12 :                         r->trusted_dc_name = NULL;
    6066             :                 }
    6067         366 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->tc_connection_status));
    6068         366 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6069             :         }
    6070         366 :         if (ndr_flags & NDR_BUFFERS) {
    6071         366 :                 if (r->trusted_dc_name) {
    6072         354 :                         _mem_save_trusted_dc_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6073         354 :                         NDR_PULL_SET_MEM_CTX(ndr, r->trusted_dc_name, 0);
    6074         354 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_dc_name));
    6075         354 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->trusted_dc_name));
    6076         354 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->trusted_dc_name, &size_trusted_dc_name_1));
    6077         354 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->trusted_dc_name, &length_trusted_dc_name_1));
    6078         354 :                         if (length_trusted_dc_name_1 > size_trusted_dc_name_1) {
    6079           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_trusted_dc_name_1, length_trusted_dc_name_1);
    6080             :                         }
    6081         354 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_dc_name_1, sizeof(uint16_t)));
    6082         354 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->trusted_dc_name, length_trusted_dc_name_1, sizeof(uint16_t), CH_UTF16));
    6083         354 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_dc_name_0, 0);
    6084             :                 }
    6085             :         }
    6086         330 :         return NDR_ERR_SUCCESS;
    6087             : }
    6088             : 
    6089          48 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_2(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_2 *r)
    6090             : {
    6091          48 :         ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_2");
    6092          48 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6093          48 :         ndr->depth++;
    6094          48 :         ndr_print_netr_InfoFlags(ndr, "flags", r->flags);
    6095          48 :         ndr_print_WERROR(ndr, "pdc_connection_status", r->pdc_connection_status);
    6096          48 :         ndr_print_ptr(ndr, "trusted_dc_name", r->trusted_dc_name);
    6097          48 :         ndr->depth++;
    6098          48 :         if (r->trusted_dc_name) {
    6099          48 :                 ndr_print_string(ndr, "trusted_dc_name", r->trusted_dc_name);
    6100             :         }
    6101          48 :         ndr->depth--;
    6102          48 :         ndr_print_WERROR(ndr, "tc_connection_status", r->tc_connection_status);
    6103          48 :         ndr->depth--;
    6104             : }
    6105             : 
    6106          12 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_NETLOGON_INFO_3 *r)
    6107             : {
    6108          12 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6109          12 :         if (ndr_flags & NDR_SCALARS) {
    6110          12 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    6111          12 :                 NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags));
    6112          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_attempts));
    6113          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
    6114          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
    6115          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
    6116          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
    6117          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    6118          12 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    6119             :         }
    6120          12 :         if (ndr_flags & NDR_BUFFERS) {
    6121           0 :         }
    6122          12 :         return NDR_ERR_SUCCESS;
    6123             : }
    6124             : 
    6125          12 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_NETLOGON_INFO_3 *r)
    6126             : {
    6127          12 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6128          12 :         if (ndr_flags & NDR_SCALARS) {
    6129          12 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    6130          12 :                 NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags));
    6131          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_attempts));
    6132          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
    6133          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
    6134          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
    6135          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
    6136          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    6137          12 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    6138             :         }
    6139          12 :         if (ndr_flags & NDR_BUFFERS) {
    6140           0 :         }
    6141          12 :         return NDR_ERR_SUCCESS;
    6142             : }
    6143             : 
    6144           0 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_3(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_3 *r)
    6145             : {
    6146           0 :         ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_3");
    6147           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6148           0 :         ndr->depth++;
    6149           0 :         ndr_print_netr_InfoFlags(ndr, "flags", r->flags);
    6150           0 :         ndr_print_uint32(ndr, "logon_attempts", r->logon_attempts);
    6151           0 :         ndr_print_uint32(ndr, "unknown1", r->unknown1);
    6152           0 :         ndr_print_uint32(ndr, "unknown2", r->unknown2);
    6153           0 :         ndr_print_uint32(ndr, "unknown3", r->unknown3);
    6154           0 :         ndr_print_uint32(ndr, "unknown4", r->unknown4);
    6155           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    6156           0 :         ndr->depth--;
    6157             : }
    6158             : 
    6159           0 : static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_4(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_NETLOGON_INFO_4 *r)
    6160             : {
    6161           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6162           0 :         if (ndr_flags & NDR_SCALARS) {
    6163           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6164           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_dc_name));
    6165           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_domain_name));
    6166           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6167             :         }
    6168           0 :         if (ndr_flags & NDR_BUFFERS) {
    6169           0 :                 if (r->trusted_dc_name) {
    6170           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
    6171           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6172           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
    6173           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));
    6174             :                 }
    6175           0 :                 if (r->trusted_domain_name) {
    6176           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_domain_name, CH_UTF16)));
    6177           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6178           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_domain_name, CH_UTF16)));
    6179           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));
    6180             :                 }
    6181             :         }
    6182           0 :         return NDR_ERR_SUCCESS;
    6183             : }
    6184             : 
    6185           0 : static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_4(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_NETLOGON_INFO_4 *r)
    6186             : {
    6187           0 :         uint32_t _ptr_trusted_dc_name;
    6188           0 :         uint32_t size_trusted_dc_name_1 = 0;
    6189           0 :         uint32_t length_trusted_dc_name_1 = 0;
    6190           0 :         TALLOC_CTX *_mem_save_trusted_dc_name_0 = NULL;
    6191           0 :         uint32_t _ptr_trusted_domain_name;
    6192           0 :         uint32_t size_trusted_domain_name_1 = 0;
    6193           0 :         uint32_t length_trusted_domain_name_1 = 0;
    6194           0 :         TALLOC_CTX *_mem_save_trusted_domain_name_0 = NULL;
    6195           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6196           0 :         if (ndr_flags & NDR_SCALARS) {
    6197           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6198           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_dc_name));
    6199           0 :                 if (_ptr_trusted_dc_name) {
    6200           0 :                         NDR_PULL_ALLOC(ndr, r->trusted_dc_name);
    6201             :                 } else {
    6202           0 :                         r->trusted_dc_name = NULL;
    6203             :                 }
    6204           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domain_name));
    6205           0 :                 if (_ptr_trusted_domain_name) {
    6206           0 :                         NDR_PULL_ALLOC(ndr, r->trusted_domain_name);
    6207             :                 } else {
    6208           0 :                         r->trusted_domain_name = NULL;
    6209             :                 }
    6210           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6211             :         }
    6212           0 :         if (ndr_flags & NDR_BUFFERS) {
    6213           0 :                 if (r->trusted_dc_name) {
    6214           0 :                         _mem_save_trusted_dc_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6215           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->trusted_dc_name, 0);
    6216           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_dc_name));
    6217           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->trusted_dc_name));
    6218           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->trusted_dc_name, &size_trusted_dc_name_1));
    6219           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->trusted_dc_name, &length_trusted_dc_name_1));
    6220           0 :                         if (length_trusted_dc_name_1 > size_trusted_dc_name_1) {
    6221           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_trusted_dc_name_1, length_trusted_dc_name_1);
    6222             :                         }
    6223           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_dc_name_1, sizeof(uint16_t)));
    6224           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->trusted_dc_name, length_trusted_dc_name_1, sizeof(uint16_t), CH_UTF16));
    6225           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_dc_name_0, 0);
    6226             :                 }
    6227           0 :                 if (r->trusted_domain_name) {
    6228           0 :                         _mem_save_trusted_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6229           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domain_name, 0);
    6230           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_domain_name));
    6231           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->trusted_domain_name));
    6232           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->trusted_domain_name, &size_trusted_domain_name_1));
    6233           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->trusted_domain_name, &length_trusted_domain_name_1));
    6234           0 :                         if (length_trusted_domain_name_1 > size_trusted_domain_name_1) {
    6235           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_trusted_domain_name_1, length_trusted_domain_name_1);
    6236             :                         }
    6237           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_domain_name_1, sizeof(uint16_t)));
    6238           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->trusted_domain_name, length_trusted_domain_name_1, sizeof(uint16_t), CH_UTF16));
    6239           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_name_0, 0);
    6240             :                 }
    6241             :         }
    6242           0 :         return NDR_ERR_SUCCESS;
    6243             : }
    6244             : 
    6245           0 : _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_4(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_4 *r)
    6246             : {
    6247           0 :         ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_4");
    6248           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6249           0 :         ndr->depth++;
    6250           0 :         ndr_print_ptr(ndr, "trusted_dc_name", r->trusted_dc_name);
    6251           0 :         ndr->depth++;
    6252           0 :         if (r->trusted_dc_name) {
    6253           0 :                 ndr_print_string(ndr, "trusted_dc_name", r->trusted_dc_name);
    6254             :         }
    6255           0 :         ndr->depth--;
    6256           0 :         ndr_print_ptr(ndr, "trusted_domain_name", r->trusted_domain_name);
    6257           0 :         ndr->depth++;
    6258           0 :         if (r->trusted_domain_name) {
    6259           0 :                 ndr_print_string(ndr, "trusted_domain_name", r->trusted_domain_name);
    6260             :         }
    6261           0 :         ndr->depth--;
    6262           0 :         ndr->depth--;
    6263             : }
    6264             : 
    6265        9721 : _PUBLIC_ enum ndr_err_code ndr_push_netr_CONTROL_QUERY_INFORMATION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_CONTROL_QUERY_INFORMATION *r)
    6266             : {
    6267        1674 :         uint32_t level;
    6268        9721 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6269        9721 :         if (ndr_flags & NDR_SCALARS) {
    6270             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6271        9721 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6272        9721 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6273        9721 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    6274             :                 /* ms_union is always aligned to the largest union arm*/
    6275        9721 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6276        9721 :                 switch (level) {
    6277        2472 :                         case 1: {
    6278        2472 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
    6279        2040 :                         break; }
    6280             : 
    6281        2614 :                         case 2: {
    6282        2614 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
    6283        2182 :                         break; }
    6284             : 
    6285        2678 :                         case 3: {
    6286        2678 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
    6287        2210 :                         break; }
    6288             : 
    6289        1648 :                         case 4: {
    6290        1648 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
    6291        1360 :                         break; }
    6292             : 
    6293         255 :                         default: {
    6294         255 :                         break; }
    6295             : 
    6296             :                 }
    6297             :         }
    6298        9721 :         if (ndr_flags & NDR_BUFFERS) {
    6299        9721 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6300             :                         /* We didn't get it above, and the token is not needed after this. */
    6301           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6302             :                 }
    6303        9721 :                 switch (level) {
    6304        2472 :                         case 1:
    6305        2472 :                                 if (r->info1) {
    6306         115 :                                         NDR_CHECK(ndr_push_netr_NETLOGON_INFO_1(ndr, NDR_SCALARS, r->info1));
    6307             :                                 }
    6308        2040 :                         break;
    6309             : 
    6310        2614 :                         case 2:
    6311        2614 :                                 if (r->info2) {
    6312         225 :                                         NDR_CHECK(ndr_push_netr_NETLOGON_INFO_2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
    6313             :                                 }
    6314        2182 :                         break;
    6315             : 
    6316        2678 :                         case 3:
    6317        2678 :                                 if (r->info3) {
    6318          12 :                                         NDR_CHECK(ndr_push_netr_NETLOGON_INFO_3(ndr, NDR_SCALARS, r->info3));
    6319             :                                 }
    6320        2210 :                         break;
    6321             : 
    6322        1648 :                         case 4:
    6323        1648 :                                 if (r->info4) {
    6324           0 :                                         NDR_CHECK(ndr_push_netr_NETLOGON_INFO_4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
    6325             :                                 }
    6326        1360 :                         break;
    6327             : 
    6328         255 :                         default:
    6329         255 :                         break;
    6330             : 
    6331             :                 }
    6332             :         }
    6333        8047 :         return NDR_ERR_SUCCESS;
    6334             : }
    6335             : 
    6336        8337 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_CONTROL_QUERY_INFORMATION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_CONTROL_QUERY_INFORMATION *r)
    6337             : {
    6338        1411 :         uint32_t level;
    6339        1411 :         uint32_t _level;
    6340        8337 :         TALLOC_CTX *_mem_save_info1_0 = NULL;
    6341        1411 :         uint32_t _ptr_info1;
    6342        8337 :         TALLOC_CTX *_mem_save_info2_0 = NULL;
    6343        1411 :         uint32_t _ptr_info2;
    6344        8337 :         TALLOC_CTX *_mem_save_info3_0 = NULL;
    6345        1411 :         uint32_t _ptr_info3;
    6346        8337 :         TALLOC_CTX *_mem_save_info4_0 = NULL;
    6347        1411 :         uint32_t _ptr_info4;
    6348        8337 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6349        8337 :         if (ndr_flags & NDR_SCALARS) {
    6350             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6351        8337 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6352        8337 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6353        8337 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    6354        8337 :                 if (_level != level) {
    6355           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    6356             :                 }
    6357             :                 /* ms_union is always aligned to the largest union arm*/
    6358        8337 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6359        8337 :                 switch (level) {
    6360        2088 :                         case 1: {
    6361        2088 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
    6362        2088 :                                 if (_ptr_info1) {
    6363          99 :                                         NDR_PULL_ALLOC(ndr, r->info1);
    6364             :                                 } else {
    6365        1989 :                                         r->info1 = NULL;
    6366             :                                 }
    6367        1728 :                         break; }
    6368             : 
    6369        2334 :                         case 2: {
    6370        2334 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
    6371        2334 :                                 if (_ptr_info2) {
    6372         366 :                                         NDR_PULL_ALLOC(ndr, r->info2);
    6373             :                                 } else {
    6374        1968 :                                         r->info2 = NULL;
    6375             :                                 }
    6376        1958 :                         break; }
    6377             : 
    6378        2262 :                         case 3: {
    6379        2262 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
    6380        2262 :                                 if (_ptr_info3) {
    6381          12 :                                         NDR_PULL_ALLOC(ndr, r->info3);
    6382             :                                 } else {
    6383        2250 :                                         r->info3 = NULL;
    6384             :                                 }
    6385        1872 :                         break; }
    6386             : 
    6387        1392 :                         case 4: {
    6388        1392 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
    6389        1392 :                                 if (_ptr_info4) {
    6390           0 :                                         NDR_PULL_ALLOC(ndr, r->info4);
    6391             :                                 } else {
    6392        1392 :                                         r->info4 = NULL;
    6393             :                                 }
    6394        1152 :                         break; }
    6395             : 
    6396         216 :                         default: {
    6397         216 :                         break; }
    6398             : 
    6399             :                 }
    6400             :         }
    6401        8337 :         if (ndr_flags & NDR_BUFFERS) {
    6402        8337 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6403             :                         /* We didn't get it above, and the token is not needed after this. */
    6404           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6405             :                 }
    6406        8337 :                 switch (level) {
    6407        2088 :                         case 1:
    6408        2088 :                                 if (r->info1) {
    6409          99 :                                         _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6410          99 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
    6411          99 :                                         NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_1(ndr, NDR_SCALARS, r->info1));
    6412          99 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
    6413             :                                 }
    6414        1728 :                         break;
    6415             : 
    6416        2334 :                         case 2:
    6417        2334 :                                 if (r->info2) {
    6418         366 :                                         _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6419         366 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
    6420         366 :                                         NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
    6421         366 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
    6422             :                                 }
    6423        1958 :                         break;
    6424             : 
    6425        2262 :                         case 3:
    6426        2262 :                                 if (r->info3) {
    6427          12 :                                         _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6428          12 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
    6429          12 :                                         NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_3(ndr, NDR_SCALARS, r->info3));
    6430          12 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
    6431             :                                 }
    6432        1872 :                         break;
    6433             : 
    6434        1392 :                         case 4:
    6435        1392 :                                 if (r->info4) {
    6436           0 :                                         _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6437           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
    6438           0 :                                         NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
    6439           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
    6440             :                                 }
    6441        1152 :                         break;
    6442             : 
    6443         216 :                         default:
    6444         216 :                         break;
    6445             : 
    6446             :                 }
    6447             :         }
    6448        6926 :         return NDR_ERR_SUCCESS;
    6449             : }
    6450             : 
    6451        3348 : _PUBLIC_ void ndr_print_netr_CONTROL_QUERY_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_QUERY_INFORMATION *r)
    6452             : {
    6453         558 :         uint32_t level;
    6454        3348 :         level = ndr_print_steal_switch_value(ndr, r);
    6455        3348 :         ndr_print_union(ndr, name, level, "netr_CONTROL_QUERY_INFORMATION");
    6456        3348 :         switch (level) {
    6457         864 :                 case 1:
    6458         864 :                         ndr_print_ptr(ndr, "info1", r->info1);
    6459         864 :                         ndr->depth++;
    6460         864 :                         if (r->info1) {
    6461          36 :                                 ndr_print_netr_NETLOGON_INFO_1(ndr, "info1", r->info1);
    6462             :                         }
    6463         864 :                         ndr->depth--;
    6464         864 :                 break;
    6465             : 
    6466         864 :                 case 2:
    6467         864 :                         ndr_print_ptr(ndr, "info2", r->info2);
    6468         864 :                         ndr->depth++;
    6469         864 :                         if (r->info2) {
    6470          48 :                                 ndr_print_netr_NETLOGON_INFO_2(ndr, "info2", r->info2);
    6471             :                         }
    6472         864 :                         ndr->depth--;
    6473         864 :                 break;
    6474             : 
    6475         936 :                 case 3:
    6476         936 :                         ndr_print_ptr(ndr, "info3", r->info3);
    6477         936 :                         ndr->depth++;
    6478         936 :                         if (r->info3) {
    6479           0 :                                 ndr_print_netr_NETLOGON_INFO_3(ndr, "info3", r->info3);
    6480             :                         }
    6481         936 :                         ndr->depth--;
    6482         936 :                 break;
    6483             : 
    6484         576 :                 case 4:
    6485         576 :                         ndr_print_ptr(ndr, "info4", r->info4);
    6486         576 :                         ndr->depth++;
    6487         576 :                         if (r->info4) {
    6488           0 :                                 ndr_print_netr_NETLOGON_INFO_4(ndr, "info4", r->info4);
    6489             :                         }
    6490         576 :                         ndr->depth--;
    6491         576 :                 break;
    6492             : 
    6493          90 :                 default:
    6494          90 :                 break;
    6495             : 
    6496             :         }
    6497        3348 : }
    6498             : 
    6499       11019 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonControlCode(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_LogonControlCode r)
    6500             : {
    6501       11019 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    6502        9172 :         return NDR_ERR_SUCCESS;
    6503             : }
    6504             : 
    6505        8047 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonControlCode(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_LogonControlCode *r)
    6506             : {
    6507        1395 :         uint32_t v;
    6508        8047 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    6509        8047 :         *r = v;
    6510        8047 :         return NDR_ERR_SUCCESS;
    6511             : }
    6512             : 
    6513           0 : _PUBLIC_ void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char *name, enum netr_LogonControlCode r)
    6514             : {
    6515           0 :         const char *val = NULL;
    6516             : 
    6517           0 :         switch (r) {
    6518           0 :                 case NETLOGON_CONTROL_QUERY: val = "NETLOGON_CONTROL_QUERY"; break;
    6519           0 :                 case NETLOGON_CONTROL_REPLICATE: val = "NETLOGON_CONTROL_REPLICATE"; break;
    6520           0 :                 case NETLOGON_CONTROL_SYNCHRONIZE: val = "NETLOGON_CONTROL_SYNCHRONIZE"; break;
    6521           0 :                 case NETLOGON_CONTROL_PDC_REPLICATE: val = "NETLOGON_CONTROL_PDC_REPLICATE"; break;
    6522           0 :                 case NETLOGON_CONTROL_REDISCOVER: val = "NETLOGON_CONTROL_REDISCOVER"; break;
    6523           0 :                 case NETLOGON_CONTROL_TC_QUERY: val = "NETLOGON_CONTROL_TC_QUERY"; break;
    6524           0 :                 case NETLOGON_CONTROL_TRANSPORT_NOTIFY: val = "NETLOGON_CONTROL_TRANSPORT_NOTIFY"; break;
    6525           0 :                 case NETLOGON_CONTROL_FIND_USER: val = "NETLOGON_CONTROL_FIND_USER"; break;
    6526           0 :                 case NETLOGON_CONTROL_CHANGE_PASSWORD: val = "NETLOGON_CONTROL_CHANGE_PASSWORD"; break;
    6527           0 :                 case NETLOGON_CONTROL_TC_VERIFY: val = "NETLOGON_CONTROL_TC_VERIFY"; break;
    6528           0 :                 case NETLOGON_CONTROL_FORCE_DNS_REG: val = "NETLOGON_CONTROL_FORCE_DNS_REG"; break;
    6529           0 :                 case NETLOGON_CONTROL_QUERY_DNS_REG: val = "NETLOGON_CONTROL_QUERY_DNS_REG"; break;
    6530           0 :                 case NETLOGON_CONTROL_BACKUP_CHANGE_LOG: val = "NETLOGON_CONTROL_BACKUP_CHANGE_LOG"; break;
    6531           0 :                 case NETLOGON_CONTROL_TRUNCATE_LOG: val = "NETLOGON_CONTROL_TRUNCATE_LOG"; break;
    6532           0 :                 case NETLOGON_CONTROL_SET_DBFLAG: val = "NETLOGON_CONTROL_SET_DBFLAG"; break;
    6533           0 :                 case NETLOGON_CONTROL_BREAKPOINT: val = "NETLOGON_CONTROL_BREAKPOINT"; break;
    6534             :         }
    6535           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    6536           0 : }
    6537             : 
    6538        2682 : _PUBLIC_ enum ndr_err_code ndr_push_netr_CONTROL_DATA_INFORMATION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_CONTROL_DATA_INFORMATION *r)
    6539             : {
    6540         436 :         uint32_t level;
    6541        2682 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6542        2682 :         if (ndr_flags & NDR_SCALARS) {
    6543             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6544        2682 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6545        2682 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6546        2682 :                 NDR_CHECK(ndr_push_netr_LogonControlCode(ndr, NDR_SCALARS, level));
    6547             :                 /* ms_union is always aligned to the largest union arm*/
    6548        2682 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6549        2682 :                 switch (level) {
    6550         620 :                         case NETLOGON_CONTROL_REDISCOVER: {
    6551         620 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    6552         522 :                         break; }
    6553             : 
    6554         564 :                         case NETLOGON_CONTROL_TC_QUERY: {
    6555         564 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    6556         466 :                         break; }
    6557             : 
    6558         522 :                         case NETLOGON_CONTROL_TRANSPORT_NOTIFY: {
    6559         522 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    6560         432 :                         break; }
    6561             : 
    6562           0 :                         case NETLOGON_CONTROL_CHANGE_PASSWORD: {
    6563           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    6564           0 :                         break; }
    6565             : 
    6566         106 :                         case NETLOGON_CONTROL_TC_VERIFY: {
    6567         106 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    6568         106 :                         break; }
    6569             : 
    6570           0 :                         case NETLOGON_CONTROL_FIND_USER: {
    6571           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
    6572           0 :                         break; }
    6573             : 
    6574         696 :                         case NETLOGON_CONTROL_SET_DBFLAG: {
    6575         696 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->debug_level));
    6576         576 :                         break; }
    6577             : 
    6578         144 :                         default: {
    6579         144 :                         break; }
    6580             : 
    6581             :                 }
    6582             :         }
    6583        2682 :         if (ndr_flags & NDR_BUFFERS) {
    6584        2682 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6585             :                         /* We didn't get it above, and the token is not needed after this. */
    6586           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6587             :                 }
    6588        2682 :                 switch (level) {
    6589         620 :                         case NETLOGON_CONTROL_REDISCOVER:
    6590         620 :                                 if (r->domain) {
    6591         620 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6592         620 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6593         620 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6594         620 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6595             :                                 }
    6596         522 :                         break;
    6597             : 
    6598         564 :                         case NETLOGON_CONTROL_TC_QUERY:
    6599         564 :                                 if (r->domain) {
    6600         564 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6601         564 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6602         564 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6603         564 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6604             :                                 }
    6605         466 :                         break;
    6606             : 
    6607         522 :                         case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
    6608         522 :                                 if (r->domain) {
    6609         522 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6610         522 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6611         522 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6612         522 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6613             :                                 }
    6614         432 :                         break;
    6615             : 
    6616           0 :                         case NETLOGON_CONTROL_CHANGE_PASSWORD:
    6617           0 :                                 if (r->domain) {
    6618           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6619           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6620           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6621           0 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6622             :                                 }
    6623           0 :                         break;
    6624             : 
    6625         106 :                         case NETLOGON_CONTROL_TC_VERIFY:
    6626         106 :                                 if (r->domain) {
    6627         106 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6628         106 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6629         106 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    6630         106 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6631             :                                 }
    6632         106 :                         break;
    6633             : 
    6634           0 :                         case NETLOGON_CONTROL_FIND_USER:
    6635           0 :                                 if (r->user) {
    6636           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    6637           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6638           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    6639           0 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6640             :                                 }
    6641           0 :                         break;
    6642             : 
    6643         576 :                         case NETLOGON_CONTROL_SET_DBFLAG:
    6644         576 :                         break;
    6645             : 
    6646         144 :                         default:
    6647         144 :                         break;
    6648             : 
    6649             :                 }
    6650             :         }
    6651        2246 :         return NDR_ERR_SUCCESS;
    6652             : }
    6653             : 
    6654        2461 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_CONTROL_DATA_INFORMATION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_CONTROL_DATA_INFORMATION *r)
    6655             : {
    6656         420 :         uint32_t level;
    6657         420 :         uint32_t _level;
    6658        2461 :         TALLOC_CTX *_mem_save_domain_0 = NULL;
    6659         420 :         uint32_t _ptr_domain;
    6660        2461 :         uint32_t size_domain_1 = 0;
    6661        2461 :         uint32_t length_domain_1 = 0;
    6662        2461 :         TALLOC_CTX *_mem_save_user_0 = NULL;
    6663         420 :         uint32_t _ptr_user;
    6664        2461 :         uint32_t size_user_1 = 0;
    6665        2461 :         uint32_t length_user_1 = 0;
    6666        2461 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6667        2461 :         if (ndr_flags & NDR_SCALARS) {
    6668             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6669        2461 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6670        2461 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6671        2461 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    6672        2461 :                 if (_level != level) {
    6673           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    6674             :                 }
    6675             :                 /* ms_union is always aligned to the largest union arm*/
    6676        2461 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6677        2461 :                 switch (level) {
    6678         538 :                         case NETLOGON_CONTROL_REDISCOVER: {
    6679         538 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    6680         538 :                                 if (_ptr_domain) {
    6681         538 :                                         NDR_PULL_ALLOC(ndr, r->domain);
    6682             :                                 } else {
    6683           0 :                                         r->domain = NULL;
    6684             :                                 }
    6685         448 :                         break; }
    6686             : 
    6687         510 :                         case NETLOGON_CONTROL_TC_QUERY: {
    6688         510 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    6689         510 :                                 if (_ptr_domain) {
    6690         510 :                                         NDR_PULL_ALLOC(ndr, r->domain);
    6691             :                                 } else {
    6692           0 :                                         r->domain = NULL;
    6693             :                                 }
    6694         420 :                         break; }
    6695             : 
    6696         510 :                         case NETLOGON_CONTROL_TRANSPORT_NOTIFY: {
    6697         510 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    6698         510 :                                 if (_ptr_domain) {
    6699         510 :                                         NDR_PULL_ALLOC(ndr, r->domain);
    6700             :                                 } else {
    6701           0 :                                         r->domain = NULL;
    6702             :                                 }
    6703         420 :                         break; }
    6704             : 
    6705           0 :                         case NETLOGON_CONTROL_CHANGE_PASSWORD: {
    6706           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    6707           0 :                                 if (_ptr_domain) {
    6708           0 :                                         NDR_PULL_ALLOC(ndr, r->domain);
    6709             :                                 } else {
    6710           0 :                                         r->domain = NULL;
    6711             :                                 }
    6712           0 :                         break; }
    6713             : 
    6714          53 :                         case NETLOGON_CONTROL_TC_VERIFY: {
    6715          53 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    6716          53 :                                 if (_ptr_domain) {
    6717          53 :                                         NDR_PULL_ALLOC(ndr, r->domain);
    6718             :                                 } else {
    6719           0 :                                         r->domain = NULL;
    6720             :                                 }
    6721          53 :                         break; }
    6722             : 
    6723           0 :                         case NETLOGON_CONTROL_FIND_USER: {
    6724           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
    6725           0 :                                 if (_ptr_user) {
    6726           0 :                                         NDR_PULL_ALLOC(ndr, r->user);
    6727             :                                 } else {
    6728           0 :                                         r->user = NULL;
    6729             :                                 }
    6730           0 :                         break; }
    6731             : 
    6732         680 :                         case NETLOGON_CONTROL_SET_DBFLAG: {
    6733         680 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->debug_level));
    6734         560 :                         break; }
    6735             : 
    6736         140 :                         default: {
    6737         140 :                         break; }
    6738             : 
    6739             :                 }
    6740             :         }
    6741        2461 :         if (ndr_flags & NDR_BUFFERS) {
    6742        2461 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6743             :                         /* We didn't get it above, and the token is not needed after this. */
    6744           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6745             :                 }
    6746        2461 :                 switch (level) {
    6747         538 :                         case NETLOGON_CONTROL_REDISCOVER:
    6748         538 :                                 if (r->domain) {
    6749         538 :                                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6750         538 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    6751         538 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
    6752         538 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
    6753         538 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
    6754         538 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
    6755         538 :                                         if (length_domain_1 > size_domain_1) {
    6756           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_1, length_domain_1);
    6757             :                                         }
    6758         538 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
    6759         538 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
    6760         538 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    6761             :                                 }
    6762         448 :                         break;
    6763             : 
    6764         510 :                         case NETLOGON_CONTROL_TC_QUERY:
    6765         510 :                                 if (r->domain) {
    6766         510 :                                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6767         510 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    6768         510 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
    6769         510 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
    6770         510 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
    6771         510 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
    6772         510 :                                         if (length_domain_1 > size_domain_1) {
    6773           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_1, length_domain_1);
    6774             :                                         }
    6775         510 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
    6776         510 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
    6777         510 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    6778             :                                 }
    6779         420 :                         break;
    6780             : 
    6781         510 :                         case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
    6782         510 :                                 if (r->domain) {
    6783         510 :                                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6784         510 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    6785         510 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
    6786         510 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
    6787         510 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
    6788         510 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
    6789         510 :                                         if (length_domain_1 > size_domain_1) {
    6790           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_1, length_domain_1);
    6791             :                                         }
    6792         510 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
    6793         510 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
    6794         510 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    6795             :                                 }
    6796         420 :                         break;
    6797             : 
    6798           0 :                         case NETLOGON_CONTROL_CHANGE_PASSWORD:
    6799           0 :                                 if (r->domain) {
    6800           0 :                                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6801           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    6802           0 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
    6803           0 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
    6804           0 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
    6805           0 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
    6806           0 :                                         if (length_domain_1 > size_domain_1) {
    6807           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_1, length_domain_1);
    6808             :                                         }
    6809           0 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
    6810           0 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
    6811           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    6812             :                                 }
    6813           0 :                         break;
    6814             : 
    6815          53 :                         case NETLOGON_CONTROL_TC_VERIFY:
    6816          53 :                                 if (r->domain) {
    6817          53 :                                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6818          53 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    6819          53 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
    6820          53 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
    6821          53 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
    6822          53 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
    6823          53 :                                         if (length_domain_1 > size_domain_1) {
    6824           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_1, length_domain_1);
    6825             :                                         }
    6826          53 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
    6827          53 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
    6828          53 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    6829             :                                 }
    6830          53 :                         break;
    6831             : 
    6832           0 :                         case NETLOGON_CONTROL_FIND_USER:
    6833           0 :                                 if (r->user) {
    6834           0 :                                         _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6835           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
    6836           0 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
    6837           0 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
    6838           0 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user, &size_user_1));
    6839           0 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user, &length_user_1));
    6840           0 :                                         if (length_user_1 > size_user_1) {
    6841           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_user_1, length_user_1);
    6842             :                                         }
    6843           0 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
    6844           0 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
    6845           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
    6846             :                                 }
    6847           0 :                         break;
    6848             : 
    6849         560 :                         case NETLOGON_CONTROL_SET_DBFLAG:
    6850         560 :                         break;
    6851             : 
    6852         140 :                         default:
    6853         140 :                         break;
    6854             : 
    6855             :                 }
    6856             :         }
    6857        2041 :         return NDR_ERR_SUCCESS;
    6858             : }
    6859             : 
    6860           0 : _PUBLIC_ void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_DATA_INFORMATION *r)
    6861             : {
    6862           0 :         uint32_t level;
    6863           0 :         level = ndr_print_steal_switch_value(ndr, r);
    6864           0 :         ndr_print_union(ndr, name, level, "netr_CONTROL_DATA_INFORMATION");
    6865           0 :         switch (level) {
    6866           0 :                 case NETLOGON_CONTROL_REDISCOVER:
    6867           0 :                         ndr_print_ptr(ndr, "domain", r->domain);
    6868           0 :                         ndr->depth++;
    6869           0 :                         if (r->domain) {
    6870           0 :                                 ndr_print_string(ndr, "domain", r->domain);
    6871             :                         }
    6872           0 :                         ndr->depth--;
    6873           0 :                 break;
    6874             : 
    6875           0 :                 case NETLOGON_CONTROL_TC_QUERY:
    6876           0 :                         ndr_print_ptr(ndr, "domain", r->domain);
    6877           0 :                         ndr->depth++;
    6878           0 :                         if (r->domain) {
    6879           0 :                                 ndr_print_string(ndr, "domain", r->domain);
    6880             :                         }
    6881           0 :                         ndr->depth--;
    6882           0 :                 break;
    6883             : 
    6884           0 :                 case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
    6885           0 :                         ndr_print_ptr(ndr, "domain", r->domain);
    6886           0 :                         ndr->depth++;
    6887           0 :                         if (r->domain) {
    6888           0 :                                 ndr_print_string(ndr, "domain", r->domain);
    6889             :                         }
    6890           0 :                         ndr->depth--;
    6891           0 :                 break;
    6892             : 
    6893           0 :                 case NETLOGON_CONTROL_CHANGE_PASSWORD:
    6894           0 :                         ndr_print_ptr(ndr, "domain", r->domain);
    6895           0 :                         ndr->depth++;
    6896           0 :                         if (r->domain) {
    6897           0 :                                 ndr_print_string(ndr, "domain", r->domain);
    6898             :                         }
    6899           0 :                         ndr->depth--;
    6900           0 :                 break;
    6901             : 
    6902           0 :                 case NETLOGON_CONTROL_TC_VERIFY:
    6903           0 :                         ndr_print_ptr(ndr, "domain", r->domain);
    6904           0 :                         ndr->depth++;
    6905           0 :                         if (r->domain) {
    6906           0 :                                 ndr_print_string(ndr, "domain", r->domain);
    6907             :                         }
    6908           0 :                         ndr->depth--;
    6909           0 :                 break;
    6910             : 
    6911           0 :                 case NETLOGON_CONTROL_FIND_USER:
    6912           0 :                         ndr_print_ptr(ndr, "user", r->user);
    6913           0 :                         ndr->depth++;
    6914           0 :                         if (r->user) {
    6915           0 :                                 ndr_print_string(ndr, "user", r->user);
    6916             :                         }
    6917           0 :                         ndr->depth--;
    6918           0 :                 break;
    6919             : 
    6920           0 :                 case NETLOGON_CONTROL_SET_DBFLAG:
    6921           0 :                         ndr_print_uint32(ndr, "debug_level", r->debug_level);
    6922           0 :                 break;
    6923             : 
    6924           0 :                 default:
    6925           0 :                 break;
    6926             : 
    6927             :         }
    6928           0 : }
    6929             : 
    6930       19385 : _PUBLIC_ enum ndr_err_code ndr_push_netr_NegotiateFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
    6931             : {
    6932       19385 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    6933       17498 :         return NDR_ERR_SUCCESS;
    6934             : }
    6935             : 
    6936       25918 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_NegotiateFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
    6937             : {
    6938        2419 :         uint32_t v;
    6939       25918 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    6940       25918 :         *r = v;
    6941       25918 :         return NDR_ERR_SUCCESS;
    6942             : }
    6943             : 
    6944        1226 : _PUBLIC_ void ndr_print_netr_NegotiateFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    6945             : {
    6946        1226 :         ndr_print_uint32(ndr, name, r);
    6947        1226 :         ndr->depth++;
    6948        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_ACCOUNT_LOCKOUT", NETLOGON_NEG_ACCOUNT_LOCKOUT, r);
    6949        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PERSISTENT_SAMREPL", NETLOGON_NEG_PERSISTENT_SAMREPL, r);
    6950        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_ARCFOUR", NETLOGON_NEG_ARCFOUR, r);
    6951        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PROMOTION_COUNT", NETLOGON_NEG_PROMOTION_COUNT, r);
    6952        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_CHANGELOG_BDC", NETLOGON_NEG_CHANGELOG_BDC, r);
    6953        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_FULL_SYNC_REPL", NETLOGON_NEG_FULL_SYNC_REPL, r);
    6954        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_MULTIPLE_SIDS", NETLOGON_NEG_MULTIPLE_SIDS, r);
    6955        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_REDO", NETLOGON_NEG_REDO, r);
    6956        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL", NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL, r);
    6957        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_SEND_PASSWORD_INFO_PDC", NETLOGON_NEG_SEND_PASSWORD_INFO_PDC, r);
    6958        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_GENERIC_PASSTHROUGH", NETLOGON_NEG_GENERIC_PASSTHROUGH, r);
    6959        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_CONCURRENT_RPC", NETLOGON_NEG_CONCURRENT_RPC, r);
    6960        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL", NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL, r);
    6961        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL", NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL, r);
    6962        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_STRONG_KEYS", NETLOGON_NEG_STRONG_KEYS, r);
    6963        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_TRANSITIVE_TRUSTS", NETLOGON_NEG_TRANSITIVE_TRUSTS, r);
    6964        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_DNS_DOMAIN_TRUSTS", NETLOGON_NEG_DNS_DOMAIN_TRUSTS, r);
    6965        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_PASSWORD_SET2", NETLOGON_NEG_PASSWORD_SET2, r);
    6966        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_GETDOMAININFO", NETLOGON_NEG_GETDOMAININFO, r);
    6967        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_CROSS_FOREST_TRUSTS", NETLOGON_NEG_CROSS_FOREST_TRUSTS, r);
    6968        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION", NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION, r);
    6969        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_RODC_PASSTHROUGH", NETLOGON_NEG_RODC_PASSTHROUGH, r);
    6970        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_SUPPORTS_AES_SHA2", NETLOGON_NEG_SUPPORTS_AES_SHA2, r);
    6971        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_SUPPORTS_AES", NETLOGON_NEG_SUPPORTS_AES, r);
    6972        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AUTHENTICATED_RPC_LSASS", NETLOGON_NEG_AUTHENTICATED_RPC_LSASS, r);
    6973        1226 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NEG_AUTHENTICATED_RPC", NETLOGON_NEG_AUTHENTICATED_RPC, r);
    6974        1226 :         ndr->depth--;
    6975        1226 : }
    6976             : 
    6977          12 : static enum ndr_err_code ndr_push_SyncStateEnum(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum SyncStateEnum r)
    6978             : {
    6979          12 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
    6980          12 :         return NDR_ERR_SUCCESS;
    6981             : }
    6982             : 
    6983          12 : static enum ndr_err_code ndr_pull_SyncStateEnum(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum SyncStateEnum *r)
    6984             : {
    6985           0 :         uint16_t v;
    6986          12 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
    6987          12 :         *r = v;
    6988          12 :         return NDR_ERR_SUCCESS;
    6989             : }
    6990             : 
    6991           0 : _PUBLIC_ void ndr_print_SyncStateEnum(struct ndr_print *ndr, const char *name, enum SyncStateEnum r)
    6992             : {
    6993           0 :         const char *val = NULL;
    6994             : 
    6995           0 :         switch (r) {
    6996           0 :                 case SYNCSTATE_NORMAL_STATE: val = "SYNCSTATE_NORMAL_STATE"; break;
    6997           0 :                 case SYNCSTATE_DOMAIN_STATE: val = "SYNCSTATE_DOMAIN_STATE"; break;
    6998           0 :                 case SYNCSTATE_GROUP_STATE: val = "SYNCSTATE_GROUP_STATE"; break;
    6999           0 :                 case SYNCSTATE_UAS_BUILT_IN_GROUP_STATE: val = "SYNCSTATE_UAS_BUILT_IN_GROUP_STATE"; break;
    7000           0 :                 case SYNCSTATE_USER_STATE: val = "SYNCSTATE_USER_STATE"; break;
    7001           0 :                 case SYNCSTATE_GROUP_MEMBER_STATE: val = "SYNCSTATE_GROUP_MEMBER_STATE"; break;
    7002           0 :                 case SYNCSTATE_ALIAS_STATE: val = "SYNCSTATE_ALIAS_STATE"; break;
    7003           0 :                 case SYNCSTATE_ALIAS_MEMBER_STATE: val = "SYNCSTATE_ALIAS_MEMBER_STATE"; break;
    7004           0 :                 case SYNCSTATE_SAM_DONE_STATE: val = "SYNCSTATE_SAM_DONE_STATE"; break;
    7005             :         }
    7006           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    7007           0 : }
    7008             : 
    7009          48 : static enum ndr_err_code ndr_push_netr_ChangeLogFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint16_t r)
    7010             : {
    7011          48 :         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
    7012          40 :         return NDR_ERR_SUCCESS;
    7013             : }
    7014             : 
    7015          24 : static enum ndr_err_code ndr_pull_netr_ChangeLogFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint16_t *r)
    7016             : {
    7017           4 :         uint16_t v;
    7018          24 :         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
    7019          24 :         *r = v;
    7020          24 :         return NDR_ERR_SUCCESS;
    7021             : }
    7022             : 
    7023           0 : _PUBLIC_ void ndr_print_netr_ChangeLogFlags(struct ndr_print *ndr, const char *name, uint16_t r)
    7024             : {
    7025           0 :         ndr_print_uint16(ndr, name, r);
    7026           0 :         ndr->depth++;
    7027           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED", NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED, r);
    7028           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_CHANGED_PASSWORD", NETR_CHANGELOG_CHANGED_PASSWORD, r);
    7029           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_SID_INCLUDED", NETR_CHANGELOG_SID_INCLUDED, r);
    7030           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_NAME_INCLUDED", NETR_CHANGELOG_NAME_INCLUDED, r);
    7031           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_FIRST_PROMOTION_OBJ", NETR_CHANGELOG_FIRST_PROMOTION_OBJ, r);
    7032           0 :         ndr->depth--;
    7033           0 : }
    7034             : 
    7035          88 : static enum ndr_err_code ndr_push_netr_ChangeLogObject(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_ChangeLogObject *r)
    7036             : {
    7037           8 :         uint32_t level;
    7038          88 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7039          88 :         if (ndr_flags & NDR_SCALARS) {
    7040             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7041          48 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7042             :                 /* ms_union is always aligned to the largest union arm*/
    7043          48 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    7044          48 :                 switch (level) {
    7045           0 :                         case NETR_CHANGELOG_SID_INCLUDED: {
    7046           0 :                                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->object_sid));
    7047           0 :                         break; }
    7048             : 
    7049           0 :                         case NETR_CHANGELOG_NAME_INCLUDED: {
    7050             :                                 {
    7051           0 :                                         libndr_flags _flags_save_string = ndr->flags;
    7052           0 :                                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    7053           0 :                                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->object_name));
    7054           0 :                                         ndr->flags = _flags_save_string;
    7055             :                                 }
    7056           0 :                         break; }
    7057             : 
    7058          40 :                         default: {
    7059          40 :                         break; }
    7060             : 
    7061             :                 }
    7062             :         }
    7063          80 :         return NDR_ERR_SUCCESS;
    7064             : }
    7065             : 
    7066          48 : static enum ndr_err_code ndr_pull_netr_ChangeLogObject(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_ChangeLogObject *r)
    7067             : {
    7068           8 :         uint32_t level;
    7069          48 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7070          48 :         if (ndr_flags & NDR_SCALARS) {
    7071             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7072          24 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7073             :                 /* ms_union is always aligned to the largest union arm*/
    7074          24 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    7075          24 :                 switch (level) {
    7076           0 :                         case NETR_CHANGELOG_SID_INCLUDED: {
    7077           0 :                                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->object_sid));
    7078           0 :                         break; }
    7079             : 
    7080           0 :                         case NETR_CHANGELOG_NAME_INCLUDED: {
    7081             :                                 {
    7082           0 :                                         libndr_flags _flags_save_string = ndr->flags;
    7083           0 :                                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    7084           0 :                                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->object_name));
    7085           0 :                                         ndr->flags = _flags_save_string;
    7086             :                                 }
    7087           0 :                         break; }
    7088             : 
    7089          20 :                         default: {
    7090          20 :                         break; }
    7091             : 
    7092             :                 }
    7093             :         }
    7094          40 :         return NDR_ERR_SUCCESS;
    7095             : }
    7096             : 
    7097           0 : _PUBLIC_ void ndr_print_netr_ChangeLogObject(struct ndr_print *ndr, const char *name, const union netr_ChangeLogObject *r)
    7098             : {
    7099           0 :         uint32_t level;
    7100           0 :         level = ndr_print_steal_switch_value(ndr, r);
    7101           0 :         ndr_print_union(ndr, name, level, "netr_ChangeLogObject");
    7102           0 :         switch (level) {
    7103           0 :                 case NETR_CHANGELOG_SID_INCLUDED:
    7104           0 :                         ndr_print_dom_sid(ndr, "object_sid", &r->object_sid);
    7105           0 :                 break;
    7106             : 
    7107           0 :                 case NETR_CHANGELOG_NAME_INCLUDED:
    7108             :                         {
    7109           0 :                                 libndr_flags _flags_save_string = ndr->flags;
    7110           0 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    7111           0 :                                 ndr_print_string(ndr, "object_name", r->object_name);
    7112           0 :                                 ndr->flags = _flags_save_string;
    7113             :                         }
    7114           0 :                 break;
    7115             : 
    7116           0 :                 default:
    7117           0 :                 break;
    7118             : 
    7119             :         }
    7120           0 : }
    7121             : 
    7122          48 : _PUBLIC_ enum ndr_err_code ndr_push_netr_ChangeLogEntry(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_ChangeLogEntry *r)
    7123             : {
    7124          48 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7125          48 :         if (ndr_flags & NDR_SCALARS) {
    7126          48 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    7127          48 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number1));
    7128          48 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number2));
    7129          48 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_rid));
    7130          56 :                 NDR_CHECK(ndr_push_netr_ChangeLogFlags(ndr, NDR_SCALARS, r->flags));
    7131          48 :                 NDR_CHECK(ndr_push_netr_SamDatabaseID8Bit(ndr, NDR_SCALARS, r->db_index));
    7132          48 :                 NDR_CHECK(ndr_push_netr_DeltaEnum8Bit(ndr, NDR_SCALARS, r->delta_type));
    7133          48 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
    7134          48 :                 NDR_CHECK(ndr_push_netr_ChangeLogObject(ndr, NDR_SCALARS, &r->object));
    7135          48 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    7136             :         }
    7137          48 :         if (ndr_flags & NDR_BUFFERS) {
    7138          48 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
    7139          40 :                 NDR_CHECK(ndr_push_netr_ChangeLogObject(ndr, NDR_BUFFERS, &r->object));
    7140             :         }
    7141          40 :         return NDR_ERR_SUCCESS;
    7142             : }
    7143             : 
    7144          24 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_ChangeLogEntry(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_ChangeLogEntry *r)
    7145             : {
    7146          24 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7147          24 :         if (ndr_flags & NDR_SCALARS) {
    7148          24 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    7149          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number1));
    7150          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number2));
    7151          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->object_rid));
    7152          28 :                 NDR_CHECK(ndr_pull_netr_ChangeLogFlags(ndr, NDR_SCALARS, &r->flags));
    7153          24 :                 NDR_CHECK(ndr_pull_netr_SamDatabaseID8Bit(ndr, NDR_SCALARS, &r->db_index));
    7154          24 :                 NDR_CHECK(ndr_pull_netr_DeltaEnum8Bit(ndr, NDR_SCALARS, &r->delta_type));
    7155          24 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
    7156          24 :                 NDR_CHECK(ndr_pull_netr_ChangeLogObject(ndr, NDR_SCALARS, &r->object));
    7157          24 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    7158             :         }
    7159          24 :         if (ndr_flags & NDR_BUFFERS) {
    7160          24 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
    7161          24 :                 NDR_CHECK(ndr_pull_netr_ChangeLogObject(ndr, NDR_BUFFERS, &r->object));
    7162             :         }
    7163          20 :         return NDR_ERR_SUCCESS;
    7164             : }
    7165             : 
    7166           0 : static void ndr_print_flags_netr_ChangeLogEntry(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_ChangeLogEntry *r)
    7167             : {
    7168           0 :         ndr_print_netr_ChangeLogEntry(ndr, name, r);
    7169           0 : }
    7170             : 
    7171           0 : _PUBLIC_ void ndr_print_netr_ChangeLogEntry(struct ndr_print *ndr, const char *name, const struct netr_ChangeLogEntry *r)
    7172             : {
    7173           0 :         ndr_print_struct(ndr, name, "netr_ChangeLogEntry");
    7174           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7175           0 :         ndr->depth++;
    7176           0 :         ndr_print_uint32(ndr, "serial_number1", r->serial_number1);
    7177           0 :         ndr_print_uint32(ndr, "serial_number2", r->serial_number2);
    7178           0 :         ndr_print_uint32(ndr, "object_rid", r->object_rid);
    7179           0 :         ndr_print_netr_ChangeLogFlags(ndr, "flags", r->flags);
    7180           0 :         ndr_print_netr_SamDatabaseID8Bit(ndr, "db_index", r->db_index);
    7181           0 :         ndr_print_netr_DeltaEnum8Bit(ndr, "delta_type", r->delta_type);
    7182           0 :         ndr_print_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED));
    7183           0 :         ndr_print_netr_ChangeLogObject(ndr, "object", &r->object);
    7184           0 :         ndr->depth--;
    7185             : }
    7186             : 
    7187          24 : _PUBLIC_ size_t ndr_size_netr_ChangeLogEntry(const struct netr_ChangeLogEntry *r, libndr_flags flags)
    7188             : {
    7189          24 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_netr_ChangeLogEntry);
    7190             : }
    7191             : 
    7192           0 : static enum ndr_err_code ndr_push_netr_Blob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_Blob *r)
    7193             : {
    7194           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7195           0 :         if (ndr_flags & NDR_SCALARS) {
    7196           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7197           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
    7198           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
    7199           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7200             :         }
    7201           0 :         if (ndr_flags & NDR_BUFFERS) {
    7202           0 :                 if (r->data) {
    7203           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
    7204           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
    7205             :                 }
    7206             :         }
    7207           0 :         return NDR_ERR_SUCCESS;
    7208             : }
    7209             : 
    7210           0 : static enum ndr_err_code ndr_pull_netr_Blob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_Blob *r)
    7211             : {
    7212           0 :         uint32_t _ptr_data;
    7213           0 :         uint32_t size_data_1 = 0;
    7214           0 :         TALLOC_CTX *_mem_save_data_0 = NULL;
    7215           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7216           0 :         if (ndr_flags & NDR_SCALARS) {
    7217           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7218           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
    7219           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
    7220           0 :                 if (_ptr_data) {
    7221           0 :                         NDR_PULL_ALLOC(ndr, r->data);
    7222             :                 } else {
    7223           0 :                         r->data = NULL;
    7224             :                 }
    7225           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7226             :         }
    7227           0 :         if (ndr_flags & NDR_BUFFERS) {
    7228           0 :                 if (r->data) {
    7229           0 :                         _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7230           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
    7231           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
    7232           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
    7233           0 :                         NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
    7234           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
    7235           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
    7236             :                 }
    7237           0 :                 if (r->data) {
    7238           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->length));
    7239             :                 }
    7240             :         }
    7241           0 :         return NDR_ERR_SUCCESS;
    7242             : }
    7243             : 
    7244           0 : _PUBLIC_ void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const struct netr_Blob *r)
    7245             : {
    7246           0 :         ndr_print_struct(ndr, name, "netr_Blob");
    7247           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7248           0 :         ndr->depth++;
    7249           0 :         ndr_print_uint32(ndr, "length", r->length);
    7250           0 :         ndr_print_ptr(ndr, "data", r->data);
    7251           0 :         ndr->depth++;
    7252           0 :         if (r->data) {
    7253           0 :                 ndr_print_array_uint8(ndr, "data", r->data, r->length);
    7254             :         }
    7255           0 :         ndr->depth--;
    7256           0 :         ndr->depth--;
    7257             : }
    7258             : 
    7259         373 : static enum ndr_err_code ndr_push_netr_DsRGetDCName_flags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
    7260             : {
    7261         373 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    7262         339 :         return NDR_ERR_SUCCESS;
    7263             : }
    7264             : 
    7265         399 : static enum ndr_err_code ndr_pull_netr_DsRGetDCName_flags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
    7266             : {
    7267          34 :         uint32_t v;
    7268         399 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    7269         399 :         *r = v;
    7270         399 :         return NDR_ERR_SUCCESS;
    7271             : }
    7272             : 
    7273           0 : _PUBLIC_ void ndr_print_netr_DsRGetDCName_flags(struct ndr_print *ndr, const char *name, uint32_t r)
    7274             : {
    7275           0 :         ndr_print_uint32(ndr, name, r);
    7276           0 :         ndr->depth++;
    7277           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_FORCE_REDISCOVERY", DS_FORCE_REDISCOVERY, r);
    7278           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_REQUIRED", DS_DIRECTORY_SERVICE_REQUIRED, r);
    7279           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_PREFERRED", DS_DIRECTORY_SERVICE_PREFERRED, r);
    7280           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_GC_SERVER_REQUIRED", DS_GC_SERVER_REQUIRED, r);
    7281           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_PDC_REQUIRED", DS_PDC_REQUIRED, r);
    7282           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_BACKGROUND_ONLY", DS_BACKGROUND_ONLY, r);
    7283           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IP_REQUIRED", DS_IP_REQUIRED, r);
    7284           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_KDC_REQUIRED", DS_KDC_REQUIRED, r);
    7285           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_TIMESERV_REQUIRED", DS_TIMESERV_REQUIRED, r);
    7286           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_WRITABLE_REQUIRED", DS_WRITABLE_REQUIRED, r);
    7287           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_GOOD_TIMESERV_PREFERRED", DS_GOOD_TIMESERV_PREFERRED, r);
    7288           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_AVOID_SELF", DS_AVOID_SELF, r);
    7289           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ONLY_LDAP_NEEDED", DS_ONLY_LDAP_NEEDED, r);
    7290           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IS_FLAT_NAME", DS_IS_FLAT_NAME, r);
    7291           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IS_DNS_NAME", DS_IS_DNS_NAME, r);
    7292           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_TRY_NEXTCLOSEST_SITE", DS_TRY_NEXTCLOSEST_SITE, r);
    7293           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_6_REQUIRED", DS_DIRECTORY_SERVICE_6_REQUIRED, r);
    7294           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_WEB_SERVICE_REQUIRED", DS_WEB_SERVICE_REQUIRED, r);
    7295           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_8_REQUIRED", DS_DIRECTORY_SERVICE_8_REQUIRED, r);
    7296           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_9_REQUIRED", DS_DIRECTORY_SERVICE_9_REQUIRED, r);
    7297           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_10_REQUIRED", DS_DIRECTORY_SERVICE_10_REQUIRED, r);
    7298           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_RETURN_DNS_NAME", DS_RETURN_DNS_NAME, r);
    7299           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_RETURN_FLAT_NAME", DS_RETURN_FLAT_NAME, r);
    7300           0 :         ndr->depth--;
    7301           0 : }
    7302             : 
    7303        2059 : static enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo_AddressType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_DsRGetDCNameInfo_AddressType r)
    7304             : {
    7305        2059 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    7306        2017 :         return NDR_ERR_SUCCESS;
    7307             : }
    7308             : 
    7309         471 : static enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo_AddressType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_DsRGetDCNameInfo_AddressType *r)
    7310             : {
    7311          38 :         uint32_t v;
    7312         471 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    7313         471 :         *r = v;
    7314         471 :         return NDR_ERR_SUCCESS;
    7315             : }
    7316             : 
    7317         222 : _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo_AddressType(struct ndr_print *ndr, const char *name, enum netr_DsRGetDCNameInfo_AddressType r)
    7318             : {
    7319         222 :         const char *val = NULL;
    7320             : 
    7321         222 :         switch (r) {
    7322         222 :                 case DS_ADDRESS_TYPE_INET: val = "DS_ADDRESS_TYPE_INET"; break;
    7323           0 :                 case DS_ADDRESS_TYPE_NETBIOS: val = "DS_ADDRESS_TYPE_NETBIOS"; break;
    7324             :         }
    7325         222 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    7326         222 : }
    7327             : 
    7328        3679 : _PUBLIC_ enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DsRGetDCNameInfo *r)
    7329             : {
    7330        3679 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7331        3679 :         if (ndr_flags & NDR_SCALARS) {
    7332        2059 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7333        2059 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_unc));
    7334        2059 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_address));
    7335        2101 :                 NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo_AddressType(ndr, NDR_SCALARS, r->dc_address_type));
    7336        2059 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
    7337        2059 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name));
    7338        2059 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest_name));
    7339        2059 :                 NDR_CHECK(ndr_push_nbt_server_type(ndr, NDR_SCALARS, r->dc_flags));
    7340        2059 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_site_name));
    7341        2059 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_site_name));
    7342        2059 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7343             :         }
    7344        3679 :         if (ndr_flags & NDR_BUFFERS) {
    7345        2059 :                 if (r->dc_unc) {
    7346        2059 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_unc, CH_UTF16)));
    7347        2059 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7348        2059 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_unc, CH_UTF16)));
    7349        2059 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dc_unc, ndr_charset_length(r->dc_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7350             :                 }
    7351        2059 :                 if (r->dc_address) {
    7352        2059 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_address, CH_UTF16)));
    7353        2059 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7354        2059 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_address, CH_UTF16)));
    7355        2059 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dc_address, ndr_charset_length(r->dc_address, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7356             :                 }
    7357        2059 :                 if (r->domain_name) {
    7358        2059 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
    7359        2059 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7360        2059 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
    7361        2059 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, ndr_charset_length(r->domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7362             :                 }
    7363        2059 :                 if (r->forest_name) {
    7364        2053 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->forest_name, CH_UTF16)));
    7365        2053 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7366        2053 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->forest_name, CH_UTF16)));
    7367        2053 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->forest_name, ndr_charset_length(r->forest_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7368             :                 }
    7369        2059 :                 if (r->dc_site_name) {
    7370        1515 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_site_name, CH_UTF16)));
    7371        1515 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7372        1515 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dc_site_name, CH_UTF16)));
    7373        1515 :                         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));
    7374             :                 }
    7375        2059 :                 if (r->client_site_name) {
    7376        1473 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_site_name, CH_UTF16)));
    7377        1473 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7378        1473 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_site_name, CH_UTF16)));
    7379        1473 :                         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));
    7380             :                 }
    7381             :         }
    7382        3637 :         return NDR_ERR_SUCCESS;
    7383             : }
    7384             : 
    7385         511 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DsRGetDCNameInfo *r)
    7386             : {
    7387          42 :         uint32_t _ptr_dc_unc;
    7388         511 :         uint32_t size_dc_unc_1 = 0;
    7389         511 :         uint32_t length_dc_unc_1 = 0;
    7390         511 :         TALLOC_CTX *_mem_save_dc_unc_0 = NULL;
    7391          42 :         uint32_t _ptr_dc_address;
    7392         511 :         uint32_t size_dc_address_1 = 0;
    7393         511 :         uint32_t length_dc_address_1 = 0;
    7394         511 :         TALLOC_CTX *_mem_save_dc_address_0 = NULL;
    7395          42 :         uint32_t _ptr_domain_name;
    7396         511 :         uint32_t size_domain_name_1 = 0;
    7397         511 :         uint32_t length_domain_name_1 = 0;
    7398         511 :         TALLOC_CTX *_mem_save_domain_name_0 = NULL;
    7399          42 :         uint32_t _ptr_forest_name;
    7400         511 :         uint32_t size_forest_name_1 = 0;
    7401         511 :         uint32_t length_forest_name_1 = 0;
    7402         511 :         TALLOC_CTX *_mem_save_forest_name_0 = NULL;
    7403          42 :         uint32_t _ptr_dc_site_name;
    7404         511 :         uint32_t size_dc_site_name_1 = 0;
    7405         511 :         uint32_t length_dc_site_name_1 = 0;
    7406         511 :         TALLOC_CTX *_mem_save_dc_site_name_0 = NULL;
    7407          42 :         uint32_t _ptr_client_site_name;
    7408         511 :         uint32_t size_client_site_name_1 = 0;
    7409         511 :         uint32_t length_client_site_name_1 = 0;
    7410         511 :         TALLOC_CTX *_mem_save_client_site_name_0 = NULL;
    7411         511 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7412         511 :         if (ndr_flags & NDR_SCALARS) {
    7413         471 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7414         471 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_unc));
    7415         471 :                 if (_ptr_dc_unc) {
    7416         471 :                         NDR_PULL_ALLOC(ndr, r->dc_unc);
    7417             :                 } else {
    7418           0 :                         r->dc_unc = NULL;
    7419             :                 }
    7420         471 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_address));
    7421         471 :                 if (_ptr_dc_address) {
    7422         471 :                         NDR_PULL_ALLOC(ndr, r->dc_address);
    7423             :                 } else {
    7424           0 :                         r->dc_address = NULL;
    7425             :                 }
    7426         509 :                 NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo_AddressType(ndr, NDR_SCALARS, &r->dc_address_type));
    7427         471 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
    7428         471 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
    7429         471 :                 if (_ptr_domain_name) {
    7430         471 :                         NDR_PULL_ALLOC(ndr, r->domain_name);
    7431             :                 } else {
    7432           0 :                         r->domain_name = NULL;
    7433             :                 }
    7434         471 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_name));
    7435         471 :                 if (_ptr_forest_name) {
    7436         459 :                         NDR_PULL_ALLOC(ndr, r->forest_name);
    7437             :                 } else {
    7438          12 :                         r->forest_name = NULL;
    7439             :                 }
    7440         471 :                 NDR_CHECK(ndr_pull_nbt_server_type(ndr, NDR_SCALARS, &r->dc_flags));
    7441         471 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_site_name));
    7442         471 :                 if (_ptr_dc_site_name) {
    7443         451 :                         NDR_PULL_ALLOC(ndr, r->dc_site_name);
    7444             :                 } else {
    7445          20 :                         r->dc_site_name = NULL;
    7446             :                 }
    7447         471 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_site_name));
    7448         471 :                 if (_ptr_client_site_name) {
    7449         419 :                         NDR_PULL_ALLOC(ndr, r->client_site_name);
    7450             :                 } else {
    7451          52 :                         r->client_site_name = NULL;
    7452             :                 }
    7453         471 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7454             :         }
    7455         511 :         if (ndr_flags & NDR_BUFFERS) {
    7456         471 :                 if (r->dc_unc) {
    7457         471 :                         _mem_save_dc_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7458         471 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dc_unc, 0);
    7459         471 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_unc));
    7460         471 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_unc));
    7461         471 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dc_unc, &size_dc_unc_1));
    7462         471 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dc_unc, &length_dc_unc_1));
    7463         471 :                         if (length_dc_unc_1 > size_dc_unc_1) {
    7464           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dc_unc_1, length_dc_unc_1);
    7465             :                         }
    7466         471 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dc_unc_1, sizeof(uint16_t)));
    7467         471 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_unc, length_dc_unc_1, sizeof(uint16_t), CH_UTF16));
    7468         471 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_unc_0, 0);
    7469             :                 }
    7470         471 :                 if (r->dc_address) {
    7471         471 :                         _mem_save_dc_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7472         471 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dc_address, 0);
    7473         471 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_address));
    7474         471 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_address));
    7475         471 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dc_address, &size_dc_address_1));
    7476         471 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dc_address, &length_dc_address_1));
    7477         471 :                         if (length_dc_address_1 > size_dc_address_1) {
    7478           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dc_address_1, length_dc_address_1);
    7479             :                         }
    7480         471 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dc_address_1, sizeof(uint16_t)));
    7481         471 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_address, length_dc_address_1, sizeof(uint16_t), CH_UTF16));
    7482         471 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_address_0, 0);
    7483             :                 }
    7484         471 :                 if (r->domain_name) {
    7485         471 :                         _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7486         471 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain_name, 0);
    7487         471 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_name));
    7488         471 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_name));
    7489         471 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_name, &size_domain_name_1));
    7490         471 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_name, &length_domain_name_1));
    7491         471 :                         if (length_domain_name_1 > size_domain_name_1) {
    7492           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
    7493             :                         }
    7494         471 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
    7495         471 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
    7496         471 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
    7497             :                 }
    7498         471 :                 if (r->forest_name) {
    7499         459 :                         _mem_save_forest_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7500         459 :                         NDR_PULL_SET_MEM_CTX(ndr, r->forest_name, 0);
    7501         459 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->forest_name));
    7502         459 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->forest_name));
    7503         459 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->forest_name, &size_forest_name_1));
    7504         459 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->forest_name, &length_forest_name_1));
    7505         459 :                         if (length_forest_name_1 > size_forest_name_1) {
    7506           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_forest_name_1, length_forest_name_1);
    7507             :                         }
    7508         459 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_forest_name_1, sizeof(uint16_t)));
    7509         459 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->forest_name, length_forest_name_1, sizeof(uint16_t), CH_UTF16));
    7510         459 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_name_0, 0);
    7511             :                 }
    7512         471 :                 if (r->dc_site_name) {
    7513         451 :                         _mem_save_dc_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7514         451 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dc_site_name, 0);
    7515         451 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_site_name));
    7516         451 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_site_name));
    7517         451 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dc_site_name, &size_dc_site_name_1));
    7518         451 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dc_site_name, &length_dc_site_name_1));
    7519         451 :                         if (length_dc_site_name_1 > size_dc_site_name_1) {
    7520           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dc_site_name_1, length_dc_site_name_1);
    7521             :                         }
    7522         451 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dc_site_name_1, sizeof(uint16_t)));
    7523         451 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_site_name, length_dc_site_name_1, sizeof(uint16_t), CH_UTF16));
    7524         451 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_site_name_0, 0);
    7525             :                 }
    7526         471 :                 if (r->client_site_name) {
    7527         419 :                         _mem_save_client_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7528         419 :                         NDR_PULL_SET_MEM_CTX(ndr, r->client_site_name, 0);
    7529         419 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->client_site_name));
    7530         419 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->client_site_name));
    7531         419 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client_site_name, &size_client_site_name_1));
    7532         419 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client_site_name, &length_client_site_name_1));
    7533         419 :                         if (length_client_site_name_1 > size_client_site_name_1) {
    7534           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_client_site_name_1, length_client_site_name_1);
    7535             :                         }
    7536         419 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_client_site_name_1, sizeof(uint16_t)));
    7537         419 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_site_name, length_client_site_name_1, sizeof(uint16_t), CH_UTF16));
    7538         419 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_site_name_0, 0);
    7539             :                 }
    7540             :         }
    7541         469 :         return NDR_ERR_SUCCESS;
    7542             : }
    7543             : 
    7544           0 : static void ndr_print_flags_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_DsRGetDCNameInfo *r)
    7545             : {
    7546           0 :         ndr_print_netr_DsRGetDCNameInfo(ndr, name, r);
    7547           0 : }
    7548             : 
    7549         222 : _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r)
    7550             : {
    7551         222 :         ndr_print_struct(ndr, name, "netr_DsRGetDCNameInfo");
    7552         222 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7553         222 :         ndr->depth++;
    7554         222 :         ndr_print_ptr(ndr, "dc_unc", r->dc_unc);
    7555         222 :         ndr->depth++;
    7556         222 :         if (r->dc_unc) {
    7557         222 :                 ndr_print_string(ndr, "dc_unc", r->dc_unc);
    7558             :         }
    7559         222 :         ndr->depth--;
    7560         222 :         ndr_print_ptr(ndr, "dc_address", r->dc_address);
    7561         222 :         ndr->depth++;
    7562         222 :         if (r->dc_address) {
    7563         222 :                 ndr_print_string(ndr, "dc_address", r->dc_address);
    7564             :         }
    7565         222 :         ndr->depth--;
    7566         222 :         ndr_print_netr_DsRGetDCNameInfo_AddressType(ndr, "dc_address_type", r->dc_address_type);
    7567         222 :         ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
    7568         222 :         ndr_print_ptr(ndr, "domain_name", r->domain_name);
    7569         222 :         ndr->depth++;
    7570         222 :         if (r->domain_name) {
    7571         222 :                 ndr_print_string(ndr, "domain_name", r->domain_name);
    7572             :         }
    7573         222 :         ndr->depth--;
    7574         222 :         ndr_print_ptr(ndr, "forest_name", r->forest_name);
    7575         222 :         ndr->depth++;
    7576         222 :         if (r->forest_name) {
    7577         204 :                 ndr_print_string(ndr, "forest_name", r->forest_name);
    7578             :         }
    7579         222 :         ndr->depth--;
    7580         222 :         ndr_print_nbt_server_type(ndr, "dc_flags", r->dc_flags);
    7581         222 :         ndr_print_ptr(ndr, "dc_site_name", r->dc_site_name);
    7582         222 :         ndr->depth++;
    7583         222 :         if (r->dc_site_name) {
    7584         186 :                 ndr_print_string(ndr, "dc_site_name", r->dc_site_name);
    7585             :         }
    7586         222 :         ndr->depth--;
    7587         222 :         ndr_print_ptr(ndr, "client_site_name", r->client_site_name);
    7588         222 :         ndr->depth++;
    7589         222 :         if (r->client_site_name) {
    7590         186 :                 ndr_print_string(ndr, "client_site_name", r->client_site_name);
    7591             :         }
    7592         222 :         ndr->depth--;
    7593         222 :         ndr->depth--;
    7594             : }
    7595             : 
    7596        1191 : static enum ndr_err_code ndr_push_netr_Capabilities(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_Capabilities *r)
    7597             : {
    7598         156 :         uint32_t level;
    7599        1191 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7600        1191 :         if (ndr_flags & NDR_SCALARS) {
    7601             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7602        1191 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7603        1191 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    7604        1191 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    7605             :                 /* ms_union is always aligned to the largest union arm*/
    7606        1191 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    7607        1191 :                 switch (level) {
    7608        1191 :                         case 1: {
    7609        1191 :                                 NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, r->server_capabilities));
    7610        1035 :                         break; }
    7611             : 
    7612           0 :                         case 2: {
    7613           0 :                                 NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, r->server_capabilities));
    7614           0 :                         break; }
    7615             : 
    7616           0 :                         default:
    7617           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    7618             :                 }
    7619             :         }
    7620        1191 :         if (ndr_flags & NDR_BUFFERS) {
    7621           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7622             :                         /* We didn't get it above, and the token is not needed after this. */
    7623           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7624             :                 }
    7625           0 :                 switch (level) {
    7626           0 :                         case 1:
    7627           0 :                         break;
    7628             : 
    7629           0 :                         case 2:
    7630           0 :                         break;
    7631             : 
    7632           0 :                         default:
    7633           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    7634             :                 }
    7635             :         }
    7636        1035 :         return NDR_ERR_SUCCESS;
    7637             : }
    7638             : 
    7639         998 : static enum ndr_err_code ndr_pull_netr_Capabilities(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_Capabilities *r)
    7640             : {
    7641         130 :         uint32_t level;
    7642         130 :         uint32_t _level;
    7643         998 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7644         998 :         if (ndr_flags & NDR_SCALARS) {
    7645             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7646         998 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7647         998 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    7648         998 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    7649         998 :                 if (_level != level) {
    7650           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    7651             :                 }
    7652             :                 /* ms_union is always aligned to the largest union arm*/
    7653         998 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    7654         998 :                 switch (level) {
    7655         998 :                         case 1: {
    7656         998 :                                 NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, &r->server_capabilities));
    7657         868 :                         break; }
    7658             : 
    7659           0 :                         case 2: {
    7660           0 :                                 NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, &r->server_capabilities));
    7661           0 :                         break; }
    7662             : 
    7663           0 :                         default:
    7664           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    7665             :                 }
    7666             :         }
    7667         998 :         if (ndr_flags & NDR_BUFFERS) {
    7668           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7669             :                         /* We didn't get it above, and the token is not needed after this. */
    7670           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7671             :                 }
    7672           0 :                 switch (level) {
    7673           0 :                         case 1:
    7674           0 :                         break;
    7675             : 
    7676           0 :                         case 2:
    7677           0 :                         break;
    7678             : 
    7679           0 :                         default:
    7680           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    7681             :                 }
    7682             :         }
    7683         868 :         return NDR_ERR_SUCCESS;
    7684             : }
    7685             : 
    7686         312 : _PUBLIC_ void ndr_print_netr_Capabilities(struct ndr_print *ndr, const char *name, const union netr_Capabilities *r)
    7687             : {
    7688          52 :         uint32_t level;
    7689         312 :         level = ndr_print_steal_switch_value(ndr, r);
    7690         312 :         ndr_print_union(ndr, name, level, "netr_Capabilities");
    7691         312 :         switch (level) {
    7692         312 :                 case 1:
    7693         312 :                         ndr_print_netr_NegotiateFlags(ndr, "server_capabilities", r->server_capabilities);
    7694         312 :                 break;
    7695             : 
    7696           0 :                 case 2:
    7697           0 :                         ndr_print_netr_NegotiateFlags(ndr, "server_capabilities", r->server_capabilities);
    7698           0 :                 break;
    7699             : 
    7700           0 :                 default:
    7701           0 :                         ndr_print_bad_level(ndr, name, level);
    7702             :         }
    7703         312 : }
    7704             : 
    7705         493 : _PUBLIC_ enum ndr_err_code ndr_push_netr_TrustFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
    7706             : {
    7707         493 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    7708         449 :         return NDR_ERR_SUCCESS;
    7709             : }
    7710             : 
    7711        4780 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_TrustFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
    7712             : {
    7713          44 :         uint32_t v;
    7714        4780 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    7715        4780 :         *r = v;
    7716        4780 :         return NDR_ERR_SUCCESS;
    7717             : }
    7718             : 
    7719         107 : _PUBLIC_ void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    7720             : {
    7721         107 :         ndr_print_uint32(ndr, name, r);
    7722         107 :         ndr->depth++;
    7723         107 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_IN_FOREST", NETR_TRUST_FLAG_IN_FOREST, r);
    7724         107 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_OUTBOUND", NETR_TRUST_FLAG_OUTBOUND, r);
    7725         107 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_TREEROOT", NETR_TRUST_FLAG_TREEROOT, r);
    7726         107 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_PRIMARY", NETR_TRUST_FLAG_PRIMARY, r);
    7727         107 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_NATIVE", NETR_TRUST_FLAG_NATIVE, r);
    7728         107 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_INBOUND", NETR_TRUST_FLAG_INBOUND, r);
    7729         107 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_MIT_KRB5", NETR_TRUST_FLAG_MIT_KRB5, r);
    7730         107 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_AES", NETR_TRUST_FLAG_AES, r);
    7731         107 :         ndr->depth--;
    7732         107 : }
    7733             : 
    7734         430 : static enum ndr_err_code ndr_push_netr_WorkstationFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
    7735             : {
    7736         430 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    7737         367 :         return NDR_ERR_SUCCESS;
    7738             : }
    7739             : 
    7740         406 : static enum ndr_err_code ndr_pull_netr_WorkstationFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
    7741             : {
    7742          70 :         uint32_t v;
    7743         406 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    7744         406 :         *r = v;
    7745         406 :         return NDR_ERR_SUCCESS;
    7746             : }
    7747             : 
    7748          98 : _PUBLIC_ void ndr_print_netr_WorkstationFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    7749             : {
    7750          98 :         ndr_print_uint32(ndr, name, r);
    7751          98 :         ndr->depth++;
    7752          98 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS", NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS, r);
    7753          98 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_WS_FLAG_HANDLES_SPN_UPDATE", NETR_WS_FLAG_HANDLES_SPN_UPDATE, r);
    7754          98 :         ndr->depth--;
    7755          98 : }
    7756             : 
    7757          48 : static enum ndr_err_code ndr_push_netr_SuiteMask(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint16_t r)
    7758             : {
    7759          48 :         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
    7760          40 :         return NDR_ERR_SUCCESS;
    7761             : }
    7762             : 
    7763          50 : static enum ndr_err_code ndr_pull_netr_SuiteMask(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint16_t *r)
    7764             : {
    7765          10 :         uint16_t v;
    7766          50 :         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
    7767          50 :         *r = v;
    7768          50 :         return NDR_ERR_SUCCESS;
    7769             : }
    7770             : 
    7771           2 : _PUBLIC_ void ndr_print_netr_SuiteMask(struct ndr_print *ndr, const char *name, uint16_t r)
    7772             : {
    7773           2 :         ndr_print_uint16(ndr, name, r);
    7774           2 :         ndr->depth++;
    7775           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_BACKOFFICE", NETR_VER_SUITE_BACKOFFICE, r);
    7776           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_BLADE", NETR_VER_SUITE_BLADE, r);
    7777           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_COMPUTE_SERVER", NETR_VER_SUITE_COMPUTE_SERVER, r);
    7778           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_DATACENTER", NETR_VER_SUITE_DATACENTER, r);
    7779           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_ENTERPRISE", NETR_VER_SUITE_ENTERPRISE, r);
    7780           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_EMBEDDEDNT", NETR_VER_SUITE_EMBEDDEDNT, r);
    7781           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_PERSONAL", NETR_VER_SUITE_PERSONAL, r);
    7782           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_SINGLEUSERTS", NETR_VER_SUITE_SINGLEUSERTS, r);
    7783           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_SMALLBUSINESS", NETR_VER_SUITE_SMALLBUSINESS, r);
    7784           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED", NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED, r);
    7785           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_STORAGE_SERVER", NETR_VER_SUITE_STORAGE_SERVER, r);
    7786           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_TERMINAL", NETR_VER_SUITE_TERMINAL, r);
    7787           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_VER_SUITE_WH_SERVER", NETR_VER_SUITE_WH_SERVER, r);
    7788           2 :         ndr->depth--;
    7789           2 : }
    7790             : 
    7791          48 : static enum ndr_err_code ndr_push_netr_ProductType(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint8_t r)
    7792             : {
    7793          48 :         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
    7794          40 :         return NDR_ERR_SUCCESS;
    7795             : }
    7796             : 
    7797          50 : static enum ndr_err_code ndr_pull_netr_ProductType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint8_t *r)
    7798             : {
    7799          10 :         uint8_t v;
    7800          50 :         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
    7801          50 :         *r = v;
    7802          50 :         return NDR_ERR_SUCCESS;
    7803             : }
    7804             : 
    7805           2 : _PUBLIC_ void ndr_print_netr_ProductType(struct ndr_print *ndr, const char *name, uint8_t r)
    7806             : {
    7807           2 :         ndr_print_uint8(ndr, name, r);
    7808           2 :         ndr->depth++;
    7809           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "NETR_VER_NT_DOMAIN_CONTROLLER", NETR_VER_NT_DOMAIN_CONTROLLER, r);
    7810           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "NETR_VER_NT_SERVER", NETR_VER_NT_SERVER, r);
    7811           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "NETR_VER_NT_WORKSTATION", NETR_VER_NT_WORKSTATION, r);
    7812           2 :         ndr->depth--;
    7813           2 : }
    7814             : 
    7815         874 : static enum ndr_err_code ndr_push_netr_LsaPolicyInformation(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_LsaPolicyInformation *r)
    7816             : {
    7817         874 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7818         874 :         if (ndr_flags & NDR_SCALARS) {
    7819         444 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7820         444 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->policy_size));
    7821         444 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->policy));
    7822         444 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7823             :         }
    7824         874 :         if (ndr_flags & NDR_BUFFERS) {
    7825         444 :                 if (r->policy) {
    7826           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->policy_size));
    7827           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->policy, r->policy_size));
    7828             :                 }
    7829             :         }
    7830         748 :         return NDR_ERR_SUCCESS;
    7831             : }
    7832             : 
    7833         822 : static enum ndr_err_code ndr_pull_netr_LsaPolicyInformation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_LsaPolicyInformation *r)
    7834             : {
    7835         140 :         uint32_t _ptr_policy;
    7836         822 :         uint32_t size_policy_1 = 0;
    7837         822 :         TALLOC_CTX *_mem_save_policy_0 = NULL;
    7838         822 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7839         822 :         if (ndr_flags & NDR_SCALARS) {
    7840         416 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7841         416 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->policy_size));
    7842         416 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_policy));
    7843         416 :                 if (_ptr_policy) {
    7844           0 :                         NDR_PULL_ALLOC(ndr, r->policy);
    7845             :                 } else {
    7846         416 :                         r->policy = NULL;
    7847             :                 }
    7848         416 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7849             :         }
    7850         822 :         if (ndr_flags & NDR_BUFFERS) {
    7851         416 :                 if (r->policy) {
    7852           0 :                         _mem_save_policy_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7853           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->policy, 0);
    7854           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->policy));
    7855           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->policy, &size_policy_1));
    7856           0 :                         NDR_PULL_ALLOC_N(ndr, r->policy, size_policy_1);
    7857           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->policy, size_policy_1));
    7858           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_0, 0);
    7859             :                 }
    7860         416 :                 if (r->policy) {
    7861           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->policy, r->policy_size));
    7862             :                 }
    7863             :         }
    7864         682 :         return NDR_ERR_SUCCESS;
    7865             : }
    7866             : 
    7867          98 : _PUBLIC_ void ndr_print_netr_LsaPolicyInformation(struct ndr_print *ndr, const char *name, const struct netr_LsaPolicyInformation *r)
    7868             : {
    7869          98 :         ndr_print_struct(ndr, name, "netr_LsaPolicyInformation");
    7870          98 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7871          98 :         ndr->depth++;
    7872          98 :         ndr_print_uint32(ndr, "policy_size", r->policy_size);
    7873          98 :         ndr_print_ptr(ndr, "policy", r->policy);
    7874          98 :         ndr->depth++;
    7875          98 :         if (r->policy) {
    7876           0 :                 ndr_print_array_uint8(ndr, "policy", r->policy, r->policy_size);
    7877             :         }
    7878          98 :         ndr->depth--;
    7879          98 :         ndr->depth--;
    7880             : }
    7881             : 
    7882          48 : static enum ndr_err_code ndr_push_netr_OsVersionInfoEx(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_OsVersionInfoEx *r)
    7883             : {
    7884          48 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7885          48 :         if (ndr_flags & NDR_SCALARS) {
    7886          48 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    7887          48 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 284));
    7888          48 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MajorVersion));
    7889          48 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MinorVersion));
    7890          48 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->BuildNumber));
    7891          48 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->PlatformId));
    7892             :                 {
    7893          48 :                         libndr_flags _flags_save_string = ndr->flags;
    7894          48 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    7895             :                         {
    7896           8 :                                 struct ndr_push *_ndr_CSDVersion;
    7897          48 :                                 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_CSDVersion, 0, 256));
    7898          48 :                                 NDR_CHECK(ndr_push_string(_ndr_CSDVersion, NDR_SCALARS, r->CSDVersion));
    7899          48 :                                 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_CSDVersion, 0, 256));
    7900             :                         }
    7901          48 :                         ndr->flags = _flags_save_string;
    7902             :                 }
    7903          48 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ServicePackMajor));
    7904          48 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ServicePackMinor));
    7905          56 :                 NDR_CHECK(ndr_push_netr_SuiteMask(ndr, NDR_SCALARS, r->SuiteMask));
    7906          56 :                 NDR_CHECK(ndr_push_netr_ProductType(ndr, NDR_SCALARS, r->ProductType));
    7907          48 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Reserved));
    7908          48 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    7909             :         }
    7910          48 :         if (ndr_flags & NDR_BUFFERS) {
    7911           8 :         }
    7912          48 :         return NDR_ERR_SUCCESS;
    7913             : }
    7914             : 
    7915          50 : static enum ndr_err_code ndr_pull_netr_OsVersionInfoEx(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_OsVersionInfoEx *r)
    7916             : {
    7917          50 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7918          50 :         if (ndr_flags & NDR_SCALARS) {
    7919          50 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    7920          50 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->OSVersionInfoSize));
    7921          50 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MajorVersion));
    7922          50 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MinorVersion));
    7923          50 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->BuildNumber));
    7924          50 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->PlatformId));
    7925             :                 {
    7926          50 :                         libndr_flags _flags_save_string = ndr->flags;
    7927          50 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    7928             :                         {
    7929          10 :                                 struct ndr_pull *_ndr_CSDVersion;
    7930          50 :                                 ssize_t sub_size = 256;
    7931          50 :                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_CSDVersion, 0, sub_size));
    7932          50 :                                 NDR_CHECK(ndr_pull_string(_ndr_CSDVersion, NDR_SCALARS, &r->CSDVersion));
    7933          50 :                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_CSDVersion, 0, sub_size));
    7934             :                         }
    7935          50 :                         ndr->flags = _flags_save_string;
    7936             :                 }
    7937          50 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ServicePackMajor));
    7938          50 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ServicePackMinor));
    7939          60 :                 NDR_CHECK(ndr_pull_netr_SuiteMask(ndr, NDR_SCALARS, &r->SuiteMask));
    7940          60 :                 NDR_CHECK(ndr_pull_netr_ProductType(ndr, NDR_SCALARS, &r->ProductType));
    7941          50 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Reserved));
    7942          50 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    7943             :         }
    7944          50 :         if (ndr_flags & NDR_BUFFERS) {
    7945          10 :         }
    7946          50 :         return NDR_ERR_SUCCESS;
    7947             : }
    7948             : 
    7949           2 : _PUBLIC_ void ndr_print_netr_OsVersionInfoEx(struct ndr_print *ndr, const char *name, const struct netr_OsVersionInfoEx *r)
    7950             : {
    7951           2 :         ndr_print_struct(ndr, name, "netr_OsVersionInfoEx");
    7952           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7953           2 :         ndr->depth++;
    7954           2 :         ndr_print_uint32(ndr, "OSVersionInfoSize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?284:r->OSVersionInfoSize);
    7955           2 :         ndr_print_uint32(ndr, "MajorVersion", r->MajorVersion);
    7956           2 :         ndr_print_uint32(ndr, "MinorVersion", r->MinorVersion);
    7957           2 :         ndr_print_uint32(ndr, "BuildNumber", r->BuildNumber);
    7958           2 :         ndr_print_uint32(ndr, "PlatformId", r->PlatformId);
    7959             :         {
    7960           2 :                 libndr_flags _flags_save_string = ndr->flags;
    7961           2 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    7962           2 :                 ndr_print_string(ndr, "CSDVersion", r->CSDVersion);
    7963           2 :                 ndr->flags = _flags_save_string;
    7964             :         }
    7965           2 :         ndr_print_uint16(ndr, "ServicePackMajor", r->ServicePackMajor);
    7966           2 :         ndr_print_uint16(ndr, "ServicePackMinor", r->ServicePackMinor);
    7967           2 :         ndr_print_netr_SuiteMask(ndr, "SuiteMask", r->SuiteMask);
    7968           2 :         ndr_print_netr_ProductType(ndr, "ProductType", r->ProductType);
    7969           2 :         ndr_print_uint8(ndr, "Reserved", r->Reserved);
    7970           2 :         ndr->depth--;
    7971             : }
    7972             : 
    7973          48 : static enum ndr_err_code ndr_push_netr_OsVersion(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_OsVersion *r)
    7974             : {
    7975          48 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7976          48 :         if (ndr_flags & NDR_SCALARS) {
    7977          48 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7978          48 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 142));
    7979          48 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7980          48 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 142));
    7981             :                 {
    7982           8 :                         struct ndr_push *_ndr_os;
    7983          48 :                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_os, 0, 142 * 2));
    7984          48 :                         NDR_CHECK(ndr_push_netr_OsVersionInfoEx(_ndr_os, NDR_SCALARS, &r->os));
    7985          48 :                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_os, 0, 142 * 2));
    7986             :                 }
    7987          48 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7988             :         }
    7989          48 :         if (ndr_flags & NDR_BUFFERS) {
    7990           8 :         }
    7991          48 :         return NDR_ERR_SUCCESS;
    7992             : }
    7993             : 
    7994          50 : static enum ndr_err_code ndr_pull_netr_OsVersion(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_OsVersion *r)
    7995             : {
    7996          50 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7997          50 :         if (ndr_flags & NDR_SCALARS) {
    7998          50 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7999          50 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->length));
    8000          50 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->dummy));
    8001          50 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->size));
    8002             :                 {
    8003          10 :                         struct ndr_pull *_ndr_os;
    8004          50 :                         ssize_t sub_size = r->size * 2;
    8005          50 :                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_os, 0, sub_size));
    8006          50 :                         NDR_CHECK(ndr_pull_netr_OsVersionInfoEx(_ndr_os, NDR_SCALARS, &r->os));
    8007          50 :                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_os, 0, sub_size));
    8008             :                 }
    8009          50 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8010             :         }
    8011          50 :         if (ndr_flags & NDR_BUFFERS) {
    8012          10 :         }
    8013          50 :         return NDR_ERR_SUCCESS;
    8014             : }
    8015             : 
    8016           2 : _PUBLIC_ void ndr_print_netr_OsVersion(struct ndr_print *ndr, const char *name, const struct netr_OsVersion *r)
    8017             : {
    8018           2 :         ndr_print_struct(ndr, name, "netr_OsVersion");
    8019           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8020           2 :         ndr->depth++;
    8021           2 :         ndr_print_uint3264(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?142:r->length);
    8022           2 :         ndr_print_uint3264(ndr, "dummy", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->dummy);
    8023           2 :         ndr_print_uint3264(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?142:r->size);
    8024           2 :         ndr_print_netr_OsVersionInfoEx(ndr, "os", &r->os);
    8025           2 :         ndr->depth--;
    8026             : }
    8027             : 
    8028         398 : static enum ndr_err_code ndr_push_netr_OsVersionContainer(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_OsVersionContainer *r)
    8029             : {
    8030         398 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8031         398 :         if (ndr_flags & NDR_SCALARS) {
    8032         199 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8033         207 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->os == NULL?0:284));
    8034         207 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->os == NULL?0:284));
    8035         199 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->os));
    8036         199 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    8037             :         }
    8038         398 :         if (ndr_flags & NDR_BUFFERS) {
    8039         199 :                 if (r->os) {
    8040          48 :                         NDR_CHECK(ndr_push_netr_OsVersion(ndr, NDR_SCALARS, r->os));
    8041             :                 }
    8042             :         }
    8043         342 :         return NDR_ERR_SUCCESS;
    8044             : }
    8045             : 
    8046         426 : static enum ndr_err_code ndr_pull_netr_OsVersionContainer(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_OsVersionContainer *r)
    8047             : {
    8048          76 :         uint32_t _ptr_os;
    8049         426 :         TALLOC_CTX *_mem_save_os_0 = NULL;
    8050         426 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8051         426 :         if (ndr_flags & NDR_SCALARS) {
    8052         213 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8053         213 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
    8054         213 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
    8055         213 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_os));
    8056         213 :                 if (_ptr_os) {
    8057          50 :                         NDR_PULL_ALLOC(ndr, r->os);
    8058             :                 } else {
    8059         163 :                         r->os = NULL;
    8060             :                 }
    8061         213 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8062             :         }
    8063         426 :         if (ndr_flags & NDR_BUFFERS) {
    8064         213 :                 if (r->os) {
    8065          50 :                         _mem_save_os_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8066          50 :                         NDR_PULL_SET_MEM_CTX(ndr, r->os, 0);
    8067          50 :                         NDR_CHECK(ndr_pull_netr_OsVersion(ndr, NDR_SCALARS, r->os));
    8068          50 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_os_0, 0);
    8069             :                 }
    8070             :         }
    8071         350 :         return NDR_ERR_SUCCESS;
    8072             : }
    8073             : 
    8074          10 : _PUBLIC_ void ndr_print_netr_OsVersionContainer(struct ndr_print *ndr, const char *name, const struct netr_OsVersionContainer *r)
    8075             : {
    8076          10 :         ndr_print_struct(ndr, name, "netr_OsVersionContainer");
    8077          10 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8078          10 :         ndr->depth++;
    8079          10 :         ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->os == NULL?0:284:r->length);
    8080          10 :         ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->os == NULL?0:284:r->size);
    8081          10 :         ndr_print_ptr(ndr, "os", r->os);
    8082          10 :         ndr->depth++;
    8083          10 :         if (r->os) {
    8084           2 :                 ndr_print_netr_OsVersion(ndr, "os", r->os);
    8085             :         }
    8086          10 :         ndr->depth--;
    8087          10 :         ndr->depth--;
    8088             : }
    8089             : 
    8090         199 : static enum ndr_err_code ndr_push_netr_WorkstationInformation(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_WorkstationInformation *r)
    8091             : {
    8092         199 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8093         199 :         if (ndr_flags & NDR_SCALARS) {
    8094         199 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8095         199 :                 NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_SCALARS, &r->lsa_policy));
    8096         199 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_hostname));
    8097         199 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sitename));
    8098         199 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy1));
    8099         199 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy2));
    8100         199 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy3));
    8101         199 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dummy4));
    8102         199 :                 NDR_CHECK(ndr_push_netr_OsVersionContainer(ndr, NDR_SCALARS, &r->os_version));
    8103         199 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->os_name));
    8104         199 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dummy_string3));
    8105         199 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dummy_string4));
    8106         227 :                 NDR_CHECK(ndr_push_netr_WorkstationFlags(ndr, NDR_SCALARS, r->workstation_flags));
    8107         199 :                 NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->supported_enc_types));
    8108         199 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long3));
    8109         199 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long4));
    8110         199 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    8111             :         }
    8112         199 :         if (ndr_flags & NDR_BUFFERS) {
    8113         199 :                 NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->lsa_policy));
    8114         199 :                 if (r->dns_hostname) {
    8115         165 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_hostname, CH_UTF16)));
    8116         165 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8117         165 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_hostname, CH_UTF16)));
    8118         165 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_hostname, ndr_charset_length(r->dns_hostname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8119             :                 }
    8120         199 :                 if (r->sitename) {
    8121         168 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sitename, CH_UTF16)));
    8122         168 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8123         168 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sitename, CH_UTF16)));
    8124         168 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->sitename, ndr_charset_length(r->sitename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8125             :                 }
    8126         199 :                 if (r->dummy1) {
    8127           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy1, CH_UTF16)));
    8128           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8129           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy1, CH_UTF16)));
    8130           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dummy1, ndr_charset_length(r->dummy1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8131             :                 }
    8132         199 :                 if (r->dummy2) {
    8133           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy2, CH_UTF16)));
    8134           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8135           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy2, CH_UTF16)));
    8136           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dummy2, ndr_charset_length(r->dummy2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8137             :                 }
    8138         199 :                 if (r->dummy3) {
    8139           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy3, CH_UTF16)));
    8140           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8141           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy3, CH_UTF16)));
    8142           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dummy3, ndr_charset_length(r->dummy3, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8143             :                 }
    8144         199 :                 if (r->dummy4) {
    8145           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy4, CH_UTF16)));
    8146           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8147           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dummy4, CH_UTF16)));
    8148           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dummy4, ndr_charset_length(r->dummy4, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8149             :                 }
    8150         199 :                 NDR_CHECK(ndr_push_netr_OsVersionContainer(ndr, NDR_BUFFERS, &r->os_version));
    8151         199 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->os_name));
    8152         199 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dummy_string3));
    8153         199 :                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dummy_string4));
    8154             :         }
    8155         171 :         return NDR_ERR_SUCCESS;
    8156             : }
    8157             : 
    8158         213 : static enum ndr_err_code ndr_pull_netr_WorkstationInformation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_WorkstationInformation *r)
    8159             : {
    8160          38 :         uint32_t _ptr_dns_hostname;
    8161         213 :         uint32_t size_dns_hostname_1 = 0;
    8162         213 :         uint32_t length_dns_hostname_1 = 0;
    8163         213 :         TALLOC_CTX *_mem_save_dns_hostname_0 = NULL;
    8164          38 :         uint32_t _ptr_sitename;
    8165         213 :         uint32_t size_sitename_1 = 0;
    8166         213 :         uint32_t length_sitename_1 = 0;
    8167         213 :         TALLOC_CTX *_mem_save_sitename_0 = NULL;
    8168          38 :         uint32_t _ptr_dummy1;
    8169         213 :         uint32_t size_dummy1_1 = 0;
    8170         213 :         uint32_t length_dummy1_1 = 0;
    8171         213 :         TALLOC_CTX *_mem_save_dummy1_0 = NULL;
    8172          38 :         uint32_t _ptr_dummy2;
    8173         213 :         uint32_t size_dummy2_1 = 0;
    8174         213 :         uint32_t length_dummy2_1 = 0;
    8175         213 :         TALLOC_CTX *_mem_save_dummy2_0 = NULL;
    8176          38 :         uint32_t _ptr_dummy3;
    8177         213 :         uint32_t size_dummy3_1 = 0;
    8178         213 :         uint32_t length_dummy3_1 = 0;
    8179         213 :         TALLOC_CTX *_mem_save_dummy3_0 = NULL;
    8180          38 :         uint32_t _ptr_dummy4;
    8181         213 :         uint32_t size_dummy4_1 = 0;
    8182         213 :         uint32_t length_dummy4_1 = 0;
    8183         213 :         TALLOC_CTX *_mem_save_dummy4_0 = NULL;
    8184         213 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8185         213 :         if (ndr_flags & NDR_SCALARS) {
    8186         213 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8187         213 :                 NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_SCALARS, &r->lsa_policy));
    8188         213 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_hostname));
    8189         213 :                 if (_ptr_dns_hostname) {
    8190         167 :                         NDR_PULL_ALLOC(ndr, r->dns_hostname);
    8191             :                 } else {
    8192          46 :                         r->dns_hostname = NULL;
    8193             :                 }
    8194         213 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sitename));
    8195         213 :                 if (_ptr_sitename) {
    8196         170 :                         NDR_PULL_ALLOC(ndr, r->sitename);
    8197             :                 } else {
    8198          43 :                         r->sitename = NULL;
    8199             :                 }
    8200         213 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy1));
    8201         213 :                 if (_ptr_dummy1) {
    8202           0 :                         NDR_PULL_ALLOC(ndr, r->dummy1);
    8203             :                 } else {
    8204         213 :                         r->dummy1 = NULL;
    8205             :                 }
    8206         213 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy2));
    8207         213 :                 if (_ptr_dummy2) {
    8208           0 :                         NDR_PULL_ALLOC(ndr, r->dummy2);
    8209             :                 } else {
    8210         213 :                         r->dummy2 = NULL;
    8211             :                 }
    8212         213 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy3));
    8213         213 :                 if (_ptr_dummy3) {
    8214           0 :                         NDR_PULL_ALLOC(ndr, r->dummy3);
    8215             :                 } else {
    8216         213 :                         r->dummy3 = NULL;
    8217             :                 }
    8218         213 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dummy4));
    8219         213 :                 if (_ptr_dummy4) {
    8220           0 :                         NDR_PULL_ALLOC(ndr, r->dummy4);
    8221             :                 } else {
    8222         213 :                         r->dummy4 = NULL;
    8223             :                 }
    8224         213 :                 NDR_CHECK(ndr_pull_netr_OsVersionContainer(ndr, NDR_SCALARS, &r->os_version));
    8225         213 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->os_name));
    8226         213 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dummy_string3));
    8227         213 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dummy_string4));
    8228         251 :                 NDR_CHECK(ndr_pull_netr_WorkstationFlags(ndr, NDR_SCALARS, &r->workstation_flags));
    8229         213 :                 NDR_CHECK(ndr_pull_kerb_EncTypes(ndr, NDR_SCALARS, &r->supported_enc_types));
    8230         213 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long3));
    8231         213 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long4));
    8232         213 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8233             :         }
    8234         213 :         if (ndr_flags & NDR_BUFFERS) {
    8235         213 :                 NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->lsa_policy));
    8236         213 :                 if (r->dns_hostname) {
    8237         167 :                         _mem_save_dns_hostname_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8238         167 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dns_hostname, 0);
    8239         167 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_hostname));
    8240         167 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_hostname));
    8241         167 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_hostname, &size_dns_hostname_1));
    8242         167 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_hostname, &length_dns_hostname_1));
    8243         167 :                         if (length_dns_hostname_1 > size_dns_hostname_1) {
    8244           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_hostname_1, length_dns_hostname_1);
    8245             :                         }
    8246         167 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_hostname_1, sizeof(uint16_t)));
    8247         167 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_hostname, length_dns_hostname_1, sizeof(uint16_t), CH_UTF16));
    8248         167 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_hostname_0, 0);
    8249             :                 }
    8250         213 :                 if (r->sitename) {
    8251         170 :                         _mem_save_sitename_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8252         170 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
    8253         170 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->sitename));
    8254         170 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->sitename));
    8255         170 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->sitename, &size_sitename_1));
    8256         170 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->sitename, &length_sitename_1));
    8257         170 :                         if (length_sitename_1 > size_sitename_1) {
    8258           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_sitename_1, length_sitename_1);
    8259             :                         }
    8260         170 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_sitename_1, sizeof(uint16_t)));
    8261         170 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->sitename, length_sitename_1, sizeof(uint16_t), CH_UTF16));
    8262         170 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_0, 0);
    8263             :                 }
    8264         213 :                 if (r->dummy1) {
    8265           0 :                         _mem_save_dummy1_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8266           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dummy1, 0);
    8267           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dummy1));
    8268           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dummy1));
    8269           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dummy1, &size_dummy1_1));
    8270           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dummy1, &length_dummy1_1));
    8271           0 :                         if (length_dummy1_1 > size_dummy1_1) {
    8272           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dummy1_1, length_dummy1_1);
    8273             :                         }
    8274           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dummy1_1, sizeof(uint16_t)));
    8275           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dummy1, length_dummy1_1, sizeof(uint16_t), CH_UTF16));
    8276           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy1_0, 0);
    8277             :                 }
    8278         213 :                 if (r->dummy2) {
    8279           0 :                         _mem_save_dummy2_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8280           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dummy2, 0);
    8281           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dummy2));
    8282           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dummy2));
    8283           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dummy2, &size_dummy2_1));
    8284           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dummy2, &length_dummy2_1));
    8285           0 :                         if (length_dummy2_1 > size_dummy2_1) {
    8286           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dummy2_1, length_dummy2_1);
    8287             :                         }
    8288           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dummy2_1, sizeof(uint16_t)));
    8289           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dummy2, length_dummy2_1, sizeof(uint16_t), CH_UTF16));
    8290           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy2_0, 0);
    8291             :                 }
    8292         213 :                 if (r->dummy3) {
    8293           0 :                         _mem_save_dummy3_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8294           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dummy3, 0);
    8295           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dummy3));
    8296           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dummy3));
    8297           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dummy3, &size_dummy3_1));
    8298           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dummy3, &length_dummy3_1));
    8299           0 :                         if (length_dummy3_1 > size_dummy3_1) {
    8300           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dummy3_1, length_dummy3_1);
    8301             :                         }
    8302           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dummy3_1, sizeof(uint16_t)));
    8303           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dummy3, length_dummy3_1, sizeof(uint16_t), CH_UTF16));
    8304           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy3_0, 0);
    8305             :                 }
    8306         213 :                 if (r->dummy4) {
    8307           0 :                         _mem_save_dummy4_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8308           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dummy4, 0);
    8309           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dummy4));
    8310           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dummy4));
    8311           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dummy4, &size_dummy4_1));
    8312           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dummy4, &length_dummy4_1));
    8313           0 :                         if (length_dummy4_1 > size_dummy4_1) {
    8314           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dummy4_1, length_dummy4_1);
    8315             :                         }
    8316           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dummy4_1, sizeof(uint16_t)));
    8317           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dummy4, length_dummy4_1, sizeof(uint16_t), CH_UTF16));
    8318           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dummy4_0, 0);
    8319             :                 }
    8320         213 :                 NDR_CHECK(ndr_pull_netr_OsVersionContainer(ndr, NDR_BUFFERS, &r->os_version));
    8321         213 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->os_name));
    8322         213 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dummy_string3));
    8323         213 :                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dummy_string4));
    8324             :         }
    8325         175 :         return NDR_ERR_SUCCESS;
    8326             : }
    8327             : 
    8328          10 : _PUBLIC_ void ndr_print_netr_WorkstationInformation(struct ndr_print *ndr, const char *name, const struct netr_WorkstationInformation *r)
    8329             : {
    8330          10 :         ndr_print_struct(ndr, name, "netr_WorkstationInformation");
    8331          10 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8332          10 :         ndr->depth++;
    8333          10 :         ndr_print_netr_LsaPolicyInformation(ndr, "lsa_policy", &r->lsa_policy);
    8334          10 :         ndr_print_ptr(ndr, "dns_hostname", r->dns_hostname);
    8335          10 :         ndr->depth++;
    8336          10 :         if (r->dns_hostname) {
    8337           2 :                 ndr_print_string(ndr, "dns_hostname", r->dns_hostname);
    8338             :         }
    8339          10 :         ndr->depth--;
    8340          10 :         ndr_print_ptr(ndr, "sitename", r->sitename);
    8341          10 :         ndr->depth++;
    8342          10 :         if (r->sitename) {
    8343           2 :                 ndr_print_string(ndr, "sitename", r->sitename);
    8344             :         }
    8345          10 :         ndr->depth--;
    8346          10 :         ndr_print_ptr(ndr, "dummy1", r->dummy1);
    8347          10 :         ndr->depth++;
    8348          10 :         if (r->dummy1) {
    8349           0 :                 ndr_print_string(ndr, "dummy1", r->dummy1);
    8350             :         }
    8351          10 :         ndr->depth--;
    8352          10 :         ndr_print_ptr(ndr, "dummy2", r->dummy2);
    8353          10 :         ndr->depth++;
    8354          10 :         if (r->dummy2) {
    8355           0 :                 ndr_print_string(ndr, "dummy2", r->dummy2);
    8356             :         }
    8357          10 :         ndr->depth--;
    8358          10 :         ndr_print_ptr(ndr, "dummy3", r->dummy3);
    8359          10 :         ndr->depth++;
    8360          10 :         if (r->dummy3) {
    8361           0 :                 ndr_print_string(ndr, "dummy3", r->dummy3);
    8362             :         }
    8363          10 :         ndr->depth--;
    8364          10 :         ndr_print_ptr(ndr, "dummy4", r->dummy4);
    8365          10 :         ndr->depth++;
    8366          10 :         if (r->dummy4) {
    8367           0 :                 ndr_print_string(ndr, "dummy4", r->dummy4);
    8368             :         }
    8369          10 :         ndr->depth--;
    8370          10 :         ndr_print_netr_OsVersionContainer(ndr, "os_version", &r->os_version);
    8371          10 :         ndr_print_lsa_String(ndr, "os_name", &r->os_name);
    8372          10 :         ndr_print_lsa_String(ndr, "dummy_string3", &r->dummy_string3);
    8373          10 :         ndr_print_lsa_String(ndr, "dummy_string4", &r->dummy_string4);
    8374          10 :         ndr_print_netr_WorkstationFlags(ndr, "workstation_flags", r->workstation_flags);
    8375          10 :         ndr_print_kerb_EncTypes(ndr, "supported_enc_types", r->supported_enc_types);
    8376          10 :         ndr_print_uint32(ndr, "dummy_long3", r->dummy_long3);
    8377          10 :         ndr_print_uint32(ndr, "dummy_long4", r->dummy_long4);
    8378          10 :         ndr->depth--;
    8379             : }
    8380             : 
    8381         199 : static enum ndr_err_code ndr_push_netr_WorkstationInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_WorkstationInfo *r)
    8382             : {
    8383          28 :         uint32_t level;
    8384         199 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8385         199 :         if (ndr_flags & NDR_SCALARS) {
    8386             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    8387         199 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    8388         199 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    8389         199 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    8390             :                 /* ms_union is always aligned to the largest union arm*/
    8391         199 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8392         199 :                 switch (level) {
    8393         189 :                         case 1: {
    8394         189 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->workstation_info));
    8395         161 :                         break; }
    8396             : 
    8397          10 :                         case 2: {
    8398          10 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->lsa_policy_info));
    8399          10 :                         break; }
    8400             : 
    8401           0 :                         default:
    8402           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    8403             :                 }
    8404             :         }
    8405         199 :         if (ndr_flags & NDR_BUFFERS) {
    8406         199 :                 if (!(ndr_flags & NDR_SCALARS)) {
    8407             :                         /* We didn't get it above, and the token is not needed after this. */
    8408           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    8409             :                 }
    8410         199 :                 switch (level) {
    8411         189 :                         case 1:
    8412         189 :                                 if (r->workstation_info) {
    8413         189 :                                         NDR_CHECK(ndr_push_netr_WorkstationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->workstation_info));
    8414             :                                 }
    8415         161 :                         break;
    8416             : 
    8417          10 :                         case 2:
    8418          10 :                                 if (r->lsa_policy_info) {
    8419          10 :                                         NDR_CHECK(ndr_push_netr_WorkstationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->lsa_policy_info));
    8420             :                                 }
    8421          10 :                         break;
    8422             : 
    8423           0 :                         default:
    8424           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    8425             :                 }
    8426             :         }
    8427         171 :         return NDR_ERR_SUCCESS;
    8428             : }
    8429             : 
    8430         213 : static enum ndr_err_code ndr_pull_netr_WorkstationInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_WorkstationInfo *r)
    8431             : {
    8432          38 :         uint32_t level;
    8433          38 :         uint32_t _level;
    8434         213 :         TALLOC_CTX *_mem_save_workstation_info_0 = NULL;
    8435          38 :         uint32_t _ptr_workstation_info;
    8436         213 :         TALLOC_CTX *_mem_save_lsa_policy_info_0 = NULL;
    8437          38 :         uint32_t _ptr_lsa_policy_info;
    8438         213 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8439         213 :         if (ndr_flags & NDR_SCALARS) {
    8440             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    8441         213 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    8442         213 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    8443         213 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    8444         213 :                 if (_level != level) {
    8445           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    8446             :                 }
    8447             :                 /* ms_union is always aligned to the largest union arm*/
    8448         213 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8449         213 :                 switch (level) {
    8450         199 :                         case 1: {
    8451         199 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_workstation_info));
    8452         199 :                                 if (_ptr_workstation_info) {
    8453         199 :                                         NDR_PULL_ALLOC(ndr, r->workstation_info);
    8454             :                                 } else {
    8455           0 :                                         r->workstation_info = NULL;
    8456             :                                 }
    8457         161 :                         break; }
    8458             : 
    8459          14 :                         case 2: {
    8460          14 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lsa_policy_info));
    8461          14 :                                 if (_ptr_lsa_policy_info) {
    8462          14 :                                         NDR_PULL_ALLOC(ndr, r->lsa_policy_info);
    8463             :                                 } else {
    8464           0 :                                         r->lsa_policy_info = NULL;
    8465             :                                 }
    8466          14 :                         break; }
    8467             : 
    8468           0 :                         default:
    8469           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    8470             :                 }
    8471             :         }
    8472         213 :         if (ndr_flags & NDR_BUFFERS) {
    8473         213 :                 if (!(ndr_flags & NDR_SCALARS)) {
    8474             :                         /* We didn't get it above, and the token is not needed after this. */
    8475           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    8476             :                 }
    8477         213 :                 switch (level) {
    8478         199 :                         case 1:
    8479         199 :                                 if (r->workstation_info) {
    8480         199 :                                         _mem_save_workstation_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8481         199 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->workstation_info, 0);
    8482         199 :                                         NDR_CHECK(ndr_pull_netr_WorkstationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->workstation_info));
    8483         199 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_workstation_info_0, 0);
    8484             :                                 }
    8485         161 :                         break;
    8486             : 
    8487          14 :                         case 2:
    8488          14 :                                 if (r->lsa_policy_info) {
    8489          14 :                                         _mem_save_lsa_policy_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8490          14 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->lsa_policy_info, 0);
    8491          14 :                                         NDR_CHECK(ndr_pull_netr_WorkstationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->lsa_policy_info));
    8492          14 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lsa_policy_info_0, 0);
    8493             :                                 }
    8494          14 :                         break;
    8495             : 
    8496           0 :                         default:
    8497           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    8498             :                 }
    8499             :         }
    8500         175 :         return NDR_ERR_SUCCESS;
    8501             : }
    8502             : 
    8503          10 : _PUBLIC_ void ndr_print_netr_WorkstationInfo(struct ndr_print *ndr, const char *name, const union netr_WorkstationInfo *r)
    8504             : {
    8505          10 :         uint32_t level;
    8506          10 :         level = ndr_print_steal_switch_value(ndr, r);
    8507          10 :         ndr_print_union(ndr, name, level, "netr_WorkstationInfo");
    8508          10 :         switch (level) {
    8509          10 :                 case 1:
    8510          10 :                         ndr_print_ptr(ndr, "workstation_info", r->workstation_info);
    8511          10 :                         ndr->depth++;
    8512          10 :                         if (r->workstation_info) {
    8513          10 :                                 ndr_print_netr_WorkstationInformation(ndr, "workstation_info", r->workstation_info);
    8514             :                         }
    8515          10 :                         ndr->depth--;
    8516          10 :                 break;
    8517             : 
    8518           0 :                 case 2:
    8519           0 :                         ndr_print_ptr(ndr, "lsa_policy_info", r->lsa_policy_info);
    8520           0 :                         ndr->depth++;
    8521           0 :                         if (r->lsa_policy_info) {
    8522           0 :                                 ndr_print_netr_WorkstationInformation(ndr, "lsa_policy_info", r->lsa_policy_info);
    8523             :                         }
    8524           0 :                         ndr->depth--;
    8525           0 :                 break;
    8526             : 
    8527           0 :                 default:
    8528           0 :                         ndr_print_bad_level(ndr, name, level);
    8529             :         }
    8530          10 : }
    8531             : 
    8532         231 : static enum ndr_err_code ndr_push_netr_trust_extension_info(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_trust_extension_info *r)
    8533             : {
    8534         231 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8535         231 :         if (ndr_flags & NDR_SCALARS) {
    8536         231 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    8537         231 :                 NDR_CHECK(ndr_push_netr_TrustFlags(ndr, NDR_SCALARS, r->flags));
    8538         231 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->parent_index));
    8539         231 :                 NDR_CHECK(ndr_push_lsa_TrustType(ndr, NDR_SCALARS, r->trust_type));
    8540         231 :                 NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes));
    8541         231 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    8542             :         }
    8543         231 :         if (ndr_flags & NDR_BUFFERS) {
    8544          35 :         }
    8545         231 :         return NDR_ERR_SUCCESS;
    8546             : }
    8547             : 
    8548         197 : static enum ndr_err_code ndr_pull_netr_trust_extension_info(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_trust_extension_info *r)
    8549             : {
    8550         197 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8551         197 :         if (ndr_flags & NDR_SCALARS) {
    8552         197 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    8553         197 :                 NDR_CHECK(ndr_pull_netr_TrustFlags(ndr, NDR_SCALARS, &r->flags));
    8554         197 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->parent_index));
    8555         197 :                 NDR_CHECK(ndr_pull_lsa_TrustType(ndr, NDR_SCALARS, &r->trust_type));
    8556         197 :                 NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes));
    8557         197 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    8558             :         }
    8559         197 :         if (ndr_flags & NDR_BUFFERS) {
    8560          36 :         }
    8561         197 :         return NDR_ERR_SUCCESS;
    8562             : }
    8563             : 
    8564          92 : _PUBLIC_ void ndr_print_netr_trust_extension_info(struct ndr_print *ndr, const char *name, const struct netr_trust_extension_info *r)
    8565             : {
    8566          92 :         ndr_print_struct(ndr, name, "netr_trust_extension_info");
    8567          92 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8568          92 :         ndr->depth++;
    8569          92 :         ndr_print_netr_TrustFlags(ndr, "flags", r->flags);
    8570          92 :         ndr_print_uint32(ndr, "parent_index", r->parent_index);
    8571          92 :         ndr_print_lsa_TrustType(ndr, "trust_type", r->trust_type);
    8572          92 :         ndr_print_lsa_TrustAttributes(ndr, "trust_attributes", r->trust_attributes);
    8573          92 :         ndr->depth--;
    8574             : }
    8575             : 
    8576         231 : static enum ndr_err_code ndr_push_netr_trust_extension(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_trust_extension *r)
    8577             : {
    8578         231 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8579         231 :         if (ndr_flags & NDR_SCALARS) {
    8580         231 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8581         231 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 8));
    8582         231 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8583         231 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 8));
    8584             :                 {
    8585          35 :                         struct ndr_push *_ndr_info;
    8586         231 :                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 0, 8 * 2));
    8587         231 :                         NDR_CHECK(ndr_push_netr_trust_extension_info(_ndr_info, NDR_SCALARS, &r->info));
    8588         231 :                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 0, 8 * 2));
    8589             :                 }
    8590         231 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    8591             :         }
    8592         231 :         if (ndr_flags & NDR_BUFFERS) {
    8593          35 :         }
    8594         231 :         return NDR_ERR_SUCCESS;
    8595             : }
    8596             : 
    8597         197 : static enum ndr_err_code ndr_pull_netr_trust_extension(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_trust_extension *r)
    8598             : {
    8599         197 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8600         197 :         if (ndr_flags & NDR_SCALARS) {
    8601         197 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8602         197 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->length));
    8603         197 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->dummy));
    8604         197 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->size));
    8605             :                 {
    8606          36 :                         struct ndr_pull *_ndr_info;
    8607         197 :                         ssize_t sub_size = r->size * 2;
    8608         197 :                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 0, sub_size));
    8609         197 :                         NDR_CHECK(ndr_pull_netr_trust_extension_info(_ndr_info, NDR_SCALARS, &r->info));
    8610         197 :                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 0, sub_size));
    8611             :                 }
    8612         197 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8613             :         }
    8614         197 :         if (ndr_flags & NDR_BUFFERS) {
    8615          36 :         }
    8616         197 :         return NDR_ERR_SUCCESS;
    8617             : }
    8618             : 
    8619          92 : _PUBLIC_ void ndr_print_netr_trust_extension(struct ndr_print *ndr, const char *name, const struct netr_trust_extension *r)
    8620             : {
    8621          92 :         ndr_print_struct(ndr, name, "netr_trust_extension");
    8622          92 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8623          92 :         ndr->depth++;
    8624          92 :         ndr_print_uint3264(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?8:r->length);
    8625          92 :         ndr_print_uint3264(ndr, "dummy", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->dummy);
    8626          92 :         ndr_print_uint3264(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?8:r->size);
    8627          92 :         ndr_print_netr_trust_extension_info(ndr, "info", &r->info);
    8628          92 :         ndr->depth--;
    8629             : }
    8630             : 
    8631         924 : static enum ndr_err_code ndr_push_netr_trust_extension_container(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_trust_extension_container *r)
    8632             : {
    8633         924 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8634         924 :         if (ndr_flags & NDR_SCALARS) {
    8635         462 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8636         497 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->info == NULL?0:16));
    8637         497 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->info == NULL?0:16));
    8638         462 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
    8639         462 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    8640             :         }
    8641         924 :         if (ndr_flags & NDR_BUFFERS) {
    8642         462 :                 if (r->info) {
    8643         231 :                         NDR_CHECK(ndr_push_netr_trust_extension(ndr, NDR_SCALARS, r->info));
    8644             :                 }
    8645             :         }
    8646         784 :         return NDR_ERR_SUCCESS;
    8647             : }
    8648             : 
    8649         780 : static enum ndr_err_code ndr_pull_netr_trust_extension_container(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_trust_extension_container *r)
    8650             : {
    8651         136 :         uint32_t _ptr_info;
    8652         780 :         TALLOC_CTX *_mem_save_info_0 = NULL;
    8653         780 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8654         780 :         if (ndr_flags & NDR_SCALARS) {
    8655         390 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8656         390 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
    8657         390 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
    8658         390 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
    8659         390 :                 if (_ptr_info) {
    8660         197 :                         NDR_PULL_ALLOC(ndr, r->info);
    8661             :                 } else {
    8662         193 :                         r->info = NULL;
    8663             :                 }
    8664         390 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8665             :         }
    8666         780 :         if (ndr_flags & NDR_BUFFERS) {
    8667         390 :                 if (r->info) {
    8668         197 :                         _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8669         197 :                         NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
    8670         197 :                         NDR_CHECK(ndr_pull_netr_trust_extension(ndr, NDR_SCALARS, r->info));
    8671         197 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
    8672             :                 }
    8673             :         }
    8674         644 :         return NDR_ERR_SUCCESS;
    8675             : }
    8676             : 
    8677         180 : _PUBLIC_ void ndr_print_netr_trust_extension_container(struct ndr_print *ndr, const char *name, const struct netr_trust_extension_container *r)
    8678             : {
    8679         180 :         ndr_print_struct(ndr, name, "netr_trust_extension_container");
    8680         180 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8681         180 :         ndr->depth++;
    8682         180 :         ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->info == NULL?0:16:r->length);
    8683         180 :         ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->info == NULL?0:16:r->size);
    8684         180 :         ndr_print_ptr(ndr, "info", r->info);
    8685         180 :         ndr->depth++;
    8686         180 :         if (r->info) {
    8687          92 :                 ndr_print_netr_trust_extension(ndr, "info", r->info);
    8688             :         }
    8689         180 :         ndr->depth--;
    8690         180 :         ndr->depth--;
    8691             : }
    8692             : 
    8693         924 : static enum ndr_err_code ndr_push_netr_OneDomainInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_OneDomainInfo *r)
    8694             : {
    8695         924 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8696         924 :         if (ndr_flags & NDR_SCALARS) {
    8697         462 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8698         462 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->domainname));
    8699         462 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domainname));
    8700         462 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forestname));
    8701         462 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
    8702         462 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid));
    8703         462 :                 NDR_CHECK(ndr_push_netr_trust_extension_container(ndr, NDR_SCALARS, &r->trust_extension));
    8704         462 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string2));
    8705         462 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string3));
    8706         462 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string4));
    8707         462 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long1));
    8708         462 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long2));
    8709         462 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long3));
    8710         462 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long4));
    8711         462 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    8712             :         }
    8713         924 :         if (ndr_flags & NDR_BUFFERS) {
    8714         462 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domainname));
    8715         462 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domainname));
    8716         462 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forestname));
    8717         462 :                 if (r->domain_sid) {
    8718         462 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
    8719             :                 }
    8720         462 :                 NDR_CHECK(ndr_push_netr_trust_extension_container(ndr, NDR_BUFFERS, &r->trust_extension));
    8721         462 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string2));
    8722         462 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string3));
    8723         462 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string4));
    8724             :         }
    8725         784 :         return NDR_ERR_SUCCESS;
    8726             : }
    8727             : 
    8728         780 : static enum ndr_err_code ndr_pull_netr_OneDomainInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_OneDomainInfo *r)
    8729             : {
    8730         136 :         uint32_t _ptr_domain_sid;
    8731         780 :         TALLOC_CTX *_mem_save_domain_sid_0 = NULL;
    8732         780 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8733         780 :         if (ndr_flags & NDR_SCALARS) {
    8734         390 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8735         390 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->domainname));
    8736         390 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domainname));
    8737         390 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forestname));
    8738         390 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
    8739         390 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_sid));
    8740         390 :                 if (_ptr_domain_sid) {
    8741         390 :                         NDR_PULL_ALLOC(ndr, r->domain_sid);
    8742             :                 } else {
    8743           0 :                         r->domain_sid = NULL;
    8744             :                 }
    8745         390 :                 NDR_CHECK(ndr_pull_netr_trust_extension_container(ndr, NDR_SCALARS, &r->trust_extension));
    8746         390 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string2));
    8747         390 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string3));
    8748         390 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string4));
    8749         390 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long1));
    8750         390 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long2));
    8751         390 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long3));
    8752         390 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long4));
    8753         390 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8754             :         }
    8755         780 :         if (ndr_flags & NDR_BUFFERS) {
    8756         390 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domainname));
    8757         390 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domainname));
    8758         390 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forestname));
    8759         390 :                 if (r->domain_sid) {
    8760         390 :                         _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8761         390 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain_sid, 0);
    8762         390 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
    8763         390 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, 0);
    8764             :                 }
    8765         390 :                 NDR_CHECK(ndr_pull_netr_trust_extension_container(ndr, NDR_BUFFERS, &r->trust_extension));
    8766         390 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string2));
    8767         390 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string3));
    8768         390 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string4));
    8769             :         }
    8770         644 :         return NDR_ERR_SUCCESS;
    8771             : }
    8772             : 
    8773         180 : _PUBLIC_ void ndr_print_netr_OneDomainInfo(struct ndr_print *ndr, const char *name, const struct netr_OneDomainInfo *r)
    8774             : {
    8775         180 :         ndr_print_struct(ndr, name, "netr_OneDomainInfo");
    8776         180 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8777         180 :         ndr->depth++;
    8778         180 :         ndr_print_lsa_StringLarge(ndr, "domainname", &r->domainname);
    8779         180 :         ndr_print_lsa_StringLarge(ndr, "dns_domainname", &r->dns_domainname);
    8780         180 :         ndr_print_lsa_StringLarge(ndr, "dns_forestname", &r->dns_forestname);
    8781         180 :         ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
    8782         180 :         ndr_print_ptr(ndr, "domain_sid", r->domain_sid);
    8783         180 :         ndr->depth++;
    8784         180 :         if (r->domain_sid) {
    8785         180 :                 ndr_print_dom_sid2(ndr, "domain_sid", r->domain_sid);
    8786             :         }
    8787         180 :         ndr->depth--;
    8788         180 :         ndr_print_netr_trust_extension_container(ndr, "trust_extension", &r->trust_extension);
    8789         180 :         ndr_print_lsa_StringLarge(ndr, "dummy_string2", &r->dummy_string2);
    8790         180 :         ndr_print_lsa_StringLarge(ndr, "dummy_string3", &r->dummy_string3);
    8791         180 :         ndr_print_lsa_StringLarge(ndr, "dummy_string4", &r->dummy_string4);
    8792         180 :         ndr_print_uint32(ndr, "dummy_long1", r->dummy_long1);
    8793         180 :         ndr_print_uint32(ndr, "dummy_long2", r->dummy_long2);
    8794         180 :         ndr_print_uint32(ndr, "dummy_long3", r->dummy_long3);
    8795         180 :         ndr_print_uint32(ndr, "dummy_long4", r->dummy_long4);
    8796         180 :         ndr->depth--;
    8797             : }
    8798             : 
    8799         231 : static enum ndr_err_code ndr_push_netr_DomainInformation(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DomainInformation *r)
    8800             : {
    8801          35 :         uint32_t cntr_trusted_domains_1;
    8802         231 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8803         231 :         if (ndr_flags & NDR_SCALARS) {
    8804         231 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8805         231 :                 NDR_CHECK(ndr_push_netr_OneDomainInfo(ndr, NDR_SCALARS, &r->primary_domain));
    8806         231 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trusted_domain_count));
    8807         231 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_domains));
    8808         231 :                 NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_SCALARS, &r->lsa_policy));
    8809         231 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_hostname));
    8810         231 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string2));
    8811         231 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string3));
    8812         231 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string4));
    8813         266 :                 NDR_CHECK(ndr_push_netr_WorkstationFlags(ndr, NDR_SCALARS, r->workstation_flags));
    8814         231 :                 NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->supported_enc_types));
    8815         231 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long3));
    8816         231 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy_long4));
    8817         231 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    8818             :         }
    8819         231 :         if (ndr_flags & NDR_BUFFERS) {
    8820         231 :                 NDR_CHECK(ndr_push_netr_OneDomainInfo(ndr, NDR_BUFFERS, &r->primary_domain));
    8821         231 :                 if (r->trusted_domains) {
    8822         231 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->trusted_domain_count));
    8823         462 :                         for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (r->trusted_domain_count); cntr_trusted_domains_1++) {
    8824         231 :                                 NDR_CHECK(ndr_push_netr_OneDomainInfo(ndr, NDR_SCALARS, &r->trusted_domains[cntr_trusted_domains_1]));
    8825             :                         }
    8826         462 :                         for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (r->trusted_domain_count); cntr_trusted_domains_1++) {
    8827         231 :                                 NDR_CHECK(ndr_push_netr_OneDomainInfo(ndr, NDR_BUFFERS, &r->trusted_domains[cntr_trusted_domains_1]));
    8828             :                         }
    8829             :                 }
    8830         231 :                 NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->lsa_policy));
    8831         231 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_hostname));
    8832         231 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string2));
    8833         231 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string3));
    8834         231 :                 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string4));
    8835             :         }
    8836         196 :         return NDR_ERR_SUCCESS;
    8837             : }
    8838             : 
    8839         193 : static enum ndr_err_code ndr_pull_netr_DomainInformation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DomainInformation *r)
    8840             : {
    8841          32 :         uint32_t _ptr_trusted_domains;
    8842         193 :         uint32_t size_trusted_domains_1 = 0;
    8843          32 :         uint32_t cntr_trusted_domains_1;
    8844         193 :         TALLOC_CTX *_mem_save_trusted_domains_0 = NULL;
    8845         193 :         TALLOC_CTX *_mem_save_trusted_domains_1 = NULL;
    8846         193 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8847         193 :         if (ndr_flags & NDR_SCALARS) {
    8848         193 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8849         193 :                 NDR_CHECK(ndr_pull_netr_OneDomainInfo(ndr, NDR_SCALARS, &r->primary_domain));
    8850         193 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trusted_domain_count));
    8851         193 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domains));
    8852         193 :                 if (_ptr_trusted_domains) {
    8853         193 :                         NDR_PULL_ALLOC(ndr, r->trusted_domains);
    8854             :                 } else {
    8855           0 :                         r->trusted_domains = NULL;
    8856             :                 }
    8857         193 :                 NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_SCALARS, &r->lsa_policy));
    8858         193 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_hostname));
    8859         193 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string2));
    8860         193 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string3));
    8861         193 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dummy_string4));
    8862         225 :                 NDR_CHECK(ndr_pull_netr_WorkstationFlags(ndr, NDR_SCALARS, &r->workstation_flags));
    8863         193 :                 NDR_CHECK(ndr_pull_kerb_EncTypes(ndr, NDR_SCALARS, &r->supported_enc_types));
    8864         193 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long3));
    8865         193 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy_long4));
    8866         193 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8867             :         }
    8868         193 :         if (ndr_flags & NDR_BUFFERS) {
    8869         193 :                 NDR_CHECK(ndr_pull_netr_OneDomainInfo(ndr, NDR_BUFFERS, &r->primary_domain));
    8870         193 :                 if (r->trusted_domains) {
    8871         193 :                         _mem_save_trusted_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8872         193 :                         NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domains, 0);
    8873         193 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_domains));
    8874         193 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->trusted_domains, &size_trusted_domains_1));
    8875         193 :                         NDR_PULL_ALLOC_N(ndr, r->trusted_domains, size_trusted_domains_1);
    8876         193 :                         _mem_save_trusted_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
    8877         193 :                         NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domains, 0);
    8878         390 :                         for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (size_trusted_domains_1); cntr_trusted_domains_1++) {
    8879         197 :                                 NDR_CHECK(ndr_pull_netr_OneDomainInfo(ndr, NDR_SCALARS, &r->trusted_domains[cntr_trusted_domains_1]));
    8880             :                         }
    8881         390 :                         for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (size_trusted_domains_1); cntr_trusted_domains_1++) {
    8882         197 :                                 NDR_CHECK(ndr_pull_netr_OneDomainInfo(ndr, NDR_BUFFERS, &r->trusted_domains[cntr_trusted_domains_1]));
    8883             :                         }
    8884         193 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domains_1, 0);
    8885         193 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domains_0, 0);
    8886             :                 }
    8887         193 :                 NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_BUFFERS, &r->lsa_policy));
    8888         193 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_hostname));
    8889         193 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string2));
    8890         193 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string3));
    8891         193 :                 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dummy_string4));
    8892         193 :                 if (r->trusted_domains) {
    8893         193 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->trusted_domains, r->trusted_domain_count));
    8894             :                 }
    8895         390 :                 for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (size_trusted_domains_1); cntr_trusted_domains_1++) {
    8896          36 :                 }
    8897             :         }
    8898         161 :         return NDR_ERR_SUCCESS;
    8899             : }
    8900             : 
    8901          88 : _PUBLIC_ void ndr_print_netr_DomainInformation(struct ndr_print *ndr, const char *name, const struct netr_DomainInformation *r)
    8902             : {
    8903          18 :         uint32_t cntr_trusted_domains_1;
    8904          88 :         ndr_print_struct(ndr, name, "netr_DomainInformation");
    8905          88 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8906          88 :         ndr->depth++;
    8907          88 :         ndr_print_netr_OneDomainInfo(ndr, "primary_domain", &r->primary_domain);
    8908          88 :         ndr_print_uint32(ndr, "trusted_domain_count", r->trusted_domain_count);
    8909          88 :         ndr_print_ptr(ndr, "trusted_domains", r->trusted_domains);
    8910          88 :         ndr->depth++;
    8911          88 :         if (r->trusted_domains) {
    8912          88 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "trusted_domains", (uint32_t)(r->trusted_domain_count));
    8913          88 :                 ndr->depth++;
    8914         180 :                 for (cntr_trusted_domains_1 = 0; cntr_trusted_domains_1 < (r->trusted_domain_count); cntr_trusted_domains_1++) {
    8915          92 :                         ndr_print_netr_OneDomainInfo(ndr, "trusted_domains", &r->trusted_domains[cntr_trusted_domains_1]);
    8916             :                 }
    8917          88 :                 ndr->depth--;
    8918             :         }
    8919          88 :         ndr->depth--;
    8920          88 :         ndr_print_netr_LsaPolicyInformation(ndr, "lsa_policy", &r->lsa_policy);
    8921          88 :         ndr_print_lsa_StringLarge(ndr, "dns_hostname", &r->dns_hostname);
    8922          88 :         ndr_print_lsa_StringLarge(ndr, "dummy_string2", &r->dummy_string2);
    8923          88 :         ndr_print_lsa_StringLarge(ndr, "dummy_string3", &r->dummy_string3);
    8924          88 :         ndr_print_lsa_StringLarge(ndr, "dummy_string4", &r->dummy_string4);
    8925          88 :         ndr_print_netr_WorkstationFlags(ndr, "workstation_flags", r->workstation_flags);
    8926          88 :         ndr_print_kerb_EncTypes(ndr, "supported_enc_types", r->supported_enc_types);
    8927          88 :         ndr_print_uint32(ndr, "dummy_long3", r->dummy_long3);
    8928          88 :         ndr_print_uint32(ndr, "dummy_long4", r->dummy_long4);
    8929          88 :         ndr->depth--;
    8930             : }
    8931             : 
    8932         245 : static enum ndr_err_code ndr_push_netr_DomainInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_DomainInfo *r)
    8933             : {
    8934          35 :         uint32_t level;
    8935         245 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8936         245 :         if (ndr_flags & NDR_SCALARS) {
    8937             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    8938         245 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    8939         245 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    8940         245 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    8941             :                 /* ms_union is always aligned to the largest union arm*/
    8942         245 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8943         245 :                 switch (level) {
    8944         231 :                         case 1: {
    8945         231 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_info));
    8946         196 :                         break; }
    8947             : 
    8948          14 :                         case 2: {
    8949          14 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->lsa_policy_info));
    8950          14 :                         break; }
    8951             : 
    8952           0 :                         default:
    8953           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    8954             :                 }
    8955             :         }
    8956         245 :         if (ndr_flags & NDR_BUFFERS) {
    8957         245 :                 if (!(ndr_flags & NDR_SCALARS)) {
    8958             :                         /* We didn't get it above, and the token is not needed after this. */
    8959           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    8960             :                 }
    8961         245 :                 switch (level) {
    8962         231 :                         case 1:
    8963         231 :                                 if (r->domain_info) {
    8964         231 :                                         NDR_CHECK(ndr_push_netr_DomainInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_info));
    8965             :                                 }
    8966         196 :                         break;
    8967             : 
    8968          14 :                         case 2:
    8969          14 :                                 if (r->lsa_policy_info) {
    8970          14 :                                         NDR_CHECK(ndr_push_netr_LsaPolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->lsa_policy_info));
    8971             :                                 }
    8972          14 :                         break;
    8973             : 
    8974           0 :                         default:
    8975           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    8976             :                 }
    8977             :         }
    8978         210 :         return NDR_ERR_SUCCESS;
    8979             : }
    8980             : 
    8981         203 : static enum ndr_err_code ndr_pull_netr_DomainInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_DomainInfo *r)
    8982             : {
    8983          32 :         uint32_t level;
    8984          32 :         uint32_t _level;
    8985         203 :         TALLOC_CTX *_mem_save_domain_info_0 = NULL;
    8986          32 :         uint32_t _ptr_domain_info;
    8987         203 :         TALLOC_CTX *_mem_save_lsa_policy_info_0 = NULL;
    8988          32 :         uint32_t _ptr_lsa_policy_info;
    8989         203 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8990         203 :         if (ndr_flags & NDR_SCALARS) {
    8991             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    8992         203 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    8993         203 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    8994         203 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    8995         203 :                 if (_level != level) {
    8996           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    8997             :                 }
    8998             :                 /* ms_union is always aligned to the largest union arm*/
    8999         203 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9000         203 :                 switch (level) {
    9001         193 :                         case 1: {
    9002         193 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_info));
    9003         193 :                                 if (_ptr_domain_info) {
    9004         193 :                                         NDR_PULL_ALLOC(ndr, r->domain_info);
    9005             :                                 } else {
    9006           0 :                                         r->domain_info = NULL;
    9007             :                                 }
    9008         161 :                         break; }
    9009             : 
    9010          10 :                         case 2: {
    9011          10 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lsa_policy_info));
    9012          10 :                                 if (_ptr_lsa_policy_info) {
    9013          10 :                                         NDR_PULL_ALLOC(ndr, r->lsa_policy_info);
    9014             :                                 } else {
    9015           0 :                                         r->lsa_policy_info = NULL;
    9016             :                                 }
    9017          10 :                         break; }
    9018             : 
    9019           0 :                         default:
    9020           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    9021             :                 }
    9022             :         }
    9023         203 :         if (ndr_flags & NDR_BUFFERS) {
    9024         203 :                 if (!(ndr_flags & NDR_SCALARS)) {
    9025             :                         /* We didn't get it above, and the token is not needed after this. */
    9026           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    9027             :                 }
    9028         203 :                 switch (level) {
    9029         193 :                         case 1:
    9030         193 :                                 if (r->domain_info) {
    9031         193 :                                         _mem_save_domain_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9032         193 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->domain_info, 0);
    9033         193 :                                         NDR_CHECK(ndr_pull_netr_DomainInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_info));
    9034         193 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_info_0, 0);
    9035             :                                 }
    9036         161 :                         break;
    9037             : 
    9038          10 :                         case 2:
    9039          10 :                                 if (r->lsa_policy_info) {
    9040          10 :                                         _mem_save_lsa_policy_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9041          10 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->lsa_policy_info, 0);
    9042          10 :                                         NDR_CHECK(ndr_pull_netr_LsaPolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->lsa_policy_info));
    9043          10 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lsa_policy_info_0, 0);
    9044             :                                 }
    9045          10 :                         break;
    9046             : 
    9047           0 :                         default:
    9048           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    9049             :                 }
    9050             :         }
    9051         171 :         return NDR_ERR_SUCCESS;
    9052             : }
    9053             : 
    9054          88 : _PUBLIC_ void ndr_print_netr_DomainInfo(struct ndr_print *ndr, const char *name, const union netr_DomainInfo *r)
    9055             : {
    9056          18 :         uint32_t level;
    9057          88 :         level = ndr_print_steal_switch_value(ndr, r);
    9058          88 :         ndr_print_union(ndr, name, level, "netr_DomainInfo");
    9059          88 :         switch (level) {
    9060          88 :                 case 1:
    9061          88 :                         ndr_print_ptr(ndr, "domain_info", r->domain_info);
    9062          88 :                         ndr->depth++;
    9063          88 :                         if (r->domain_info) {
    9064          88 :                                 ndr_print_netr_DomainInformation(ndr, "domain_info", r->domain_info);
    9065             :                         }
    9066          88 :                         ndr->depth--;
    9067          88 :                 break;
    9068             : 
    9069           0 :                 case 2:
    9070           0 :                         ndr_print_ptr(ndr, "lsa_policy_info", r->lsa_policy_info);
    9071           0 :                         ndr->depth++;
    9072           0 :                         if (r->lsa_policy_info) {
    9073           0 :                                 ndr_print_netr_LsaPolicyInformation(ndr, "lsa_policy_info", r->lsa_policy_info);
    9074             :                         }
    9075           0 :                         ndr->depth--;
    9076           0 :                 break;
    9077             : 
    9078           0 :                 default:
    9079           0 :                         ndr_print_bad_level(ndr, name, level);
    9080             :         }
    9081          88 : }
    9082             : 
    9083         525 : static enum ndr_err_code ndr_push_netr_CryptPassword(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_CryptPassword *r)
    9084             : {
    9085             :         {
    9086         525 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    9087         525 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    9088         525 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9089         525 :                 if (ndr_flags & NDR_SCALARS) {
    9090         525 :                         NDR_CHECK(ndr_push_align(ndr, 4));
    9091         525 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 512));
    9092         525 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
    9093         525 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    9094             :                 }
    9095         525 :                 if (ndr_flags & NDR_BUFFERS) {
    9096          47 :                 }
    9097         525 :                 ndr->flags = _flags_save_STRUCT;
    9098             :         }
    9099         525 :         return NDR_ERR_SUCCESS;
    9100             : }
    9101             : 
    9102         531 : static enum ndr_err_code ndr_pull_netr_CryptPassword(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_CryptPassword *r)
    9103             : {
    9104         531 :         uint32_t size_data_0 = 0;
    9105             :         {
    9106         531 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    9107         531 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    9108         531 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9109         531 :                 if (ndr_flags & NDR_SCALARS) {
    9110         531 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
    9111         531 :                         size_data_0 = 512;
    9112         531 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
    9113         531 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
    9114         531 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    9115             :                 }
    9116         531 :                 if (ndr_flags & NDR_BUFFERS) {
    9117          47 :                 }
    9118         531 :                 ndr->flags = _flags_save_STRUCT;
    9119             :         }
    9120         531 :         return NDR_ERR_SUCCESS;
    9121             : }
    9122             : 
    9123           0 : _PUBLIC_ void ndr_print_netr_CryptPassword(struct ndr_print *ndr, const char *name, const struct netr_CryptPassword *r)
    9124             : {
    9125           0 :         ndr_print_struct(ndr, name, "netr_CryptPassword");
    9126           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9127             :         {
    9128           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    9129           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    9130           0 :                 ndr->depth++;
    9131           0 :                 ndr_print_array_uint8(ndr, "data", r->data, 512);
    9132           0 :                 ndr_print_uint32(ndr, "length", r->length);
    9133           0 :                 ndr->depth--;
    9134           0 :                 ndr->flags = _flags_save_STRUCT;
    9135             :         }
    9136             : }
    9137             : 
    9138          17 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SendToSamType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_SendToSamType r)
    9139             : {
    9140          17 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
    9141          17 :         return NDR_ERR_SUCCESS;
    9142             : }
    9143             : 
    9144          17 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SendToSamType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_SendToSamType *r)
    9145             : {
    9146           0 :         uint16_t v;
    9147          17 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
    9148          17 :         *r = v;
    9149          17 :         return NDR_ERR_SUCCESS;
    9150             : }
    9151             : 
    9152           0 : _PUBLIC_ void ndr_print_netr_SendToSamType(struct ndr_print *ndr, const char *name, enum netr_SendToSamType r)
    9153             : {
    9154           0 :         const char *val = NULL;
    9155             : 
    9156           0 :         switch (r) {
    9157           0 :                 case SendToSamUpdatePassword: val = "SendToSamUpdatePassword"; break;
    9158           0 :                 case SendToSamResetBadPasswordCount: val = "SendToSamResetBadPasswordCount"; break;
    9159           0 :                 case SendToSamUpdatePasswordForward: val = "SendToSamUpdatePasswordForward"; break;
    9160           0 :                 case SendToSamUpdateLastLogonTimestamp: val = "SendToSamUpdateLastLogonTimestamp"; break;
    9161           0 :                 case SendToSamResetSmartCardPassword: val = "SendToSamResetSmartCardPassword"; break;
    9162             :         }
    9163           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    9164           0 : }
    9165             : 
    9166          17 : static enum ndr_err_code ndr_push_netr_SendToSamResetBadPasswordCount(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_SendToSamResetBadPasswordCount *r)
    9167             : {
    9168          17 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9169          17 :         if (ndr_flags & NDR_SCALARS) {
    9170          17 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    9171          17 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
    9172          17 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    9173             :         }
    9174          17 :         if (ndr_flags & NDR_BUFFERS) {
    9175           0 :         }
    9176          17 :         return NDR_ERR_SUCCESS;
    9177             : }
    9178             : 
    9179          17 : static enum ndr_err_code ndr_pull_netr_SendToSamResetBadPasswordCount(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_SendToSamResetBadPasswordCount *r)
    9180             : {
    9181          17 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9182          17 :         if (ndr_flags & NDR_SCALARS) {
    9183          17 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    9184          17 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
    9185          17 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    9186             :         }
    9187          17 :         if (ndr_flags & NDR_BUFFERS) {
    9188           0 :         }
    9189          17 :         return NDR_ERR_SUCCESS;
    9190             : }
    9191             : 
    9192           0 : _PUBLIC_ void ndr_print_netr_SendToSamResetBadPasswordCount(struct ndr_print *ndr, const char *name, const struct netr_SendToSamResetBadPasswordCount *r)
    9193             : {
    9194           0 :         ndr_print_struct(ndr, name, "netr_SendToSamResetBadPasswordCount");
    9195           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9196           0 :         ndr->depth++;
    9197           0 :         ndr_print_GUID(ndr, "guid", &r->guid);
    9198           0 :         ndr->depth--;
    9199             : }
    9200             : 
    9201          17 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SendToSamMessage(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union netr_SendToSamMessage *r)
    9202             : {
    9203           0 :         uint32_t level;
    9204          17 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9205          17 :         if (ndr_flags & NDR_SCALARS) {
    9206             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    9207          17 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    9208             :                 /* ms_union is always aligned to the largest union arm*/
    9209          17 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    9210          17 :                 switch (level) {
    9211          17 :                         case SendToSamResetBadPasswordCount: {
    9212          17 :                                 NDR_CHECK(ndr_push_netr_SendToSamResetBadPasswordCount(ndr, NDR_SCALARS, &r->reset_bad_password));
    9213          17 :                         break; }
    9214             : 
    9215           0 :                         default: {
    9216           0 :                         break; }
    9217             : 
    9218             :                 }
    9219             :         }
    9220          17 :         return NDR_ERR_SUCCESS;
    9221             : }
    9222             : 
    9223          17 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SendToSamMessage(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union netr_SendToSamMessage *r)
    9224             : {
    9225           0 :         uint32_t level;
    9226          17 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9227          17 :         if (ndr_flags & NDR_SCALARS) {
    9228             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    9229          17 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    9230             :                 /* ms_union is always aligned to the largest union arm*/
    9231          17 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    9232          17 :                 switch (level) {
    9233          17 :                         case SendToSamResetBadPasswordCount: {
    9234          17 :                                 NDR_CHECK(ndr_pull_netr_SendToSamResetBadPasswordCount(ndr, NDR_SCALARS, &r->reset_bad_password));
    9235          17 :                         break; }
    9236             : 
    9237           0 :                         default: {
    9238           0 :                         break; }
    9239             : 
    9240             :                 }
    9241             :         }
    9242          17 :         return NDR_ERR_SUCCESS;
    9243             : }
    9244             : 
    9245           0 : _PUBLIC_ void ndr_print_netr_SendToSamMessage(struct ndr_print *ndr, const char *name, const union netr_SendToSamMessage *r)
    9246             : {
    9247           0 :         uint32_t level;
    9248           0 :         level = ndr_print_steal_switch_value(ndr, r);
    9249           0 :         ndr_print_union(ndr, name, level, "netr_SendToSamMessage");
    9250           0 :         switch (level) {
    9251           0 :                 case SendToSamResetBadPasswordCount:
    9252           0 :                         ndr_print_netr_SendToSamResetBadPasswordCount(ndr, "reset_bad_password", &r->reset_bad_password);
    9253           0 :                 break;
    9254             : 
    9255           0 :                 default:
    9256           0 :                 break;
    9257             : 
    9258             :         }
    9259           0 : }
    9260             : 
    9261          17 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SendToSamBase(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_SendToSamBase *r)
    9262             : {
    9263          17 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9264          17 :         if (ndr_flags & NDR_SCALARS) {
    9265          17 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    9266          17 :                 NDR_CHECK(ndr_push_netr_SendToSamType(ndr, NDR_SCALARS, r->message_type));
    9267          17 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->message_size));
    9268             :                 {
    9269           0 :                         struct ndr_push *_ndr_message;
    9270          17 :                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_message, 0, r->message_size));
    9271          17 :                         NDR_CHECK(ndr_push_set_switch_value(_ndr_message, &r->message, r->message_type));
    9272          17 :                         NDR_CHECK(ndr_push_netr_SendToSamMessage(_ndr_message, NDR_SCALARS|NDR_BUFFERS, &r->message));
    9273          17 :                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_message, 0, r->message_size));
    9274             :                 }
    9275          17 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    9276             :         }
    9277          17 :         if (ndr_flags & NDR_BUFFERS) {
    9278           0 :         }
    9279          17 :         return NDR_ERR_SUCCESS;
    9280             : }
    9281             : 
    9282          17 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SendToSamBase(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_SendToSamBase *r)
    9283             : {
    9284          17 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9285          17 :         if (ndr_flags & NDR_SCALARS) {
    9286          17 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    9287          17 :                 NDR_CHECK(ndr_pull_netr_SendToSamType(ndr, NDR_SCALARS, &r->message_type));
    9288          17 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->message_size));
    9289             :                 {
    9290           0 :                         struct ndr_pull *_ndr_message;
    9291          17 :                         ssize_t sub_size = r->message_size;
    9292          17 :                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_message, 0, sub_size));
    9293          17 :                         NDR_CHECK(ndr_pull_set_switch_value(_ndr_message, &r->message, r->message_type));
    9294          17 :                         NDR_CHECK(ndr_pull_netr_SendToSamMessage(_ndr_message, NDR_SCALARS|NDR_BUFFERS, &r->message));
    9295          17 :                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_message, 0, sub_size));
    9296             :                 }
    9297          17 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    9298             :         }
    9299          17 :         if (ndr_flags & NDR_BUFFERS) {
    9300           0 :         }
    9301          17 :         return NDR_ERR_SUCCESS;
    9302             : }
    9303             : 
    9304           0 : static void ndr_print_flags_netr_SendToSamBase(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_SendToSamBase *r)
    9305             : {
    9306           0 :         ndr_print_netr_SendToSamBase(ndr, name, r);
    9307           0 : }
    9308             : 
    9309           0 : _PUBLIC_ void ndr_print_netr_SendToSamBase(struct ndr_print *ndr, const char *name, const struct netr_SendToSamBase *r)
    9310             : {
    9311           0 :         ndr_print_struct(ndr, name, "netr_SendToSamBase");
    9312           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9313           0 :         ndr->depth++;
    9314           0 :         ndr_print_netr_SendToSamType(ndr, "message_type", r->message_type);
    9315           0 :         ndr_print_uint32(ndr, "message_size", r->message_size);
    9316           0 :         ndr_print_set_switch_value(ndr, &r->message, r->message_type);
    9317           0 :         ndr_print_netr_SendToSamMessage(ndr, "message", &r->message);
    9318           0 :         ndr->depth--;
    9319             : }
    9320             : 
    9321          90 : static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesWCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DsRAddressToSitenamesWCtr *r)
    9322             : {
    9323          15 :         uint32_t cntr_sitename_1;
    9324          90 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9325          90 :         if (ndr_flags & NDR_SCALARS) {
    9326          90 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9327          90 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    9328          90 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sitename));
    9329          90 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9330             :         }
    9331          90 :         if (ndr_flags & NDR_BUFFERS) {
    9332          90 :                 if (r->sitename) {
    9333          90 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    9334         630 :                         for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
    9335         540 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1]));
    9336             :                         }
    9337         630 :                         for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
    9338         540 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1]));
    9339             :                         }
    9340             :                 }
    9341             :         }
    9342          75 :         return NDR_ERR_SUCCESS;
    9343             : }
    9344             : 
    9345          72 : static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesWCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DsRAddressToSitenamesWCtr *r)
    9346             : {
    9347          12 :         uint32_t _ptr_sitename;
    9348          72 :         uint32_t size_sitename_1 = 0;
    9349          12 :         uint32_t cntr_sitename_1;
    9350          72 :         TALLOC_CTX *_mem_save_sitename_0 = NULL;
    9351          72 :         TALLOC_CTX *_mem_save_sitename_1 = NULL;
    9352          72 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9353          72 :         if (ndr_flags & NDR_SCALARS) {
    9354          72 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9355          72 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    9356          72 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sitename));
    9357          72 :                 if (_ptr_sitename) {
    9358          72 :                         NDR_PULL_ALLOC(ndr, r->sitename);
    9359             :                 } else {
    9360           0 :                         r->sitename = NULL;
    9361             :                 }
    9362          72 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9363             :         }
    9364          72 :         if (ndr_flags & NDR_BUFFERS) {
    9365          72 :                 if (r->sitename) {
    9366          72 :                         _mem_save_sitename_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9367          72 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
    9368          72 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->sitename));
    9369          72 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sitename, &size_sitename_1));
    9370          72 :                         NDR_PULL_ALLOC_N(ndr, r->sitename, size_sitename_1);
    9371          72 :                         _mem_save_sitename_1 = NDR_PULL_GET_MEM_CTX(ndr);
    9372          72 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
    9373         504 :                         for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
    9374         432 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1]));
    9375             :                         }
    9376         504 :                         for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
    9377         432 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1]));
    9378             :                         }
    9379          72 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_1, 0);
    9380          72 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_0, 0);
    9381             :                 }
    9382          72 :                 if (r->sitename) {
    9383          72 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sitename, r->count));
    9384             :                 }
    9385         504 :                 for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
    9386          72 :                 }
    9387             :         }
    9388          60 :         return NDR_ERR_SUCCESS;
    9389             : }
    9390             : 
    9391          36 : _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesWCtr *r)
    9392             : {
    9393           6 :         uint32_t cntr_sitename_1;
    9394          36 :         ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesWCtr");
    9395          36 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9396          36 :         ndr->depth++;
    9397          36 :         ndr_print_uint32(ndr, "count", r->count);
    9398          36 :         ndr_print_ptr(ndr, "sitename", r->sitename);
    9399          36 :         ndr->depth++;
    9400          36 :         if (r->sitename) {
    9401          36 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sitename", (uint32_t)(r->count));
    9402          36 :                 ndr->depth++;
    9403         252 :                 for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
    9404         216 :                         ndr_print_lsa_String(ndr, "sitename", &r->sitename[cntr_sitename_1]);
    9405             :                 }
    9406          36 :                 ndr->depth--;
    9407             :         }
    9408          36 :         ndr->depth--;
    9409          36 :         ndr->depth--;
    9410             : }
    9411             : 
    9412        1728 : static enum ndr_err_code ndr_push_netr_DsRAddress(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DsRAddress *r)
    9413             : {
    9414        1728 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9415        1728 :         if (ndr_flags & NDR_SCALARS) {
    9416         864 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9417         864 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->buffer));
    9418         864 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
    9419         864 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9420             :         }
    9421        1728 :         if (ndr_flags & NDR_BUFFERS) {
    9422         864 :                 if (r->buffer) {
    9423         864 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size));
    9424         864 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->buffer, r->size));
    9425             :                 }
    9426             :         }
    9427        1440 :         return NDR_ERR_SUCCESS;
    9428             : }
    9429             : 
    9430        1728 : static enum ndr_err_code ndr_pull_netr_DsRAddress(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DsRAddress *r)
    9431             : {
    9432         288 :         uint32_t _ptr_buffer;
    9433        1728 :         uint32_t size_buffer_1 = 0;
    9434        1728 :         TALLOC_CTX *_mem_save_buffer_0 = NULL;
    9435        1728 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9436        1728 :         if (ndr_flags & NDR_SCALARS) {
    9437         864 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9438         864 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
    9439         864 :                 if (_ptr_buffer) {
    9440         864 :                         NDR_PULL_ALLOC(ndr, r->buffer);
    9441             :                 } else {
    9442           0 :                         r->buffer = NULL;
    9443             :                 }
    9444         864 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
    9445         864 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9446             :         }
    9447        1728 :         if (ndr_flags & NDR_BUFFERS) {
    9448         864 :                 if (r->buffer) {
    9449         864 :                         _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9450         864 :                         NDR_PULL_SET_MEM_CTX(ndr, r->buffer, 0);
    9451         864 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->buffer));
    9452         864 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->buffer, &size_buffer_1));
    9453         864 :                         NDR_PULL_ALLOC_N(ndr, r->buffer, size_buffer_1);
    9454         864 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->buffer, size_buffer_1));
    9455         864 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
    9456             :                 }
    9457         864 :                 if (r->buffer) {
    9458         864 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->buffer, r->size));
    9459             :                 }
    9460             :         }
    9461        1440 :         return NDR_ERR_SUCCESS;
    9462             : }
    9463             : 
    9464           0 : _PUBLIC_ void ndr_print_netr_DsRAddress(struct ndr_print *ndr, const char *name, const struct netr_DsRAddress *r)
    9465             : {
    9466           0 :         ndr_print_struct(ndr, name, "netr_DsRAddress");
    9467           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9468           0 :         ndr->depth++;
    9469           0 :         ndr_print_ptr(ndr, "buffer", r->buffer);
    9470           0 :         ndr->depth++;
    9471           0 :         if (r->buffer) {
    9472           0 :                 ndr_print_array_uint8(ndr, "buffer", r->buffer, r->size);
    9473             :         }
    9474           0 :         ndr->depth--;
    9475           0 :         ndr_print_uint32(ndr, "size", r->size);
    9476           0 :         ndr->depth--;
    9477             : }
    9478             : 
    9479         228 : _PUBLIC_ enum ndr_err_code ndr_push_netr_DomainTrust(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DomainTrust *r)
    9480             : {
    9481         228 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9482         228 :         if (ndr_flags & NDR_SCALARS) {
    9483         114 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9484         114 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_name));
    9485         114 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_name));
    9486         114 :                 NDR_CHECK(ndr_push_netr_TrustFlags(ndr, NDR_SCALARS, r->trust_flags));
    9487         114 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->parent_index));
    9488         114 :                 NDR_CHECK(ndr_push_lsa_TrustType(ndr, NDR_SCALARS, r->trust_type));
    9489         114 :                 NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes));
    9490         114 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
    9491         114 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
    9492         114 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9493             :         }
    9494         228 :         if (ndr_flags & NDR_BUFFERS) {
    9495         114 :                 if (r->netbios_name) {
    9496         114 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
    9497         114 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    9498         114 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
    9499         114 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->netbios_name, ndr_charset_length(r->netbios_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    9500             :                 }
    9501         114 :                 if (r->dns_name) {
    9502         114 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
    9503         114 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    9504         114 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
    9505         114 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, ndr_charset_length(r->dns_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    9506             :                 }
    9507         114 :                 if (r->sid) {
    9508         114 :                         NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    9509             :                 }
    9510             :         }
    9511         218 :         return NDR_ERR_SUCCESS;
    9512             : }
    9513             : 
    9514         192 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_DomainTrust(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DomainTrust *r)
    9515             : {
    9516           8 :         uint32_t _ptr_netbios_name;
    9517         192 :         uint32_t size_netbios_name_1 = 0;
    9518         192 :         uint32_t length_netbios_name_1 = 0;
    9519         192 :         TALLOC_CTX *_mem_save_netbios_name_0 = NULL;
    9520           8 :         uint32_t _ptr_dns_name;
    9521         192 :         uint32_t size_dns_name_1 = 0;
    9522         192 :         uint32_t length_dns_name_1 = 0;
    9523         192 :         TALLOC_CTX *_mem_save_dns_name_0 = NULL;
    9524           8 :         uint32_t _ptr_sid;
    9525         192 :         TALLOC_CTX *_mem_save_sid_0 = NULL;
    9526         192 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9527         192 :         if (ndr_flags & NDR_SCALARS) {
    9528          96 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9529          96 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_name));
    9530          96 :                 if (_ptr_netbios_name) {
    9531          96 :                         NDR_PULL_ALLOC(ndr, r->netbios_name);
    9532             :                 } else {
    9533           0 :                         r->netbios_name = NULL;
    9534             :                 }
    9535          96 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name));
    9536          96 :                 if (_ptr_dns_name) {
    9537          96 :                         NDR_PULL_ALLOC(ndr, r->dns_name);
    9538             :                 } else {
    9539           0 :                         r->dns_name = NULL;
    9540             :                 }
    9541          96 :                 NDR_CHECK(ndr_pull_netr_TrustFlags(ndr, NDR_SCALARS, &r->trust_flags));
    9542          96 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->parent_index));
    9543          96 :                 NDR_CHECK(ndr_pull_lsa_TrustType(ndr, NDR_SCALARS, &r->trust_type));
    9544          96 :                 NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes));
    9545          96 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
    9546          96 :                 if (_ptr_sid) {
    9547          96 :                         NDR_PULL_ALLOC(ndr, r->sid);
    9548             :                 } else {
    9549           0 :                         r->sid = NULL;
    9550             :                 }
    9551          96 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
    9552          96 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9553             :         }
    9554         192 :         if (ndr_flags & NDR_BUFFERS) {
    9555          96 :                 if (r->netbios_name) {
    9556          96 :                         _mem_save_netbios_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9557          96 :                         NDR_PULL_SET_MEM_CTX(ndr, r->netbios_name, 0);
    9558          96 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_name));
    9559          96 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->netbios_name));
    9560          96 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->netbios_name, &size_netbios_name_1));
    9561          96 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->netbios_name, &length_netbios_name_1));
    9562          96 :                         if (length_netbios_name_1 > size_netbios_name_1) {
    9563           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_netbios_name_1, length_netbios_name_1);
    9564             :                         }
    9565          96 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_netbios_name_1, sizeof(uint16_t)));
    9566          96 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->netbios_name, length_netbios_name_1, sizeof(uint16_t), CH_UTF16));
    9567          96 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_name_0, 0);
    9568             :                 }
    9569          96 :                 if (r->dns_name) {
    9570          96 :                         _mem_save_dns_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9571          96 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dns_name, 0);
    9572          96 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_name));
    9573          96 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_name));
    9574          96 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_name, &size_dns_name_1));
    9575          96 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_name, &length_dns_name_1));
    9576          96 :                         if (length_dns_name_1 > size_dns_name_1) {
    9577           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_name_1, length_dns_name_1);
    9578             :                         }
    9579          96 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_name_1, sizeof(uint16_t)));
    9580          96 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, length_dns_name_1, sizeof(uint16_t), CH_UTF16));
    9581          96 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name_0, 0);
    9582             :                 }
    9583          96 :                 if (r->sid) {
    9584          96 :                         _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9585          96 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
    9586          96 :                         NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
    9587          96 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
    9588             :                 }
    9589             :         }
    9590         184 :         return NDR_ERR_SUCCESS;
    9591             : }
    9592             : 
    9593           0 : static void ndr_print_flags_netr_DomainTrust(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_DomainTrust *r)
    9594             : {
    9595           0 :         ndr_print_netr_DomainTrust(ndr, name, r);
    9596           0 : }
    9597             : 
    9598          12 : _PUBLIC_ void ndr_print_netr_DomainTrust(struct ndr_print *ndr, const char *name, const struct netr_DomainTrust *r)
    9599             : {
    9600          12 :         ndr_print_struct(ndr, name, "netr_DomainTrust");
    9601          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9602          12 :         ndr->depth++;
    9603          12 :         ndr_print_ptr(ndr, "netbios_name", r->netbios_name);
    9604          12 :         ndr->depth++;
    9605          12 :         if (r->netbios_name) {
    9606          12 :                 ndr_print_string(ndr, "netbios_name", r->netbios_name);
    9607             :         }
    9608          12 :         ndr->depth--;
    9609          12 :         ndr_print_ptr(ndr, "dns_name", r->dns_name);
    9610          12 :         ndr->depth++;
    9611          12 :         if (r->dns_name) {
    9612          12 :                 ndr_print_string(ndr, "dns_name", r->dns_name);
    9613             :         }
    9614          12 :         ndr->depth--;
    9615          12 :         ndr_print_netr_TrustFlags(ndr, "trust_flags", r->trust_flags);
    9616          12 :         ndr_print_uint32(ndr, "parent_index", r->parent_index);
    9617          12 :         ndr_print_lsa_TrustType(ndr, "trust_type", r->trust_type);
    9618          12 :         ndr_print_lsa_TrustAttributes(ndr, "trust_attributes", r->trust_attributes);
    9619          12 :         ndr_print_ptr(ndr, "sid", r->sid);
    9620          12 :         ndr->depth++;
    9621          12 :         if (r->sid) {
    9622          12 :                 ndr_print_dom_sid2(ndr, "sid", r->sid);
    9623             :         }
    9624          12 :         ndr->depth--;
    9625          12 :         ndr_print_GUID(ndr, "guid", &r->guid);
    9626          12 :         ndr->depth--;
    9627             : }
    9628             : 
    9629          66 : _PUBLIC_ enum ndr_err_code ndr_push_netr_DomainTrustList(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DomainTrustList *r)
    9630             : {
    9631           5 :         uint32_t cntr_array_1;
    9632          66 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9633          66 :         if (ndr_flags & NDR_SCALARS) {
    9634          66 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9635          66 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    9636          66 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    9637          66 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9638             :         }
    9639          66 :         if (ndr_flags & NDR_BUFFERS) {
    9640          66 :                 if (r->array) {
    9641          66 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    9642         180 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    9643         114 :                                 NDR_CHECK(ndr_push_netr_DomainTrust(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    9644             :                         }
    9645         180 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    9646         114 :                                 NDR_CHECK(ndr_push_netr_DomainTrust(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    9647             :                         }
    9648             :                 }
    9649             :         }
    9650          61 :         return NDR_ERR_SUCCESS;
    9651             : }
    9652             : 
    9653          56 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_DomainTrustList(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DomainTrustList *r)
    9654             : {
    9655           4 :         uint32_t _ptr_array;
    9656          56 :         uint32_t size_array_1 = 0;
    9657           4 :         uint32_t cntr_array_1;
    9658          56 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    9659          56 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    9660          56 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9661          56 :         if (ndr_flags & NDR_SCALARS) {
    9662          56 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9663          56 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    9664          56 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    9665          56 :                 if (_ptr_array) {
    9666          56 :                         NDR_PULL_ALLOC(ndr, r->array);
    9667             :                 } else {
    9668           0 :                         r->array = NULL;
    9669             :                 }
    9670          56 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9671             :         }
    9672          56 :         if (ndr_flags & NDR_BUFFERS) {
    9673          56 :                 if (r->array) {
    9674          56 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9675          56 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    9676          56 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    9677          56 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    9678          56 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    9679          56 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    9680          56 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    9681         152 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    9682          96 :                                 NDR_CHECK(ndr_pull_netr_DomainTrust(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    9683             :                         }
    9684         152 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    9685          96 :                                 NDR_CHECK(ndr_pull_netr_DomainTrust(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    9686             :                         }
    9687          56 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    9688          56 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    9689             :                 }
    9690          56 :                 if (r->array) {
    9691          56 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    9692             :                 }
    9693         152 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    9694           4 :                 }
    9695             :         }
    9696          52 :         return NDR_ERR_SUCCESS;
    9697             : }
    9698             : 
    9699           0 : static void ndr_print_flags_netr_DomainTrustList(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netr_DomainTrustList *r)
    9700             : {
    9701           0 :         ndr_print_netr_DomainTrustList(ndr, name, r);
    9702           0 : }
    9703             : 
    9704          12 : _PUBLIC_ void ndr_print_netr_DomainTrustList(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustList *r)
    9705             : {
    9706           2 :         uint32_t cntr_array_1;
    9707          12 :         ndr_print_struct(ndr, name, "netr_DomainTrustList");
    9708          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9709          12 :         ndr->depth++;
    9710          12 :         ndr_print_uint32(ndr, "count", r->count);
    9711          12 :         ndr_print_ptr(ndr, "array", r->array);
    9712          12 :         ndr->depth++;
    9713          12 :         if (r->array) {
    9714          12 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
    9715          12 :                 ndr->depth++;
    9716          24 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    9717          12 :                         ndr_print_netr_DomainTrust(ndr, "array", &r->array[cntr_array_1]);
    9718             :                 }
    9719          12 :                 ndr->depth--;
    9720             :         }
    9721          12 :         ndr->depth--;
    9722          12 :         ndr->depth--;
    9723             : }
    9724             : 
    9725          90 : static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesExWCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_DsRAddressToSitenamesExWCtr *r)
    9726             : {
    9727          15 :         uint32_t cntr_sitename_1;
    9728          15 :         uint32_t cntr_subnetname_1;
    9729          90 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9730          90 :         if (ndr_flags & NDR_SCALARS) {
    9731          90 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9732          90 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    9733          90 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sitename));
    9734          90 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->subnetname));
    9735          90 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9736             :         }
    9737          90 :         if (ndr_flags & NDR_BUFFERS) {
    9738          90 :                 if (r->sitename) {
    9739          90 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    9740         630 :                         for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
    9741         540 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1]));
    9742             :                         }
    9743         630 :                         for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
    9744         540 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1]));
    9745             :                         }
    9746             :                 }
    9747          90 :                 if (r->subnetname) {
    9748          90 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    9749         630 :                         for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (r->count); cntr_subnetname_1++) {
    9750         540 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->subnetname[cntr_subnetname_1]));
    9751             :                         }
    9752         630 :                         for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (r->count); cntr_subnetname_1++) {
    9753         540 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->subnetname[cntr_subnetname_1]));
    9754             :                         }
    9755             :                 }
    9756             :         }
    9757          75 :         return NDR_ERR_SUCCESS;
    9758             : }
    9759             : 
    9760          72 : static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesExWCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_DsRAddressToSitenamesExWCtr *r)
    9761             : {
    9762          12 :         uint32_t _ptr_sitename;
    9763          72 :         uint32_t size_sitename_1 = 0;
    9764          12 :         uint32_t cntr_sitename_1;
    9765          72 :         TALLOC_CTX *_mem_save_sitename_0 = NULL;
    9766          72 :         TALLOC_CTX *_mem_save_sitename_1 = NULL;
    9767          12 :         uint32_t _ptr_subnetname;
    9768          72 :         uint32_t size_subnetname_1 = 0;
    9769          12 :         uint32_t cntr_subnetname_1;
    9770          72 :         TALLOC_CTX *_mem_save_subnetname_0 = NULL;
    9771          72 :         TALLOC_CTX *_mem_save_subnetname_1 = NULL;
    9772          72 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9773          72 :         if (ndr_flags & NDR_SCALARS) {
    9774          72 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9775          72 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    9776          72 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sitename));
    9777          72 :                 if (_ptr_sitename) {
    9778          72 :                         NDR_PULL_ALLOC(ndr, r->sitename);
    9779             :                 } else {
    9780           0 :                         r->sitename = NULL;
    9781             :                 }
    9782          72 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_subnetname));
    9783          72 :                 if (_ptr_subnetname) {
    9784          72 :                         NDR_PULL_ALLOC(ndr, r->subnetname);
    9785             :                 } else {
    9786           0 :                         r->subnetname = NULL;
    9787             :                 }
    9788          72 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9789             :         }
    9790          72 :         if (ndr_flags & NDR_BUFFERS) {
    9791          72 :                 if (r->sitename) {
    9792          72 :                         _mem_save_sitename_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9793          72 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
    9794          72 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->sitename));
    9795          72 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sitename, &size_sitename_1));
    9796          72 :                         NDR_PULL_ALLOC_N(ndr, r->sitename, size_sitename_1);
    9797          72 :                         _mem_save_sitename_1 = NDR_PULL_GET_MEM_CTX(ndr);
    9798          72 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0);
    9799         504 :                         for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
    9800         432 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1]));
    9801             :                         }
    9802         504 :                         for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
    9803         432 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1]));
    9804             :                         }
    9805          72 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_1, 0);
    9806          72 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_0, 0);
    9807             :                 }
    9808          72 :                 if (r->subnetname) {
    9809          72 :                         _mem_save_subnetname_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9810          72 :                         NDR_PULL_SET_MEM_CTX(ndr, r->subnetname, 0);
    9811          72 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->subnetname));
    9812          72 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->subnetname, &size_subnetname_1));
    9813          72 :                         NDR_PULL_ALLOC_N(ndr, r->subnetname, size_subnetname_1);
    9814          72 :                         _mem_save_subnetname_1 = NDR_PULL_GET_MEM_CTX(ndr);
    9815          72 :                         NDR_PULL_SET_MEM_CTX(ndr, r->subnetname, 0);
    9816         504 :                         for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (size_subnetname_1); cntr_subnetname_1++) {
    9817         432 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->subnetname[cntr_subnetname_1]));
    9818             :                         }
    9819         504 :                         for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (size_subnetname_1); cntr_subnetname_1++) {
    9820         432 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->subnetname[cntr_subnetname_1]));
    9821             :                         }
    9822          72 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_subnetname_1, 0);
    9823          72 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_subnetname_0, 0);
    9824             :                 }
    9825          72 :                 if (r->sitename) {
    9826          72 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sitename, r->count));
    9827             :                 }
    9828         504 :                 for (cntr_sitename_1 = 0; cntr_sitename_1 < (size_sitename_1); cntr_sitename_1++) {
    9829          72 :                 }
    9830          72 :                 if (r->subnetname) {
    9831          72 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->subnetname, r->count));
    9832             :                 }
    9833         504 :                 for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (size_subnetname_1); cntr_subnetname_1++) {
    9834          72 :                 }
    9835             :         }
    9836          60 :         return NDR_ERR_SUCCESS;
    9837             : }
    9838             : 
    9839          36 : _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesExWCtr *r)
    9840             : {
    9841           6 :         uint32_t cntr_sitename_1;
    9842           6 :         uint32_t cntr_subnetname_1;
    9843          36 :         ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesExWCtr");
    9844          36 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9845          36 :         ndr->depth++;
    9846          36 :         ndr_print_uint32(ndr, "count", r->count);
    9847          36 :         ndr_print_ptr(ndr, "sitename", r->sitename);
    9848          36 :         ndr->depth++;
    9849          36 :         if (r->sitename) {
    9850          36 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sitename", (uint32_t)(r->count));
    9851          36 :                 ndr->depth++;
    9852         252 :                 for (cntr_sitename_1 = 0; cntr_sitename_1 < (r->count); cntr_sitename_1++) {
    9853         216 :                         ndr_print_lsa_String(ndr, "sitename", &r->sitename[cntr_sitename_1]);
    9854             :                 }
    9855          36 :                 ndr->depth--;
    9856             :         }
    9857          36 :         ndr->depth--;
    9858          36 :         ndr_print_ptr(ndr, "subnetname", r->subnetname);
    9859          36 :         ndr->depth++;
    9860          36 :         if (r->subnetname) {
    9861          36 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "subnetname", (uint32_t)(r->count));
    9862          36 :                 ndr->depth++;
    9863         252 :                 for (cntr_subnetname_1 = 0; cntr_subnetname_1 < (r->count); cntr_subnetname_1++) {
    9864         216 :                         ndr_print_lsa_String(ndr, "subnetname", &r->subnetname[cntr_subnetname_1]);
    9865             :                 }
    9866          36 :                 ndr->depth--;
    9867             :         }
    9868          36 :         ndr->depth--;
    9869          36 :         ndr->depth--;
    9870             : }
    9871             : 
    9872          35 : static enum ndr_err_code ndr_push_DcSitesCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct DcSitesCtr *r)
    9873             : {
    9874           5 :         uint32_t cntr_sites_1;
    9875          35 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9876          35 :         if (ndr_flags & NDR_SCALARS) {
    9877          35 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9878          35 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sites));
    9879          35 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sites));
    9880          35 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9881             :         }
    9882          35 :         if (ndr_flags & NDR_BUFFERS) {
    9883          35 :                 if (r->sites) {
    9884          35 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_sites));
    9885          70 :                         for (cntr_sites_1 = 0; cntr_sites_1 < (r->num_sites); cntr_sites_1++) {
    9886          35 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->sites[cntr_sites_1]));
    9887             :                         }
    9888          70 :                         for (cntr_sites_1 = 0; cntr_sites_1 < (r->num_sites); cntr_sites_1++) {
    9889          35 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->sites[cntr_sites_1]));
    9890             :                         }
    9891             :                 }
    9892             :         }
    9893          30 :         return NDR_ERR_SUCCESS;
    9894             : }
    9895             : 
    9896          29 : static enum ndr_err_code ndr_pull_DcSitesCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct DcSitesCtr *r)
    9897             : {
    9898           4 :         uint32_t _ptr_sites;
    9899          29 :         uint32_t size_sites_1 = 0;
    9900           4 :         uint32_t cntr_sites_1;
    9901          29 :         TALLOC_CTX *_mem_save_sites_0 = NULL;
    9902          29 :         TALLOC_CTX *_mem_save_sites_1 = NULL;
    9903          29 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9904          29 :         if (ndr_flags & NDR_SCALARS) {
    9905          29 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9906          29 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sites));
    9907          29 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sites));
    9908          29 :                 if (_ptr_sites) {
    9909          29 :                         NDR_PULL_ALLOC(ndr, r->sites);
    9910             :                 } else {
    9911           0 :                         r->sites = NULL;
    9912             :                 }
    9913          29 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9914             :         }
    9915          29 :         if (ndr_flags & NDR_BUFFERS) {
    9916          29 :                 if (r->sites) {
    9917          29 :                         _mem_save_sites_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9918          29 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sites, 0);
    9919          29 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->sites));
    9920          29 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sites, &size_sites_1));
    9921          29 :                         NDR_PULL_ALLOC_N(ndr, r->sites, size_sites_1);
    9922          29 :                         _mem_save_sites_1 = NDR_PULL_GET_MEM_CTX(ndr);
    9923          29 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sites, 0);
    9924          58 :                         for (cntr_sites_1 = 0; cntr_sites_1 < (size_sites_1); cntr_sites_1++) {
    9925          29 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->sites[cntr_sites_1]));
    9926             :                         }
    9927          58 :                         for (cntr_sites_1 = 0; cntr_sites_1 < (size_sites_1); cntr_sites_1++) {
    9928          29 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->sites[cntr_sites_1]));
    9929             :                         }
    9930          29 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sites_1, 0);
    9931          29 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sites_0, 0);
    9932             :                 }
    9933          29 :                 if (r->sites) {
    9934          29 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sites, r->num_sites));
    9935             :                 }
    9936          58 :                 for (cntr_sites_1 = 0; cntr_sites_1 < (size_sites_1); cntr_sites_1++) {
    9937           4 :                 }
    9938             :         }
    9939          25 :         return NDR_ERR_SUCCESS;
    9940             : }
    9941             : 
    9942          12 : _PUBLIC_ void ndr_print_DcSitesCtr(struct ndr_print *ndr, const char *name, const struct DcSitesCtr *r)
    9943             : {
    9944           2 :         uint32_t cntr_sites_1;
    9945          12 :         ndr_print_struct(ndr, name, "DcSitesCtr");
    9946          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9947          12 :         ndr->depth++;
    9948          12 :         ndr_print_uint32(ndr, "num_sites", r->num_sites);
    9949          12 :         ndr_print_ptr(ndr, "sites", r->sites);
    9950          12 :         ndr->depth++;
    9951          12 :         if (r->sites) {
    9952          12 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sites", (uint32_t)(r->num_sites));
    9953          12 :                 ndr->depth++;
    9954          24 :                 for (cntr_sites_1 = 0; cntr_sites_1 < (r->num_sites); cntr_sites_1++) {
    9955          12 :                         ndr_print_lsa_String(ndr, "sites", &r->sites[cntr_sites_1]);
    9956             :                 }
    9957          12 :                 ndr->depth--;
    9958             :         }
    9959          12 :         ndr->depth--;
    9960          12 :         ndr->depth--;
    9961             : }
    9962             : 
    9963       18353 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonSamLogon_flags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
    9964             : {
    9965       18353 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    9966       17143 :         return NDR_ERR_SUCCESS;
    9967             : }
    9968             : 
    9969       17693 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonSamLogon_flags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
    9970             : {
    9971        1100 :         uint32_t v;
    9972       17693 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    9973       17693 :         *r = v;
    9974       17693 :         return NDR_ERR_SUCCESS;
    9975             : }
    9976             : 
    9977        1320 : _PUBLIC_ void ndr_print_netr_LogonSamLogon_flags(struct ndr_print *ndr, const char *name, uint32_t r)
    9978             : {
    9979        1320 :         ndr_print_uint32(ndr, name, r);
    9980        1320 :         ndr->depth++;
    9981        1320 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT", NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT, r);
    9982        1320 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP", NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP, r);
    9983        1320 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN", NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN, r);
    9984        1320 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST", NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST, r);
    9985        1320 :         ndr->depth--;
    9986        1320 : }
    9987             : 
    9988          52 : static enum ndr_err_code ndr_push_netr_TrustInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netr_TrustInfo *r)
    9989             : {
    9990           0 :         uint32_t cntr_data_1;
    9991           0 :         uint32_t cntr_entries_1;
    9992          52 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9993          52 :         if (ndr_flags & NDR_SCALARS) {
    9994          52 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9995          52 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    9996          52 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
    9997          52 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entry_count));
    9998          52 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
    9999          52 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   10000             :         }
   10001          52 :         if (ndr_flags & NDR_BUFFERS) {
   10002          52 :                 if (r->data) {
   10003          52 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   10004         104 :                         for (cntr_data_1 = 0; cntr_data_1 < (r->count); cntr_data_1++) {
   10005          52 :                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data[cntr_data_1]));
   10006             :                         }
   10007             :                 }
   10008          52 :                 if (r->entries) {
   10009           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   10010           0 :                         for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
   10011           0 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
   10012             :                         }
   10013           0 :                         for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
   10014           0 :                                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
   10015             :                         }
   10016             :                 }
   10017             :         }
   10018          52 :         return NDR_ERR_SUCCESS;
   10019             : }
   10020             : 
   10021           4 : static enum ndr_err_code ndr_pull_netr_TrustInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netr_TrustInfo *r)
   10022             : {
   10023           0 :         uint32_t _ptr_data;
   10024           4 :         uint32_t size_data_1 = 0;
   10025           0 :         uint32_t cntr_data_1;
   10026           4 :         TALLOC_CTX *_mem_save_data_0 = NULL;
   10027           4 :         TALLOC_CTX *_mem_save_data_1 = NULL;
   10028           0 :         uint32_t _ptr_entries;
   10029           4 :         uint32_t size_entries_1 = 0;
   10030           0 :         uint32_t cntr_entries_1;
   10031           4 :         TALLOC_CTX *_mem_save_entries_0 = NULL;
   10032           4 :         TALLOC_CTX *_mem_save_entries_1 = NULL;
   10033           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   10034           4 :         if (ndr_flags & NDR_SCALARS) {
   10035           4 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   10036           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   10037           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
   10038           4 :                 if (_ptr_data) {
   10039           4 :                         NDR_PULL_ALLOC(ndr, r->data);
   10040             :                 } else {
   10041           0 :                         r->data = NULL;
   10042             :                 }
   10043           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->entry_count));
   10044           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
   10045           4 :                 if (_ptr_entries) {
   10046           0 :                         NDR_PULL_ALLOC(ndr, r->entries);
   10047             :                 } else {
   10048           4 :                         r->entries = NULL;
   10049             :                 }
   10050           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   10051             :         }
   10052           4 :         if (ndr_flags & NDR_BUFFERS) {
   10053           4 :                 if (r->data) {
   10054           4 :                         _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10055           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
   10056           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
   10057           4 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
   10058           4 :                         NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
   10059           4 :                         _mem_save_data_1 = NDR_PULL_GET_MEM_CTX(ndr);
   10060           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
   10061           8 :                         for (cntr_data_1 = 0; cntr_data_1 < (size_data_1); cntr_data_1++) {
   10062           4 :                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data[cntr_data_1]));
   10063             :                         }
   10064           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_1, 0);
   10065           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
   10066             :                 }
   10067           4 :                 if (r->entries) {
   10068           0 :                         _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10069           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
   10070           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
   10071           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->entries, &size_entries_1));
   10072           0 :                         NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
   10073           0 :                         _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
   10074           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
   10075           0 :                         for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
   10076           0 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
   10077             :                         }
   10078           0 :                         for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
   10079           0 :                                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
   10080             :                         }
   10081           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
   10082           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
   10083             :                 }
   10084           4 :                 if (r->data) {
   10085           4 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->count));
   10086             :                 }
   10087           4 :                 if (r->entries) {
   10088           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
   10089             :                 }
   10090           4 :                 for (cntr_entries_1 = 0; cntr_entries_1 < (size_entries_1); cntr_entries_1++) {
   10091           0 :                 }
   10092             :         }
   10093           4 :         return NDR_ERR_SUCCESS;
   10094             : }
   10095             : 
   10096           2 : _PUBLIC_ void ndr_print_netr_TrustInfo(struct ndr_print *ndr, const char *name, const struct netr_TrustInfo *r)
   10097             : {
   10098           0 :         uint32_t cntr_data_1;
   10099           0 :         uint32_t cntr_entries_1;
   10100           2 :         ndr_print_struct(ndr, name, "netr_TrustInfo");
   10101           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
   10102           2 :         ndr->depth++;
   10103           2 :         ndr_print_uint32(ndr, "count", r->count);
   10104           2 :         ndr_print_ptr(ndr, "data", r->data);
   10105           2 :         ndr->depth++;
   10106           2 :         if (r->data) {
   10107           2 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "data", (uint32_t)(r->count));
   10108           2 :                 ndr->depth++;
   10109           4 :                 for (cntr_data_1 = 0; cntr_data_1 < (r->count); cntr_data_1++) {
   10110           2 :                         ndr_print_uint32(ndr, "data", r->data[cntr_data_1]);
   10111             :                 }
   10112           2 :                 ndr->depth--;
   10113             :         }
   10114           2 :         ndr->depth--;
   10115           2 :         ndr_print_uint32(ndr, "entry_count", r->entry_count);
   10116           2 :         ndr_print_ptr(ndr, "entries", r->entries);
   10117           2 :         ndr->depth++;
   10118           2 :         if (r->entries) {
   10119           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "entries", (uint32_t)(r->count));
   10120           0 :                 ndr->depth++;
   10121           0 :                 for (cntr_entries_1 = 0; cntr_entries_1 < (r->count); cntr_entries_1++) {
   10122           0 :                         ndr_print_lsa_String(ndr, "entries", &r->entries[cntr_entries_1]);
   10123             :                 }
   10124           0 :                 ndr->depth--;
   10125             :         }
   10126           2 :         ndr->depth--;
   10127           2 :         ndr->depth--;
   10128             : }
   10129             : 
   10130          20 : static enum ndr_err_code ndr_push_netr_DnsType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_DnsType r)
   10131             : {
   10132          20 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
   10133          20 :         return NDR_ERR_SUCCESS;
   10134             : }
   10135             : 
   10136          20 : static enum ndr_err_code ndr_pull_netr_DnsType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_DnsType *r)
   10137             : {
   10138           0 :         uint16_t v;
   10139          20 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
   10140          20 :         *r = v;
   10141          20 :         return NDR_ERR_SUCCESS;
   10142             : }
   10143             : 
   10144           0 : _PUBLIC_ void ndr_print_netr_DnsType(struct ndr_print *ndr, const char *name, enum netr_DnsType r)
   10145             : {
   10146           0 :         const char *val = NULL;
   10147             : 
   10148           0 :         switch (r) {
   10149           0 :                 case NlDnsLdapAtSite: val = "NlDnsLdapAtSite"; break;
   10150           0 :                 case NlDnsGcAtSite: val = "NlDnsGcAtSite"; break;
   10151           0 :                 case NlDnsDsaCname: val = "NlDnsDsaCname"; break;
   10152           0 :                 case NlDnsKdcAtSite: val = "NlDnsKdcAtSite"; break;
   10153           0 :                 case NlDnsDcAtSite: val = "NlDnsDcAtSite"; break;
   10154           0 :                 case NlDnsRfc1510KdcAtSite: val = "NlDnsRfc1510KdcAtSite"; break;
   10155           0 :                 case NlDnsGenericGcAtSite: val = "NlDnsGenericGcAtSite"; break;
   10156             :         }
   10157           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
   10158           0 : }
   10159             : 
   10160          20 : static enum ndr_err_code ndr_push_netr_DnsDomainInfoType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_DnsDomainInfoType r)
   10161             : {
   10162          20 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
   10163          20 :         return NDR_ERR_SUCCESS;
   10164             : }
   10165             : 
   10166          20 : static enum ndr_err_code ndr_pull_netr_DnsDomainInfoType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_DnsDomainInfoType *r)
   10167             : {
   10168           0 :         uint16_t v;
   10169          20 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
   10170          20 :         *r = v;
   10171          20 :         return NDR_ERR_SUCCESS;
   10172             : }
   10173             : 
   10174           0 : _PUBLIC_ void ndr_print_netr_DnsDomainInfoType(struct ndr_print *ndr, const char *name, enum netr_DnsDomainInfoType r)
   10175             : {
   10176           0 :         const char *val = NULL;
   10177             : 
   10178           0 :         switch (r) {
   10179           0 :                 case NlDnsInfoTypeNone: val = "NlDnsInfoTypeNone"; break;
   10180           0 :                 case NlDnsDomainName: val = "NlDnsDomainName"; break;
   10181           0 :                 case NlDnsDomainNameAlias: val = "NlDnsDomainNameAlias"; break;
   10182           0 :                 case NlDnsForestName: val = "NlDnsForestName"; break;
   10183           0 :                 case NlDnsForestNameAlias: val = "NlDnsForestNameAlias"; break;
   10184           0 :                 case NlDnsNdncDomainName: val = "NlDnsNdncDomainName"; break;
   10185           0 :                 case NlDnsRecordName: val = "NlDnsRecordName"; break;
   10186             :         }
   10187           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
   10188           0 : }
   10189             : 
   10190          40 : static enum ndr_err_code ndr_push_NL_DNS_NAME_INFO(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct NL_DNS_NAME_INFO *r)
   10191             : {
   10192          40 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   10193          40 :         if (ndr_flags & NDR_SCALARS) {
   10194          20 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   10195          20 :                 NDR_CHECK(ndr_push_netr_DnsType(ndr, NDR_SCALARS, r->type));
   10196          20 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_domain_info));
   10197          20 :                 NDR_CHECK(ndr_push_netr_DnsDomainInfoType(ndr, NDR_SCALARS, r->dns_domain_info_type));
   10198          20 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
   10199          20 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->weight));
   10200          20 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->port));
   10201          20 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dns_register));
   10202          20 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
   10203          20 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   10204             :         }
   10205          40 :         if (ndr_flags & NDR_BUFFERS) {
   10206          20 :                 if (r->dns_domain_info) {
   10207           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain_info, CH_UTF16)));
   10208           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   10209           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain_info, CH_UTF16)));
   10210           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_domain_info, ndr_charset_length(r->dns_domain_info, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   10211             :                 }
   10212             :         }
   10213          40 :         return NDR_ERR_SUCCESS;
   10214             : }
   10215             : 
   10216          40 : static enum ndr_err_code ndr_pull_NL_DNS_NAME_INFO(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct NL_DNS_NAME_INFO *r)
   10217             : {
   10218           0 :         uint32_t _ptr_dns_domain_info;
   10219          40 :         uint32_t size_dns_domain_info_1 = 0;
   10220          40 :         uint32_t length_dns_domain_info_1 = 0;
   10221          40 :         TALLOC_CTX *_mem_save_dns_domain_info_0 = NULL;
   10222          40 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   10223          40 :         if (ndr_flags & NDR_SCALARS) {
   10224          20 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   10225          20 :                 NDR_CHECK(ndr_pull_netr_DnsType(ndr, NDR_SCALARS, &r->type));
   10226          20 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_domain_info));
   10227          20 :                 if (_ptr_dns_domain_info) {
   10228           0 :                         NDR_PULL_ALLOC(ndr, r->dns_domain_info);
   10229             :                 } else {
   10230          20 :                         r->dns_domain_info = NULL;
   10231             :                 }
   10232          20 :                 NDR_CHECK(ndr_pull_netr_DnsDomainInfoType(ndr, NDR_SCALARS, &r->dns_domain_info_type));
   10233          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
   10234          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->weight));
   10235          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->port));
   10236          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dns_register));
   10237          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
   10238          20 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   10239             :         }
   10240          40 :         if (ndr_flags & NDR_BUFFERS) {
   10241          20 :                 if (r->dns_domain_info) {
   10242           0 :                         _mem_save_dns_domain_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10243           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dns_domain_info, 0);
   10244           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_domain_info));
   10245           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_domain_info));
   10246           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_domain_info, &size_dns_domain_info_1));
   10247           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_domain_info, &length_dns_domain_info_1));
   10248           0 :                         if (length_dns_domain_info_1 > size_dns_domain_info_1) {
   10249           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_domain_info_1, length_dns_domain_info_1);
   10250             :                         }
   10251           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_domain_info_1, sizeof(uint16_t)));
   10252           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_domain_info, length_dns_domain_info_1, sizeof(uint16_t), CH_UTF16));
   10253           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_domain_info_0, 0);
   10254             :                 }
   10255             :         }
   10256          40 :         return NDR_ERR_SUCCESS;
   10257             : }
   10258             : 
   10259           0 : _PUBLIC_ void ndr_print_NL_DNS_NAME_INFO(struct ndr_print *ndr, const char *name, const struct NL_DNS_NAME_INFO *r)
   10260             : {
   10261           0 :         ndr_print_struct(ndr, name, "NL_DNS_NAME_INFO");
   10262           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   10263           0 :         ndr->depth++;
   10264           0 :         ndr_print_netr_DnsType(ndr, "type", r->type);
   10265           0 :         ndr_print_ptr(ndr, "dns_domain_info", r->dns_domain_info);
   10266           0 :         ndr->depth++;
   10267           0 :         if (r->dns_domain_info) {
   10268           0 :                 ndr_print_string(ndr, "dns_domain_info", r->dns_domain_info);
   10269             :         }
   10270           0 :         ndr->depth--;
   10271           0 :         ndr_print_netr_DnsDomainInfoType(ndr, "dns_domain_info_type", r->dns_domain_info_type);
   10272           0 :         ndr_print_uint32(ndr, "priority", r->priority);
   10273           0 :         ndr_print_uint32(ndr, "weight", r->weight);
   10274           0 :         ndr_print_uint32(ndr, "port", r->port);
   10275           0 :         ndr_print_uint32(ndr, "dns_register", r->dns_register);
   10276           0 :         ndr_print_uint32(ndr, "status", r->status);
   10277           0 :         ndr->depth--;
   10278             : }
   10279             : 
   10280          20 : _PUBLIC_ enum ndr_err_code ndr_push_NL_DNS_NAME_INFO_ARRAY(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct NL_DNS_NAME_INFO_ARRAY *r)
   10281             : {
   10282           0 :         uint32_t cntr_names_1;
   10283          20 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   10284          20 :         if (ndr_flags & NDR_SCALARS) {
   10285          20 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   10286          20 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   10287          20 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
   10288          20 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   10289             :         }
   10290          20 :         if (ndr_flags & NDR_BUFFERS) {
   10291          20 :                 if (r->names) {
   10292          20 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   10293          40 :                         for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
   10294          20 :                                 NDR_CHECK(ndr_push_NL_DNS_NAME_INFO(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
   10295             :                         }
   10296          40 :                         for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
   10297          20 :                                 NDR_CHECK(ndr_push_NL_DNS_NAME_INFO(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
   10298             :                         }
   10299             :                 }
   10300             :         }
   10301          20 :         return NDR_ERR_SUCCESS;
   10302             : }
   10303             : 
   10304          20 : _PUBLIC_ enum ndr_err_code ndr_pull_NL_DNS_NAME_INFO_ARRAY(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct NL_DNS_NAME_INFO_ARRAY *r)
   10305             : {
   10306           0 :         uint32_t _ptr_names;
   10307          20 :         uint32_t size_names_1 = 0;
   10308           0 :         uint32_t cntr_names_1;
   10309          20 :         TALLOC_CTX *_mem_save_names_0 = NULL;
   10310          20 :         TALLOC_CTX *_mem_save_names_1 = NULL;
   10311          20 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   10312          20 :         if (ndr_flags & NDR_SCALARS) {
   10313          20 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   10314          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   10315          20 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
   10316          20 :                 if (_ptr_names) {
   10317          20 :                         NDR_PULL_ALLOC(ndr, r->names);
   10318             :                 } else {
   10319           0 :                         r->names = NULL;
   10320             :                 }
   10321          20 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   10322             :         }
   10323          20 :         if (ndr_flags & NDR_BUFFERS) {
   10324          20 :                 if (r->names) {
   10325          20 :                         _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10326          20 :                         NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
   10327          20 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
   10328          20 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->names, &size_names_1));
   10329          20 :                         NDR_PULL_ALLOC_N(ndr, r->names, size_names_1);
   10330          20 :                         _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
   10331          20 :                         NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
   10332          40 :                         for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
   10333          20 :                                 NDR_CHECK(ndr_pull_NL_DNS_NAME_INFO(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
   10334             :                         }
   10335          40 :                         for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
   10336          20 :                                 NDR_CHECK(ndr_pull_NL_DNS_NAME_INFO(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
   10337             :                         }
   10338          20 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
   10339          20 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
   10340             :                 }
   10341          20 :                 if (r->names) {
   10342          20 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
   10343             :                 }
   10344          40 :                 for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
   10345           0 :                 }
   10346             :         }
   10347          20 :         return NDR_ERR_SUCCESS;
   10348             : }
   10349             : 
   10350           0 : static void ndr_print_flags_NL_DNS_NAME_INFO_ARRAY(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct NL_DNS_NAME_INFO_ARRAY *r)
   10351             : {
   10352           0 :         ndr_print_NL_DNS_NAME_INFO_ARRAY(ndr, name, r);
   10353           0 : }
   10354             : 
   10355           0 : _PUBLIC_ void ndr_print_NL_DNS_NAME_INFO_ARRAY(struct ndr_print *ndr, const char *name, const struct NL_DNS_NAME_INFO_ARRAY *r)
   10356             : {
   10357           0 :         uint32_t cntr_names_1;
   10358           0 :         ndr_print_struct(ndr, name, "NL_DNS_NAME_INFO_ARRAY");
   10359           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   10360           0 :         ndr->depth++;
   10361           0 :         ndr_print_uint32(ndr, "count", r->count);
   10362           0 :         ndr_print_ptr(ndr, "names", r->names);
   10363           0 :         ndr->depth++;
   10364           0 :         if (r->names) {
   10365           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "names", (uint32_t)(r->count));
   10366           0 :                 ndr->depth++;
   10367           0 :                 for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
   10368           0 :                         ndr_print_NL_DNS_NAME_INFO(ndr, "names", &r->names[cntr_names_1]);
   10369             :                 }
   10370           0 :                 ndr->depth--;
   10371             :         }
   10372           0 :         ndr->depth--;
   10373           0 :         ndr->depth--;
   10374             : }
   10375             : 
   10376          24 : static enum ndr_err_code ndr_push_netr_LogonUasLogon(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonUasLogon *r)
   10377             : {
   10378          24 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   10379          24 :         if (flags & NDR_IN) {
   10380          24 :                 if (r->in.account_name == NULL) {
   10381           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   10382             :                 }
   10383          24 :                 if (r->in.workstation == NULL) {
   10384           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   10385             :                 }
   10386          24 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   10387          24 :                 if (r->in.server_name) {
   10388           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   10389           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   10390           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   10391           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   10392             :                 }
   10393          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   10394          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   10395          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   10396          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   10397          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
   10398          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   10399          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
   10400          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.workstation, ndr_charset_length(r->in.workstation, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   10401             :         }
   10402          24 :         if (flags & NDR_OUT) {
   10403           0 :                 if (r->out.info == NULL) {
   10404           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   10405             :                 }
   10406           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
   10407           0 :                 if (*r->out.info) {
   10408           0 :                         NDR_CHECK(ndr_push_netr_UasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
   10409             :                 }
   10410           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   10411             :         }
   10412          20 :         return NDR_ERR_SUCCESS;
   10413             : }
   10414             : 
   10415          24 : static enum ndr_err_code ndr_pull_netr_LogonUasLogon(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonUasLogon *r)
   10416             : {
   10417           4 :         uint32_t _ptr_server_name;
   10418          24 :         uint32_t size_server_name_1 = 0;
   10419          24 :         uint32_t length_server_name_1 = 0;
   10420          24 :         uint32_t size_account_name_1 = 0;
   10421          24 :         uint32_t length_account_name_1 = 0;
   10422          24 :         uint32_t size_workstation_1 = 0;
   10423          24 :         uint32_t length_workstation_1 = 0;
   10424           4 :         uint32_t _ptr_info;
   10425          24 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   10426          24 :         TALLOC_CTX *_mem_save_info_0 = NULL;
   10427          24 :         TALLOC_CTX *_mem_save_info_1 = NULL;
   10428          24 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   10429          24 :         if (flags & NDR_IN) {
   10430          24 :                 NDR_ZERO_STRUCT(r->out);
   10431             : 
   10432          24 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   10433          24 :                 if (_ptr_server_name) {
   10434           0 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   10435             :                 } else {
   10436          24 :                         r->in.server_name = NULL;
   10437             :                 }
   10438          24 :                 if (r->in.server_name) {
   10439           0 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10440           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   10441           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   10442           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   10443           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   10444           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   10445           0 :                         if (length_server_name_1 > size_server_name_1) {
   10446           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   10447             :                         }
   10448           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   10449           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   10450           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   10451             :                 }
   10452          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
   10453          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
   10454          24 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
   10455          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
   10456          24 :                 if (length_account_name_1 > size_account_name_1) {
   10457           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
   10458             :                 }
   10459          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
   10460          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
   10461          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.workstation));
   10462          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.workstation));
   10463          24 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.workstation, &size_workstation_1));
   10464          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.workstation, &length_workstation_1));
   10465          24 :                 if (length_workstation_1 > size_workstation_1) {
   10466           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_workstation_1, length_workstation_1);
   10467             :                 }
   10468          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_workstation_1, sizeof(uint16_t)));
   10469          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.workstation, length_workstation_1, sizeof(uint16_t), CH_UTF16));
   10470          24 :                 NDR_PULL_ALLOC(ndr, r->out.info);
   10471          24 :                 NDR_ZERO_STRUCTP(r->out.info);
   10472             :         }
   10473          24 :         if (flags & NDR_OUT) {
   10474             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   10475             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   10476           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   10477           0 :                         NDR_PULL_ALLOC(ndr, r->out.info);
   10478             :                 }
   10479           0 :                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10480           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
   10481           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
   10482           0 :                 if (_ptr_info) {
   10483           0 :                         NDR_PULL_ALLOC(ndr, *r->out.info);
   10484             :                 } else {
   10485           0 :                         *r->out.info = NULL;
   10486             :                 }
   10487           0 :                 if (*r->out.info) {
   10488           0 :                         _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
   10489           0 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
   10490           0 :                         NDR_CHECK(ndr_pull_netr_UasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
   10491           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
   10492             :                 }
   10493           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
   10494           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   10495             :         }
   10496          20 :         return NDR_ERR_SUCCESS;
   10497             : }
   10498             : 
   10499           0 : _PUBLIC_ void ndr_print_netr_LogonUasLogon(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonUasLogon *r)
   10500             : {
   10501           0 :         ndr_print_struct(ndr, name, "netr_LogonUasLogon");
   10502           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   10503           0 :         ndr->depth++;
   10504           0 :         if (flags & NDR_SET_VALUES) {
   10505           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   10506             :         }
   10507           0 :         if (flags & NDR_IN) {
   10508           0 :                 ndr_print_struct(ndr, "in", "netr_LogonUasLogon");
   10509           0 :                 ndr->depth++;
   10510           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   10511           0 :                 ndr->depth++;
   10512           0 :                 if (r->in.server_name) {
   10513           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   10514             :                 }
   10515           0 :                 ndr->depth--;
   10516           0 :                 ndr_print_ptr(ndr, "account_name", r->in.account_name);
   10517           0 :                 ndr->depth++;
   10518           0 :                 ndr_print_string(ndr, "account_name", r->in.account_name);
   10519           0 :                 ndr->depth--;
   10520           0 :                 ndr_print_ptr(ndr, "workstation", r->in.workstation);
   10521           0 :                 ndr->depth++;
   10522           0 :                 ndr_print_string(ndr, "workstation", r->in.workstation);
   10523           0 :                 ndr->depth--;
   10524           0 :                 ndr->depth--;
   10525             :         }
   10526           0 :         if (flags & NDR_OUT) {
   10527           0 :                 ndr_print_struct(ndr, "out", "netr_LogonUasLogon");
   10528           0 :                 ndr->depth++;
   10529           0 :                 ndr_print_ptr(ndr, "info", r->out.info);
   10530           0 :                 ndr->depth++;
   10531           0 :                 ndr_print_ptr(ndr, "info", *r->out.info);
   10532           0 :                 ndr->depth++;
   10533           0 :                 if (*r->out.info) {
   10534           0 :                         ndr_print_netr_UasInfo(ndr, "info", *r->out.info);
   10535             :                 }
   10536           0 :                 ndr->depth--;
   10537           0 :                 ndr->depth--;
   10538           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   10539           0 :                 ndr->depth--;
   10540             :         }
   10541           0 :         ndr->depth--;
   10542             : }
   10543             : 
   10544          24 : static enum ndr_err_code ndr_push_netr_LogonUasLogoff(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonUasLogoff *r)
   10545             : {
   10546          24 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   10547          24 :         if (flags & NDR_IN) {
   10548          24 :                 if (r->in.account_name == NULL) {
   10549           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   10550             :                 }
   10551          24 :                 if (r->in.workstation == NULL) {
   10552           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   10553             :                 }
   10554          24 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   10555          24 :                 if (r->in.server_name) {
   10556           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   10557           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   10558           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   10559           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   10560             :                 }
   10561          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   10562          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   10563          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   10564          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   10565          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
   10566          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   10567          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
   10568          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.workstation, ndr_charset_length(r->in.workstation, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   10569             :         }
   10570          24 :         if (flags & NDR_OUT) {
   10571           0 :                 if (r->out.info == NULL) {
   10572           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   10573             :                 }
   10574           0 :                 NDR_CHECK(ndr_push_netr_UasLogoffInfo(ndr, NDR_SCALARS, r->out.info));
   10575           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   10576             :         }
   10577          20 :         return NDR_ERR_SUCCESS;
   10578             : }
   10579             : 
   10580          24 : static enum ndr_err_code ndr_pull_netr_LogonUasLogoff(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonUasLogoff *r)
   10581             : {
   10582           4 :         uint32_t _ptr_server_name;
   10583          24 :         uint32_t size_server_name_1 = 0;
   10584          24 :         uint32_t length_server_name_1 = 0;
   10585          24 :         uint32_t size_account_name_1 = 0;
   10586          24 :         uint32_t length_account_name_1 = 0;
   10587          24 :         uint32_t size_workstation_1 = 0;
   10588          24 :         uint32_t length_workstation_1 = 0;
   10589          24 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   10590          24 :         TALLOC_CTX *_mem_save_info_0 = NULL;
   10591          24 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   10592          24 :         if (flags & NDR_IN) {
   10593          24 :                 NDR_ZERO_STRUCT(r->out);
   10594             : 
   10595          24 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   10596          24 :                 if (_ptr_server_name) {
   10597           0 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   10598             :                 } else {
   10599          24 :                         r->in.server_name = NULL;
   10600             :                 }
   10601          24 :                 if (r->in.server_name) {
   10602           0 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10603           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   10604           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   10605           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   10606           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   10607           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   10608           0 :                         if (length_server_name_1 > size_server_name_1) {
   10609           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   10610             :                         }
   10611           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   10612           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   10613           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   10614             :                 }
   10615          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
   10616          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
   10617          24 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
   10618          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
   10619          24 :                 if (length_account_name_1 > size_account_name_1) {
   10620           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
   10621             :                 }
   10622          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
   10623          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
   10624          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.workstation));
   10625          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.workstation));
   10626          24 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.workstation, &size_workstation_1));
   10627          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.workstation, &length_workstation_1));
   10628          24 :                 if (length_workstation_1 > size_workstation_1) {
   10629           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_workstation_1, length_workstation_1);
   10630             :                 }
   10631          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_workstation_1, sizeof(uint16_t)));
   10632          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.workstation, length_workstation_1, sizeof(uint16_t), CH_UTF16));
   10633          24 :                 NDR_PULL_ALLOC(ndr, r->out.info);
   10634          24 :                 NDR_ZERO_STRUCTP(r->out.info);
   10635             :         }
   10636          24 :         if (flags & NDR_OUT) {
   10637             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   10638             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   10639           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   10640           0 :                         NDR_PULL_ALLOC(ndr, r->out.info);
   10641             :                 }
   10642           0 :                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10643           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
   10644           0 :                 NDR_CHECK(ndr_pull_netr_UasLogoffInfo(ndr, NDR_SCALARS, r->out.info));
   10645           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
   10646           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   10647             :         }
   10648          20 :         return NDR_ERR_SUCCESS;
   10649             : }
   10650             : 
   10651           0 : _PUBLIC_ void ndr_print_netr_LogonUasLogoff(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonUasLogoff *r)
   10652             : {
   10653           0 :         ndr_print_struct(ndr, name, "netr_LogonUasLogoff");
   10654           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   10655           0 :         ndr->depth++;
   10656           0 :         if (flags & NDR_SET_VALUES) {
   10657           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   10658             :         }
   10659           0 :         if (flags & NDR_IN) {
   10660           0 :                 ndr_print_struct(ndr, "in", "netr_LogonUasLogoff");
   10661           0 :                 ndr->depth++;
   10662           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   10663           0 :                 ndr->depth++;
   10664           0 :                 if (r->in.server_name) {
   10665           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   10666             :                 }
   10667           0 :                 ndr->depth--;
   10668           0 :                 ndr_print_ptr(ndr, "account_name", r->in.account_name);
   10669           0 :                 ndr->depth++;
   10670           0 :                 ndr_print_string(ndr, "account_name", r->in.account_name);
   10671           0 :                 ndr->depth--;
   10672           0 :                 ndr_print_ptr(ndr, "workstation", r->in.workstation);
   10673           0 :                 ndr->depth++;
   10674           0 :                 ndr_print_string(ndr, "workstation", r->in.workstation);
   10675           0 :                 ndr->depth--;
   10676           0 :                 ndr->depth--;
   10677             :         }
   10678           0 :         if (flags & NDR_OUT) {
   10679           0 :                 ndr_print_struct(ndr, "out", "netr_LogonUasLogoff");
   10680           0 :                 ndr->depth++;
   10681           0 :                 ndr_print_ptr(ndr, "info", r->out.info);
   10682           0 :                 ndr->depth++;
   10683           0 :                 ndr_print_netr_UasLogoffInfo(ndr, "info", r->out.info);
   10684           0 :                 ndr->depth--;
   10685           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   10686           0 :                 ndr->depth--;
   10687             :         }
   10688           0 :         ndr->depth--;
   10689             : }
   10690             : 
   10691       30466 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonSamLogon(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonSamLogon *r)
   10692             : {
   10693       30466 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   10694       30466 :         if (flags & NDR_IN) {
   10695       14210 :                 if (r->in.logon == NULL) {
   10696           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   10697             :                 }
   10698       14210 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   10699       14210 :                 if (r->in.server_name) {
   10700       14210 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   10701       14210 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   10702       14210 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   10703       14210 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   10704             :                 }
   10705       14210 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
   10706       14210 :                 if (r->in.computer_name) {
   10707       14210 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   10708       14210 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   10709       14210 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   10710       14210 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   10711             :                 }
   10712       14210 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.credential));
   10713       14210 :                 if (r->in.credential) {
   10714       12058 :                         NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   10715             :                 }
   10716       14210 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.return_authenticator));
   10717       14210 :                 if (r->in.return_authenticator) {
   10718       14210 :                         NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   10719             :                 }
   10720       14210 :                 NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
   10721       14210 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level));
   10722       14210 :                 NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
   10723       14210 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
   10724             :         }
   10725       30466 :         if (flags & NDR_OUT) {
   10726       16256 :                 if (r->out.validation == NULL) {
   10727           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   10728             :                 }
   10729       16256 :                 if (r->out.authoritative == NULL) {
   10730           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   10731             :                 }
   10732       16256 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator));
   10733       16256 :                 if (r->out.return_authenticator) {
   10734       10116 :                         NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   10735             :                 }
   10736       16256 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.validation, r->in.validation_level));
   10737       16256 :                 NDR_CHECK(ndr_push_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
   10738       16256 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.authoritative));
   10739       16256 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   10740             :         }
   10741       26011 :         return NDR_ERR_SUCCESS;
   10742             : }
   10743             : 
   10744       28004 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonSamLogon *r)
   10745             : {
   10746        4050 :         uint32_t _ptr_server_name;
   10747       28004 :         uint32_t size_server_name_1 = 0;
   10748       28004 :         uint32_t length_server_name_1 = 0;
   10749        4050 :         uint32_t _ptr_computer_name;
   10750       28004 :         uint32_t size_computer_name_1 = 0;
   10751       28004 :         uint32_t length_computer_name_1 = 0;
   10752        4050 :         uint32_t _ptr_credential;
   10753        4050 :         uint32_t _ptr_return_authenticator;
   10754       28004 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   10755       28004 :         TALLOC_CTX *_mem_save_computer_name_0 = NULL;
   10756       28004 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   10757       28004 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   10758       28004 :         TALLOC_CTX *_mem_save_logon_0 = NULL;
   10759       28004 :         TALLOC_CTX *_mem_save_validation_0 = NULL;
   10760       28004 :         TALLOC_CTX *_mem_save_authoritative_0 = NULL;
   10761       28004 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   10762       28004 :         if (flags & NDR_IN) {
   10763       13794 :                 NDR_ZERO_STRUCT(r->out);
   10764             : 
   10765       13794 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   10766       13794 :                 if (_ptr_server_name) {
   10767       13794 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   10768             :                 } else {
   10769           0 :                         r->in.server_name = NULL;
   10770             :                 }
   10771       13794 :                 if (r->in.server_name) {
   10772       13794 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10773       13794 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   10774       13794 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   10775       13794 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   10776       13794 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   10777       13794 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   10778       13794 :                         if (length_server_name_1 > size_server_name_1) {
   10779           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   10780             :                         }
   10781       13794 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   10782       13794 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   10783       13794 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   10784             :                 }
   10785       13794 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
   10786       13794 :                 if (_ptr_computer_name) {
   10787       13794 :                         NDR_PULL_ALLOC(ndr, r->in.computer_name);
   10788             :                 } else {
   10789           0 :                         r->in.computer_name = NULL;
   10790             :                 }
   10791       13794 :                 if (r->in.computer_name) {
   10792       13794 :                         _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10793       13794 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
   10794       13794 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   10795       13794 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   10796       13794 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   10797       13794 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   10798       13794 :                         if (length_computer_name_1 > size_computer_name_1) {
   10799           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   10800             :                         }
   10801       13794 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   10802       13794 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   10803       13794 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
   10804             :                 }
   10805       13794 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_credential));
   10806       13794 :                 if (_ptr_credential) {
   10807       11718 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   10808             :                 } else {
   10809        2076 :                         r->in.credential = NULL;
   10810             :                 }
   10811       13794 :                 if (r->in.credential) {
   10812       11718 :                         _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10813       11718 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, 0);
   10814       11718 :                         NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   10815       11718 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, 0);
   10816             :                 }
   10817       13794 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
   10818       13794 :                 if (_ptr_return_authenticator) {
   10819       13794 :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   10820             :                 } else {
   10821           0 :                         r->in.return_authenticator = NULL;
   10822             :                 }
   10823       13794 :                 if (r->in.return_authenticator) {
   10824       13794 :                         _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10825       13794 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, 0);
   10826       13794 :                         NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   10827       13794 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
   10828             :                 }
   10829       13794 :                 NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
   10830       13794 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   10831       13794 :                         NDR_PULL_ALLOC(ndr, r->in.logon);
   10832             :                 }
   10833       13794 :                 _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10834       13794 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC);
   10835       13794 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level));
   10836       13794 :                 NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
   10837       13794 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC);
   10838       13794 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
   10839       13794 :                 NDR_PULL_ALLOC(ndr, r->out.validation);
   10840       13794 :                 NDR_ZERO_STRUCTP(r->out.validation);
   10841       13794 :                 NDR_PULL_ALLOC(ndr, r->out.authoritative);
   10842       13794 :                 NDR_ZERO_STRUCTP(r->out.authoritative);
   10843             :         }
   10844       28004 :         if (flags & NDR_OUT) {
   10845             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   10846             :                 if (r->in.logon == NULL) {
   10847             :                         NDR_PULL_ALLOC(ndr, r->in.logon);
   10848             :                         NDR_ZERO_STRUCTP(r->in.logon);
   10849             :                 }
   10850             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   10851       14210 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
   10852       14210 :                 if (_ptr_return_authenticator) {
   10853        9190 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   10854             :                 } else {
   10855        5020 :                         r->out.return_authenticator = NULL;
   10856             :                 }
   10857       14210 :                 if (r->out.return_authenticator) {
   10858        9190 :                         _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10859        9190 :                         NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, 0);
   10860        9190 :                         NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   10861        9190 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
   10862             :                 }
   10863       14210 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   10864        2464 :                         NDR_PULL_ALLOC(ndr, r->out.validation);
   10865             :                 }
   10866       14210 :                 _mem_save_validation_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10867       14210 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.validation, LIBNDR_FLAG_REF_ALLOC);
   10868       14210 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.validation, r->in.validation_level));
   10869       14210 :                 NDR_CHECK(ndr_pull_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
   10870       14210 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_validation_0, LIBNDR_FLAG_REF_ALLOC);
   10871       14210 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   10872        2464 :                         NDR_PULL_ALLOC(ndr, r->out.authoritative);
   10873             :                 }
   10874       14210 :                 _mem_save_authoritative_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10875       14210 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.authoritative, LIBNDR_FLAG_REF_ALLOC);
   10876       14210 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.authoritative));
   10877       14210 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authoritative_0, LIBNDR_FLAG_REF_ALLOC);
   10878       14210 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   10879             :         }
   10880       23954 :         return NDR_ERR_SUCCESS;
   10881             : }
   10882             : 
   10883        4930 : _PUBLIC_ void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonSamLogon *r)
   10884             : {
   10885        4930 :         ndr_print_struct(ndr, name, "netr_LogonSamLogon");
   10886        4930 :         if (r == NULL) { ndr_print_null(ndr); return; }
   10887        4930 :         ndr->depth++;
   10888        4930 :         if (flags & NDR_SET_VALUES) {
   10889           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   10890             :         }
   10891        4930 :         if (flags & NDR_IN) {
   10892           2 :                 ndr_print_struct(ndr, "in", "netr_LogonSamLogon");
   10893           2 :                 ndr->depth++;
   10894           2 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   10895           2 :                 ndr->depth++;
   10896           2 :                 if (r->in.server_name) {
   10897           2 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   10898             :                 }
   10899           2 :                 ndr->depth--;
   10900           2 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   10901           2 :                 ndr->depth++;
   10902           2 :                 if (r->in.computer_name) {
   10903           2 :                         ndr_print_string(ndr, "computer_name", r->in.computer_name);
   10904             :                 }
   10905           2 :                 ndr->depth--;
   10906           2 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   10907           2 :                 ndr->depth++;
   10908           2 :                 if (r->in.credential) {
   10909           2 :                         ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   10910             :                 }
   10911           2 :                 ndr->depth--;
   10912           2 :                 ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
   10913           2 :                 ndr->depth++;
   10914           2 :                 if (r->in.return_authenticator) {
   10915           2 :                         ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
   10916             :                 }
   10917           2 :                 ndr->depth--;
   10918           2 :                 ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
   10919           2 :                 ndr_print_ptr(ndr, "logon", r->in.logon);
   10920           2 :                 ndr->depth++;
   10921           2 :                 ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level);
   10922           2 :                 ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon);
   10923           2 :                 ndr->depth--;
   10924           2 :                 ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
   10925           2 :                 ndr->depth--;
   10926             :         }
   10927        4930 :         if (flags & NDR_OUT) {
   10928        4928 :                 ndr_print_struct(ndr, "out", "netr_LogonSamLogon");
   10929        4928 :                 ndr->depth++;
   10930        4928 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   10931        4928 :                 ndr->depth++;
   10932        4928 :                 if (r->out.return_authenticator) {
   10933        2688 :                         ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   10934             :                 }
   10935        4928 :                 ndr->depth--;
   10936        4928 :                 ndr_print_ptr(ndr, "validation", r->out.validation);
   10937        4928 :                 ndr->depth++;
   10938        4928 :                 ndr_print_set_switch_value(ndr, r->out.validation, r->in.validation_level);
   10939        4928 :                 ndr_print_netr_Validation(ndr, "validation", r->out.validation);
   10940        4928 :                 ndr->depth--;
   10941        4928 :                 ndr_print_ptr(ndr, "authoritative", r->out.authoritative);
   10942        4928 :                 ndr->depth++;
   10943        4928 :                 ndr_print_uint8(ndr, "authoritative", *r->out.authoritative);
   10944        4928 :                 ndr->depth--;
   10945        4928 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   10946        4928 :                 ndr->depth--;
   10947             :         }
   10948        4930 :         ndr->depth--;
   10949             : }
   10950             : 
   10951           0 : static enum ndr_err_code ndr_push_netr_LogonSamLogoff(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonSamLogoff *r)
   10952             : {
   10953           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   10954           0 :         if (flags & NDR_IN) {
   10955           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   10956           0 :                 if (r->in.server_name) {
   10957           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   10958           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   10959           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   10960           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   10961             :                 }
   10962           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
   10963           0 :                 if (r->in.computer_name) {
   10964           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   10965           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   10966           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   10967           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   10968             :                 }
   10969           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.credential));
   10970           0 :                 if (r->in.credential) {
   10971           0 :                         NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   10972             :                 }
   10973           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.return_authenticator));
   10974           0 :                 if (r->in.return_authenticator) {
   10975           0 :                         NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   10976             :                 }
   10977           0 :                 NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
   10978           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
   10979           0 :                 NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
   10980             :         }
   10981           0 :         if (flags & NDR_OUT) {
   10982           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator));
   10983           0 :                 if (r->out.return_authenticator) {
   10984           0 :                         NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   10985             :                 }
   10986           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   10987             :         }
   10988           0 :         return NDR_ERR_SUCCESS;
   10989             : }
   10990             : 
   10991           0 : static enum ndr_err_code ndr_pull_netr_LogonSamLogoff(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonSamLogoff *r)
   10992             : {
   10993           0 :         uint32_t _ptr_server_name;
   10994           0 :         uint32_t size_server_name_1 = 0;
   10995           0 :         uint32_t length_server_name_1 = 0;
   10996           0 :         uint32_t _ptr_computer_name;
   10997           0 :         uint32_t size_computer_name_1 = 0;
   10998           0 :         uint32_t length_computer_name_1 = 0;
   10999           0 :         uint32_t _ptr_credential;
   11000           0 :         uint32_t _ptr_return_authenticator;
   11001           0 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   11002           0 :         TALLOC_CTX *_mem_save_computer_name_0 = NULL;
   11003           0 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   11004           0 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   11005           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   11006           0 :         if (flags & NDR_IN) {
   11007           0 :                 NDR_ZERO_STRUCT(r->out);
   11008             : 
   11009           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   11010           0 :                 if (_ptr_server_name) {
   11011           0 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   11012             :                 } else {
   11013           0 :                         r->in.server_name = NULL;
   11014             :                 }
   11015           0 :                 if (r->in.server_name) {
   11016           0 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11017           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   11018           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   11019           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   11020           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   11021           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   11022           0 :                         if (length_server_name_1 > size_server_name_1) {
   11023           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   11024             :                         }
   11025           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   11026           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   11027           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   11028             :                 }
   11029           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
   11030           0 :                 if (_ptr_computer_name) {
   11031           0 :                         NDR_PULL_ALLOC(ndr, r->in.computer_name);
   11032             :                 } else {
   11033           0 :                         r->in.computer_name = NULL;
   11034             :                 }
   11035           0 :                 if (r->in.computer_name) {
   11036           0 :                         _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11037           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
   11038           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   11039           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   11040           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   11041           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   11042           0 :                         if (length_computer_name_1 > size_computer_name_1) {
   11043           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   11044             :                         }
   11045           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   11046           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   11047           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
   11048             :                 }
   11049           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_credential));
   11050           0 :                 if (_ptr_credential) {
   11051           0 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   11052             :                 } else {
   11053           0 :                         r->in.credential = NULL;
   11054             :                 }
   11055           0 :                 if (r->in.credential) {
   11056           0 :                         _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11057           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, 0);
   11058           0 :                         NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   11059           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, 0);
   11060             :                 }
   11061           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
   11062           0 :                 if (_ptr_return_authenticator) {
   11063           0 :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   11064             :                 } else {
   11065           0 :                         r->in.return_authenticator = NULL;
   11066             :                 }
   11067           0 :                 if (r->in.return_authenticator) {
   11068           0 :                         _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11069           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, 0);
   11070           0 :                         NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   11071           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
   11072             :                 }
   11073           0 :                 NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
   11074           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
   11075           0 :                 NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
   11076             :         }
   11077           0 :         if (flags & NDR_OUT) {
   11078             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   11079             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   11080           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
   11081           0 :                 if (_ptr_return_authenticator) {
   11082           0 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   11083             :                 } else {
   11084           0 :                         r->out.return_authenticator = NULL;
   11085             :                 }
   11086           0 :                 if (r->out.return_authenticator) {
   11087           0 :                         _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11088           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, 0);
   11089           0 :                         NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   11090           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
   11091             :                 }
   11092           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   11093             :         }
   11094           0 :         return NDR_ERR_SUCCESS;
   11095             : }
   11096             : 
   11097           0 : _PUBLIC_ void ndr_print_netr_LogonSamLogoff(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonSamLogoff *r)
   11098             : {
   11099           0 :         ndr_print_struct(ndr, name, "netr_LogonSamLogoff");
   11100           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   11101           0 :         ndr->depth++;
   11102           0 :         if (flags & NDR_SET_VALUES) {
   11103           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   11104             :         }
   11105           0 :         if (flags & NDR_IN) {
   11106           0 :                 ndr_print_struct(ndr, "in", "netr_LogonSamLogoff");
   11107           0 :                 ndr->depth++;
   11108           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   11109           0 :                 ndr->depth++;
   11110           0 :                 if (r->in.server_name) {
   11111           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   11112             :                 }
   11113           0 :                 ndr->depth--;
   11114           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   11115           0 :                 ndr->depth++;
   11116           0 :                 if (r->in.computer_name) {
   11117           0 :                         ndr_print_string(ndr, "computer_name", r->in.computer_name);
   11118             :                 }
   11119           0 :                 ndr->depth--;
   11120           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   11121           0 :                 ndr->depth++;
   11122           0 :                 if (r->in.credential) {
   11123           0 :                         ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   11124             :                 }
   11125           0 :                 ndr->depth--;
   11126           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
   11127           0 :                 ndr->depth++;
   11128           0 :                 if (r->in.return_authenticator) {
   11129           0 :                         ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
   11130             :                 }
   11131           0 :                 ndr->depth--;
   11132           0 :                 ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
   11133           0 :                 ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level);
   11134           0 :                 ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon);
   11135           0 :                 ndr->depth--;
   11136             :         }
   11137           0 :         if (flags & NDR_OUT) {
   11138           0 :                 ndr_print_struct(ndr, "out", "netr_LogonSamLogoff");
   11139           0 :                 ndr->depth++;
   11140           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   11141           0 :                 ndr->depth++;
   11142           0 :                 if (r->out.return_authenticator) {
   11143           0 :                         ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   11144             :                 }
   11145           0 :                 ndr->depth--;
   11146           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   11147           0 :                 ndr->depth--;
   11148             :         }
   11149           0 :         ndr->depth--;
   11150             : }
   11151             : 
   11152       35041 : _PUBLIC_ enum ndr_err_code ndr_push_netr_ServerReqChallenge(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerReqChallenge *r)
   11153             : {
   11154       35041 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   11155       35041 :         if (flags & NDR_IN) {
   11156       15480 :                 if (r->in.computer_name == NULL) {
   11157           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11158             :                 }
   11159       15480 :                 if (r->in.credentials == NULL) {
   11160           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11161             :                 }
   11162       15480 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   11163       15480 :                 if (r->in.server_name) {
   11164        1607 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   11165        1607 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11166        1607 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   11167        1607 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11168             :                 }
   11169       15480 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   11170       15480 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11171       15480 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   11172       15480 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11173       15480 :                 NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
   11174             :         }
   11175       35041 :         if (flags & NDR_OUT) {
   11176       19561 :                 if (r->out.return_credentials == NULL) {
   11177           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11178             :                 }
   11179       19561 :                 NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
   11180       19561 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   11181             :         }
   11182       33349 :         return NDR_ERR_SUCCESS;
   11183             : }
   11184             : 
   11185       31034 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_ServerReqChallenge(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerReqChallenge *r)
   11186             : {
   11187        1630 :         uint32_t _ptr_server_name;
   11188       31034 :         uint32_t size_server_name_1 = 0;
   11189       31034 :         uint32_t length_server_name_1 = 0;
   11190       31034 :         uint32_t size_computer_name_1 = 0;
   11191       31034 :         uint32_t length_computer_name_1 = 0;
   11192       31034 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   11193       31034 :         TALLOC_CTX *_mem_save_credentials_0 = NULL;
   11194       31034 :         TALLOC_CTX *_mem_save_return_credentials_0 = NULL;
   11195       31034 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   11196       31034 :         if (flags & NDR_IN) {
   11197       15552 :                 NDR_ZERO_STRUCT(r->out);
   11198             : 
   11199       15552 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   11200       15552 :                 if (_ptr_server_name) {
   11201        1679 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   11202             :                 } else {
   11203       13873 :                         r->in.server_name = NULL;
   11204             :                 }
   11205       15552 :                 if (r->in.server_name) {
   11206        1679 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11207        1679 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   11208        1679 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   11209        1679 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   11210        1679 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   11211        1679 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   11212        1679 :                         if (length_server_name_1 > size_server_name_1) {
   11213           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   11214             :                         }
   11215        1679 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   11216        1679 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   11217        1679 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   11218             :                 }
   11219       15552 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   11220       15552 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   11221       15552 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   11222       15552 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   11223       15552 :                 if (length_computer_name_1 > size_computer_name_1) {
   11224           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   11225             :                 }
   11226       15552 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   11227       15552 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   11228       15552 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11229       15552 :                         NDR_PULL_ALLOC(ndr, r->in.credentials);
   11230             :                 }
   11231       15552 :                 _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11232       15552 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
   11233       15552 :                 NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
   11234       15552 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
   11235       15552 :                 NDR_PULL_ALLOC(ndr, r->out.return_credentials);
   11236       15552 :                 NDR_ZERO_STRUCTP(r->out.return_credentials);
   11237             :         }
   11238       31034 :         if (flags & NDR_OUT) {
   11239             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   11240             :                 if (r->in.credentials == NULL) {
   11241             :                         NDR_PULL_ALLOC(ndr, r->in.credentials);
   11242             :                         NDR_ZERO_STRUCTP(r->in.credentials);
   11243             :                 }
   11244             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   11245       15482 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11246        4135 :                         NDR_PULL_ALLOC(ndr, r->out.return_credentials);
   11247             :                 }
   11248       15482 :                 _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11249       15482 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
   11250       15482 :                 NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
   11251       15482 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
   11252       15482 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   11253             :         }
   11254       29404 :         return NDR_ERR_SUCCESS;
   11255             : }
   11256             : 
   11257        8026 : _PUBLIC_ void ndr_print_netr_ServerReqChallenge(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerReqChallenge *r)
   11258             : {
   11259        8026 :         ndr_print_struct(ndr, name, "netr_ServerReqChallenge");
   11260        8026 :         if (r == NULL) { ndr_print_null(ndr); return; }
   11261        8026 :         ndr->depth++;
   11262        8026 :         if (flags & NDR_SET_VALUES) {
   11263           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   11264             :         }
   11265        8026 :         if (flags & NDR_IN) {
   11266           2 :                 ndr_print_struct(ndr, "in", "netr_ServerReqChallenge");
   11267           2 :                 ndr->depth++;
   11268           2 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   11269           2 :                 ndr->depth++;
   11270           2 :                 if (r->in.server_name) {
   11271           2 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   11272             :                 }
   11273           2 :                 ndr->depth--;
   11274           2 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   11275           2 :                 ndr->depth++;
   11276           2 :                 ndr_print_string(ndr, "computer_name", r->in.computer_name);
   11277           2 :                 ndr->depth--;
   11278           2 :                 ndr_print_ptr(ndr, "credentials", r->in.credentials);
   11279           2 :                 ndr->depth++;
   11280           2 :                 ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
   11281           2 :                 ndr->depth--;
   11282           2 :                 ndr->depth--;
   11283             :         }
   11284        8026 :         if (flags & NDR_OUT) {
   11285        8024 :                 ndr_print_struct(ndr, "out", "netr_ServerReqChallenge");
   11286        8024 :                 ndr->depth++;
   11287        8024 :                 ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
   11288        8024 :                 ndr->depth++;
   11289        8024 :                 ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
   11290        8024 :                 ndr->depth--;
   11291        8024 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   11292        8024 :                 ndr->depth--;
   11293             :         }
   11294        8026 :         ndr->depth--;
   11295             : }
   11296             : 
   11297         828 : static enum ndr_err_code ndr_push_netr_ServerAuthenticate(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerAuthenticate *r)
   11298             : {
   11299         828 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   11300         828 :         if (flags & NDR_IN) {
   11301         368 :                 if (r->in.account_name == NULL) {
   11302           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11303             :                 }
   11304         368 :                 if (r->in.computer_name == NULL) {
   11305           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11306             :                 }
   11307         368 :                 if (r->in.credentials == NULL) {
   11308           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11309             :                 }
   11310         368 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   11311         368 :                 if (r->in.server_name) {
   11312           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   11313           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11314           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   11315           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11316             :                 }
   11317         368 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   11318         368 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11319         368 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   11320         368 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11321         368 :                 NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
   11322         368 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   11323         368 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11324         368 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   11325         368 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11326         368 :                 NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
   11327             :         }
   11328         828 :         if (flags & NDR_OUT) {
   11329         460 :                 if (r->out.return_credentials == NULL) {
   11330           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11331             :                 }
   11332         460 :                 NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
   11333         460 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   11334             :         }
   11335         702 :         return NDR_ERR_SUCCESS;
   11336             : }
   11337             : 
   11338         736 : static enum ndr_err_code ndr_pull_netr_ServerAuthenticate(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerAuthenticate *r)
   11339             : {
   11340         112 :         uint32_t _ptr_server_name;
   11341         736 :         uint32_t size_server_name_1 = 0;
   11342         736 :         uint32_t length_server_name_1 = 0;
   11343         736 :         uint32_t size_account_name_1 = 0;
   11344         736 :         uint32_t length_account_name_1 = 0;
   11345         736 :         uint32_t size_computer_name_1 = 0;
   11346         736 :         uint32_t length_computer_name_1 = 0;
   11347         736 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   11348         736 :         TALLOC_CTX *_mem_save_credentials_0 = NULL;
   11349         736 :         TALLOC_CTX *_mem_save_return_credentials_0 = NULL;
   11350         736 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   11351         736 :         if (flags & NDR_IN) {
   11352         368 :                 NDR_ZERO_STRUCT(r->out);
   11353             : 
   11354         368 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   11355         368 :                 if (_ptr_server_name) {
   11356           0 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   11357             :                 } else {
   11358         368 :                         r->in.server_name = NULL;
   11359             :                 }
   11360         368 :                 if (r->in.server_name) {
   11361           0 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11362           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   11363           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   11364           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   11365           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   11366           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   11367           0 :                         if (length_server_name_1 > size_server_name_1) {
   11368           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   11369             :                         }
   11370           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   11371           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   11372           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   11373             :                 }
   11374         368 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
   11375         368 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
   11376         368 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
   11377         368 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
   11378         368 :                 if (length_account_name_1 > size_account_name_1) {
   11379           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
   11380             :                 }
   11381         368 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
   11382         368 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
   11383         368 :                 NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
   11384         368 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   11385         368 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   11386         368 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   11387         368 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   11388         368 :                 if (length_computer_name_1 > size_computer_name_1) {
   11389           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   11390             :                 }
   11391         368 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   11392         368 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   11393         368 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11394         368 :                         NDR_PULL_ALLOC(ndr, r->in.credentials);
   11395             :                 }
   11396         368 :                 _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11397         368 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
   11398         368 :                 NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
   11399         368 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
   11400         368 :                 NDR_PULL_ALLOC(ndr, r->out.return_credentials);
   11401         368 :                 NDR_ZERO_STRUCTP(r->out.return_credentials);
   11402             :         }
   11403         736 :         if (flags & NDR_OUT) {
   11404             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   11405             :                 if (r->in.credentials == NULL) {
   11406             :                         NDR_PULL_ALLOC(ndr, r->in.credentials);
   11407             :                         NDR_ZERO_STRUCTP(r->in.credentials);
   11408             :                 }
   11409             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   11410         368 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11411          92 :                         NDR_PULL_ALLOC(ndr, r->out.return_credentials);
   11412             :                 }
   11413         368 :                 _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11414         368 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
   11415         368 :                 NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
   11416         368 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
   11417         368 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   11418             :         }
   11419         624 :         return NDR_ERR_SUCCESS;
   11420             : }
   11421             : 
   11422         184 : _PUBLIC_ void ndr_print_netr_ServerAuthenticate(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerAuthenticate *r)
   11423             : {
   11424         184 :         ndr_print_struct(ndr, name, "netr_ServerAuthenticate");
   11425         184 :         if (r == NULL) { ndr_print_null(ndr); return; }
   11426         184 :         ndr->depth++;
   11427         184 :         if (flags & NDR_SET_VALUES) {
   11428           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   11429             :         }
   11430         184 :         if (flags & NDR_IN) {
   11431           0 :                 ndr_print_struct(ndr, "in", "netr_ServerAuthenticate");
   11432           0 :                 ndr->depth++;
   11433           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   11434           0 :                 ndr->depth++;
   11435           0 :                 if (r->in.server_name) {
   11436           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   11437             :                 }
   11438           0 :                 ndr->depth--;
   11439           0 :                 ndr_print_ptr(ndr, "account_name", r->in.account_name);
   11440           0 :                 ndr->depth++;
   11441           0 :                 ndr_print_string(ndr, "account_name", r->in.account_name);
   11442           0 :                 ndr->depth--;
   11443           0 :                 ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
   11444           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   11445           0 :                 ndr->depth++;
   11446           0 :                 ndr_print_string(ndr, "computer_name", r->in.computer_name);
   11447           0 :                 ndr->depth--;
   11448           0 :                 ndr_print_ptr(ndr, "credentials", r->in.credentials);
   11449           0 :                 ndr->depth++;
   11450           0 :                 ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
   11451           0 :                 ndr->depth--;
   11452           0 :                 ndr->depth--;
   11453             :         }
   11454         184 :         if (flags & NDR_OUT) {
   11455         184 :                 ndr_print_struct(ndr, "out", "netr_ServerAuthenticate");
   11456         184 :                 ndr->depth++;
   11457         184 :                 ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
   11458         184 :                 ndr->depth++;
   11459         184 :                 ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
   11460         184 :                 ndr->depth--;
   11461         184 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   11462         184 :                 ndr->depth--;
   11463             :         }
   11464         184 :         ndr->depth--;
   11465             : }
   11466             : 
   11467         181 : static enum ndr_err_code ndr_push_netr_ServerPasswordSet(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerPasswordSet *r)
   11468             : {
   11469         181 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   11470         181 :         if (flags & NDR_IN) {
   11471          83 :                 if (r->in.account_name == NULL) {
   11472           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11473             :                 }
   11474          83 :                 if (r->in.computer_name == NULL) {
   11475           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11476             :                 }
   11477          83 :                 if (r->in.credential == NULL) {
   11478           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11479             :                 }
   11480          83 :                 if (r->in.new_password == NULL) {
   11481           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11482             :                 }
   11483          83 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   11484          83 :                 if (r->in.server_name) {
   11485          83 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   11486          83 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11487          83 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   11488          83 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11489             :                 }
   11490          83 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   11491          83 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11492          83 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   11493          83 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11494          83 :                 NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
   11495          83 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   11496          83 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11497          83 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   11498          83 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11499          83 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   11500          83 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.new_password));
   11501             :         }
   11502         181 :         if (flags & NDR_OUT) {
   11503          98 :                 if (r->out.return_authenticator == NULL) {
   11504           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11505             :                 }
   11506          98 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   11507          98 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   11508             :         }
   11509         161 :         return NDR_ERR_SUCCESS;
   11510             : }
   11511             : 
   11512         166 : static enum ndr_err_code ndr_pull_netr_ServerPasswordSet(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerPasswordSet *r)
   11513             : {
   11514          18 :         uint32_t _ptr_server_name;
   11515         166 :         uint32_t size_server_name_1 = 0;
   11516         166 :         uint32_t length_server_name_1 = 0;
   11517         166 :         uint32_t size_account_name_1 = 0;
   11518         166 :         uint32_t length_account_name_1 = 0;
   11519         166 :         uint32_t size_computer_name_1 = 0;
   11520         166 :         uint32_t length_computer_name_1 = 0;
   11521         166 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   11522         166 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   11523         166 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   11524         166 :         TALLOC_CTX *_mem_save_new_password_0 = NULL;
   11525         166 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   11526         166 :         if (flags & NDR_IN) {
   11527          83 :                 NDR_ZERO_STRUCT(r->out);
   11528             : 
   11529          83 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   11530          83 :                 if (_ptr_server_name) {
   11531          83 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   11532             :                 } else {
   11533           0 :                         r->in.server_name = NULL;
   11534             :                 }
   11535          83 :                 if (r->in.server_name) {
   11536          83 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11537          83 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   11538          83 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   11539          83 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   11540          83 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   11541          83 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   11542          83 :                         if (length_server_name_1 > size_server_name_1) {
   11543           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   11544             :                         }
   11545          83 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   11546          83 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   11547          83 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   11548             :                 }
   11549          83 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
   11550          83 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
   11551          83 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
   11552          83 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
   11553          83 :                 if (length_account_name_1 > size_account_name_1) {
   11554           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
   11555             :                 }
   11556          83 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
   11557          83 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
   11558          83 :                 NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
   11559          83 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   11560          83 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   11561          83 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   11562          83 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   11563          83 :                 if (length_computer_name_1 > size_computer_name_1) {
   11564           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   11565             :                 }
   11566          83 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   11567          83 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   11568          83 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11569          83 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   11570             :                 }
   11571          83 :                 _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11572          83 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
   11573          83 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   11574          83 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
   11575          83 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11576          83 :                         NDR_PULL_ALLOC(ndr, r->in.new_password);
   11577             :                 }
   11578          83 :                 _mem_save_new_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11579          83 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_password, LIBNDR_FLAG_REF_ALLOC);
   11580          83 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.new_password));
   11581          83 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_password_0, LIBNDR_FLAG_REF_ALLOC);
   11582          83 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   11583          83 :                 NDR_ZERO_STRUCTP(r->out.return_authenticator);
   11584             :         }
   11585         166 :         if (flags & NDR_OUT) {
   11586             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   11587             :                 if (r->in.credential == NULL) {
   11588             :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   11589             :                         NDR_ZERO_STRUCTP(r->in.credential);
   11590             :                 }
   11591             :                 if (r->in.new_password == NULL) {
   11592             :                         NDR_PULL_ALLOC(ndr, r->in.new_password);
   11593             :                         NDR_ZERO_STRUCTP(r->in.new_password);
   11594             :                 }
   11595             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   11596          83 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11597          15 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   11598             :                 }
   11599          83 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11600          83 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   11601          83 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   11602          83 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   11603          83 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   11604             :         }
   11605         148 :         return NDR_ERR_SUCCESS;
   11606             : }
   11607             : 
   11608          30 : _PUBLIC_ void ndr_print_netr_ServerPasswordSet(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerPasswordSet *r)
   11609             : {
   11610          30 :         ndr_print_struct(ndr, name, "netr_ServerPasswordSet");
   11611          30 :         if (r == NULL) { ndr_print_null(ndr); return; }
   11612          30 :         ndr->depth++;
   11613          30 :         if (flags & NDR_SET_VALUES) {
   11614           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   11615             :         }
   11616          30 :         if (flags & NDR_IN) {
   11617           0 :                 ndr_print_struct(ndr, "in", "netr_ServerPasswordSet");
   11618           0 :                 ndr->depth++;
   11619           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   11620           0 :                 ndr->depth++;
   11621           0 :                 if (r->in.server_name) {
   11622           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   11623             :                 }
   11624           0 :                 ndr->depth--;
   11625           0 :                 ndr_print_ptr(ndr, "account_name", r->in.account_name);
   11626           0 :                 ndr->depth++;
   11627           0 :                 ndr_print_string(ndr, "account_name", r->in.account_name);
   11628           0 :                 ndr->depth--;
   11629           0 :                 ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
   11630           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   11631           0 :                 ndr->depth++;
   11632           0 :                 ndr_print_string(ndr, "computer_name", r->in.computer_name);
   11633           0 :                 ndr->depth--;
   11634           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   11635           0 :                 ndr->depth++;
   11636           0 :                 ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   11637           0 :                 ndr->depth--;
   11638           0 :                 ndr_print_ptr(ndr, "new_password", r->in.new_password);
   11639           0 :                 ndr->depth++;
   11640           0 :                 ndr_print_samr_Password(ndr, "new_password", r->in.new_password);
   11641           0 :                 ndr->depth--;
   11642           0 :                 ndr->depth--;
   11643             :         }
   11644          30 :         if (flags & NDR_OUT) {
   11645          30 :                 ndr_print_struct(ndr, "out", "netr_ServerPasswordSet");
   11646          30 :                 ndr->depth++;
   11647          30 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   11648          30 :                 ndr->depth++;
   11649          30 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   11650          30 :                 ndr->depth--;
   11651          30 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   11652          30 :                 ndr->depth--;
   11653             :         }
   11654          30 :         ndr->depth--;
   11655             : }
   11656             : 
   11657           0 : static enum ndr_err_code ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DatabaseDeltas *r)
   11658             : {
   11659           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   11660           0 :         if (flags & NDR_IN) {
   11661           0 :                 if (r->in.logon_server == NULL) {
   11662           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11663             :                 }
   11664           0 :                 if (r->in.computername == NULL) {
   11665           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11666             :                 }
   11667           0 :                 if (r->in.credential == NULL) {
   11668           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11669             :                 }
   11670           0 :                 if (r->in.return_authenticator == NULL) {
   11671           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11672             :                 }
   11673           0 :                 if (r->in.sequence_num == NULL) {
   11674           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11675             :                 }
   11676           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   11677           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11678           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   11679           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11680           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
   11681           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11682           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
   11683           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11684           0 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   11685           0 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   11686           0 :                 NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->in.database_id));
   11687           0 :                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, *r->in.sequence_num));
   11688           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.preferredmaximumlength));
   11689             :         }
   11690           0 :         if (flags & NDR_OUT) {
   11691           0 :                 if (r->out.return_authenticator == NULL) {
   11692           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11693             :                 }
   11694           0 :                 if (r->out.sequence_num == NULL) {
   11695           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11696             :                 }
   11697           0 :                 if (r->out.delta_enum_array == NULL) {
   11698           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11699             :                 }
   11700           0 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   11701           0 :                 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, *r->out.sequence_num));
   11702           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
   11703           0 :                 if (*r->out.delta_enum_array) {
   11704           0 :                         NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
   11705             :                 }
   11706           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   11707             :         }
   11708           0 :         return NDR_ERR_SUCCESS;
   11709             : }
   11710             : 
   11711           0 : static enum ndr_err_code ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DatabaseDeltas *r)
   11712             : {
   11713           0 :         uint32_t size_logon_server_1 = 0;
   11714           0 :         uint32_t length_logon_server_1 = 0;
   11715           0 :         uint32_t size_computername_1 = 0;
   11716           0 :         uint32_t length_computername_1 = 0;
   11717           0 :         uint32_t _ptr_delta_enum_array;
   11718           0 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   11719           0 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   11720           0 :         TALLOC_CTX *_mem_save_sequence_num_0 = NULL;
   11721           0 :         TALLOC_CTX *_mem_save_delta_enum_array_0 = NULL;
   11722           0 :         TALLOC_CTX *_mem_save_delta_enum_array_1 = NULL;
   11723           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   11724           0 :         if (flags & NDR_IN) {
   11725           0 :                 NDR_ZERO_STRUCT(r->out);
   11726             : 
   11727           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
   11728           0 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
   11729           0 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
   11730           0 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
   11731           0 :                 if (length_logon_server_1 > size_logon_server_1) {
   11732           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
   11733             :                 }
   11734           0 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
   11735           0 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
   11736           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
   11737           0 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
   11738           0 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
   11739           0 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
   11740           0 :                 if (length_computername_1 > size_computername_1) {
   11741           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computername_1, length_computername_1);
   11742             :                 }
   11743           0 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
   11744           0 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
   11745           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11746           0 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   11747             :                 }
   11748           0 :                 _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11749           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
   11750           0 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   11751           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
   11752           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11753           0 :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   11754             :                 }
   11755           0 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11756           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   11757           0 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   11758           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   11759           0 :                 NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->in.database_id));
   11760           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11761           0 :                         NDR_PULL_ALLOC(ndr, r->in.sequence_num);
   11762             :                 }
   11763           0 :                 _mem_save_sequence_num_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11764           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sequence_num, LIBNDR_FLAG_REF_ALLOC);
   11765           0 :                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, r->in.sequence_num));
   11766           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sequence_num_0, LIBNDR_FLAG_REF_ALLOC);
   11767           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.preferredmaximumlength));
   11768           0 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   11769           0 :                 *r->out.return_authenticator = *r->in.return_authenticator;
   11770           0 :                 NDR_PULL_ALLOC(ndr, r->out.sequence_num);
   11771           0 :                 *r->out.sequence_num = *r->in.sequence_num;
   11772           0 :                 NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
   11773           0 :                 NDR_ZERO_STRUCTP(r->out.delta_enum_array);
   11774             :         }
   11775           0 :         if (flags & NDR_OUT) {
   11776             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   11777             :                 if (r->in.credential == NULL) {
   11778             :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   11779             :                         NDR_ZERO_STRUCTP(r->in.credential);
   11780             :                 }
   11781             :                 if (r->in.return_authenticator == NULL) {
   11782             :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   11783             :                         NDR_ZERO_STRUCTP(r->in.return_authenticator);
   11784             :                 }
   11785             :                 if (r->in.sequence_num == NULL) {
   11786             :                         NDR_PULL_ALLOC(ndr, r->in.sequence_num);
   11787             :                         NDR_ZERO_STRUCTP(r->in.sequence_num);
   11788             :                 }
   11789             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   11790           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11791           0 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   11792             :                 }
   11793           0 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11794           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   11795           0 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   11796           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   11797           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11798           0 :                         NDR_PULL_ALLOC(ndr, r->out.sequence_num);
   11799             :                 }
   11800           0 :                 _mem_save_sequence_num_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11801           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sequence_num, LIBNDR_FLAG_REF_ALLOC);
   11802           0 :                 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, r->out.sequence_num));
   11803           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sequence_num_0, LIBNDR_FLAG_REF_ALLOC);
   11804           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11805           0 :                         NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
   11806             :                 }
   11807           0 :                 _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11808           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
   11809           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
   11810           0 :                 if (_ptr_delta_enum_array) {
   11811           0 :                         NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
   11812             :                 } else {
   11813           0 :                         *r->out.delta_enum_array = NULL;
   11814             :                 }
   11815           0 :                 if (*r->out.delta_enum_array) {
   11816           0 :                         _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
   11817           0 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
   11818           0 :                         NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
   11819           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
   11820             :                 }
   11821           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
   11822           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   11823             :         }
   11824           0 :         return NDR_ERR_SUCCESS;
   11825             : }
   11826             : 
   11827           0 : _PUBLIC_ void ndr_print_netr_DatabaseDeltas(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DatabaseDeltas *r)
   11828             : {
   11829           0 :         ndr_print_struct(ndr, name, "netr_DatabaseDeltas");
   11830           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   11831           0 :         ndr->depth++;
   11832           0 :         if (flags & NDR_SET_VALUES) {
   11833           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   11834             :         }
   11835           0 :         if (flags & NDR_IN) {
   11836           0 :                 ndr_print_struct(ndr, "in", "netr_DatabaseDeltas");
   11837           0 :                 ndr->depth++;
   11838           0 :                 ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
   11839           0 :                 ndr->depth++;
   11840           0 :                 ndr_print_string(ndr, "logon_server", r->in.logon_server);
   11841           0 :                 ndr->depth--;
   11842           0 :                 ndr_print_ptr(ndr, "computername", r->in.computername);
   11843           0 :                 ndr->depth++;
   11844           0 :                 ndr_print_string(ndr, "computername", r->in.computername);
   11845           0 :                 ndr->depth--;
   11846           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   11847           0 :                 ndr->depth++;
   11848           0 :                 ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   11849           0 :                 ndr->depth--;
   11850           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
   11851           0 :                 ndr->depth++;
   11852           0 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
   11853           0 :                 ndr->depth--;
   11854           0 :                 ndr_print_netr_SamDatabaseID(ndr, "database_id", r->in.database_id);
   11855           0 :                 ndr_print_ptr(ndr, "sequence_num", r->in.sequence_num);
   11856           0 :                 ndr->depth++;
   11857           0 :                 ndr_print_udlong(ndr, "sequence_num", *r->in.sequence_num);
   11858           0 :                 ndr->depth--;
   11859           0 :                 ndr_print_uint32(ndr, "preferredmaximumlength", r->in.preferredmaximumlength);
   11860           0 :                 ndr->depth--;
   11861             :         }
   11862           0 :         if (flags & NDR_OUT) {
   11863           0 :                 ndr_print_struct(ndr, "out", "netr_DatabaseDeltas");
   11864           0 :                 ndr->depth++;
   11865           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   11866           0 :                 ndr->depth++;
   11867           0 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   11868           0 :                 ndr->depth--;
   11869           0 :                 ndr_print_ptr(ndr, "sequence_num", r->out.sequence_num);
   11870           0 :                 ndr->depth++;
   11871           0 :                 ndr_print_udlong(ndr, "sequence_num", *r->out.sequence_num);
   11872           0 :                 ndr->depth--;
   11873           0 :                 ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
   11874           0 :                 ndr->depth++;
   11875           0 :                 ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
   11876           0 :                 ndr->depth++;
   11877           0 :                 if (*r->out.delta_enum_array) {
   11878           0 :                         ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
   11879             :                 }
   11880           0 :                 ndr->depth--;
   11881           0 :                 ndr->depth--;
   11882           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   11883           0 :                 ndr->depth--;
   11884             :         }
   11885           0 :         ndr->depth--;
   11886             : }
   11887             : 
   11888          54 : static enum ndr_err_code ndr_push_netr_DatabaseSync(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DatabaseSync *r)
   11889             : {
   11890          54 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   11891          54 :         if (flags & NDR_IN) {
   11892          24 :                 if (r->in.logon_server == NULL) {
   11893           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11894             :                 }
   11895          24 :                 if (r->in.computername == NULL) {
   11896           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11897             :                 }
   11898          24 :                 if (r->in.credential == NULL) {
   11899           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11900             :                 }
   11901          24 :                 if (r->in.return_authenticator == NULL) {
   11902           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11903             :                 }
   11904          24 :                 if (r->in.sync_context == NULL) {
   11905           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11906             :                 }
   11907          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   11908          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11909          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   11910          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11911          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
   11912          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11913          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
   11914          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11915          24 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   11916          24 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   11917          24 :                 NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->in.database_id));
   11918          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.sync_context));
   11919          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.preferredmaximumlength));
   11920             :         }
   11921          54 :         if (flags & NDR_OUT) {
   11922          30 :                 if (r->out.return_authenticator == NULL) {
   11923           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11924             :                 }
   11925          30 :                 if (r->out.sync_context == NULL) {
   11926           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11927             :                 }
   11928          30 :                 if (r->out.delta_enum_array == NULL) {
   11929           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   11930             :                 }
   11931          30 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   11932          30 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sync_context));
   11933          30 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
   11934          30 :                 if (*r->out.delta_enum_array) {
   11935           0 :                         NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
   11936             :                 }
   11937          30 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   11938             :         }
   11939          45 :         return NDR_ERR_SUCCESS;
   11940             : }
   11941             : 
   11942          48 : static enum ndr_err_code ndr_pull_netr_DatabaseSync(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DatabaseSync *r)
   11943             : {
   11944          48 :         uint32_t size_logon_server_1 = 0;
   11945          48 :         uint32_t length_logon_server_1 = 0;
   11946          48 :         uint32_t size_computername_1 = 0;
   11947          48 :         uint32_t length_computername_1 = 0;
   11948           8 :         uint32_t _ptr_delta_enum_array;
   11949          48 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   11950          48 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   11951          48 :         TALLOC_CTX *_mem_save_sync_context_0 = NULL;
   11952          48 :         TALLOC_CTX *_mem_save_delta_enum_array_0 = NULL;
   11953          48 :         TALLOC_CTX *_mem_save_delta_enum_array_1 = NULL;
   11954          48 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   11955          48 :         if (flags & NDR_IN) {
   11956          24 :                 NDR_ZERO_STRUCT(r->out);
   11957             : 
   11958          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
   11959          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
   11960          24 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
   11961          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
   11962          24 :                 if (length_logon_server_1 > size_logon_server_1) {
   11963           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
   11964             :                 }
   11965          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
   11966          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
   11967          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
   11968          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
   11969          24 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
   11970          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
   11971          24 :                 if (length_computername_1 > size_computername_1) {
   11972           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computername_1, length_computername_1);
   11973             :                 }
   11974          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
   11975          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
   11976          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11977          24 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   11978             :                 }
   11979          24 :                 _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11980          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
   11981          24 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   11982          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
   11983          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11984          24 :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   11985             :                 }
   11986          24 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11987          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   11988          24 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   11989          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   11990          24 :                 NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->in.database_id));
   11991          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   11992          24 :                         NDR_PULL_ALLOC(ndr, r->in.sync_context);
   11993             :                 }
   11994          24 :                 _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11995          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sync_context, LIBNDR_FLAG_REF_ALLOC);
   11996          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.sync_context));
   11997          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
   11998          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.preferredmaximumlength));
   11999          24 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   12000          24 :                 *r->out.return_authenticator = *r->in.return_authenticator;
   12001          24 :                 NDR_PULL_ALLOC(ndr, r->out.sync_context);
   12002          24 :                 *r->out.sync_context = *r->in.sync_context;
   12003          24 :                 NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
   12004          24 :                 NDR_ZERO_STRUCTP(r->out.delta_enum_array);
   12005             :         }
   12006          48 :         if (flags & NDR_OUT) {
   12007             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   12008             :                 if (r->in.credential == NULL) {
   12009             :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   12010             :                         NDR_ZERO_STRUCTP(r->in.credential);
   12011             :                 }
   12012             :                 if (r->in.return_authenticator == NULL) {
   12013             :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   12014             :                         NDR_ZERO_STRUCTP(r->in.return_authenticator);
   12015             :                 }
   12016             :                 if (r->in.sync_context == NULL) {
   12017             :                         NDR_PULL_ALLOC(ndr, r->in.sync_context);
   12018             :                         NDR_ZERO_STRUCTP(r->in.sync_context);
   12019             :                 }
   12020             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   12021          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12022           6 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   12023             :                 }
   12024          24 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12025          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   12026          24 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   12027          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   12028          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12029           6 :                         NDR_PULL_ALLOC(ndr, r->out.sync_context);
   12030             :                 }
   12031          24 :                 _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12032          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sync_context, LIBNDR_FLAG_REF_ALLOC);
   12033          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sync_context));
   12034          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
   12035          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12036           6 :                         NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
   12037             :                 }
   12038          24 :                 _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12039          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
   12040          24 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
   12041          24 :                 if (_ptr_delta_enum_array) {
   12042           0 :                         NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
   12043             :                 } else {
   12044          24 :                         *r->out.delta_enum_array = NULL;
   12045             :                 }
   12046          24 :                 if (*r->out.delta_enum_array) {
   12047           0 :                         _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
   12048           0 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
   12049           0 :                         NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
   12050           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
   12051             :                 }
   12052          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
   12053          24 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   12054             :         }
   12055          40 :         return NDR_ERR_SUCCESS;
   12056             : }
   12057             : 
   12058          12 : _PUBLIC_ void ndr_print_netr_DatabaseSync(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DatabaseSync *r)
   12059             : {
   12060          12 :         ndr_print_struct(ndr, name, "netr_DatabaseSync");
   12061          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12062          12 :         ndr->depth++;
   12063          12 :         if (flags & NDR_SET_VALUES) {
   12064           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   12065             :         }
   12066          12 :         if (flags & NDR_IN) {
   12067           0 :                 ndr_print_struct(ndr, "in", "netr_DatabaseSync");
   12068           0 :                 ndr->depth++;
   12069           0 :                 ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
   12070           0 :                 ndr->depth++;
   12071           0 :                 ndr_print_string(ndr, "logon_server", r->in.logon_server);
   12072           0 :                 ndr->depth--;
   12073           0 :                 ndr_print_ptr(ndr, "computername", r->in.computername);
   12074           0 :                 ndr->depth++;
   12075           0 :                 ndr_print_string(ndr, "computername", r->in.computername);
   12076           0 :                 ndr->depth--;
   12077           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   12078           0 :                 ndr->depth++;
   12079           0 :                 ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   12080           0 :                 ndr->depth--;
   12081           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
   12082           0 :                 ndr->depth++;
   12083           0 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
   12084           0 :                 ndr->depth--;
   12085           0 :                 ndr_print_netr_SamDatabaseID(ndr, "database_id", r->in.database_id);
   12086           0 :                 ndr_print_ptr(ndr, "sync_context", r->in.sync_context);
   12087           0 :                 ndr->depth++;
   12088           0 :                 ndr_print_uint32(ndr, "sync_context", *r->in.sync_context);
   12089           0 :                 ndr->depth--;
   12090           0 :                 ndr_print_uint32(ndr, "preferredmaximumlength", r->in.preferredmaximumlength);
   12091           0 :                 ndr->depth--;
   12092             :         }
   12093          12 :         if (flags & NDR_OUT) {
   12094          12 :                 ndr_print_struct(ndr, "out", "netr_DatabaseSync");
   12095          12 :                 ndr->depth++;
   12096          12 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   12097          12 :                 ndr->depth++;
   12098          12 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   12099          12 :                 ndr->depth--;
   12100          12 :                 ndr_print_ptr(ndr, "sync_context", r->out.sync_context);
   12101          12 :                 ndr->depth++;
   12102          12 :                 ndr_print_uint32(ndr, "sync_context", *r->out.sync_context);
   12103          12 :                 ndr->depth--;
   12104          12 :                 ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
   12105          12 :                 ndr->depth++;
   12106          12 :                 ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
   12107          12 :                 ndr->depth++;
   12108          12 :                 if (*r->out.delta_enum_array) {
   12109           0 :                         ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
   12110             :                 }
   12111          12 :                 ndr->depth--;
   12112          12 :                 ndr->depth--;
   12113          12 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   12114          12 :                 ndr->depth--;
   12115             :         }
   12116          12 :         ndr->depth--;
   12117             : }
   12118             : 
   12119          54 : static enum ndr_err_code ndr_push_netr_AccountDeltas(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_AccountDeltas *r)
   12120             : {
   12121          54 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   12122          54 :         if (flags & NDR_IN) {
   12123          24 :                 if (r->in.computername == NULL) {
   12124           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12125             :                 }
   12126          24 :                 if (r->in.return_authenticator == NULL) {
   12127           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12128             :                 }
   12129          24 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
   12130          24 :                 if (r->in.logon_server) {
   12131          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   12132          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12133          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   12134          24 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12135             :                 }
   12136          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
   12137          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12138          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
   12139          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12140          24 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
   12141          24 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   12142          24 :                 NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, &r->in.uas));
   12143          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
   12144          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   12145          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffersize));
   12146             :         }
   12147          54 :         if (flags & NDR_OUT) {
   12148          30 :                 if (r->out.return_authenticator == NULL) {
   12149           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12150             :                 }
   12151          30 :                 if (r->out.buffer == NULL) {
   12152           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12153             :                 }
   12154          30 :                 if (r->out.count_returned == NULL) {
   12155           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12156             :                 }
   12157          30 :                 if (r->out.total_entries == NULL) {
   12158           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12159             :                 }
   12160          30 :                 if (r->out.recordid == NULL) {
   12161           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12162             :                 }
   12163          30 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   12164             :                 {
   12165           5 :                         struct ndr_push *_ndr_buffer;
   12166          30 :                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_buffer, 4, -1));
   12167          30 :                         NDR_CHECK(ndr_push_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
   12168          30 :                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_buffer, 4, -1));
   12169             :                 }
   12170          30 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count_returned));
   12171          30 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_entries));
   12172          30 :                 NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
   12173          30 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   12174             :         }
   12175          45 :         return NDR_ERR_SUCCESS;
   12176             : }
   12177             : 
   12178          48 : static enum ndr_err_code ndr_pull_netr_AccountDeltas(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_AccountDeltas *r)
   12179             : {
   12180           8 :         uint32_t _ptr_logon_server;
   12181          48 :         uint32_t size_logon_server_1 = 0;
   12182          48 :         uint32_t length_logon_server_1 = 0;
   12183          48 :         uint32_t size_computername_1 = 0;
   12184          48 :         uint32_t length_computername_1 = 0;
   12185          48 :         TALLOC_CTX *_mem_save_logon_server_0 = NULL;
   12186          48 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   12187          48 :         TALLOC_CTX *_mem_save_buffer_0 = NULL;
   12188          48 :         TALLOC_CTX *_mem_save_count_returned_0 = NULL;
   12189          48 :         TALLOC_CTX *_mem_save_total_entries_0 = NULL;
   12190          48 :         TALLOC_CTX *_mem_save_recordid_0 = NULL;
   12191          48 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   12192          48 :         if (flags & NDR_IN) {
   12193          24 :                 NDR_ZERO_STRUCT(r->out);
   12194             : 
   12195          24 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
   12196          24 :                 if (_ptr_logon_server) {
   12197          24 :                         NDR_PULL_ALLOC(ndr, r->in.logon_server);
   12198             :                 } else {
   12199           0 :                         r->in.logon_server = NULL;
   12200             :                 }
   12201          24 :                 if (r->in.logon_server) {
   12202          24 :                         _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12203          24 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
   12204          24 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
   12205          24 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
   12206          24 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
   12207          24 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
   12208          24 :                         if (length_logon_server_1 > size_logon_server_1) {
   12209           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
   12210             :                         }
   12211          24 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
   12212          24 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
   12213          24 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
   12214             :                 }
   12215          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
   12216          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
   12217          24 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
   12218          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
   12219          24 :                 if (length_computername_1 > size_computername_1) {
   12220           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computername_1, length_computername_1);
   12221             :                 }
   12222          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
   12223          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
   12224          24 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
   12225          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12226          24 :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   12227             :                 }
   12228          24 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12229          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   12230          24 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   12231          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   12232          24 :                 NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, &r->in.uas));
   12233          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
   12234          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   12235          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffersize));
   12236          24 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   12237          24 :                 *r->out.return_authenticator = *r->in.return_authenticator;
   12238          24 :                 NDR_PULL_ALLOC(ndr, r->out.buffer);
   12239          24 :                 NDR_ZERO_STRUCTP(r->out.buffer);
   12240          24 :                 NDR_PULL_ALLOC(ndr, r->out.count_returned);
   12241          24 :                 NDR_ZERO_STRUCTP(r->out.count_returned);
   12242          24 :                 NDR_PULL_ALLOC(ndr, r->out.total_entries);
   12243          24 :                 NDR_ZERO_STRUCTP(r->out.total_entries);
   12244          24 :                 NDR_PULL_ALLOC(ndr, r->out.recordid);
   12245          24 :                 NDR_ZERO_STRUCTP(r->out.recordid);
   12246             :         }
   12247          48 :         if (flags & NDR_OUT) {
   12248             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   12249             :                 if (r->in.return_authenticator == NULL) {
   12250             :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   12251             :                         NDR_ZERO_STRUCTP(r->in.return_authenticator);
   12252             :                 }
   12253             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   12254          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12255           6 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   12256             :                 }
   12257          24 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12258          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   12259          24 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   12260          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   12261          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12262           6 :                         NDR_PULL_ALLOC(ndr, r->out.buffer);
   12263             :                 }
   12264          24 :                 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12265          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, LIBNDR_FLAG_REF_ALLOC);
   12266             :                 {
   12267           4 :                         struct ndr_pull *_ndr_buffer;
   12268          24 :                         ssize_t sub_size = -1;
   12269          24 :                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_buffer, 4, sub_size));
   12270          24 :                         NDR_CHECK(ndr_pull_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
   12271          24 :                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_buffer, 4, sub_size));
   12272             :                 }
   12273          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, LIBNDR_FLAG_REF_ALLOC);
   12274          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12275           6 :                         NDR_PULL_ALLOC(ndr, r->out.count_returned);
   12276             :                 }
   12277          24 :                 _mem_save_count_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12278          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.count_returned, LIBNDR_FLAG_REF_ALLOC);
   12279          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count_returned));
   12280          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_returned_0, LIBNDR_FLAG_REF_ALLOC);
   12281          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12282           6 :                         NDR_PULL_ALLOC(ndr, r->out.total_entries);
   12283             :                 }
   12284          24 :                 _mem_save_total_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12285          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.total_entries, LIBNDR_FLAG_REF_ALLOC);
   12286          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_entries));
   12287          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_entries_0, LIBNDR_FLAG_REF_ALLOC);
   12288          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12289           6 :                         NDR_PULL_ALLOC(ndr, r->out.recordid);
   12290             :                 }
   12291          24 :                 _mem_save_recordid_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12292          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.recordid, LIBNDR_FLAG_REF_ALLOC);
   12293          24 :                 NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
   12294          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_recordid_0, LIBNDR_FLAG_REF_ALLOC);
   12295          24 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   12296             :         }
   12297          40 :         return NDR_ERR_SUCCESS;
   12298             : }
   12299             : 
   12300          12 : _PUBLIC_ void ndr_print_netr_AccountDeltas(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_AccountDeltas *r)
   12301             : {
   12302          12 :         ndr_print_struct(ndr, name, "netr_AccountDeltas");
   12303          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12304          12 :         ndr->depth++;
   12305          12 :         if (flags & NDR_SET_VALUES) {
   12306           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   12307             :         }
   12308          12 :         if (flags & NDR_IN) {
   12309           0 :                 ndr_print_struct(ndr, "in", "netr_AccountDeltas");
   12310           0 :                 ndr->depth++;
   12311           0 :                 ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
   12312           0 :                 ndr->depth++;
   12313           0 :                 if (r->in.logon_server) {
   12314           0 :                         ndr_print_string(ndr, "logon_server", r->in.logon_server);
   12315             :                 }
   12316           0 :                 ndr->depth--;
   12317           0 :                 ndr_print_ptr(ndr, "computername", r->in.computername);
   12318           0 :                 ndr->depth++;
   12319           0 :                 ndr_print_string(ndr, "computername", r->in.computername);
   12320           0 :                 ndr->depth--;
   12321           0 :                 ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
   12322           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
   12323           0 :                 ndr->depth++;
   12324           0 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
   12325           0 :                 ndr->depth--;
   12326           0 :                 ndr_print_netr_UAS_INFO_0(ndr, "uas", &r->in.uas);
   12327           0 :                 ndr_print_uint32(ndr, "count", r->in.count);
   12328           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   12329           0 :                 ndr_print_uint32(ndr, "buffersize", r->in.buffersize);
   12330           0 :                 ndr->depth--;
   12331             :         }
   12332          12 :         if (flags & NDR_OUT) {
   12333          12 :                 ndr_print_struct(ndr, "out", "netr_AccountDeltas");
   12334          12 :                 ndr->depth++;
   12335          12 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   12336          12 :                 ndr->depth++;
   12337          12 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   12338          12 :                 ndr->depth--;
   12339          12 :                 ndr_print_ptr(ndr, "buffer", r->out.buffer);
   12340          12 :                 ndr->depth++;
   12341          12 :                 ndr_print_netr_AccountBuffer(ndr, "buffer", r->out.buffer);
   12342          12 :                 ndr->depth--;
   12343          12 :                 ndr_print_ptr(ndr, "count_returned", r->out.count_returned);
   12344          12 :                 ndr->depth++;
   12345          12 :                 ndr_print_uint32(ndr, "count_returned", *r->out.count_returned);
   12346          12 :                 ndr->depth--;
   12347          12 :                 ndr_print_ptr(ndr, "total_entries", r->out.total_entries);
   12348          12 :                 ndr->depth++;
   12349          12 :                 ndr_print_uint32(ndr, "total_entries", *r->out.total_entries);
   12350          12 :                 ndr->depth--;
   12351          12 :                 ndr_print_ptr(ndr, "recordid", r->out.recordid);
   12352          12 :                 ndr->depth++;
   12353          12 :                 ndr_print_netr_UAS_INFO_0(ndr, "recordid", r->out.recordid);
   12354          12 :                 ndr->depth--;
   12355          12 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   12356          12 :                 ndr->depth--;
   12357             :         }
   12358          12 :         ndr->depth--;
   12359             : }
   12360             : 
   12361          54 : static enum ndr_err_code ndr_push_netr_AccountSync(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_AccountSync *r)
   12362             : {
   12363          54 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   12364          54 :         if (flags & NDR_IN) {
   12365          24 :                 if (r->in.computername == NULL) {
   12366           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12367             :                 }
   12368          24 :                 if (r->in.return_authenticator == NULL) {
   12369           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12370             :                 }
   12371          24 :                 if (r->in.recordid == NULL) {
   12372           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12373             :                 }
   12374          24 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
   12375          24 :                 if (r->in.logon_server) {
   12376          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   12377          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12378          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   12379          24 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12380             :                 }
   12381          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
   12382          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12383          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
   12384          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12385          24 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
   12386          24 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   12387          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reference));
   12388          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   12389          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffersize));
   12390          24 :                 NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->in.recordid));
   12391             :         }
   12392          54 :         if (flags & NDR_OUT) {
   12393          30 :                 if (r->out.return_authenticator == NULL) {
   12394           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12395             :                 }
   12396          30 :                 if (r->out.buffer == NULL) {
   12397           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12398             :                 }
   12399          30 :                 if (r->out.count_returned == NULL) {
   12400           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12401             :                 }
   12402          30 :                 if (r->out.total_entries == NULL) {
   12403           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12404             :                 }
   12405          30 :                 if (r->out.next_reference == NULL) {
   12406           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12407             :                 }
   12408          30 :                 if (r->out.recordid == NULL) {
   12409           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12410             :                 }
   12411          30 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   12412             :                 {
   12413           5 :                         struct ndr_push *_ndr_buffer;
   12414          30 :                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_buffer, 4, -1));
   12415          30 :                         NDR_CHECK(ndr_push_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
   12416          30 :                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_buffer, 4, -1));
   12417             :                 }
   12418          30 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count_returned));
   12419          30 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_entries));
   12420          30 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.next_reference));
   12421          30 :                 NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
   12422          30 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   12423             :         }
   12424          45 :         return NDR_ERR_SUCCESS;
   12425             : }
   12426             : 
   12427          48 : static enum ndr_err_code ndr_pull_netr_AccountSync(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_AccountSync *r)
   12428             : {
   12429           8 :         uint32_t _ptr_logon_server;
   12430          48 :         uint32_t size_logon_server_1 = 0;
   12431          48 :         uint32_t length_logon_server_1 = 0;
   12432          48 :         uint32_t size_computername_1 = 0;
   12433          48 :         uint32_t length_computername_1 = 0;
   12434          48 :         TALLOC_CTX *_mem_save_logon_server_0 = NULL;
   12435          48 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   12436          48 :         TALLOC_CTX *_mem_save_buffer_0 = NULL;
   12437          48 :         TALLOC_CTX *_mem_save_count_returned_0 = NULL;
   12438          48 :         TALLOC_CTX *_mem_save_total_entries_0 = NULL;
   12439          48 :         TALLOC_CTX *_mem_save_next_reference_0 = NULL;
   12440          48 :         TALLOC_CTX *_mem_save_recordid_0 = NULL;
   12441          48 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   12442          48 :         if (flags & NDR_IN) {
   12443          24 :                 NDR_ZERO_STRUCT(r->out);
   12444             : 
   12445          24 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
   12446          24 :                 if (_ptr_logon_server) {
   12447          24 :                         NDR_PULL_ALLOC(ndr, r->in.logon_server);
   12448             :                 } else {
   12449           0 :                         r->in.logon_server = NULL;
   12450             :                 }
   12451          24 :                 if (r->in.logon_server) {
   12452          24 :                         _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12453          24 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
   12454          24 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
   12455          24 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
   12456          24 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
   12457          24 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
   12458          24 :                         if (length_logon_server_1 > size_logon_server_1) {
   12459           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
   12460             :                         }
   12461          24 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
   12462          24 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
   12463          24 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
   12464             :                 }
   12465          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
   12466          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
   12467          24 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
   12468          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
   12469          24 :                 if (length_computername_1 > size_computername_1) {
   12470           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computername_1, length_computername_1);
   12471             :                 }
   12472          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
   12473          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
   12474          24 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
   12475          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12476          24 :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   12477             :                 }
   12478          24 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12479          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   12480          24 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   12481          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   12482          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reference));
   12483          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   12484          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffersize));
   12485          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12486          24 :                         NDR_PULL_ALLOC(ndr, r->in.recordid);
   12487             :                 }
   12488          24 :                 _mem_save_recordid_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12489          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.recordid, LIBNDR_FLAG_REF_ALLOC);
   12490          24 :                 NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->in.recordid));
   12491          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_recordid_0, LIBNDR_FLAG_REF_ALLOC);
   12492          24 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   12493          24 :                 *r->out.return_authenticator = *r->in.return_authenticator;
   12494          24 :                 NDR_PULL_ALLOC(ndr, r->out.buffer);
   12495          24 :                 NDR_ZERO_STRUCTP(r->out.buffer);
   12496          24 :                 NDR_PULL_ALLOC(ndr, r->out.count_returned);
   12497          24 :                 NDR_ZERO_STRUCTP(r->out.count_returned);
   12498          24 :                 NDR_PULL_ALLOC(ndr, r->out.total_entries);
   12499          24 :                 NDR_ZERO_STRUCTP(r->out.total_entries);
   12500          24 :                 NDR_PULL_ALLOC(ndr, r->out.next_reference);
   12501          24 :                 NDR_ZERO_STRUCTP(r->out.next_reference);
   12502          24 :                 NDR_PULL_ALLOC(ndr, r->out.recordid);
   12503          24 :                 *r->out.recordid = *r->in.recordid;
   12504             :         }
   12505          48 :         if (flags & NDR_OUT) {
   12506             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   12507             :                 if (r->in.return_authenticator == NULL) {
   12508             :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   12509             :                         NDR_ZERO_STRUCTP(r->in.return_authenticator);
   12510             :                 }
   12511             :                 if (r->in.recordid == NULL) {
   12512             :                         NDR_PULL_ALLOC(ndr, r->in.recordid);
   12513             :                         NDR_ZERO_STRUCTP(r->in.recordid);
   12514             :                 }
   12515             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   12516          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12517           6 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   12518             :                 }
   12519          24 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12520          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   12521          24 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   12522          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   12523          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12524           6 :                         NDR_PULL_ALLOC(ndr, r->out.buffer);
   12525             :                 }
   12526          24 :                 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12527          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, LIBNDR_FLAG_REF_ALLOC);
   12528             :                 {
   12529           4 :                         struct ndr_pull *_ndr_buffer;
   12530          24 :                         ssize_t sub_size = -1;
   12531          24 :                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_buffer, 4, sub_size));
   12532          24 :                         NDR_CHECK(ndr_pull_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
   12533          24 :                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_buffer, 4, sub_size));
   12534             :                 }
   12535          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, LIBNDR_FLAG_REF_ALLOC);
   12536          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12537           6 :                         NDR_PULL_ALLOC(ndr, r->out.count_returned);
   12538             :                 }
   12539          24 :                 _mem_save_count_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12540          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.count_returned, LIBNDR_FLAG_REF_ALLOC);
   12541          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count_returned));
   12542          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_returned_0, LIBNDR_FLAG_REF_ALLOC);
   12543          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12544           6 :                         NDR_PULL_ALLOC(ndr, r->out.total_entries);
   12545             :                 }
   12546          24 :                 _mem_save_total_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12547          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.total_entries, LIBNDR_FLAG_REF_ALLOC);
   12548          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_entries));
   12549          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_entries_0, LIBNDR_FLAG_REF_ALLOC);
   12550          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12551           6 :                         NDR_PULL_ALLOC(ndr, r->out.next_reference);
   12552             :                 }
   12553          24 :                 _mem_save_next_reference_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12554          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.next_reference, LIBNDR_FLAG_REF_ALLOC);
   12555          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.next_reference));
   12556          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_reference_0, LIBNDR_FLAG_REF_ALLOC);
   12557          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12558           6 :                         NDR_PULL_ALLOC(ndr, r->out.recordid);
   12559             :                 }
   12560          24 :                 _mem_save_recordid_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12561          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.recordid, LIBNDR_FLAG_REF_ALLOC);
   12562          24 :                 NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
   12563          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_recordid_0, LIBNDR_FLAG_REF_ALLOC);
   12564          24 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   12565             :         }
   12566          40 :         return NDR_ERR_SUCCESS;
   12567             : }
   12568             : 
   12569          12 : _PUBLIC_ void ndr_print_netr_AccountSync(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_AccountSync *r)
   12570             : {
   12571          12 :         ndr_print_struct(ndr, name, "netr_AccountSync");
   12572          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12573          12 :         ndr->depth++;
   12574          12 :         if (flags & NDR_SET_VALUES) {
   12575           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   12576             :         }
   12577          12 :         if (flags & NDR_IN) {
   12578           0 :                 ndr_print_struct(ndr, "in", "netr_AccountSync");
   12579           0 :                 ndr->depth++;
   12580           0 :                 ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
   12581           0 :                 ndr->depth++;
   12582           0 :                 if (r->in.logon_server) {
   12583           0 :                         ndr_print_string(ndr, "logon_server", r->in.logon_server);
   12584             :                 }
   12585           0 :                 ndr->depth--;
   12586           0 :                 ndr_print_ptr(ndr, "computername", r->in.computername);
   12587           0 :                 ndr->depth++;
   12588           0 :                 ndr_print_string(ndr, "computername", r->in.computername);
   12589           0 :                 ndr->depth--;
   12590           0 :                 ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
   12591           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
   12592           0 :                 ndr->depth++;
   12593           0 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
   12594           0 :                 ndr->depth--;
   12595           0 :                 ndr_print_uint32(ndr, "reference", r->in.reference);
   12596           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   12597           0 :                 ndr_print_uint32(ndr, "buffersize", r->in.buffersize);
   12598           0 :                 ndr_print_ptr(ndr, "recordid", r->in.recordid);
   12599           0 :                 ndr->depth++;
   12600           0 :                 ndr_print_netr_UAS_INFO_0(ndr, "recordid", r->in.recordid);
   12601           0 :                 ndr->depth--;
   12602           0 :                 ndr->depth--;
   12603             :         }
   12604          12 :         if (flags & NDR_OUT) {
   12605          12 :                 ndr_print_struct(ndr, "out", "netr_AccountSync");
   12606          12 :                 ndr->depth++;
   12607          12 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   12608          12 :                 ndr->depth++;
   12609          12 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   12610          12 :                 ndr->depth--;
   12611          12 :                 ndr_print_ptr(ndr, "buffer", r->out.buffer);
   12612          12 :                 ndr->depth++;
   12613          12 :                 ndr_print_netr_AccountBuffer(ndr, "buffer", r->out.buffer);
   12614          12 :                 ndr->depth--;
   12615          12 :                 ndr_print_ptr(ndr, "count_returned", r->out.count_returned);
   12616          12 :                 ndr->depth++;
   12617          12 :                 ndr_print_uint32(ndr, "count_returned", *r->out.count_returned);
   12618          12 :                 ndr->depth--;
   12619          12 :                 ndr_print_ptr(ndr, "total_entries", r->out.total_entries);
   12620          12 :                 ndr->depth++;
   12621          12 :                 ndr_print_uint32(ndr, "total_entries", *r->out.total_entries);
   12622          12 :                 ndr->depth--;
   12623          12 :                 ndr_print_ptr(ndr, "next_reference", r->out.next_reference);
   12624          12 :                 ndr->depth++;
   12625          12 :                 ndr_print_uint32(ndr, "next_reference", *r->out.next_reference);
   12626          12 :                 ndr->depth--;
   12627          12 :                 ndr_print_ptr(ndr, "recordid", r->out.recordid);
   12628          12 :                 ndr->depth++;
   12629          12 :                 ndr_print_netr_UAS_INFO_0(ndr, "recordid", r->out.recordid);
   12630          12 :                 ndr->depth--;
   12631          12 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   12632          12 :                 ndr->depth--;
   12633             :         }
   12634          12 :         ndr->depth--;
   12635             : }
   12636             : 
   12637          62 : static enum ndr_err_code ndr_push_netr_GetDcName(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_GetDcName *r)
   12638             : {
   12639          62 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   12640          62 :         if (flags & NDR_IN) {
   12641          28 :                 if (r->in.logon_server == NULL) {
   12642           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12643             :                 }
   12644          28 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   12645          28 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12646          28 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   12647          28 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12648          28 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domainname));
   12649          28 :                 if (r->in.domainname) {
   12650          28 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
   12651          28 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12652          28 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
   12653          28 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domainname, ndr_charset_length(r->in.domainname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12654             :                 }
   12655             :         }
   12656          62 :         if (flags & NDR_OUT) {
   12657          34 :                 if (r->out.dcname == NULL) {
   12658           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12659             :                 }
   12660          34 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.dcname));
   12661          34 :                 if (*r->out.dcname) {
   12662          34 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
   12663          34 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12664          34 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
   12665          34 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.dcname, ndr_charset_length(*r->out.dcname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12666             :                 }
   12667          34 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   12668             :         }
   12669          53 :         return NDR_ERR_SUCCESS;
   12670             : }
   12671             : 
   12672          56 : static enum ndr_err_code ndr_pull_netr_GetDcName(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_GetDcName *r)
   12673             : {
   12674          56 :         uint32_t size_logon_server_1 = 0;
   12675          56 :         uint32_t length_logon_server_1 = 0;
   12676           8 :         uint32_t _ptr_domainname;
   12677          56 :         uint32_t size_domainname_1 = 0;
   12678          56 :         uint32_t length_domainname_1 = 0;
   12679           8 :         uint32_t _ptr_dcname;
   12680          56 :         uint32_t size_dcname_2 = 0;
   12681          56 :         uint32_t length_dcname_2 = 0;
   12682          56 :         TALLOC_CTX *_mem_save_domainname_0 = NULL;
   12683          56 :         TALLOC_CTX *_mem_save_dcname_0 = NULL;
   12684          56 :         TALLOC_CTX *_mem_save_dcname_1 = NULL;
   12685          56 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   12686          56 :         if (flags & NDR_IN) {
   12687          28 :                 NDR_ZERO_STRUCT(r->out);
   12688             : 
   12689          28 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
   12690          28 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
   12691          28 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
   12692          28 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
   12693          28 :                 if (length_logon_server_1 > size_logon_server_1) {
   12694           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
   12695             :                 }
   12696          28 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
   12697          28 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
   12698          28 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domainname));
   12699          28 :                 if (_ptr_domainname) {
   12700          28 :                         NDR_PULL_ALLOC(ndr, r->in.domainname);
   12701             :                 } else {
   12702           0 :                         r->in.domainname = NULL;
   12703             :                 }
   12704          28 :                 if (r->in.domainname) {
   12705          28 :                         _mem_save_domainname_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12706          28 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.domainname, 0);
   12707          28 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domainname));
   12708          28 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domainname));
   12709          28 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domainname, &size_domainname_1));
   12710          28 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domainname, &length_domainname_1));
   12711          28 :                         if (length_domainname_1 > size_domainname_1) {
   12712           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domainname_1, length_domainname_1);
   12713             :                         }
   12714          28 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domainname_1, sizeof(uint16_t)));
   12715          28 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domainname, length_domainname_1, sizeof(uint16_t), CH_UTF16));
   12716          28 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domainname_0, 0);
   12717             :                 }
   12718          28 :                 NDR_PULL_ALLOC(ndr, r->out.dcname);
   12719          28 :                 NDR_ZERO_STRUCTP(r->out.dcname);
   12720             :         }
   12721          56 :         if (flags & NDR_OUT) {
   12722             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   12723             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   12724          28 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12725          10 :                         NDR_PULL_ALLOC(ndr, r->out.dcname);
   12726             :                 }
   12727          28 :                 _mem_save_dcname_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12728          28 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.dcname, LIBNDR_FLAG_REF_ALLOC);
   12729          28 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dcname));
   12730          28 :                 if (_ptr_dcname) {
   12731          28 :                         NDR_PULL_ALLOC(ndr, *r->out.dcname);
   12732             :                 } else {
   12733           0 :                         *r->out.dcname = NULL;
   12734             :                 }
   12735          28 :                 if (*r->out.dcname) {
   12736          28 :                         _mem_save_dcname_1 = NDR_PULL_GET_MEM_CTX(ndr);
   12737          28 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.dcname, 0);
   12738          28 :                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.dcname));
   12739          28 :                         NDR_CHECK(ndr_pull_array_length(ndr, r->out.dcname));
   12740          28 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.dcname, &size_dcname_2));
   12741          28 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.dcname, &length_dcname_2));
   12742          28 :                         if (length_dcname_2 > size_dcname_2) {
   12743           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dcname_2, length_dcname_2);
   12744             :                         }
   12745          28 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dcname_2, sizeof(uint16_t)));
   12746          28 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.dcname, length_dcname_2, sizeof(uint16_t), CH_UTF16));
   12747          28 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_1, 0);
   12748             :                 }
   12749          28 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_0, LIBNDR_FLAG_REF_ALLOC);
   12750          28 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   12751             :         }
   12752          48 :         return NDR_ERR_SUCCESS;
   12753             : }
   12754             : 
   12755          12 : _PUBLIC_ void ndr_print_netr_GetDcName(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_GetDcName *r)
   12756             : {
   12757          12 :         ndr_print_struct(ndr, name, "netr_GetDcName");
   12758          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12759          12 :         ndr->depth++;
   12760          12 :         if (flags & NDR_SET_VALUES) {
   12761           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   12762             :         }
   12763          12 :         if (flags & NDR_IN) {
   12764           0 :                 ndr_print_struct(ndr, "in", "netr_GetDcName");
   12765           0 :                 ndr->depth++;
   12766           0 :                 ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
   12767           0 :                 ndr->depth++;
   12768           0 :                 ndr_print_string(ndr, "logon_server", r->in.logon_server);
   12769           0 :                 ndr->depth--;
   12770           0 :                 ndr_print_ptr(ndr, "domainname", r->in.domainname);
   12771           0 :                 ndr->depth++;
   12772           0 :                 if (r->in.domainname) {
   12773           0 :                         ndr_print_string(ndr, "domainname", r->in.domainname);
   12774             :                 }
   12775           0 :                 ndr->depth--;
   12776           0 :                 ndr->depth--;
   12777             :         }
   12778          12 :         if (flags & NDR_OUT) {
   12779          12 :                 ndr_print_struct(ndr, "out", "netr_GetDcName");
   12780          12 :                 ndr->depth++;
   12781          12 :                 ndr_print_ptr(ndr, "dcname", r->out.dcname);
   12782          12 :                 ndr->depth++;
   12783          12 :                 ndr_print_ptr(ndr, "dcname", *r->out.dcname);
   12784          12 :                 ndr->depth++;
   12785          12 :                 if (*r->out.dcname) {
   12786          12 :                         ndr_print_string(ndr, "dcname", *r->out.dcname);
   12787             :                 }
   12788          12 :                 ndr->depth--;
   12789          12 :                 ndr->depth--;
   12790          12 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   12791          12 :                 ndr->depth--;
   12792             :         }
   12793          12 :         ndr->depth--;
   12794             : }
   12795             : 
   12796       12411 : static enum ndr_err_code ndr_push_netr_LogonControl(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonControl *r)
   12797             : {
   12798       12411 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   12799       12411 :         if (flags & NDR_IN) {
   12800        5655 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
   12801        5655 :                 if (r->in.logon_server) {
   12802        5655 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   12803        5655 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12804        5655 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   12805        5655 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12806             :                 }
   12807        5655 :                 NDR_CHECK(ndr_push_netr_LogonControlCode(ndr, NDR_SCALARS, r->in.function_code));
   12808        5655 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   12809             :         }
   12810       12411 :         if (flags & NDR_OUT) {
   12811        6756 :                 if (r->out.query == NULL) {
   12812           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12813             :                 }
   12814        6756 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.query, r->in.level));
   12815        6756 :                 NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
   12816        6756 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   12817             :         }
   12818       10266 :         return NDR_ERR_SUCCESS;
   12819             : }
   12820             : 
   12821       11241 : static enum ndr_err_code ndr_pull_netr_LogonControl(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonControl *r)
   12822             : {
   12823        1950 :         uint32_t _ptr_logon_server;
   12824       11241 :         uint32_t size_logon_server_1 = 0;
   12825       11241 :         uint32_t length_logon_server_1 = 0;
   12826       11241 :         TALLOC_CTX *_mem_save_logon_server_0 = NULL;
   12827       11241 :         TALLOC_CTX *_mem_save_query_0 = NULL;
   12828       11241 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   12829       11241 :         if (flags & NDR_IN) {
   12830        5586 :                 NDR_ZERO_STRUCT(r->out);
   12831             : 
   12832        5586 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
   12833        5586 :                 if (_ptr_logon_server) {
   12834        5586 :                         NDR_PULL_ALLOC(ndr, r->in.logon_server);
   12835             :                 } else {
   12836           0 :                         r->in.logon_server = NULL;
   12837             :                 }
   12838        5586 :                 if (r->in.logon_server) {
   12839        5586 :                         _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12840        5586 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
   12841        5586 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
   12842        5586 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
   12843        5586 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
   12844        5586 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
   12845        5586 :                         if (length_logon_server_1 > size_logon_server_1) {
   12846           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
   12847             :                         }
   12848        5586 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
   12849        5586 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
   12850        5586 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
   12851             :                 }
   12852        5586 :                 NDR_CHECK(ndr_pull_netr_LogonControlCode(ndr, NDR_SCALARS, &r->in.function_code));
   12853        5586 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   12854        5586 :                 NDR_PULL_ALLOC(ndr, r->out.query);
   12855        5586 :                 NDR_ZERO_STRUCTP(r->out.query);
   12856             :         }
   12857       11241 :         if (flags & NDR_OUT) {
   12858             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   12859             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   12860        5655 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   12861        1170 :                         NDR_PULL_ALLOC(ndr, r->out.query);
   12862             :                 }
   12863        5655 :                 _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12864        5655 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
   12865        5655 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.query, r->in.level));
   12866        5655 :                 NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
   12867        5655 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
   12868        5655 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   12869             :         }
   12870        9291 :         return NDR_ERR_SUCCESS;
   12871             : }
   12872             : 
   12873        2340 : _PUBLIC_ void ndr_print_netr_LogonControl(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonControl *r)
   12874             : {
   12875        2340 :         ndr_print_struct(ndr, name, "netr_LogonControl");
   12876        2340 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12877        2340 :         ndr->depth++;
   12878        2340 :         if (flags & NDR_SET_VALUES) {
   12879           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   12880             :         }
   12881        2340 :         if (flags & NDR_IN) {
   12882           0 :                 ndr_print_struct(ndr, "in", "netr_LogonControl");
   12883           0 :                 ndr->depth++;
   12884           0 :                 ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
   12885           0 :                 ndr->depth++;
   12886           0 :                 if (r->in.logon_server) {
   12887           0 :                         ndr_print_string(ndr, "logon_server", r->in.logon_server);
   12888             :                 }
   12889           0 :                 ndr->depth--;
   12890           0 :                 ndr_print_netr_LogonControlCode(ndr, "function_code", r->in.function_code);
   12891           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   12892           0 :                 ndr->depth--;
   12893             :         }
   12894        2340 :         if (flags & NDR_OUT) {
   12895        2340 :                 ndr_print_struct(ndr, "out", "netr_LogonControl");
   12896        2340 :                 ndr->depth++;
   12897        2340 :                 ndr_print_ptr(ndr, "query", r->out.query);
   12898        2340 :                 ndr->depth++;
   12899        2340 :                 ndr_print_set_switch_value(ndr, r->out.query, r->in.level);
   12900        2340 :                 ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr, "query", r->out.query);
   12901        2340 :                 ndr->depth--;
   12902        2340 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   12903        2340 :                 ndr->depth--;
   12904             :         }
   12905        2340 :         ndr->depth--;
   12906             : }
   12907             : 
   12908         162 : static enum ndr_err_code ndr_push_netr_GetAnyDCName(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_GetAnyDCName *r)
   12909             : {
   12910         162 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   12911         162 :         if (flags & NDR_IN) {
   12912          72 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
   12913          72 :                 if (r->in.logon_server) {
   12914          72 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   12915          72 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12916          72 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   12917          72 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12918             :                 }
   12919          72 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domainname));
   12920          72 :                 if (r->in.domainname) {
   12921          48 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
   12922          48 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12923          48 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
   12924          48 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domainname, ndr_charset_length(r->in.domainname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12925             :                 }
   12926             :         }
   12927         162 :         if (flags & NDR_OUT) {
   12928          90 :                 if (r->out.dcname == NULL) {
   12929           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   12930             :                 }
   12931          90 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.dcname));
   12932          90 :                 if (*r->out.dcname) {
   12933           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
   12934           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12935           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
   12936           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.dcname, ndr_charset_length(*r->out.dcname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12937             :                 }
   12938          90 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   12939             :         }
   12940         135 :         return NDR_ERR_SUCCESS;
   12941             : }
   12942             : 
   12943         144 : static enum ndr_err_code ndr_pull_netr_GetAnyDCName(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_GetAnyDCName *r)
   12944             : {
   12945          24 :         uint32_t _ptr_logon_server;
   12946         144 :         uint32_t size_logon_server_1 = 0;
   12947         144 :         uint32_t length_logon_server_1 = 0;
   12948          24 :         uint32_t _ptr_domainname;
   12949         144 :         uint32_t size_domainname_1 = 0;
   12950         144 :         uint32_t length_domainname_1 = 0;
   12951          24 :         uint32_t _ptr_dcname;
   12952         144 :         uint32_t size_dcname_2 = 0;
   12953         144 :         uint32_t length_dcname_2 = 0;
   12954         144 :         TALLOC_CTX *_mem_save_logon_server_0 = NULL;
   12955         144 :         TALLOC_CTX *_mem_save_domainname_0 = NULL;
   12956         144 :         TALLOC_CTX *_mem_save_dcname_0 = NULL;
   12957         144 :         TALLOC_CTX *_mem_save_dcname_1 = NULL;
   12958         144 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   12959         144 :         if (flags & NDR_IN) {
   12960          72 :                 NDR_ZERO_STRUCT(r->out);
   12961             : 
   12962          72 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
   12963          72 :                 if (_ptr_logon_server) {
   12964          72 :                         NDR_PULL_ALLOC(ndr, r->in.logon_server);
   12965             :                 } else {
   12966           0 :                         r->in.logon_server = NULL;
   12967             :                 }
   12968          72 :                 if (r->in.logon_server) {
   12969          72 :                         _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12970          72 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
   12971          72 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
   12972          72 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
   12973          72 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
   12974          72 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
   12975          72 :                         if (length_logon_server_1 > size_logon_server_1) {
   12976           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
   12977             :                         }
   12978          72 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
   12979          72 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
   12980          72 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
   12981             :                 }
   12982          72 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domainname));
   12983          72 :                 if (_ptr_domainname) {
   12984          48 :                         NDR_PULL_ALLOC(ndr, r->in.domainname);
   12985             :                 } else {
   12986          24 :                         r->in.domainname = NULL;
   12987             :                 }
   12988          72 :                 if (r->in.domainname) {
   12989          48 :                         _mem_save_domainname_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12990          48 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.domainname, 0);
   12991          48 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domainname));
   12992          48 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domainname));
   12993          48 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domainname, &size_domainname_1));
   12994          48 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domainname, &length_domainname_1));
   12995          48 :                         if (length_domainname_1 > size_domainname_1) {
   12996           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domainname_1, length_domainname_1);
   12997             :                         }
   12998          48 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domainname_1, sizeof(uint16_t)));
   12999          48 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domainname, length_domainname_1, sizeof(uint16_t), CH_UTF16));
   13000          48 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domainname_0, 0);
   13001             :                 }
   13002          72 :                 NDR_PULL_ALLOC(ndr, r->out.dcname);
   13003          72 :                 NDR_ZERO_STRUCTP(r->out.dcname);
   13004             :         }
   13005         144 :         if (flags & NDR_OUT) {
   13006             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   13007             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   13008          72 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13009          18 :                         NDR_PULL_ALLOC(ndr, r->out.dcname);
   13010             :                 }
   13011          72 :                 _mem_save_dcname_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13012          72 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.dcname, LIBNDR_FLAG_REF_ALLOC);
   13013          72 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dcname));
   13014          72 :                 if (_ptr_dcname) {
   13015           0 :                         NDR_PULL_ALLOC(ndr, *r->out.dcname);
   13016             :                 } else {
   13017          72 :                         *r->out.dcname = NULL;
   13018             :                 }
   13019          72 :                 if (*r->out.dcname) {
   13020           0 :                         _mem_save_dcname_1 = NDR_PULL_GET_MEM_CTX(ndr);
   13021           0 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.dcname, 0);
   13022           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.dcname));
   13023           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, r->out.dcname));
   13024           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.dcname, &size_dcname_2));
   13025           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.dcname, &length_dcname_2));
   13026           0 :                         if (length_dcname_2 > size_dcname_2) {
   13027           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dcname_2, length_dcname_2);
   13028             :                         }
   13029           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dcname_2, sizeof(uint16_t)));
   13030           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.dcname, length_dcname_2, sizeof(uint16_t), CH_UTF16));
   13031           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_1, 0);
   13032             :                 }
   13033          72 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_0, LIBNDR_FLAG_REF_ALLOC);
   13034          72 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   13035             :         }
   13036         120 :         return NDR_ERR_SUCCESS;
   13037             : }
   13038             : 
   13039          36 : _PUBLIC_ void ndr_print_netr_GetAnyDCName(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_GetAnyDCName *r)
   13040             : {
   13041          36 :         ndr_print_struct(ndr, name, "netr_GetAnyDCName");
   13042          36 :         if (r == NULL) { ndr_print_null(ndr); return; }
   13043          36 :         ndr->depth++;
   13044          36 :         if (flags & NDR_SET_VALUES) {
   13045           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   13046             :         }
   13047          36 :         if (flags & NDR_IN) {
   13048           0 :                 ndr_print_struct(ndr, "in", "netr_GetAnyDCName");
   13049           0 :                 ndr->depth++;
   13050           0 :                 ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
   13051           0 :                 ndr->depth++;
   13052           0 :                 if (r->in.logon_server) {
   13053           0 :                         ndr_print_string(ndr, "logon_server", r->in.logon_server);
   13054             :                 }
   13055           0 :                 ndr->depth--;
   13056           0 :                 ndr_print_ptr(ndr, "domainname", r->in.domainname);
   13057           0 :                 ndr->depth++;
   13058           0 :                 if (r->in.domainname) {
   13059           0 :                         ndr_print_string(ndr, "domainname", r->in.domainname);
   13060             :                 }
   13061           0 :                 ndr->depth--;
   13062           0 :                 ndr->depth--;
   13063             :         }
   13064          36 :         if (flags & NDR_OUT) {
   13065          36 :                 ndr_print_struct(ndr, "out", "netr_GetAnyDCName");
   13066          36 :                 ndr->depth++;
   13067          36 :                 ndr_print_ptr(ndr, "dcname", r->out.dcname);
   13068          36 :                 ndr->depth++;
   13069          36 :                 ndr_print_ptr(ndr, "dcname", *r->out.dcname);
   13070          36 :                 ndr->depth++;
   13071          36 :                 if (*r->out.dcname) {
   13072           0 :                         ndr_print_string(ndr, "dcname", *r->out.dcname);
   13073             :                 }
   13074          36 :                 ndr->depth--;
   13075          36 :                 ndr->depth--;
   13076          36 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   13077          36 :                 ndr->depth--;
   13078             :         }
   13079          36 :         ndr->depth--;
   13080             : }
   13081             : 
   13082        2660 : static enum ndr_err_code ndr_push_netr_LogonControl2(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonControl2 *r)
   13083             : {
   13084        2660 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   13085        2660 :         if (flags & NDR_IN) {
   13086        1218 :                 if (r->in.data == NULL) {
   13087           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13088             :                 }
   13089        1218 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
   13090        1218 :                 if (r->in.logon_server) {
   13091        1218 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   13092        1218 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   13093        1218 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   13094        1218 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   13095             :                 }
   13096        1218 :                 NDR_CHECK(ndr_push_netr_LogonControlCode(ndr, NDR_SCALARS, r->in.function_code));
   13097        1218 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   13098        1218 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.data, r->in.function_code));
   13099        1218 :                 NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data));
   13100             :         }
   13101        2660 :         if (flags & NDR_OUT) {
   13102        1442 :                 if (r->out.query == NULL) {
   13103           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13104             :                 }
   13105        1442 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.query, r->in.level));
   13106        1442 :                 NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
   13107        1442 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   13108             :         }
   13109        2198 :         return NDR_ERR_SUCCESS;
   13110             : }
   13111             : 
   13112        2408 : static enum ndr_err_code ndr_pull_netr_LogonControl2(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonControl2 *r)
   13113             : {
   13114         420 :         uint32_t _ptr_logon_server;
   13115        2408 :         uint32_t size_logon_server_1 = 0;
   13116        2408 :         uint32_t length_logon_server_1 = 0;
   13117        2408 :         TALLOC_CTX *_mem_save_logon_server_0 = NULL;
   13118        2408 :         TALLOC_CTX *_mem_save_data_0 = NULL;
   13119        2408 :         TALLOC_CTX *_mem_save_query_0 = NULL;
   13120        2408 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   13121        2408 :         if (flags & NDR_IN) {
   13122        1190 :                 NDR_ZERO_STRUCT(r->out);
   13123             : 
   13124        1190 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
   13125        1190 :                 if (_ptr_logon_server) {
   13126        1190 :                         NDR_PULL_ALLOC(ndr, r->in.logon_server);
   13127             :                 } else {
   13128           0 :                         r->in.logon_server = NULL;
   13129             :                 }
   13130        1190 :                 if (r->in.logon_server) {
   13131        1190 :                         _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13132        1190 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
   13133        1190 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
   13134        1190 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
   13135        1190 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
   13136        1190 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
   13137        1190 :                         if (length_logon_server_1 > size_logon_server_1) {
   13138           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
   13139             :                         }
   13140        1190 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
   13141        1190 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
   13142        1190 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
   13143             :                 }
   13144        1190 :                 NDR_CHECK(ndr_pull_netr_LogonControlCode(ndr, NDR_SCALARS, &r->in.function_code));
   13145        1190 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   13146        1190 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13147        1190 :                         NDR_PULL_ALLOC(ndr, r->in.data);
   13148             :                 }
   13149        1190 :                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13150        1190 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
   13151        1190 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.data, r->in.function_code));
   13152        1190 :                 NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data));
   13153        1190 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
   13154        1190 :                 NDR_PULL_ALLOC(ndr, r->out.query);
   13155        1190 :                 NDR_ZERO_STRUCTP(r->out.query);
   13156             :         }
   13157        2408 :         if (flags & NDR_OUT) {
   13158             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   13159             :                 if (r->in.data == NULL) {
   13160             :                         NDR_PULL_ALLOC(ndr, r->in.data);
   13161             :                         NDR_ZERO_STRUCTP(r->in.data);
   13162             :                 }
   13163             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   13164        1218 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13165         252 :                         NDR_PULL_ALLOC(ndr, r->out.query);
   13166             :                 }
   13167        1218 :                 _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13168        1218 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
   13169        1218 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.query, r->in.level));
   13170        1218 :                 NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
   13171        1218 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
   13172        1218 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   13173             :         }
   13174        1988 :         return NDR_ERR_SUCCESS;
   13175             : }
   13176             : 
   13177         504 : _PUBLIC_ void ndr_print_netr_LogonControl2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonControl2 *r)
   13178             : {
   13179         504 :         ndr_print_struct(ndr, name, "netr_LogonControl2");
   13180         504 :         if (r == NULL) { ndr_print_null(ndr); return; }
   13181         504 :         ndr->depth++;
   13182         504 :         if (flags & NDR_SET_VALUES) {
   13183           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   13184             :         }
   13185         504 :         if (flags & NDR_IN) {
   13186           0 :                 ndr_print_struct(ndr, "in", "netr_LogonControl2");
   13187           0 :                 ndr->depth++;
   13188           0 :                 ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
   13189           0 :                 ndr->depth++;
   13190           0 :                 if (r->in.logon_server) {
   13191           0 :                         ndr_print_string(ndr, "logon_server", r->in.logon_server);
   13192             :                 }
   13193           0 :                 ndr->depth--;
   13194           0 :                 ndr_print_netr_LogonControlCode(ndr, "function_code", r->in.function_code);
   13195           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   13196           0 :                 ndr_print_ptr(ndr, "data", r->in.data);
   13197           0 :                 ndr->depth++;
   13198           0 :                 ndr_print_set_switch_value(ndr, r->in.data, r->in.function_code);
   13199           0 :                 ndr_print_netr_CONTROL_DATA_INFORMATION(ndr, "data", r->in.data);
   13200           0 :                 ndr->depth--;
   13201           0 :                 ndr->depth--;
   13202             :         }
   13203         504 :         if (flags & NDR_OUT) {
   13204         504 :                 ndr_print_struct(ndr, "out", "netr_LogonControl2");
   13205         504 :                 ndr->depth++;
   13206         504 :                 ndr_print_ptr(ndr, "query", r->out.query);
   13207         504 :                 ndr->depth++;
   13208         504 :                 ndr_print_set_switch_value(ndr, r->out.query, r->in.level);
   13209         504 :                 ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr, "query", r->out.query);
   13210         504 :                 ndr->depth--;
   13211         504 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   13212         504 :                 ndr->depth--;
   13213             :         }
   13214         504 :         ndr->depth--;
   13215             : }
   13216             : 
   13217        2437 : static enum ndr_err_code ndr_push_netr_ServerAuthenticate2(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerAuthenticate2 *r)
   13218             : {
   13219        2437 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   13220        2437 :         if (flags & NDR_IN) {
   13221        1129 :                 if (r->in.account_name == NULL) {
   13222           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13223             :                 }
   13224        1129 :                 if (r->in.computer_name == NULL) {
   13225           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13226             :                 }
   13227        1129 :                 if (r->in.credentials == NULL) {
   13228           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13229             :                 }
   13230        1129 :                 if (r->in.negotiate_flags == NULL) {
   13231           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13232             :                 }
   13233        1129 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   13234        1129 :                 if (r->in.server_name) {
   13235         573 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   13236         573 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   13237         573 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   13238         573 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   13239             :                 }
   13240        1129 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   13241        1129 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   13242        1129 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   13243        1129 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   13244        1129 :                 NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
   13245        1129 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   13246        1129 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   13247        1129 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   13248        1129 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   13249        1129 :                 NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
   13250        1129 :                 NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, *r->in.negotiate_flags));
   13251             :         }
   13252        2437 :         if (flags & NDR_OUT) {
   13253        1308 :                 if (r->out.return_credentials == NULL) {
   13254           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13255             :                 }
   13256        1308 :                 if (r->out.negotiate_flags == NULL) {
   13257           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13258             :                 }
   13259        1308 :                 NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
   13260        1308 :                 NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, *r->out.negotiate_flags));
   13261        1308 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   13262             :         }
   13263        2083 :         return NDR_ERR_SUCCESS;
   13264             : }
   13265             : 
   13266        2244 : static enum ndr_err_code ndr_pull_netr_ServerAuthenticate2(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerAuthenticate2 *r)
   13267             : {
   13268         320 :         uint32_t _ptr_server_name;
   13269        2244 :         uint32_t size_server_name_1 = 0;
   13270        2244 :         uint32_t length_server_name_1 = 0;
   13271        2244 :         uint32_t size_account_name_1 = 0;
   13272        2244 :         uint32_t length_account_name_1 = 0;
   13273        2244 :         uint32_t size_computer_name_1 = 0;
   13274        2244 :         uint32_t length_computer_name_1 = 0;
   13275        2244 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   13276        2244 :         TALLOC_CTX *_mem_save_credentials_0 = NULL;
   13277        2244 :         TALLOC_CTX *_mem_save_return_credentials_0 = NULL;
   13278        2244 :         TALLOC_CTX *_mem_save_negotiate_flags_0 = NULL;
   13279        2244 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   13280        2244 :         if (flags & NDR_IN) {
   13281        1115 :                 NDR_ZERO_STRUCT(r->out);
   13282             : 
   13283        1115 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   13284        1115 :                 if (_ptr_server_name) {
   13285         559 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   13286             :                 } else {
   13287         556 :                         r->in.server_name = NULL;
   13288             :                 }
   13289        1115 :                 if (r->in.server_name) {
   13290         559 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13291         559 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   13292         559 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   13293         559 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   13294         559 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   13295         559 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   13296         559 :                         if (length_server_name_1 > size_server_name_1) {
   13297           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   13298             :                         }
   13299         559 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   13300         559 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   13301         559 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   13302             :                 }
   13303        1115 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
   13304        1115 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
   13305        1115 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
   13306        1115 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
   13307        1115 :                 if (length_account_name_1 > size_account_name_1) {
   13308           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
   13309             :                 }
   13310        1115 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
   13311        1115 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
   13312        1115 :                 NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
   13313        1115 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   13314        1115 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   13315        1115 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   13316        1115 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   13317        1115 :                 if (length_computer_name_1 > size_computer_name_1) {
   13318           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   13319             :                 }
   13320        1115 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   13321        1115 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   13322        1115 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13323        1115 :                         NDR_PULL_ALLOC(ndr, r->in.credentials);
   13324             :                 }
   13325        1115 :                 _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13326        1115 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
   13327        1115 :                 NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
   13328        1115 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
   13329        1115 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13330        1115 :                         NDR_PULL_ALLOC(ndr, r->in.negotiate_flags);
   13331             :                 }
   13332        1115 :                 _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13333        1115 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
   13334        1115 :                 NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, r->in.negotiate_flags));
   13335        1115 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
   13336        1115 :                 NDR_PULL_ALLOC(ndr, r->out.return_credentials);
   13337        1115 :                 NDR_ZERO_STRUCTP(r->out.return_credentials);
   13338        1115 :                 NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
   13339        1115 :                 *r->out.negotiate_flags = *r->in.negotiate_flags;
   13340             :         }
   13341        2244 :         if (flags & NDR_OUT) {
   13342             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   13343             :                 if (r->in.credentials == NULL) {
   13344             :                         NDR_PULL_ALLOC(ndr, r->in.credentials);
   13345             :                         NDR_ZERO_STRUCTP(r->in.credentials);
   13346             :                 }
   13347             :                 if (r->in.negotiate_flags == NULL) {
   13348             :                         NDR_PULL_ALLOC(ndr, r->in.negotiate_flags);
   13349             :                         NDR_ZERO_STRUCTP(r->in.negotiate_flags);
   13350             :                 }
   13351             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   13352        1129 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13353         193 :                         NDR_PULL_ALLOC(ndr, r->out.return_credentials);
   13354             :                 }
   13355        1129 :                 _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13356        1129 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
   13357        1129 :                 NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
   13358        1129 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
   13359        1129 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13360         193 :                         NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
   13361             :                 }
   13362        1129 :                 _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13363        1129 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
   13364        1129 :                 NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, r->out.negotiate_flags));
   13365        1129 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
   13366        1129 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   13367             :         }
   13368        1924 :         return NDR_ERR_SUCCESS;
   13369             : }
   13370             : 
   13371         386 : _PUBLIC_ void ndr_print_netr_ServerAuthenticate2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerAuthenticate2 *r)
   13372             : {
   13373         386 :         ndr_print_struct(ndr, name, "netr_ServerAuthenticate2");
   13374         386 :         if (r == NULL) { ndr_print_null(ndr); return; }
   13375         386 :         ndr->depth++;
   13376         386 :         if (flags & NDR_SET_VALUES) {
   13377           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   13378             :         }
   13379         386 :         if (flags & NDR_IN) {
   13380           0 :                 ndr_print_struct(ndr, "in", "netr_ServerAuthenticate2");
   13381           0 :                 ndr->depth++;
   13382           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   13383           0 :                 ndr->depth++;
   13384           0 :                 if (r->in.server_name) {
   13385           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   13386             :                 }
   13387           0 :                 ndr->depth--;
   13388           0 :                 ndr_print_ptr(ndr, "account_name", r->in.account_name);
   13389           0 :                 ndr->depth++;
   13390           0 :                 ndr_print_string(ndr, "account_name", r->in.account_name);
   13391           0 :                 ndr->depth--;
   13392           0 :                 ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
   13393           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   13394           0 :                 ndr->depth++;
   13395           0 :                 ndr_print_string(ndr, "computer_name", r->in.computer_name);
   13396           0 :                 ndr->depth--;
   13397           0 :                 ndr_print_ptr(ndr, "credentials", r->in.credentials);
   13398           0 :                 ndr->depth++;
   13399           0 :                 ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
   13400           0 :                 ndr->depth--;
   13401           0 :                 ndr_print_ptr(ndr, "negotiate_flags", r->in.negotiate_flags);
   13402           0 :                 ndr->depth++;
   13403           0 :                 ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", *r->in.negotiate_flags);
   13404           0 :                 ndr->depth--;
   13405           0 :                 ndr->depth--;
   13406             :         }
   13407         386 :         if (flags & NDR_OUT) {
   13408         386 :                 ndr_print_struct(ndr, "out", "netr_ServerAuthenticate2");
   13409         386 :                 ndr->depth++;
   13410         386 :                 ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
   13411         386 :                 ndr->depth++;
   13412         386 :                 ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
   13413         386 :                 ndr->depth--;
   13414         386 :                 ndr_print_ptr(ndr, "negotiate_flags", r->out.negotiate_flags);
   13415         386 :                 ndr->depth++;
   13416         386 :                 ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", *r->out.negotiate_flags);
   13417         386 :                 ndr->depth--;
   13418         386 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   13419         386 :                 ndr->depth--;
   13420             :         }
   13421         386 :         ndr->depth--;
   13422             : }
   13423             : 
   13424          27 : static enum ndr_err_code ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DatabaseSync2 *r)
   13425             : {
   13426          27 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   13427          27 :         if (flags & NDR_IN) {
   13428          12 :                 if (r->in.logon_server == NULL) {
   13429           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13430             :                 }
   13431          12 :                 if (r->in.computername == NULL) {
   13432           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13433             :                 }
   13434          12 :                 if (r->in.credential == NULL) {
   13435           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13436             :                 }
   13437          12 :                 if (r->in.return_authenticator == NULL) {
   13438           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13439             :                 }
   13440          12 :                 if (r->in.sync_context == NULL) {
   13441           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13442             :                 }
   13443          12 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   13444          12 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   13445          12 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   13446          12 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   13447          12 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
   13448          12 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   13449          12 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
   13450          12 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   13451          12 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   13452          12 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   13453          12 :                 NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->in.database_id));
   13454          12 :                 NDR_CHECK(ndr_push_SyncStateEnum(ndr, NDR_SCALARS, r->in.restart_state));
   13455          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.sync_context));
   13456          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.preferredmaximumlength));
   13457             :         }
   13458          27 :         if (flags & NDR_OUT) {
   13459          15 :                 if (r->out.return_authenticator == NULL) {
   13460           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13461             :                 }
   13462          15 :                 if (r->out.sync_context == NULL) {
   13463           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13464             :                 }
   13465          15 :                 if (r->out.delta_enum_array == NULL) {
   13466           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13467             :                 }
   13468          15 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   13469          15 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sync_context));
   13470          15 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
   13471          15 :                 if (*r->out.delta_enum_array) {
   13472           0 :                         NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
   13473             :                 }
   13474          15 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   13475             :         }
   13476          27 :         return NDR_ERR_SUCCESS;
   13477             : }
   13478             : 
   13479          24 : static enum ndr_err_code ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DatabaseSync2 *r)
   13480             : {
   13481          24 :         uint32_t size_logon_server_1 = 0;
   13482          24 :         uint32_t length_logon_server_1 = 0;
   13483          24 :         uint32_t size_computername_1 = 0;
   13484          24 :         uint32_t length_computername_1 = 0;
   13485           0 :         uint32_t _ptr_delta_enum_array;
   13486          24 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   13487          24 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   13488          24 :         TALLOC_CTX *_mem_save_sync_context_0 = NULL;
   13489          24 :         TALLOC_CTX *_mem_save_delta_enum_array_0 = NULL;
   13490          24 :         TALLOC_CTX *_mem_save_delta_enum_array_1 = NULL;
   13491          24 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   13492          24 :         if (flags & NDR_IN) {
   13493          12 :                 NDR_ZERO_STRUCT(r->out);
   13494             : 
   13495          12 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
   13496          12 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
   13497          12 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
   13498          12 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
   13499          12 :                 if (length_logon_server_1 > size_logon_server_1) {
   13500           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
   13501             :                 }
   13502          12 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
   13503          12 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
   13504          12 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
   13505          12 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
   13506          12 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
   13507          12 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
   13508          12 :                 if (length_computername_1 > size_computername_1) {
   13509           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computername_1, length_computername_1);
   13510             :                 }
   13511          12 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
   13512          12 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
   13513          12 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13514          12 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   13515             :                 }
   13516          12 :                 _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13517          12 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
   13518          12 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   13519          12 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
   13520          12 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13521          12 :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   13522             :                 }
   13523          12 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13524          12 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   13525          12 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   13526          12 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   13527          12 :                 NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->in.database_id));
   13528          12 :                 NDR_CHECK(ndr_pull_SyncStateEnum(ndr, NDR_SCALARS, &r->in.restart_state));
   13529          12 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13530          12 :                         NDR_PULL_ALLOC(ndr, r->in.sync_context);
   13531             :                 }
   13532          12 :                 _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13533          12 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.sync_context, LIBNDR_FLAG_REF_ALLOC);
   13534          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.sync_context));
   13535          12 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
   13536          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.preferredmaximumlength));
   13537          12 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   13538          12 :                 *r->out.return_authenticator = *r->in.return_authenticator;
   13539          12 :                 NDR_PULL_ALLOC(ndr, r->out.sync_context);
   13540          12 :                 *r->out.sync_context = *r->in.sync_context;
   13541          12 :                 NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
   13542          12 :                 NDR_ZERO_STRUCTP(r->out.delta_enum_array);
   13543             :         }
   13544          24 :         if (flags & NDR_OUT) {
   13545             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   13546             :                 if (r->in.credential == NULL) {
   13547             :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   13548             :                         NDR_ZERO_STRUCTP(r->in.credential);
   13549             :                 }
   13550             :                 if (r->in.return_authenticator == NULL) {
   13551             :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   13552             :                         NDR_ZERO_STRUCTP(r->in.return_authenticator);
   13553             :                 }
   13554             :                 if (r->in.sync_context == NULL) {
   13555             :                         NDR_PULL_ALLOC(ndr, r->in.sync_context);
   13556             :                         NDR_ZERO_STRUCTP(r->in.sync_context);
   13557             :                 }
   13558             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   13559          12 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13560           3 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   13561             :                 }
   13562          12 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13563          12 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   13564          12 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   13565          12 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   13566          12 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13567           3 :                         NDR_PULL_ALLOC(ndr, r->out.sync_context);
   13568             :                 }
   13569          12 :                 _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13570          12 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sync_context, LIBNDR_FLAG_REF_ALLOC);
   13571          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sync_context));
   13572          12 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
   13573          12 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13574           3 :                         NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
   13575             :                 }
   13576          12 :                 _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13577          12 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
   13578          12 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
   13579          12 :                 if (_ptr_delta_enum_array) {
   13580           0 :                         NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
   13581             :                 } else {
   13582          12 :                         *r->out.delta_enum_array = NULL;
   13583             :                 }
   13584          12 :                 if (*r->out.delta_enum_array) {
   13585           0 :                         _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
   13586           0 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
   13587           0 :                         NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
   13588           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
   13589             :                 }
   13590          12 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
   13591          12 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   13592             :         }
   13593          24 :         return NDR_ERR_SUCCESS;
   13594             : }
   13595             : 
   13596           6 : _PUBLIC_ void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DatabaseSync2 *r)
   13597             : {
   13598           6 :         ndr_print_struct(ndr, name, "netr_DatabaseSync2");
   13599           6 :         if (r == NULL) { ndr_print_null(ndr); return; }
   13600           6 :         ndr->depth++;
   13601           6 :         if (flags & NDR_SET_VALUES) {
   13602           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   13603             :         }
   13604           6 :         if (flags & NDR_IN) {
   13605           0 :                 ndr_print_struct(ndr, "in", "netr_DatabaseSync2");
   13606           0 :                 ndr->depth++;
   13607           0 :                 ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
   13608           0 :                 ndr->depth++;
   13609           0 :                 ndr_print_string(ndr, "logon_server", r->in.logon_server);
   13610           0 :                 ndr->depth--;
   13611           0 :                 ndr_print_ptr(ndr, "computername", r->in.computername);
   13612           0 :                 ndr->depth++;
   13613           0 :                 ndr_print_string(ndr, "computername", r->in.computername);
   13614           0 :                 ndr->depth--;
   13615           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   13616           0 :                 ndr->depth++;
   13617           0 :                 ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   13618           0 :                 ndr->depth--;
   13619           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
   13620           0 :                 ndr->depth++;
   13621           0 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
   13622           0 :                 ndr->depth--;
   13623           0 :                 ndr_print_netr_SamDatabaseID(ndr, "database_id", r->in.database_id);
   13624           0 :                 ndr_print_SyncStateEnum(ndr, "restart_state", r->in.restart_state);
   13625           0 :                 ndr_print_ptr(ndr, "sync_context", r->in.sync_context);
   13626           0 :                 ndr->depth++;
   13627           0 :                 ndr_print_uint32(ndr, "sync_context", *r->in.sync_context);
   13628           0 :                 ndr->depth--;
   13629           0 :                 ndr_print_uint32(ndr, "preferredmaximumlength", r->in.preferredmaximumlength);
   13630           0 :                 ndr->depth--;
   13631             :         }
   13632           6 :         if (flags & NDR_OUT) {
   13633           6 :                 ndr_print_struct(ndr, "out", "netr_DatabaseSync2");
   13634           6 :                 ndr->depth++;
   13635           6 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   13636           6 :                 ndr->depth++;
   13637           6 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   13638           6 :                 ndr->depth--;
   13639           6 :                 ndr_print_ptr(ndr, "sync_context", r->out.sync_context);
   13640           6 :                 ndr->depth++;
   13641           6 :                 ndr_print_uint32(ndr, "sync_context", *r->out.sync_context);
   13642           6 :                 ndr->depth--;
   13643           6 :                 ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
   13644           6 :                 ndr->depth++;
   13645           6 :                 ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
   13646           6 :                 ndr->depth++;
   13647           6 :                 if (*r->out.delta_enum_array) {
   13648           0 :                         ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
   13649             :                 }
   13650           6 :                 ndr->depth--;
   13651           6 :                 ndr->depth--;
   13652           6 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   13653           6 :                 ndr->depth--;
   13654             :         }
   13655           6 :         ndr->depth--;
   13656             : }
   13657             : 
   13658          24 : static enum ndr_err_code ndr_push_netr_DatabaseRedo(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DatabaseRedo *r)
   13659             : {
   13660          24 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   13661          24 :         if (flags & NDR_IN) {
   13662          24 :                 if (r->in.logon_server == NULL) {
   13663           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13664             :                 }
   13665          24 :                 if (r->in.computername == NULL) {
   13666           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13667             :                 }
   13668          24 :                 if (r->in.credential == NULL) {
   13669           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13670             :                 }
   13671          24 :                 if (r->in.return_authenticator == NULL) {
   13672           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13673             :                 }
   13674          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   13675          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   13676          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   13677          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   13678          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
   13679          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   13680          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
   13681          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   13682          24 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   13683          24 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   13684             :                 {
   13685           4 :                         struct ndr_push *_ndr_change_log_entry;
   13686          24 :                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_change_log_entry, 4, -1));
   13687          24 :                         NDR_CHECK(ndr_push_netr_ChangeLogEntry(_ndr_change_log_entry, NDR_SCALARS|NDR_BUFFERS, &r->in.change_log_entry));
   13688          24 :                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_change_log_entry, 4, -1));
   13689             :                 }
   13690          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->flags)));
   13691             :         }
   13692          24 :         if (flags & NDR_OUT) {
   13693           0 :                 if (r->out.return_authenticator == NULL) {
   13694           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13695             :                 }
   13696           0 :                 if (r->out.delta_enum_array == NULL) {
   13697           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13698             :                 }
   13699           0 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   13700           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
   13701           0 :                 if (*r->out.delta_enum_array) {
   13702           0 :                         NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
   13703             :                 }
   13704           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   13705             :         }
   13706          20 :         return NDR_ERR_SUCCESS;
   13707             : }
   13708             : 
   13709          24 : static enum ndr_err_code ndr_pull_netr_DatabaseRedo(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DatabaseRedo *r)
   13710             : {
   13711          24 :         uint32_t size_logon_server_1 = 0;
   13712          24 :         uint32_t length_logon_server_1 = 0;
   13713          24 :         uint32_t size_computername_1 = 0;
   13714          24 :         uint32_t length_computername_1 = 0;
   13715           4 :         uint32_t _ptr_delta_enum_array;
   13716          24 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   13717          24 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   13718          24 :         TALLOC_CTX *_mem_save_delta_enum_array_0 = NULL;
   13719          24 :         TALLOC_CTX *_mem_save_delta_enum_array_1 = NULL;
   13720          24 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   13721          24 :         if (flags & NDR_IN) {
   13722          24 :                 NDR_ZERO_STRUCT(r->out);
   13723             : 
   13724          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
   13725          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
   13726          24 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
   13727          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
   13728          24 :                 if (length_logon_server_1 > size_logon_server_1) {
   13729           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
   13730             :                 }
   13731          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
   13732          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
   13733          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
   13734          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
   13735          24 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computername, &size_computername_1));
   13736          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computername, &length_computername_1));
   13737          24 :                 if (length_computername_1 > size_computername_1) {
   13738           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computername_1, length_computername_1);
   13739             :                 }
   13740          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computername_1, sizeof(uint16_t)));
   13741          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, length_computername_1, sizeof(uint16_t), CH_UTF16));
   13742          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13743          24 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   13744             :                 }
   13745          24 :                 _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13746          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
   13747          24 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   13748          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
   13749          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13750          24 :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   13751             :                 }
   13752          24 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13753          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   13754          24 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   13755          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   13756             :                 {
   13757           4 :                         struct ndr_pull *_ndr_change_log_entry;
   13758          24 :                         ssize_t sub_size = -1;
   13759          24 :                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_change_log_entry, 4, sub_size));
   13760          24 :                         NDR_CHECK(ndr_pull_netr_ChangeLogEntry(_ndr_change_log_entry, NDR_SCALARS|NDR_BUFFERS, &r->in.change_log_entry));
   13761          24 :                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_change_log_entry, 4, sub_size));
   13762             :                 }
   13763          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.change_log_entry_size));
   13764          24 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   13765          24 :                 *r->out.return_authenticator = *r->in.return_authenticator;
   13766          24 :                 NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
   13767          24 :                 NDR_ZERO_STRUCTP(r->out.delta_enum_array);
   13768             :         }
   13769          24 :         if (flags & NDR_OUT) {
   13770             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   13771             :                 if (r->in.credential == NULL) {
   13772             :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   13773             :                         NDR_ZERO_STRUCTP(r->in.credential);
   13774             :                 }
   13775             :                 if (r->in.return_authenticator == NULL) {
   13776             :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   13777             :                         NDR_ZERO_STRUCTP(r->in.return_authenticator);
   13778             :                 }
   13779             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   13780           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13781           0 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   13782             :                 }
   13783           0 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13784           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   13785           0 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   13786           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   13787           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13788           0 :                         NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
   13789             :                 }
   13790           0 :                 _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13791           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
   13792           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
   13793           0 :                 if (_ptr_delta_enum_array) {
   13794           0 :                         NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
   13795             :                 } else {
   13796           0 :                         *r->out.delta_enum_array = NULL;
   13797             :                 }
   13798           0 :                 if (*r->out.delta_enum_array) {
   13799           0 :                         _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
   13800           0 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
   13801           0 :                         NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
   13802           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
   13803             :                 }
   13804           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
   13805           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   13806             :         }
   13807          20 :         return NDR_ERR_SUCCESS;
   13808             : }
   13809             : 
   13810           0 : _PUBLIC_ void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DatabaseRedo *r)
   13811             : {
   13812           0 :         ndr_print_struct(ndr, name, "netr_DatabaseRedo");
   13813           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   13814           0 :         ndr->depth++;
   13815           0 :         if (flags & NDR_SET_VALUES) {
   13816           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   13817             :         }
   13818           0 :         if (flags & NDR_IN) {
   13819           0 :                 ndr_print_struct(ndr, "in", "netr_DatabaseRedo");
   13820           0 :                 ndr->depth++;
   13821           0 :                 ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
   13822           0 :                 ndr->depth++;
   13823           0 :                 ndr_print_string(ndr, "logon_server", r->in.logon_server);
   13824           0 :                 ndr->depth--;
   13825           0 :                 ndr_print_ptr(ndr, "computername", r->in.computername);
   13826           0 :                 ndr->depth++;
   13827           0 :                 ndr_print_string(ndr, "computername", r->in.computername);
   13828           0 :                 ndr->depth--;
   13829           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   13830           0 :                 ndr->depth++;
   13831           0 :                 ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   13832           0 :                 ndr->depth--;
   13833           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
   13834           0 :                 ndr->depth++;
   13835           0 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
   13836           0 :                 ndr->depth--;
   13837           0 :                 ndr_print_netr_ChangeLogEntry(ndr, "change_log_entry", &r->in.change_log_entry);
   13838           0 :                 ndr_print_uint32(ndr, "change_log_entry_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->flags):r->in.change_log_entry_size);
   13839           0 :                 ndr->depth--;
   13840             :         }
   13841           0 :         if (flags & NDR_OUT) {
   13842           0 :                 ndr_print_struct(ndr, "out", "netr_DatabaseRedo");
   13843           0 :                 ndr->depth++;
   13844           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   13845           0 :                 ndr->depth++;
   13846           0 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   13847           0 :                 ndr->depth--;
   13848           0 :                 ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
   13849           0 :                 ndr->depth++;
   13850           0 :                 ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
   13851           0 :                 ndr->depth++;
   13852           0 :                 if (*r->out.delta_enum_array) {
   13853           0 :                         ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
   13854             :                 }
   13855           0 :                 ndr->depth--;
   13856           0 :                 ndr->depth--;
   13857           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   13858           0 :                 ndr->depth--;
   13859             :         }
   13860           0 :         ndr->depth--;
   13861             : }
   13862             : 
   13863        2822 : static enum ndr_err_code ndr_push_netr_LogonControl2Ex(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonControl2Ex *r)
   13864             : {
   13865        2822 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   13866        2822 :         if (flags & NDR_IN) {
   13867        1299 :                 if (r->in.data == NULL) {
   13868           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13869             :                 }
   13870        1299 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
   13871        1299 :                 if (r->in.logon_server) {
   13872        1299 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   13873        1299 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   13874        1299 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
   13875        1299 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   13876             :                 }
   13877        1299 :                 NDR_CHECK(ndr_push_netr_LogonControlCode(ndr, NDR_SCALARS, r->in.function_code));
   13878        1299 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   13879        1299 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.data, r->in.function_code));
   13880        1299 :                 NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data));
   13881             :         }
   13882        2822 :         if (flags & NDR_OUT) {
   13883        1523 :                 if (r->out.query == NULL) {
   13884           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   13885             :                 }
   13886        1523 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.query, r->in.level));
   13887        1523 :                 NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
   13888        1523 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   13889             :         }
   13890        2360 :         return NDR_ERR_SUCCESS;
   13891             : }
   13892             : 
   13893        2570 : static enum ndr_err_code ndr_pull_netr_LogonControl2Ex(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonControl2Ex *r)
   13894             : {
   13895         420 :         uint32_t _ptr_logon_server;
   13896        2570 :         uint32_t size_logon_server_1 = 0;
   13897        2570 :         uint32_t length_logon_server_1 = 0;
   13898        2570 :         TALLOC_CTX *_mem_save_logon_server_0 = NULL;
   13899        2570 :         TALLOC_CTX *_mem_save_data_0 = NULL;
   13900        2570 :         TALLOC_CTX *_mem_save_query_0 = NULL;
   13901        2570 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   13902        2570 :         if (flags & NDR_IN) {
   13903        1271 :                 NDR_ZERO_STRUCT(r->out);
   13904             : 
   13905        1271 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
   13906        1271 :                 if (_ptr_logon_server) {
   13907        1271 :                         NDR_PULL_ALLOC(ndr, r->in.logon_server);
   13908             :                 } else {
   13909           0 :                         r->in.logon_server = NULL;
   13910             :                 }
   13911        1271 :                 if (r->in.logon_server) {
   13912        1271 :                         _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13913        1271 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
   13914        1271 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
   13915        1271 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
   13916        1271 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.logon_server, &size_logon_server_1));
   13917        1271 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.logon_server, &length_logon_server_1));
   13918        1271 :                         if (length_logon_server_1 > size_logon_server_1) {
   13919           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_logon_server_1, length_logon_server_1);
   13920             :                         }
   13921        1271 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_logon_server_1, sizeof(uint16_t)));
   13922        1271 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, length_logon_server_1, sizeof(uint16_t), CH_UTF16));
   13923        1271 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
   13924             :                 }
   13925        1271 :                 NDR_CHECK(ndr_pull_netr_LogonControlCode(ndr, NDR_SCALARS, &r->in.function_code));
   13926        1271 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   13927        1271 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13928        1271 :                         NDR_PULL_ALLOC(ndr, r->in.data);
   13929             :                 }
   13930        1271 :                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13931        1271 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
   13932        1271 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.data, r->in.function_code));
   13933        1271 :                 NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data));
   13934        1271 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
   13935        1271 :                 NDR_PULL_ALLOC(ndr, r->out.query);
   13936        1271 :                 NDR_ZERO_STRUCTP(r->out.query);
   13937             :         }
   13938        2570 :         if (flags & NDR_OUT) {
   13939             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   13940             :                 if (r->in.data == NULL) {
   13941             :                         NDR_PULL_ALLOC(ndr, r->in.data);
   13942             :                         NDR_ZERO_STRUCTP(r->in.data);
   13943             :                 }
   13944             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   13945        1299 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   13946         333 :                         NDR_PULL_ALLOC(ndr, r->out.query);
   13947             :                 }
   13948        1299 :                 _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13949        1299 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
   13950        1299 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.query, r->in.level));
   13951        1299 :                 NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
   13952        1299 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
   13953        1299 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   13954             :         }
   13955        2150 :         return NDR_ERR_SUCCESS;
   13956             : }
   13957             : 
   13958         504 : _PUBLIC_ void ndr_print_netr_LogonControl2Ex(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonControl2Ex *r)
   13959             : {
   13960         504 :         ndr_print_struct(ndr, name, "netr_LogonControl2Ex");
   13961         504 :         if (r == NULL) { ndr_print_null(ndr); return; }
   13962         504 :         ndr->depth++;
   13963         504 :         if (flags & NDR_SET_VALUES) {
   13964           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   13965             :         }
   13966         504 :         if (flags & NDR_IN) {
   13967           0 :                 ndr_print_struct(ndr, "in", "netr_LogonControl2Ex");
   13968           0 :                 ndr->depth++;
   13969           0 :                 ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
   13970           0 :                 ndr->depth++;
   13971           0 :                 if (r->in.logon_server) {
   13972           0 :                         ndr_print_string(ndr, "logon_server", r->in.logon_server);
   13973             :                 }
   13974           0 :                 ndr->depth--;
   13975           0 :                 ndr_print_netr_LogonControlCode(ndr, "function_code", r->in.function_code);
   13976           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   13977           0 :                 ndr_print_ptr(ndr, "data", r->in.data);
   13978           0 :                 ndr->depth++;
   13979           0 :                 ndr_print_set_switch_value(ndr, r->in.data, r->in.function_code);
   13980           0 :                 ndr_print_netr_CONTROL_DATA_INFORMATION(ndr, "data", r->in.data);
   13981           0 :                 ndr->depth--;
   13982           0 :                 ndr->depth--;
   13983             :         }
   13984         504 :         if (flags & NDR_OUT) {
   13985         504 :                 ndr_print_struct(ndr, "out", "netr_LogonControl2Ex");
   13986         504 :                 ndr->depth++;
   13987         504 :                 ndr_print_ptr(ndr, "query", r->out.query);
   13988         504 :                 ndr->depth++;
   13989         504 :                 ndr_print_set_switch_value(ndr, r->out.query, r->in.level);
   13990         504 :                 ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr, "query", r->out.query);
   13991         504 :                 ndr->depth--;
   13992         504 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   13993         504 :                 ndr->depth--;
   13994             :         }
   13995         504 :         ndr->depth--;
   13996             : }
   13997             : 
   13998          28 : static enum ndr_err_code ndr_push_netr_NetrEnumerateTrustedDomains(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_NetrEnumerateTrustedDomains *r)
   13999             : {
   14000          28 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   14001          28 :         if (flags & NDR_IN) {
   14002          28 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   14003          28 :                 if (r->in.server_name) {
   14004          28 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   14005          28 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   14006          28 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   14007          28 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   14008             :                 }
   14009             :         }
   14010          28 :         if (flags & NDR_OUT) {
   14011           0 :                 if (r->out.trusted_domains_blob == NULL) {
   14012           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14013             :                 }
   14014           0 :                 NDR_CHECK(ndr_push_netr_Blob(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusted_domains_blob));
   14015           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   14016             :         }
   14017          24 :         return NDR_ERR_SUCCESS;
   14018             : }
   14019             : 
   14020          28 : static enum ndr_err_code ndr_pull_netr_NetrEnumerateTrustedDomains(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_NetrEnumerateTrustedDomains *r)
   14021             : {
   14022           4 :         uint32_t _ptr_server_name;
   14023          28 :         uint32_t size_server_name_1 = 0;
   14024          28 :         uint32_t length_server_name_1 = 0;
   14025          28 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   14026          28 :         TALLOC_CTX *_mem_save_trusted_domains_blob_0 = NULL;
   14027          28 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   14028          28 :         if (flags & NDR_IN) {
   14029          28 :                 NDR_ZERO_STRUCT(r->out);
   14030             : 
   14031          28 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   14032          28 :                 if (_ptr_server_name) {
   14033          28 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   14034             :                 } else {
   14035           0 :                         r->in.server_name = NULL;
   14036             :                 }
   14037          28 :                 if (r->in.server_name) {
   14038          28 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14039          28 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   14040          28 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   14041          28 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   14042          28 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   14043          28 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   14044          28 :                         if (length_server_name_1 > size_server_name_1) {
   14045           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   14046             :                         }
   14047          28 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   14048          28 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   14049          28 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   14050             :                 }
   14051          28 :                 NDR_PULL_ALLOC(ndr, r->out.trusted_domains_blob);
   14052          28 :                 NDR_ZERO_STRUCTP(r->out.trusted_domains_blob);
   14053             :         }
   14054          28 :         if (flags & NDR_OUT) {
   14055             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   14056             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   14057           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   14058           0 :                         NDR_PULL_ALLOC(ndr, r->out.trusted_domains_blob);
   14059             :                 }
   14060           0 :                 _mem_save_trusted_domains_blob_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14061           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.trusted_domains_blob, LIBNDR_FLAG_REF_ALLOC);
   14062           0 :                 NDR_CHECK(ndr_pull_netr_Blob(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusted_domains_blob));
   14063           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domains_blob_0, LIBNDR_FLAG_REF_ALLOC);
   14064           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   14065             :         }
   14066          24 :         return NDR_ERR_SUCCESS;
   14067             : }
   14068             : 
   14069           0 : _PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomains(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_NetrEnumerateTrustedDomains *r)
   14070             : {
   14071           0 :         ndr_print_struct(ndr, name, "netr_NetrEnumerateTrustedDomains");
   14072           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   14073           0 :         ndr->depth++;
   14074           0 :         if (flags & NDR_SET_VALUES) {
   14075           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   14076             :         }
   14077           0 :         if (flags & NDR_IN) {
   14078           0 :                 ndr_print_struct(ndr, "in", "netr_NetrEnumerateTrustedDomains");
   14079           0 :                 ndr->depth++;
   14080           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   14081           0 :                 ndr->depth++;
   14082           0 :                 if (r->in.server_name) {
   14083           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   14084             :                 }
   14085           0 :                 ndr->depth--;
   14086           0 :                 ndr->depth--;
   14087             :         }
   14088           0 :         if (flags & NDR_OUT) {
   14089           0 :                 ndr_print_struct(ndr, "out", "netr_NetrEnumerateTrustedDomains");
   14090           0 :                 ndr->depth++;
   14091           0 :                 ndr_print_ptr(ndr, "trusted_domains_blob", r->out.trusted_domains_blob);
   14092           0 :                 ndr->depth++;
   14093           0 :                 ndr_print_netr_Blob(ndr, "trusted_domains_blob", r->out.trusted_domains_blob);
   14094           0 :                 ndr->depth--;
   14095           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   14096           0 :                 ndr->depth--;
   14097             :         }
   14098           0 :         ndr->depth--;
   14099             : }
   14100             : 
   14101         134 : static enum ndr_err_code ndr_push_netr_DsRGetDCName(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsRGetDCName *r)
   14102             : {
   14103         134 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   14104         134 :         if (flags & NDR_IN) {
   14105          48 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
   14106          48 :                 if (r->in.server_unc) {
   14107          48 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
   14108          48 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   14109          48 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
   14110          48 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   14111             :                 }
   14112          48 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
   14113          48 :                 if (r->in.domain_name) {
   14114          48 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
   14115          48 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   14116          48 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
   14117          48 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   14118             :                 }
   14119          48 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
   14120          48 :                 if (r->in.domain_guid) {
   14121           0 :                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
   14122             :                 }
   14123          48 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_guid));
   14124          48 :                 if (r->in.site_guid) {
   14125           0 :                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.site_guid));
   14126             :                 }
   14127          56 :                 NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, r->in.flags));
   14128             :         }
   14129         134 :         if (flags & NDR_OUT) {
   14130          86 :                 if (r->out.info == NULL) {
   14131           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14132             :                 }
   14133          86 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
   14134          86 :                 if (*r->out.info) {
   14135          86 :                         NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
   14136             :                 }
   14137          86 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   14138             :         }
   14139         116 :         return NDR_ERR_SUCCESS;
   14140             : }
   14141             : 
   14142         122 : static enum ndr_err_code ndr_pull_netr_DsRGetDCName(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsRGetDCName *r)
   14143             : {
   14144          16 :         uint32_t _ptr_server_unc;
   14145         122 :         uint32_t size_server_unc_1 = 0;
   14146         122 :         uint32_t length_server_unc_1 = 0;
   14147          16 :         uint32_t _ptr_domain_name;
   14148         122 :         uint32_t size_domain_name_1 = 0;
   14149         122 :         uint32_t length_domain_name_1 = 0;
   14150          16 :         uint32_t _ptr_domain_guid;
   14151          16 :         uint32_t _ptr_site_guid;
   14152          16 :         uint32_t _ptr_info;
   14153         122 :         TALLOC_CTX *_mem_save_server_unc_0 = NULL;
   14154         122 :         TALLOC_CTX *_mem_save_domain_name_0 = NULL;
   14155         122 :         TALLOC_CTX *_mem_save_domain_guid_0 = NULL;
   14156         122 :         TALLOC_CTX *_mem_save_site_guid_0 = NULL;
   14157         122 :         TALLOC_CTX *_mem_save_info_0 = NULL;
   14158         122 :         TALLOC_CTX *_mem_save_info_1 = NULL;
   14159         122 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   14160         122 :         if (flags & NDR_IN) {
   14161          74 :                 NDR_ZERO_STRUCT(r->out);
   14162             : 
   14163          74 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
   14164          74 :                 if (_ptr_server_unc) {
   14165          74 :                         NDR_PULL_ALLOC(ndr, r->in.server_unc);
   14166             :                 } else {
   14167           0 :                         r->in.server_unc = NULL;
   14168             :                 }
   14169          74 :                 if (r->in.server_unc) {
   14170          74 :                         _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14171          74 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
   14172          74 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
   14173          74 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
   14174          74 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_unc, &size_server_unc_1));
   14175          74 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_unc, &length_server_unc_1));
   14176          74 :                         if (length_server_unc_1 > size_server_unc_1) {
   14177           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_unc_1, length_server_unc_1);
   14178             :                         }
   14179          74 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
   14180          74 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
   14181          74 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
   14182             :                 }
   14183          74 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
   14184          74 :                 if (_ptr_domain_name) {
   14185          74 :                         NDR_PULL_ALLOC(ndr, r->in.domain_name);
   14186             :                 } else {
   14187           0 :                         r->in.domain_name = NULL;
   14188             :                 }
   14189          74 :                 if (r->in.domain_name) {
   14190          74 :                         _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14191          74 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
   14192          74 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
   14193          74 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
   14194          74 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
   14195          74 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
   14196          74 :                         if (length_domain_name_1 > size_domain_name_1) {
   14197           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
   14198             :                         }
   14199          74 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
   14200          74 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
   14201          74 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
   14202             :                 }
   14203          74 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
   14204          74 :                 if (_ptr_domain_guid) {
   14205           0 :                         NDR_PULL_ALLOC(ndr, r->in.domain_guid);
   14206             :                 } else {
   14207          74 :                         r->in.domain_guid = NULL;
   14208             :                 }
   14209          74 :                 if (r->in.domain_guid) {
   14210           0 :                         _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14211           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
   14212           0 :                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
   14213           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
   14214             :                 }
   14215          74 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_guid));
   14216          74 :                 if (_ptr_site_guid) {
   14217           0 :                         NDR_PULL_ALLOC(ndr, r->in.site_guid);
   14218             :                 } else {
   14219          74 :                         r->in.site_guid = NULL;
   14220             :                 }
   14221          74 :                 if (r->in.site_guid) {
   14222           0 :                         _mem_save_site_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14223           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.site_guid, 0);
   14224           0 :                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.site_guid));
   14225           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_guid_0, 0);
   14226             :                 }
   14227          82 :                 NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, &r->in.flags));
   14228          74 :                 NDR_PULL_ALLOC(ndr, r->out.info);
   14229          74 :                 NDR_ZERO_STRUCTP(r->out.info);
   14230             :         }
   14231         122 :         if (flags & NDR_OUT) {
   14232             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   14233             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   14234          48 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   14235          12 :                         NDR_PULL_ALLOC(ndr, r->out.info);
   14236             :                 }
   14237          48 :                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14238          48 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
   14239          48 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
   14240          48 :                 if (_ptr_info) {
   14241          48 :                         NDR_PULL_ALLOC(ndr, *r->out.info);
   14242             :                 } else {
   14243           0 :                         *r->out.info = NULL;
   14244             :                 }
   14245          48 :                 if (*r->out.info) {
   14246          48 :                         _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
   14247          48 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
   14248          48 :                         NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
   14249          48 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
   14250             :                 }
   14251          48 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
   14252          48 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   14253             :         }
   14254         106 :         return NDR_ERR_SUCCESS;
   14255             : }
   14256             : 
   14257          24 : _PUBLIC_ void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsRGetDCName *r)
   14258             : {
   14259          24 :         ndr_print_struct(ndr, name, "netr_DsRGetDCName");
   14260          24 :         if (r == NULL) { ndr_print_null(ndr); return; }
   14261          24 :         ndr->depth++;
   14262          24 :         if (flags & NDR_SET_VALUES) {
   14263           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   14264             :         }
   14265          24 :         if (flags & NDR_IN) {
   14266           0 :                 ndr_print_struct(ndr, "in", "netr_DsRGetDCName");
   14267           0 :                 ndr->depth++;
   14268           0 :                 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
   14269           0 :                 ndr->depth++;
   14270           0 :                 if (r->in.server_unc) {
   14271           0 :                         ndr_print_string(ndr, "server_unc", r->in.server_unc);
   14272             :                 }
   14273           0 :                 ndr->depth--;
   14274           0 :                 ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
   14275           0 :                 ndr->depth++;
   14276           0 :                 if (r->in.domain_name) {
   14277           0 :                         ndr_print_string(ndr, "domain_name", r->in.domain_name);
   14278             :                 }
   14279           0 :                 ndr->depth--;
   14280           0 :                 ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
   14281           0 :                 ndr->depth++;
   14282           0 :                 if (r->in.domain_guid) {
   14283           0 :                         ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
   14284             :                 }
   14285           0 :                 ndr->depth--;
   14286           0 :                 ndr_print_ptr(ndr, "site_guid", r->in.site_guid);
   14287           0 :                 ndr->depth++;
   14288           0 :                 if (r->in.site_guid) {
   14289           0 :                         ndr_print_GUID(ndr, "site_guid", r->in.site_guid);
   14290             :                 }
   14291           0 :                 ndr->depth--;
   14292           0 :                 ndr_print_netr_DsRGetDCName_flags(ndr, "flags", r->in.flags);
   14293           0 :                 ndr->depth--;
   14294             :         }
   14295          24 :         if (flags & NDR_OUT) {
   14296          24 :                 ndr_print_struct(ndr, "out", "netr_DsRGetDCName");
   14297          24 :                 ndr->depth++;
   14298          24 :                 ndr_print_ptr(ndr, "info", r->out.info);
   14299          24 :                 ndr->depth++;
   14300          24 :                 ndr_print_ptr(ndr, "info", *r->out.info);
   14301          24 :                 ndr->depth++;
   14302          24 :                 if (*r->out.info) {
   14303          24 :                         ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info);
   14304             :                 }
   14305          24 :                 ndr->depth--;
   14306          24 :                 ndr->depth--;
   14307          24 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   14308          24 :                 ndr->depth--;
   14309             :         }
   14310          24 :         ndr->depth--;
   14311             : }
   14312             : 
   14313        4277 : static enum ndr_err_code ndr_push_netr_LogonGetCapabilities(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonGetCapabilities *r)
   14314             : {
   14315        4277 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   14316        4277 :         if (flags & NDR_IN) {
   14317        3086 :                 if (r->in.server_name == NULL) {
   14318           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14319             :                 }
   14320        3086 :                 if (r->in.credential == NULL) {
   14321           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14322             :                 }
   14323        3086 :                 if (r->in.return_authenticator == NULL) {
   14324           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14325             :                 }
   14326        3086 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   14327        3086 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   14328        3086 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   14329        3086 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   14330        3086 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
   14331        3086 :                 if (r->in.computer_name) {
   14332        3086 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   14333        3086 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   14334        3086 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   14335        3086 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   14336             :                 }
   14337        3086 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   14338        3086 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   14339        3086 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.query_level));
   14340             :         }
   14341        4277 :         if (flags & NDR_OUT) {
   14342        1191 :                 if (r->out.return_authenticator == NULL) {
   14343           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14344             :                 }
   14345        1191 :                 if (r->out.capabilities == NULL) {
   14346           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14347             :                 }
   14348        1191 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   14349        1191 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.capabilities, r->in.query_level));
   14350        1191 :                 NDR_CHECK(ndr_push_netr_Capabilities(ndr, NDR_SCALARS, r->out.capabilities));
   14351        1191 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   14352             :         }
   14353        3631 :         return NDR_ERR_SUCCESS;
   14354             : }
   14355             : 
   14356        4043 : static enum ndr_err_code ndr_pull_netr_LogonGetCapabilities(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonGetCapabilities *r)
   14357             : {
   14358        4043 :         uint32_t size_server_name_1 = 0;
   14359        4043 :         uint32_t length_server_name_1 = 0;
   14360         620 :         uint32_t _ptr_computer_name;
   14361        4043 :         uint32_t size_computer_name_1 = 0;
   14362        4043 :         uint32_t length_computer_name_1 = 0;
   14363        4043 :         TALLOC_CTX *_mem_save_computer_name_0 = NULL;
   14364        4043 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   14365        4043 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   14366        4043 :         TALLOC_CTX *_mem_save_capabilities_0 = NULL;
   14367        4043 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   14368        4043 :         if (flags & NDR_IN) {
   14369        3045 :                 NDR_ZERO_STRUCT(r->out);
   14370             : 
   14371        3045 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   14372        3045 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   14373        3045 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   14374        3045 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   14375        3045 :                 if (length_server_name_1 > size_server_name_1) {
   14376           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   14377             :                 }
   14378        3045 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   14379        3045 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   14380        3045 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
   14381        3045 :                 if (_ptr_computer_name) {
   14382        3045 :                         NDR_PULL_ALLOC(ndr, r->in.computer_name);
   14383             :                 } else {
   14384           0 :                         r->in.computer_name = NULL;
   14385             :                 }
   14386        3045 :                 if (r->in.computer_name) {
   14387        3045 :                         _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14388        3045 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
   14389        3045 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   14390        3045 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   14391        3045 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   14392        3045 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   14393        3045 :                         if (length_computer_name_1 > size_computer_name_1) {
   14394           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   14395             :                         }
   14396        3045 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   14397        3045 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   14398        3045 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
   14399             :                 }
   14400        3045 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   14401        3045 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   14402             :                 }
   14403        3045 :                 _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14404        3045 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
   14405        3045 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   14406        3045 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
   14407        3045 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   14408        3045 :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   14409             :                 }
   14410        3045 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14411        3045 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   14412        3045 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   14413        3045 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   14414        3045 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.query_level));
   14415        3045 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   14416        3045 :                 *r->out.return_authenticator = *r->in.return_authenticator;
   14417        3045 :                 NDR_PULL_ALLOC(ndr, r->out.capabilities);
   14418        3045 :                 NDR_ZERO_STRUCTP(r->out.capabilities);
   14419             :         }
   14420        4043 :         if (flags & NDR_OUT) {
   14421             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   14422             :                 if (r->in.credential == NULL) {
   14423             :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   14424             :                         NDR_ZERO_STRUCTP(r->in.credential);
   14425             :                 }
   14426             :                 if (r->in.return_authenticator == NULL) {
   14427             :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   14428             :                         NDR_ZERO_STRUCTP(r->in.return_authenticator);
   14429             :                 }
   14430             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   14431         998 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   14432         259 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   14433             :                 }
   14434         998 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14435         998 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   14436         998 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   14437         998 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   14438         998 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   14439         259 :                         NDR_PULL_ALLOC(ndr, r->out.capabilities);
   14440             :                 }
   14441         998 :                 _mem_save_capabilities_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14442         998 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.capabilities, LIBNDR_FLAG_REF_ALLOC);
   14443         998 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.capabilities, r->in.query_level));
   14444         998 :                 NDR_CHECK(ndr_pull_netr_Capabilities(ndr, NDR_SCALARS, r->out.capabilities));
   14445         998 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_capabilities_0, LIBNDR_FLAG_REF_ALLOC);
   14446         998 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   14447             :         }
   14448        3423 :         return NDR_ERR_SUCCESS;
   14449             : }
   14450             : 
   14451         312 : _PUBLIC_ void ndr_print_netr_LogonGetCapabilities(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonGetCapabilities *r)
   14452             : {
   14453         312 :         ndr_print_struct(ndr, name, "netr_LogonGetCapabilities");
   14454         312 :         if (r == NULL) { ndr_print_null(ndr); return; }
   14455         312 :         ndr->depth++;
   14456         312 :         if (flags & NDR_SET_VALUES) {
   14457           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   14458             :         }
   14459         312 :         if (flags & NDR_IN) {
   14460           0 :                 ndr_print_struct(ndr, "in", "netr_LogonGetCapabilities");
   14461           0 :                 ndr->depth++;
   14462           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   14463           0 :                 ndr->depth++;
   14464           0 :                 ndr_print_string(ndr, "server_name", r->in.server_name);
   14465           0 :                 ndr->depth--;
   14466           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   14467           0 :                 ndr->depth++;
   14468           0 :                 if (r->in.computer_name) {
   14469           0 :                         ndr_print_string(ndr, "computer_name", r->in.computer_name);
   14470             :                 }
   14471           0 :                 ndr->depth--;
   14472           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   14473           0 :                 ndr->depth++;
   14474           0 :                 ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   14475           0 :                 ndr->depth--;
   14476           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
   14477           0 :                 ndr->depth++;
   14478           0 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
   14479           0 :                 ndr->depth--;
   14480           0 :                 ndr_print_uint32(ndr, "query_level", r->in.query_level);
   14481           0 :                 ndr->depth--;
   14482             :         }
   14483         312 :         if (flags & NDR_OUT) {
   14484         312 :                 ndr_print_struct(ndr, "out", "netr_LogonGetCapabilities");
   14485         312 :                 ndr->depth++;
   14486         312 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   14487         312 :                 ndr->depth++;
   14488         312 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   14489         312 :                 ndr->depth--;
   14490         312 :                 ndr_print_ptr(ndr, "capabilities", r->out.capabilities);
   14491         312 :                 ndr->depth++;
   14492         312 :                 ndr_print_set_switch_value(ndr, r->out.capabilities, r->in.query_level);
   14493         312 :                 ndr_print_netr_Capabilities(ndr, "capabilities", r->out.capabilities);
   14494         312 :                 ndr->depth--;
   14495         312 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   14496         312 :                 ndr->depth--;
   14497             :         }
   14498         312 :         ndr->depth--;
   14499             : }
   14500             : 
   14501           0 : static enum ndr_err_code ndr_push_netr_NETRLOGONSETSERVICEBITS(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_NETRLOGONSETSERVICEBITS *r)
   14502             : {
   14503           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   14504           0 :         if (flags & NDR_IN) {
   14505           0 :         }
   14506           0 :         if (flags & NDR_OUT) {
   14507           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   14508             :         }
   14509           0 :         return NDR_ERR_SUCCESS;
   14510             : }
   14511             : 
   14512           0 : static enum ndr_err_code ndr_pull_netr_NETRLOGONSETSERVICEBITS(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_NETRLOGONSETSERVICEBITS *r)
   14513             : {
   14514           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   14515           0 :         if (flags & NDR_IN) {
   14516           0 :         }
   14517           0 :         if (flags & NDR_OUT) {
   14518             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   14519             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   14520           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   14521             :         }
   14522           0 :         return NDR_ERR_SUCCESS;
   14523             : }
   14524             : 
   14525           0 : _PUBLIC_ void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_NETRLOGONSETSERVICEBITS *r)
   14526             : {
   14527           0 :         ndr_print_struct(ndr, name, "netr_NETRLOGONSETSERVICEBITS");
   14528           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   14529           0 :         ndr->depth++;
   14530           0 :         if (flags & NDR_SET_VALUES) {
   14531           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   14532             :         }
   14533           0 :         if (flags & NDR_IN) {
   14534           0 :                 ndr_print_struct(ndr, "in", "netr_NETRLOGONSETSERVICEBITS");
   14535           0 :                 ndr->depth++;
   14536           0 :                 ndr->depth--;
   14537             :         }
   14538           0 :         if (flags & NDR_OUT) {
   14539           0 :                 ndr_print_struct(ndr, "out", "netr_NETRLOGONSETSERVICEBITS");
   14540           0 :                 ndr->depth++;
   14541           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   14542           0 :                 ndr->depth--;
   14543             :         }
   14544           0 :         ndr->depth--;
   14545             : }
   14546             : 
   14547           0 : static enum ndr_err_code ndr_push_netr_LogonGetTrustRid(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonGetTrustRid *r)
   14548             : {
   14549           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   14550           0 :         if (flags & NDR_IN) {
   14551           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   14552           0 :                 if (r->in.server_name) {
   14553           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   14554           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   14555           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   14556           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   14557             :                 }
   14558           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
   14559           0 :                 if (r->in.domain_name) {
   14560           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
   14561           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   14562           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
   14563           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   14564             :                 }
   14565             :         }
   14566           0 :         if (flags & NDR_OUT) {
   14567           0 :                 if (r->out.rid == NULL) {
   14568           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14569             :                 }
   14570           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
   14571           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   14572             :         }
   14573           0 :         return NDR_ERR_SUCCESS;
   14574             : }
   14575             : 
   14576           0 : static enum ndr_err_code ndr_pull_netr_LogonGetTrustRid(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonGetTrustRid *r)
   14577             : {
   14578           0 :         uint32_t _ptr_server_name;
   14579           0 :         uint32_t size_server_name_1 = 0;
   14580           0 :         uint32_t length_server_name_1 = 0;
   14581           0 :         uint32_t _ptr_domain_name;
   14582           0 :         uint32_t size_domain_name_1 = 0;
   14583           0 :         uint32_t length_domain_name_1 = 0;
   14584           0 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   14585           0 :         TALLOC_CTX *_mem_save_domain_name_0 = NULL;
   14586           0 :         TALLOC_CTX *_mem_save_rid_0 = NULL;
   14587           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   14588           0 :         if (flags & NDR_IN) {
   14589           0 :                 NDR_ZERO_STRUCT(r->out);
   14590             : 
   14591           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   14592           0 :                 if (_ptr_server_name) {
   14593           0 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   14594             :                 } else {
   14595           0 :                         r->in.server_name = NULL;
   14596             :                 }
   14597           0 :                 if (r->in.server_name) {
   14598           0 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14599           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   14600           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   14601           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   14602           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   14603           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   14604           0 :                         if (length_server_name_1 > size_server_name_1) {
   14605           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   14606             :                         }
   14607           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   14608           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   14609           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   14610             :                 }
   14611           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
   14612           0 :                 if (_ptr_domain_name) {
   14613           0 :                         NDR_PULL_ALLOC(ndr, r->in.domain_name);
   14614             :                 } else {
   14615           0 :                         r->in.domain_name = NULL;
   14616             :                 }
   14617           0 :                 if (r->in.domain_name) {
   14618           0 :                         _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14619           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
   14620           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
   14621           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
   14622           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
   14623           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
   14624           0 :                         if (length_domain_name_1 > size_domain_name_1) {
   14625           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
   14626             :                         }
   14627           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
   14628           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
   14629           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
   14630             :                 }
   14631           0 :                 NDR_PULL_ALLOC(ndr, r->out.rid);
   14632           0 :                 NDR_ZERO_STRUCTP(r->out.rid);
   14633             :         }
   14634           0 :         if (flags & NDR_OUT) {
   14635             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   14636             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   14637           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   14638           0 :                         NDR_PULL_ALLOC(ndr, r->out.rid);
   14639             :                 }
   14640           0 :                 _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14641           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
   14642           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
   14643           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
   14644           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   14645             :         }
   14646           0 :         return NDR_ERR_SUCCESS;
   14647             : }
   14648             : 
   14649           0 : _PUBLIC_ void ndr_print_netr_LogonGetTrustRid(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonGetTrustRid *r)
   14650             : {
   14651           0 :         ndr_print_struct(ndr, name, "netr_LogonGetTrustRid");
   14652           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   14653           0 :         ndr->depth++;
   14654           0 :         if (flags & NDR_SET_VALUES) {
   14655           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   14656             :         }
   14657           0 :         if (flags & NDR_IN) {
   14658           0 :                 ndr_print_struct(ndr, "in", "netr_LogonGetTrustRid");
   14659           0 :                 ndr->depth++;
   14660           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   14661           0 :                 ndr->depth++;
   14662           0 :                 if (r->in.server_name) {
   14663           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   14664             :                 }
   14665           0 :                 ndr->depth--;
   14666           0 :                 ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
   14667           0 :                 ndr->depth++;
   14668           0 :                 if (r->in.domain_name) {
   14669           0 :                         ndr_print_string(ndr, "domain_name", r->in.domain_name);
   14670             :                 }
   14671           0 :                 ndr->depth--;
   14672           0 :                 ndr->depth--;
   14673             :         }
   14674           0 :         if (flags & NDR_OUT) {
   14675           0 :                 ndr_print_struct(ndr, "out", "netr_LogonGetTrustRid");
   14676           0 :                 ndr->depth++;
   14677           0 :                 ndr_print_ptr(ndr, "rid", r->out.rid);
   14678           0 :                 ndr->depth++;
   14679           0 :                 ndr_print_uint32(ndr, "rid", *r->out.rid);
   14680           0 :                 ndr->depth--;
   14681           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   14682           0 :                 ndr->depth--;
   14683             :         }
   14684           0 :         ndr->depth--;
   14685             : }
   14686             : 
   14687           0 : static enum ndr_err_code ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
   14688             : {
   14689           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   14690           0 :         if (flags & NDR_IN) {
   14691           0 :         }
   14692           0 :         if (flags & NDR_OUT) {
   14693           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   14694             :         }
   14695           0 :         return NDR_ERR_SUCCESS;
   14696             : }
   14697             : 
   14698           0 : static enum ndr_err_code ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
   14699             : {
   14700           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   14701           0 :         if (flags & NDR_IN) {
   14702           0 :         }
   14703           0 :         if (flags & NDR_OUT) {
   14704             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   14705             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   14706           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   14707             :         }
   14708           0 :         return NDR_ERR_SUCCESS;
   14709             : }
   14710             : 
   14711           0 : _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
   14712             : {
   14713           0 :         ndr_print_struct(ndr, name, "netr_NETRLOGONCOMPUTESERVERDIGEST");
   14714           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   14715           0 :         ndr->depth++;
   14716           0 :         if (flags & NDR_SET_VALUES) {
   14717           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   14718             :         }
   14719           0 :         if (flags & NDR_IN) {
   14720           0 :                 ndr_print_struct(ndr, "in", "netr_NETRLOGONCOMPUTESERVERDIGEST");
   14721           0 :                 ndr->depth++;
   14722           0 :                 ndr->depth--;
   14723             :         }
   14724           0 :         if (flags & NDR_OUT) {
   14725           0 :                 ndr_print_struct(ndr, "out", "netr_NETRLOGONCOMPUTESERVERDIGEST");
   14726           0 :                 ndr->depth++;
   14727           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   14728           0 :                 ndr->depth--;
   14729             :         }
   14730           0 :         ndr->depth--;
   14731             : }
   14732             : 
   14733           0 : static enum ndr_err_code ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
   14734             : {
   14735           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   14736           0 :         if (flags & NDR_IN) {
   14737           0 :         }
   14738           0 :         if (flags & NDR_OUT) {
   14739           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   14740             :         }
   14741           0 :         return NDR_ERR_SUCCESS;
   14742             : }
   14743             : 
   14744           0 : static enum ndr_err_code ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
   14745             : {
   14746           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   14747           0 :         if (flags & NDR_IN) {
   14748           0 :         }
   14749           0 :         if (flags & NDR_OUT) {
   14750             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   14751             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   14752           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   14753             :         }
   14754           0 :         return NDR_ERR_SUCCESS;
   14755             : }
   14756             : 
   14757           0 : _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
   14758             : {
   14759           0 :         ndr_print_struct(ndr, name, "netr_NETRLOGONCOMPUTECLIENTDIGEST");
   14760           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   14761           0 :         ndr->depth++;
   14762           0 :         if (flags & NDR_SET_VALUES) {
   14763           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   14764             :         }
   14765           0 :         if (flags & NDR_IN) {
   14766           0 :                 ndr_print_struct(ndr, "in", "netr_NETRLOGONCOMPUTECLIENTDIGEST");
   14767           0 :                 ndr->depth++;
   14768           0 :                 ndr->depth--;
   14769             :         }
   14770           0 :         if (flags & NDR_OUT) {
   14771           0 :                 ndr_print_struct(ndr, "out", "netr_NETRLOGONCOMPUTECLIENTDIGEST");
   14772           0 :                 ndr->depth++;
   14773           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   14774           0 :                 ndr->depth--;
   14775             :         }
   14776           0 :         ndr->depth--;
   14777             : }
   14778             : 
   14779        2683 : _PUBLIC_ enum ndr_err_code ndr_push_netr_ServerAuthenticate3(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerAuthenticate3 *r)
   14780             : {
   14781        2683 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   14782        2683 :         if (flags & NDR_IN) {
   14783        1171 :                 if (r->in.account_name == NULL) {
   14784           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14785             :                 }
   14786        1171 :                 if (r->in.computer_name == NULL) {
   14787           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14788             :                 }
   14789        1171 :                 if (r->in.credentials == NULL) {
   14790           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14791             :                 }
   14792        1171 :                 if (r->in.negotiate_flags == NULL) {
   14793           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14794             :                 }
   14795        1171 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   14796        1171 :                 if (r->in.server_name) {
   14797         746 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   14798         746 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   14799         746 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   14800         746 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   14801             :                 }
   14802        1171 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   14803        1171 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   14804        1171 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   14805        1171 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   14806        1171 :                 NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
   14807        1171 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   14808        1171 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   14809        1171 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   14810        1171 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   14811        1171 :                 NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
   14812        1171 :                 NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, *r->in.negotiate_flags));
   14813             :         }
   14814        2683 :         if (flags & NDR_OUT) {
   14815        1512 :                 if (r->out.return_credentials == NULL) {
   14816           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14817             :                 }
   14818        1512 :                 if (r->out.negotiate_flags == NULL) {
   14819           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14820             :                 }
   14821        1512 :                 if (r->out.rid == NULL) {
   14822           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   14823             :                 }
   14824        1512 :                 NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
   14825        1512 :                 NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, *r->out.negotiate_flags));
   14826        1512 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
   14827        1512 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   14828             :         }
   14829        2521 :         return NDR_ERR_SUCCESS;
   14830             : }
   14831             : 
   14832        2425 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_ServerAuthenticate3(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerAuthenticate3 *r)
   14833             : {
   14834         148 :         uint32_t _ptr_server_name;
   14835        2425 :         uint32_t size_server_name_1 = 0;
   14836        2425 :         uint32_t length_server_name_1 = 0;
   14837        2425 :         uint32_t size_account_name_1 = 0;
   14838        2425 :         uint32_t length_account_name_1 = 0;
   14839        2425 :         uint32_t size_computer_name_1 = 0;
   14840        2425 :         uint32_t length_computer_name_1 = 0;
   14841        2425 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   14842        2425 :         TALLOC_CTX *_mem_save_credentials_0 = NULL;
   14843        2425 :         TALLOC_CTX *_mem_save_return_credentials_0 = NULL;
   14844        2425 :         TALLOC_CTX *_mem_save_negotiate_flags_0 = NULL;
   14845        2425 :         TALLOC_CTX *_mem_save_rid_0 = NULL;
   14846        2425 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   14847        2425 :         if (flags & NDR_IN) {
   14848        1252 :                 NDR_ZERO_STRUCT(r->out);
   14849             : 
   14850        1252 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   14851        1252 :                 if (_ptr_server_name) {
   14852         827 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   14853             :                 } else {
   14854         425 :                         r->in.server_name = NULL;
   14855             :                 }
   14856        1252 :                 if (r->in.server_name) {
   14857         827 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14858         827 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   14859         827 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   14860         827 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   14861         827 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   14862         827 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   14863         827 :                         if (length_server_name_1 > size_server_name_1) {
   14864           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   14865             :                         }
   14866         827 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   14867         827 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   14868         827 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   14869             :                 }
   14870        1252 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
   14871        1252 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
   14872        1252 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
   14873        1252 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
   14874        1252 :                 if (length_account_name_1 > size_account_name_1) {
   14875           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
   14876             :                 }
   14877        1252 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
   14878        1252 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
   14879        1252 :                 NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
   14880        1252 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   14881        1252 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   14882        1252 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   14883        1252 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   14884        1252 :                 if (length_computer_name_1 > size_computer_name_1) {
   14885           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   14886             :                 }
   14887        1252 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   14888        1252 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   14889        1252 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   14890        1252 :                         NDR_PULL_ALLOC(ndr, r->in.credentials);
   14891             :                 }
   14892        1252 :                 _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14893        1252 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
   14894        1252 :                 NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
   14895        1252 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
   14896        1252 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   14897        1252 :                         NDR_PULL_ALLOC(ndr, r->in.negotiate_flags);
   14898             :                 }
   14899        1252 :                 _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14900        1252 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
   14901        1252 :                 NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, r->in.negotiate_flags));
   14902        1252 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
   14903        1252 :                 NDR_PULL_ALLOC(ndr, r->out.return_credentials);
   14904        1252 :                 NDR_ZERO_STRUCTP(r->out.return_credentials);
   14905        1252 :                 NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
   14906        1252 :                 *r->out.negotiate_flags = *r->in.negotiate_flags;
   14907        1252 :                 NDR_PULL_ALLOC(ndr, r->out.rid);
   14908        1252 :                 NDR_ZERO_STRUCTP(r->out.rid);
   14909             :         }
   14910        2425 :         if (flags & NDR_OUT) {
   14911             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   14912             :                 if (r->in.credentials == NULL) {
   14913             :                         NDR_PULL_ALLOC(ndr, r->in.credentials);
   14914             :                         NDR_ZERO_STRUCTP(r->in.credentials);
   14915             :                 }
   14916             :                 if (r->in.negotiate_flags == NULL) {
   14917             :                         NDR_PULL_ALLOC(ndr, r->in.negotiate_flags);
   14918             :                         NDR_ZERO_STRUCTP(r->in.negotiate_flags);
   14919             :                 }
   14920             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   14921        1173 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   14922         386 :                         NDR_PULL_ALLOC(ndr, r->out.return_credentials);
   14923             :                 }
   14924        1173 :                 _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14925        1173 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
   14926        1173 :                 NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
   14927        1173 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
   14928        1173 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   14929         386 :                         NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
   14930             :                 }
   14931        1173 :                 _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14932        1173 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
   14933        1173 :                 NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, r->out.negotiate_flags));
   14934        1173 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
   14935        1173 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   14936         386 :                         NDR_PULL_ALLOC(ndr, r->out.rid);
   14937             :                 }
   14938        1173 :                 _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14939        1173 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
   14940        1173 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
   14941        1173 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
   14942        1173 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   14943             :         }
   14944        2277 :         return NDR_ERR_SUCCESS;
   14945             : }
   14946             : 
   14947         528 : _PUBLIC_ void ndr_print_netr_ServerAuthenticate3(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerAuthenticate3 *r)
   14948             : {
   14949         528 :         ndr_print_struct(ndr, name, "netr_ServerAuthenticate3");
   14950         528 :         if (r == NULL) { ndr_print_null(ndr); return; }
   14951         528 :         ndr->depth++;
   14952         528 :         if (flags & NDR_SET_VALUES) {
   14953           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   14954             :         }
   14955         528 :         if (flags & NDR_IN) {
   14956           2 :                 ndr_print_struct(ndr, "in", "netr_ServerAuthenticate3");
   14957           2 :                 ndr->depth++;
   14958           2 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   14959           2 :                 ndr->depth++;
   14960           2 :                 if (r->in.server_name) {
   14961           2 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   14962             :                 }
   14963           2 :                 ndr->depth--;
   14964           2 :                 ndr_print_ptr(ndr, "account_name", r->in.account_name);
   14965           2 :                 ndr->depth++;
   14966           2 :                 ndr_print_string(ndr, "account_name", r->in.account_name);
   14967           2 :                 ndr->depth--;
   14968           2 :                 ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
   14969           2 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   14970           2 :                 ndr->depth++;
   14971           2 :                 ndr_print_string(ndr, "computer_name", r->in.computer_name);
   14972           2 :                 ndr->depth--;
   14973           2 :                 ndr_print_ptr(ndr, "credentials", r->in.credentials);
   14974           2 :                 ndr->depth++;
   14975           2 :                 ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
   14976           2 :                 ndr->depth--;
   14977           2 :                 ndr_print_ptr(ndr, "negotiate_flags", r->in.negotiate_flags);
   14978           2 :                 ndr->depth++;
   14979           2 :                 ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", *r->in.negotiate_flags);
   14980           2 :                 ndr->depth--;
   14981           2 :                 ndr->depth--;
   14982             :         }
   14983         528 :         if (flags & NDR_OUT) {
   14984         526 :                 ndr_print_struct(ndr, "out", "netr_ServerAuthenticate3");
   14985         526 :                 ndr->depth++;
   14986         526 :                 ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
   14987         526 :                 ndr->depth++;
   14988         526 :                 ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
   14989         526 :                 ndr->depth--;
   14990         526 :                 ndr_print_ptr(ndr, "negotiate_flags", r->out.negotiate_flags);
   14991         526 :                 ndr->depth++;
   14992         526 :                 ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", *r->out.negotiate_flags);
   14993         526 :                 ndr->depth--;
   14994         526 :                 ndr_print_ptr(ndr, "rid", r->out.rid);
   14995         526 :                 ndr->depth++;
   14996         526 :                 ndr_print_uint32(ndr, "rid", *r->out.rid);
   14997         526 :                 ndr->depth--;
   14998         526 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   14999         526 :                 ndr->depth--;
   15000             :         }
   15001         528 :         ndr->depth--;
   15002             : }
   15003             : 
   15004         204 : static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsRGetDCNameEx *r)
   15005             : {
   15006         204 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15007         204 :         if (flags & NDR_IN) {
   15008          96 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
   15009          96 :                 if (r->in.server_unc) {
   15010          96 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
   15011          96 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15012          96 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
   15013          96 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15014             :                 }
   15015          96 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
   15016          96 :                 if (r->in.domain_name) {
   15017          96 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
   15018          96 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15019          96 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
   15020          96 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15021             :                 }
   15022          96 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
   15023          96 :                 if (r->in.domain_guid) {
   15024           4 :                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
   15025             :                 }
   15026          96 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name));
   15027          96 :                 if (r->in.site_name) {
   15028          16 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
   15029          16 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15030          16 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
   15031          16 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.site_name, ndr_charset_length(r->in.site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15032             :                 }
   15033         104 :                 NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, r->in.flags));
   15034             :         }
   15035         204 :         if (flags & NDR_OUT) {
   15036         108 :                 if (r->out.info == NULL) {
   15037           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15038             :                 }
   15039         108 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
   15040         108 :                 if (*r->out.info) {
   15041          96 :                         NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
   15042             :                 }
   15043         108 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   15044             :         }
   15045         186 :         return NDR_ERR_SUCCESS;
   15046             : }
   15047             : 
   15048         192 : static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsRGetDCNameEx *r)
   15049             : {
   15050          16 :         uint32_t _ptr_server_unc;
   15051         192 :         uint32_t size_server_unc_1 = 0;
   15052         192 :         uint32_t length_server_unc_1 = 0;
   15053          16 :         uint32_t _ptr_domain_name;
   15054         192 :         uint32_t size_domain_name_1 = 0;
   15055         192 :         uint32_t length_domain_name_1 = 0;
   15056          16 :         uint32_t _ptr_domain_guid;
   15057          16 :         uint32_t _ptr_site_name;
   15058         192 :         uint32_t size_site_name_1 = 0;
   15059         192 :         uint32_t length_site_name_1 = 0;
   15060          16 :         uint32_t _ptr_info;
   15061         192 :         TALLOC_CTX *_mem_save_server_unc_0 = NULL;
   15062         192 :         TALLOC_CTX *_mem_save_domain_name_0 = NULL;
   15063         192 :         TALLOC_CTX *_mem_save_domain_guid_0 = NULL;
   15064         192 :         TALLOC_CTX *_mem_save_site_name_0 = NULL;
   15065         192 :         TALLOC_CTX *_mem_save_info_0 = NULL;
   15066         192 :         TALLOC_CTX *_mem_save_info_1 = NULL;
   15067         192 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15068         192 :         if (flags & NDR_IN) {
   15069          96 :                 NDR_ZERO_STRUCT(r->out);
   15070             : 
   15071          96 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
   15072          96 :                 if (_ptr_server_unc) {
   15073          96 :                         NDR_PULL_ALLOC(ndr, r->in.server_unc);
   15074             :                 } else {
   15075           0 :                         r->in.server_unc = NULL;
   15076             :                 }
   15077          96 :                 if (r->in.server_unc) {
   15078          96 :                         _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15079          96 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
   15080          96 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
   15081          96 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
   15082          96 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_unc, &size_server_unc_1));
   15083          96 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_unc, &length_server_unc_1));
   15084          96 :                         if (length_server_unc_1 > size_server_unc_1) {
   15085           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_unc_1, length_server_unc_1);
   15086             :                         }
   15087          96 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
   15088          96 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
   15089          96 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
   15090             :                 }
   15091          96 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
   15092          96 :                 if (_ptr_domain_name) {
   15093          96 :                         NDR_PULL_ALLOC(ndr, r->in.domain_name);
   15094             :                 } else {
   15095           0 :                         r->in.domain_name = NULL;
   15096             :                 }
   15097          96 :                 if (r->in.domain_name) {
   15098          96 :                         _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15099          96 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
   15100          96 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
   15101          96 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
   15102          96 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
   15103          96 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
   15104          96 :                         if (length_domain_name_1 > size_domain_name_1) {
   15105           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
   15106             :                         }
   15107          96 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
   15108          96 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
   15109          96 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
   15110             :                 }
   15111          96 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
   15112          96 :                 if (_ptr_domain_guid) {
   15113           4 :                         NDR_PULL_ALLOC(ndr, r->in.domain_guid);
   15114             :                 } else {
   15115          92 :                         r->in.domain_guid = NULL;
   15116             :                 }
   15117          96 :                 if (r->in.domain_guid) {
   15118           4 :                         _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15119           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
   15120           4 :                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
   15121           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
   15122             :                 }
   15123          96 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
   15124          96 :                 if (_ptr_site_name) {
   15125          16 :                         NDR_PULL_ALLOC(ndr, r->in.site_name);
   15126             :                 } else {
   15127          80 :                         r->in.site_name = NULL;
   15128             :                 }
   15129          96 :                 if (r->in.site_name) {
   15130          16 :                         _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15131          16 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
   15132          16 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
   15133          16 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
   15134          16 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.site_name, &size_site_name_1));
   15135          16 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.site_name, &length_site_name_1));
   15136          16 :                         if (length_site_name_1 > size_site_name_1) {
   15137           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_name_1, length_site_name_1);
   15138             :                         }
   15139          16 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
   15140          16 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
   15141          16 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
   15142             :                 }
   15143         104 :                 NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, &r->in.flags));
   15144          96 :                 NDR_PULL_ALLOC(ndr, r->out.info);
   15145          96 :                 NDR_ZERO_STRUCTP(r->out.info);
   15146             :         }
   15147         192 :         if (flags & NDR_OUT) {
   15148             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15149             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   15150          96 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15151          60 :                         NDR_PULL_ALLOC(ndr, r->out.info);
   15152             :                 }
   15153          96 :                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15154          96 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
   15155          96 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
   15156          96 :                 if (_ptr_info) {
   15157          84 :                         NDR_PULL_ALLOC(ndr, *r->out.info);
   15158             :                 } else {
   15159          12 :                         *r->out.info = NULL;
   15160             :                 }
   15161          96 :                 if (*r->out.info) {
   15162          84 :                         _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
   15163          84 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
   15164          84 :                         NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
   15165          84 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
   15166             :                 }
   15167          96 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
   15168          96 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   15169             :         }
   15170         176 :         return NDR_ERR_SUCCESS;
   15171             : }
   15172             : 
   15173          24 : _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsRGetDCNameEx *r)
   15174             : {
   15175          24 :         ndr_print_struct(ndr, name, "netr_DsRGetDCNameEx");
   15176          24 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15177          24 :         ndr->depth++;
   15178          24 :         if (flags & NDR_SET_VALUES) {
   15179           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   15180             :         }
   15181          24 :         if (flags & NDR_IN) {
   15182           0 :                 ndr_print_struct(ndr, "in", "netr_DsRGetDCNameEx");
   15183           0 :                 ndr->depth++;
   15184           0 :                 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
   15185           0 :                 ndr->depth++;
   15186           0 :                 if (r->in.server_unc) {
   15187           0 :                         ndr_print_string(ndr, "server_unc", r->in.server_unc);
   15188             :                 }
   15189           0 :                 ndr->depth--;
   15190           0 :                 ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
   15191           0 :                 ndr->depth++;
   15192           0 :                 if (r->in.domain_name) {
   15193           0 :                         ndr_print_string(ndr, "domain_name", r->in.domain_name);
   15194             :                 }
   15195           0 :                 ndr->depth--;
   15196           0 :                 ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
   15197           0 :                 ndr->depth++;
   15198           0 :                 if (r->in.domain_guid) {
   15199           0 :                         ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
   15200             :                 }
   15201           0 :                 ndr->depth--;
   15202           0 :                 ndr_print_ptr(ndr, "site_name", r->in.site_name);
   15203           0 :                 ndr->depth++;
   15204           0 :                 if (r->in.site_name) {
   15205           0 :                         ndr_print_string(ndr, "site_name", r->in.site_name);
   15206             :                 }
   15207           0 :                 ndr->depth--;
   15208           0 :                 ndr_print_netr_DsRGetDCName_flags(ndr, "flags", r->in.flags);
   15209           0 :                 ndr->depth--;
   15210             :         }
   15211          24 :         if (flags & NDR_OUT) {
   15212          24 :                 ndr_print_struct(ndr, "out", "netr_DsRGetDCNameEx");
   15213          24 :                 ndr->depth++;
   15214          24 :                 ndr_print_ptr(ndr, "info", r->out.info);
   15215          24 :                 ndr->depth++;
   15216          24 :                 ndr_print_ptr(ndr, "info", *r->out.info);
   15217          24 :                 ndr->depth++;
   15218          24 :                 if (*r->out.info) {
   15219          24 :                         ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info);
   15220             :                 }
   15221          24 :                 ndr->depth--;
   15222          24 :                 ndr->depth--;
   15223          24 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   15224          24 :                 ndr->depth--;
   15225             :         }
   15226          24 :         ndr->depth--;
   15227             : }
   15228             : 
   15229         216 : static enum ndr_err_code ndr_push_netr_DsRGetSiteName(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsRGetSiteName *r)
   15230             : {
   15231         216 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15232         216 :         if (flags & NDR_IN) {
   15233          96 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
   15234          96 :                 if (r->in.computer_name) {
   15235          96 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   15236          96 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15237          96 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   15238          96 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15239             :                 }
   15240             :         }
   15241         216 :         if (flags & NDR_OUT) {
   15242         120 :                 if (r->out.site == NULL) {
   15243           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15244             :                 }
   15245         120 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.site));
   15246         120 :                 if (*r->out.site) {
   15247         120 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.site, CH_UTF16)));
   15248         120 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15249         120 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.site, CH_UTF16)));
   15250         120 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.site, ndr_charset_length(*r->out.site, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15251             :                 }
   15252         120 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   15253             :         }
   15254         180 :         return NDR_ERR_SUCCESS;
   15255             : }
   15256             : 
   15257         192 : static enum ndr_err_code ndr_pull_netr_DsRGetSiteName(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsRGetSiteName *r)
   15258             : {
   15259          32 :         uint32_t _ptr_computer_name;
   15260         192 :         uint32_t size_computer_name_1 = 0;
   15261         192 :         uint32_t length_computer_name_1 = 0;
   15262          32 :         uint32_t _ptr_site;
   15263         192 :         uint32_t size_site_2 = 0;
   15264         192 :         uint32_t length_site_2 = 0;
   15265         192 :         TALLOC_CTX *_mem_save_computer_name_0 = NULL;
   15266         192 :         TALLOC_CTX *_mem_save_site_0 = NULL;
   15267         192 :         TALLOC_CTX *_mem_save_site_1 = NULL;
   15268         192 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15269         192 :         if (flags & NDR_IN) {
   15270          96 :                 NDR_ZERO_STRUCT(r->out);
   15271             : 
   15272          96 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
   15273          96 :                 if (_ptr_computer_name) {
   15274          96 :                         NDR_PULL_ALLOC(ndr, r->in.computer_name);
   15275             :                 } else {
   15276           0 :                         r->in.computer_name = NULL;
   15277             :                 }
   15278          96 :                 if (r->in.computer_name) {
   15279          96 :                         _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15280          96 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
   15281          96 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   15282          96 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   15283          96 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   15284          96 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   15285          96 :                         if (length_computer_name_1 > size_computer_name_1) {
   15286           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   15287             :                         }
   15288          96 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   15289          96 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   15290          96 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
   15291             :                 }
   15292          96 :                 NDR_PULL_ALLOC(ndr, r->out.site);
   15293          96 :                 NDR_ZERO_STRUCTP(r->out.site);
   15294             :         }
   15295         192 :         if (flags & NDR_OUT) {
   15296             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15297             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   15298          96 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15299          24 :                         NDR_PULL_ALLOC(ndr, r->out.site);
   15300             :                 }
   15301          96 :                 _mem_save_site_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15302          96 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.site, LIBNDR_FLAG_REF_ALLOC);
   15303          96 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site));
   15304          96 :                 if (_ptr_site) {
   15305          96 :                         NDR_PULL_ALLOC(ndr, *r->out.site);
   15306             :                 } else {
   15307           0 :                         *r->out.site = NULL;
   15308             :                 }
   15309          96 :                 if (*r->out.site) {
   15310          96 :                         _mem_save_site_1 = NDR_PULL_GET_MEM_CTX(ndr);
   15311          96 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.site, 0);
   15312          96 :                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.site));
   15313          96 :                         NDR_CHECK(ndr_pull_array_length(ndr, r->out.site));
   15314          96 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.site, &size_site_2));
   15315          96 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.site, &length_site_2));
   15316          96 :                         if (length_site_2 > size_site_2) {
   15317           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_2, length_site_2);
   15318             :                         }
   15319          96 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_site_2, sizeof(uint16_t)));
   15320          96 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.site, length_site_2, sizeof(uint16_t), CH_UTF16));
   15321          96 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_1, 0);
   15322             :                 }
   15323          96 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_0, LIBNDR_FLAG_REF_ALLOC);
   15324          96 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   15325             :         }
   15326         160 :         return NDR_ERR_SUCCESS;
   15327             : }
   15328             : 
   15329          48 : _PUBLIC_ void ndr_print_netr_DsRGetSiteName(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsRGetSiteName *r)
   15330             : {
   15331          48 :         ndr_print_struct(ndr, name, "netr_DsRGetSiteName");
   15332          48 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15333          48 :         ndr->depth++;
   15334          48 :         if (flags & NDR_SET_VALUES) {
   15335           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   15336             :         }
   15337          48 :         if (flags & NDR_IN) {
   15338           0 :                 ndr_print_struct(ndr, "in", "netr_DsRGetSiteName");
   15339           0 :                 ndr->depth++;
   15340           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   15341           0 :                 ndr->depth++;
   15342           0 :                 if (r->in.computer_name) {
   15343           0 :                         ndr_print_string(ndr, "computer_name", r->in.computer_name);
   15344             :                 }
   15345           0 :                 ndr->depth--;
   15346           0 :                 ndr->depth--;
   15347             :         }
   15348          48 :         if (flags & NDR_OUT) {
   15349          48 :                 ndr_print_struct(ndr, "out", "netr_DsRGetSiteName");
   15350          48 :                 ndr->depth++;
   15351          48 :                 ndr_print_ptr(ndr, "site", r->out.site);
   15352          48 :                 ndr->depth++;
   15353          48 :                 ndr_print_ptr(ndr, "site", *r->out.site);
   15354          48 :                 ndr->depth++;
   15355          48 :                 if (*r->out.site) {
   15356          48 :                         ndr_print_string(ndr, "site", *r->out.site);
   15357             :                 }
   15358          48 :                 ndr->depth--;
   15359          48 :                 ndr->depth--;
   15360          48 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   15361          48 :                 ndr->depth--;
   15362             :         }
   15363          48 :         ndr->depth--;
   15364             : }
   15365             : 
   15366         444 : _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonGetDomainInfo(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonGetDomainInfo *r)
   15367             : {
   15368         444 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15369         444 :         if (flags & NDR_IN) {
   15370         199 :                 if (r->in.server_name == NULL) {
   15371           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15372             :                 }
   15373         199 :                 if (r->in.credential == NULL) {
   15374           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15375             :                 }
   15376         199 :                 if (r->in.return_authenticator == NULL) {
   15377           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15378             :                 }
   15379         199 :                 if (r->in.query == NULL) {
   15380           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15381             :                 }
   15382         199 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   15383         199 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15384         199 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   15385         199 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15386         199 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
   15387         199 :                 if (r->in.computer_name) {
   15388         199 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   15389         199 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15390         199 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   15391         199 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15392             :                 }
   15393         199 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   15394         199 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   15395         199 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   15396         199 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.query, r->in.level));
   15397         199 :                 NDR_CHECK(ndr_push_netr_WorkstationInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.query));
   15398             :         }
   15399         444 :         if (flags & NDR_OUT) {
   15400         245 :                 if (r->out.return_authenticator == NULL) {
   15401           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15402             :                 }
   15403         245 :                 if (r->out.info == NULL) {
   15404           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15405             :                 }
   15406         245 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   15407         245 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
   15408         245 :                 NDR_CHECK(ndr_push_netr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
   15409         245 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   15410             :         }
   15411         381 :         return NDR_ERR_SUCCESS;
   15412             : }
   15413             : 
   15414         416 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonGetDomainInfo(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonGetDomainInfo *r)
   15415             : {
   15416         416 :         uint32_t size_server_name_1 = 0;
   15417         416 :         uint32_t length_server_name_1 = 0;
   15418          70 :         uint32_t _ptr_computer_name;
   15419         416 :         uint32_t size_computer_name_1 = 0;
   15420         416 :         uint32_t length_computer_name_1 = 0;
   15421         416 :         TALLOC_CTX *_mem_save_computer_name_0 = NULL;
   15422         416 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   15423         416 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   15424         416 :         TALLOC_CTX *_mem_save_query_0 = NULL;
   15425         416 :         TALLOC_CTX *_mem_save_info_0 = NULL;
   15426         416 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15427         416 :         if (flags & NDR_IN) {
   15428         213 :                 NDR_ZERO_STRUCT(r->out);
   15429             : 
   15430         213 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   15431         213 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   15432         213 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   15433         213 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   15434         213 :                 if (length_server_name_1 > size_server_name_1) {
   15435           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   15436             :                 }
   15437         213 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   15438         213 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   15439         213 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
   15440         213 :                 if (_ptr_computer_name) {
   15441         213 :                         NDR_PULL_ALLOC(ndr, r->in.computer_name);
   15442             :                 } else {
   15443           0 :                         r->in.computer_name = NULL;
   15444             :                 }
   15445         213 :                 if (r->in.computer_name) {
   15446         213 :                         _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15447         213 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
   15448         213 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   15449         213 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   15450         213 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   15451         213 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   15452         213 :                         if (length_computer_name_1 > size_computer_name_1) {
   15453           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   15454             :                         }
   15455         213 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   15456         213 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   15457         213 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
   15458             :                 }
   15459         213 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15460         213 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   15461             :                 }
   15462         213 :                 _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15463         213 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
   15464         213 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   15465         213 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
   15466         213 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15467         213 :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   15468             :                 }
   15469         213 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15470         213 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   15471         213 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   15472         213 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   15473         213 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   15474         213 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15475         213 :                         NDR_PULL_ALLOC(ndr, r->in.query);
   15476             :                 }
   15477         213 :                 _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15478         213 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.query, LIBNDR_FLAG_REF_ALLOC);
   15479         213 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.query, r->in.level));
   15480         213 :                 NDR_CHECK(ndr_pull_netr_WorkstationInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.query));
   15481         213 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
   15482         213 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   15483         213 :                 *r->out.return_authenticator = *r->in.return_authenticator;
   15484         213 :                 NDR_PULL_ALLOC(ndr, r->out.info);
   15485         213 :                 NDR_ZERO_STRUCTP(r->out.info);
   15486             :         }
   15487         416 :         if (flags & NDR_OUT) {
   15488             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15489             :                 if (r->in.credential == NULL) {
   15490             :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   15491             :                         NDR_ZERO_STRUCTP(r->in.credential);
   15492             :                 }
   15493             :                 if (r->in.return_authenticator == NULL) {
   15494             :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   15495             :                         NDR_ZERO_STRUCTP(r->in.return_authenticator);
   15496             :                 }
   15497             :                 if (r->in.query == NULL) {
   15498             :                         NDR_PULL_ALLOC(ndr, r->in.query);
   15499             :                         NDR_ZERO_STRUCTP(r->in.query);
   15500             :                 }
   15501             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   15502         203 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15503          77 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   15504             :                 }
   15505         203 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15506         203 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   15507         203 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   15508         203 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   15509         203 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15510          77 :                         NDR_PULL_ALLOC(ndr, r->out.info);
   15511             :                 }
   15512         203 :                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15513         203 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
   15514         203 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
   15515         203 :                 NDR_CHECK(ndr_pull_netr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
   15516         203 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
   15517         203 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   15518             :         }
   15519         346 :         return NDR_ERR_SUCCESS;
   15520             : }
   15521             : 
   15522          98 : _PUBLIC_ void ndr_print_netr_LogonGetDomainInfo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonGetDomainInfo *r)
   15523             : {
   15524          98 :         ndr_print_struct(ndr, name, "netr_LogonGetDomainInfo");
   15525          98 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15526          98 :         ndr->depth++;
   15527          98 :         if (flags & NDR_SET_VALUES) {
   15528           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   15529             :         }
   15530          98 :         if (flags & NDR_IN) {
   15531          10 :                 ndr_print_struct(ndr, "in", "netr_LogonGetDomainInfo");
   15532          10 :                 ndr->depth++;
   15533          10 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   15534          10 :                 ndr->depth++;
   15535          10 :                 ndr_print_string(ndr, "server_name", r->in.server_name);
   15536          10 :                 ndr->depth--;
   15537          10 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   15538          10 :                 ndr->depth++;
   15539          10 :                 if (r->in.computer_name) {
   15540          10 :                         ndr_print_string(ndr, "computer_name", r->in.computer_name);
   15541             :                 }
   15542          10 :                 ndr->depth--;
   15543          10 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   15544          10 :                 ndr->depth++;
   15545          10 :                 ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   15546          10 :                 ndr->depth--;
   15547          10 :                 ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
   15548          10 :                 ndr->depth++;
   15549          10 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
   15550          10 :                 ndr->depth--;
   15551          10 :                 ndr_print_uint32(ndr, "level", r->in.level);
   15552          10 :                 ndr_print_ptr(ndr, "query", r->in.query);
   15553          10 :                 ndr->depth++;
   15554          10 :                 ndr_print_set_switch_value(ndr, r->in.query, r->in.level);
   15555          10 :                 ndr_print_netr_WorkstationInfo(ndr, "query", r->in.query);
   15556          10 :                 ndr->depth--;
   15557          10 :                 ndr->depth--;
   15558             :         }
   15559          98 :         if (flags & NDR_OUT) {
   15560          88 :                 ndr_print_struct(ndr, "out", "netr_LogonGetDomainInfo");
   15561          88 :                 ndr->depth++;
   15562          88 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   15563          88 :                 ndr->depth++;
   15564          88 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   15565          88 :                 ndr->depth--;
   15566          88 :                 ndr_print_ptr(ndr, "info", r->out.info);
   15567          88 :                 ndr->depth++;
   15568          88 :                 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
   15569          88 :                 ndr_print_netr_DomainInfo(ndr, "info", r->out.info);
   15570          88 :                 ndr->depth--;
   15571          88 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   15572          88 :                 ndr->depth--;
   15573             :         }
   15574          98 :         ndr->depth--;
   15575             : }
   15576             : 
   15577        1175 : static enum ndr_err_code ndr_push_netr_ServerPasswordSet2(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerPasswordSet2 *r)
   15578             : {
   15579        1175 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15580        1175 :         if (flags & NDR_IN) {
   15581         525 :                 if (r->in.account_name == NULL) {
   15582           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15583             :                 }
   15584         525 :                 if (r->in.computer_name == NULL) {
   15585           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15586             :                 }
   15587         525 :                 if (r->in.credential == NULL) {
   15588           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15589             :                 }
   15590         525 :                 if (r->in.new_password == NULL) {
   15591           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15592             :                 }
   15593         525 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   15594         525 :                 if (r->in.server_name) {
   15595         525 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   15596         525 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15597         525 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   15598         525 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15599             :                 }
   15600         525 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   15601         525 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15602         525 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   15603         525 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15604         525 :                 NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
   15605         525 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   15606         525 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15607         525 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   15608         525 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15609         525 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   15610         525 :                 NDR_CHECK(ndr_push_netr_CryptPassword(ndr, NDR_SCALARS, r->in.new_password));
   15611             :         }
   15612        1175 :         if (flags & NDR_OUT) {
   15613         650 :                 if (r->out.return_authenticator == NULL) {
   15614           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15615             :                 }
   15616         650 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   15617         650 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   15618             :         }
   15619        1071 :         return NDR_ERR_SUCCESS;
   15620             : }
   15621             : 
   15622        1056 : static enum ndr_err_code ndr_pull_netr_ServerPasswordSet2(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerPasswordSet2 *r)
   15623             : {
   15624          94 :         uint32_t _ptr_server_name;
   15625        1056 :         uint32_t size_server_name_1 = 0;
   15626        1056 :         uint32_t length_server_name_1 = 0;
   15627        1056 :         uint32_t size_account_name_1 = 0;
   15628        1056 :         uint32_t length_account_name_1 = 0;
   15629        1056 :         uint32_t size_computer_name_1 = 0;
   15630        1056 :         uint32_t length_computer_name_1 = 0;
   15631        1056 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   15632        1056 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   15633        1056 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   15634        1056 :         TALLOC_CTX *_mem_save_new_password_0 = NULL;
   15635        1056 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15636        1056 :         if (flags & NDR_IN) {
   15637         531 :                 NDR_ZERO_STRUCT(r->out);
   15638             : 
   15639         531 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   15640         531 :                 if (_ptr_server_name) {
   15641         531 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   15642             :                 } else {
   15643           0 :                         r->in.server_name = NULL;
   15644             :                 }
   15645         531 :                 if (r->in.server_name) {
   15646         531 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15647         531 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   15648         531 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   15649         531 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   15650         531 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   15651         531 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   15652         531 :                         if (length_server_name_1 > size_server_name_1) {
   15653           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   15654             :                         }
   15655         531 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   15656         531 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   15657         531 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   15658             :                 }
   15659         531 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
   15660         531 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
   15661         531 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
   15662         531 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
   15663         531 :                 if (length_account_name_1 > size_account_name_1) {
   15664           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
   15665             :                 }
   15666         531 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
   15667         531 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
   15668         531 :                 NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
   15669         531 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   15670         531 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   15671         531 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   15672         531 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   15673         531 :                 if (length_computer_name_1 > size_computer_name_1) {
   15674           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   15675             :                 }
   15676         531 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   15677         531 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   15678         531 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15679         531 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   15680             :                 }
   15681         531 :                 _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15682         531 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
   15683         531 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   15684         531 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
   15685         531 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15686         531 :                         NDR_PULL_ALLOC(ndr, r->in.new_password);
   15687             :                 }
   15688         531 :                 _mem_save_new_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15689         531 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_password, LIBNDR_FLAG_REF_ALLOC);
   15690         531 :                 NDR_CHECK(ndr_pull_netr_CryptPassword(ndr, NDR_SCALARS, r->in.new_password));
   15691         531 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_password_0, LIBNDR_FLAG_REF_ALLOC);
   15692         531 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   15693         531 :                 NDR_ZERO_STRUCTP(r->out.return_authenticator);
   15694             :         }
   15695        1056 :         if (flags & NDR_OUT) {
   15696             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15697             :                 if (r->in.credential == NULL) {
   15698             :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   15699             :                         NDR_ZERO_STRUCTP(r->in.credential);
   15700             :                 }
   15701             :                 if (r->in.new_password == NULL) {
   15702             :                         NDR_PULL_ALLOC(ndr, r->in.new_password);
   15703             :                         NDR_ZERO_STRUCTP(r->in.new_password);
   15704             :                 }
   15705             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   15706         525 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15707         131 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   15708             :                 }
   15709         525 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15710         525 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   15711         525 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   15712         525 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   15713         525 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   15714             :         }
   15715         962 :         return NDR_ERR_SUCCESS;
   15716             : }
   15717             : 
   15718         238 : _PUBLIC_ void ndr_print_netr_ServerPasswordSet2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerPasswordSet2 *r)
   15719             : {
   15720         238 :         ndr_print_struct(ndr, name, "netr_ServerPasswordSet2");
   15721         238 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15722         238 :         ndr->depth++;
   15723         238 :         if (flags & NDR_SET_VALUES) {
   15724           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   15725             :         }
   15726         238 :         if (flags & NDR_IN) {
   15727           0 :                 ndr_print_struct(ndr, "in", "netr_ServerPasswordSet2");
   15728           0 :                 ndr->depth++;
   15729           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   15730           0 :                 ndr->depth++;
   15731           0 :                 if (r->in.server_name) {
   15732           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   15733             :                 }
   15734           0 :                 ndr->depth--;
   15735           0 :                 ndr_print_ptr(ndr, "account_name", r->in.account_name);
   15736           0 :                 ndr->depth++;
   15737           0 :                 ndr_print_string(ndr, "account_name", r->in.account_name);
   15738           0 :                 ndr->depth--;
   15739           0 :                 ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
   15740           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   15741           0 :                 ndr->depth++;
   15742           0 :                 ndr_print_string(ndr, "computer_name", r->in.computer_name);
   15743           0 :                 ndr->depth--;
   15744           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   15745           0 :                 ndr->depth++;
   15746           0 :                 ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   15747           0 :                 ndr->depth--;
   15748           0 :                 ndr_print_ptr(ndr, "new_password", r->in.new_password);
   15749           0 :                 ndr->depth++;
   15750           0 :                 ndr_print_netr_CryptPassword(ndr, "new_password", r->in.new_password);
   15751           0 :                 ndr->depth--;
   15752           0 :                 ndr->depth--;
   15753             :         }
   15754         238 :         if (flags & NDR_OUT) {
   15755         238 :                 ndr_print_struct(ndr, "out", "netr_ServerPasswordSet2");
   15756         238 :                 ndr->depth++;
   15757         238 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   15758         238 :                 ndr->depth++;
   15759         238 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   15760         238 :                 ndr->depth--;
   15761         238 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   15762         238 :                 ndr->depth--;
   15763             :         }
   15764         238 :         ndr->depth--;
   15765             : }
   15766             : 
   15767          24 : static enum ndr_err_code ndr_push_netr_ServerPasswordGet(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerPasswordGet *r)
   15768             : {
   15769          24 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15770          24 :         if (flags & NDR_IN) {
   15771          24 :                 if (r->in.account_name == NULL) {
   15772           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15773             :                 }
   15774          24 :                 if (r->in.computer_name == NULL) {
   15775           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15776             :                 }
   15777          24 :                 if (r->in.credential == NULL) {
   15778           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15779             :                 }
   15780          24 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   15781          24 :                 if (r->in.server_name) {
   15782          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   15783          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15784          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   15785          24 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15786             :                 }
   15787          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   15788          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15789          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   15790          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15791          24 :                 NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
   15792          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   15793          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15794          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   15795          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15796          24 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   15797             :         }
   15798          24 :         if (flags & NDR_OUT) {
   15799           0 :                 if (r->out.return_authenticator == NULL) {
   15800           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15801             :                 }
   15802           0 :                 if (r->out.password == NULL) {
   15803           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15804             :                 }
   15805           0 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   15806           0 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.password));
   15807           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   15808             :         }
   15809          20 :         return NDR_ERR_SUCCESS;
   15810             : }
   15811             : 
   15812          24 : static enum ndr_err_code ndr_pull_netr_ServerPasswordGet(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerPasswordGet *r)
   15813             : {
   15814           4 :         uint32_t _ptr_server_name;
   15815          24 :         uint32_t size_server_name_1 = 0;
   15816          24 :         uint32_t length_server_name_1 = 0;
   15817          24 :         uint32_t size_account_name_1 = 0;
   15818          24 :         uint32_t length_account_name_1 = 0;
   15819          24 :         uint32_t size_computer_name_1 = 0;
   15820          24 :         uint32_t length_computer_name_1 = 0;
   15821          24 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   15822          24 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   15823          24 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   15824          24 :         TALLOC_CTX *_mem_save_password_0 = NULL;
   15825          24 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15826          24 :         if (flags & NDR_IN) {
   15827          24 :                 NDR_ZERO_STRUCT(r->out);
   15828             : 
   15829          24 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   15830          24 :                 if (_ptr_server_name) {
   15831          24 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   15832             :                 } else {
   15833           0 :                         r->in.server_name = NULL;
   15834             :                 }
   15835          24 :                 if (r->in.server_name) {
   15836          24 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15837          24 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   15838          24 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   15839          24 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   15840          24 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   15841          24 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   15842          24 :                         if (length_server_name_1 > size_server_name_1) {
   15843           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   15844             :                         }
   15845          24 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   15846          24 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   15847          24 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   15848             :                 }
   15849          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
   15850          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
   15851          24 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
   15852          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
   15853          24 :                 if (length_account_name_1 > size_account_name_1) {
   15854           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
   15855             :                 }
   15856          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
   15857          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
   15858          24 :                 NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
   15859          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   15860          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   15861          24 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   15862          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   15863          24 :                 if (length_computer_name_1 > size_computer_name_1) {
   15864           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   15865             :                 }
   15866          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   15867          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   15868          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15869          24 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   15870             :                 }
   15871          24 :                 _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15872          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
   15873          24 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   15874          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
   15875          24 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   15876          24 :                 NDR_ZERO_STRUCTP(r->out.return_authenticator);
   15877          24 :                 NDR_PULL_ALLOC(ndr, r->out.password);
   15878          24 :                 NDR_ZERO_STRUCTP(r->out.password);
   15879             :         }
   15880          24 :         if (flags & NDR_OUT) {
   15881             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15882             :                 if (r->in.credential == NULL) {
   15883             :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   15884             :                         NDR_ZERO_STRUCTP(r->in.credential);
   15885             :                 }
   15886             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   15887           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15888           0 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   15889             :                 }
   15890           0 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15891           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   15892           0 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   15893           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   15894           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15895           0 :                         NDR_PULL_ALLOC(ndr, r->out.password);
   15896             :                 }
   15897           0 :                 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15898           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.password, LIBNDR_FLAG_REF_ALLOC);
   15899           0 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.password));
   15900           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, LIBNDR_FLAG_REF_ALLOC);
   15901           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   15902             :         }
   15903          20 :         return NDR_ERR_SUCCESS;
   15904             : }
   15905             : 
   15906           0 : _PUBLIC_ void ndr_print_netr_ServerPasswordGet(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerPasswordGet *r)
   15907             : {
   15908           0 :         ndr_print_struct(ndr, name, "netr_ServerPasswordGet");
   15909           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15910           0 :         ndr->depth++;
   15911           0 :         if (flags & NDR_SET_VALUES) {
   15912           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   15913             :         }
   15914           0 :         if (flags & NDR_IN) {
   15915           0 :                 ndr_print_struct(ndr, "in", "netr_ServerPasswordGet");
   15916           0 :                 ndr->depth++;
   15917           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   15918           0 :                 ndr->depth++;
   15919           0 :                 if (r->in.server_name) {
   15920           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   15921             :                 }
   15922           0 :                 ndr->depth--;
   15923           0 :                 ndr_print_ptr(ndr, "account_name", r->in.account_name);
   15924           0 :                 ndr->depth++;
   15925           0 :                 ndr_print_string(ndr, "account_name", r->in.account_name);
   15926           0 :                 ndr->depth--;
   15927           0 :                 ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
   15928           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   15929           0 :                 ndr->depth++;
   15930           0 :                 ndr_print_string(ndr, "computer_name", r->in.computer_name);
   15931           0 :                 ndr->depth--;
   15932           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   15933           0 :                 ndr->depth++;
   15934           0 :                 ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   15935           0 :                 ndr->depth--;
   15936           0 :                 ndr->depth--;
   15937             :         }
   15938           0 :         if (flags & NDR_OUT) {
   15939           0 :                 ndr_print_struct(ndr, "out", "netr_ServerPasswordGet");
   15940           0 :                 ndr->depth++;
   15941           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   15942           0 :                 ndr->depth++;
   15943           0 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   15944           0 :                 ndr->depth--;
   15945           0 :                 ndr_print_ptr(ndr, "password", r->out.password);
   15946           0 :                 ndr->depth++;
   15947           0 :                 ndr_print_samr_Password(ndr, "password", r->out.password);
   15948           0 :                 ndr->depth--;
   15949           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   15950           0 :                 ndr->depth--;
   15951             :         }
   15952           0 :         ndr->depth--;
   15953             : }
   15954             : 
   15955          17 : static enum ndr_err_code ndr_push_netr_NetrLogonSendToSam(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_NetrLogonSendToSam *r)
   15956             : {
   15957          17 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15958          17 :         if (flags & NDR_IN) {
   15959           0 :                 if (r->in.computer_name == NULL) {
   15960           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15961             :                 }
   15962           0 :                 if (r->in.credential == NULL) {
   15963           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15964             :                 }
   15965           0 :                 if (r->in.opaque_buffer == NULL) {
   15966           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15967             :                 }
   15968           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   15969           0 :                 if (r->in.server_name) {
   15970           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   15971           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15972           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   15973           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15974             :                 }
   15975           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   15976           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   15977           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   15978           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   15979           0 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   15980           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.buffer_len));
   15981           0 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.opaque_buffer, r->in.buffer_len));
   15982           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_len));
   15983             :         }
   15984          17 :         if (flags & NDR_OUT) {
   15985          17 :                 if (r->out.return_authenticator == NULL) {
   15986           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15987             :                 }
   15988          17 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   15989          17 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   15990             :         }
   15991          17 :         return NDR_ERR_SUCCESS;
   15992             : }
   15993             : 
   15994          17 : static enum ndr_err_code ndr_pull_netr_NetrLogonSendToSam(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_NetrLogonSendToSam *r)
   15995             : {
   15996           0 :         uint32_t _ptr_server_name;
   15997          17 :         uint32_t size_server_name_1 = 0;
   15998          17 :         uint32_t length_server_name_1 = 0;
   15999          17 :         uint32_t size_computer_name_1 = 0;
   16000          17 :         uint32_t length_computer_name_1 = 0;
   16001          17 :         uint32_t size_opaque_buffer_1 = 0;
   16002          17 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   16003          17 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   16004          17 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   16005          17 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16006          17 :         if (flags & NDR_IN) {
   16007          17 :                 NDR_ZERO_STRUCT(r->out);
   16008             : 
   16009          17 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   16010          17 :                 if (_ptr_server_name) {
   16011          17 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   16012             :                 } else {
   16013           0 :                         r->in.server_name = NULL;
   16014             :                 }
   16015          17 :                 if (r->in.server_name) {
   16016          17 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16017          17 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   16018          17 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   16019          17 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   16020          17 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   16021          17 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   16022          17 :                         if (length_server_name_1 > size_server_name_1) {
   16023           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   16024             :                         }
   16025          17 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   16026          17 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   16027          17 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   16028             :                 }
   16029          17 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   16030          17 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   16031          17 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   16032          17 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   16033          17 :                 if (length_computer_name_1 > size_computer_name_1) {
   16034           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   16035             :                 }
   16036          17 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   16037          17 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   16038          17 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16039          17 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   16040             :                 }
   16041          17 :                 _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16042          17 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
   16043          17 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   16044          17 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
   16045          17 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.opaque_buffer));
   16046          17 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.opaque_buffer, &size_opaque_buffer_1));
   16047          17 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16048          17 :                         NDR_PULL_ALLOC_N(ndr, r->in.opaque_buffer, size_opaque_buffer_1);
   16049             :                 }
   16050          17 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.opaque_buffer, size_opaque_buffer_1));
   16051          17 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffer_len));
   16052          17 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   16053          17 :                 NDR_ZERO_STRUCTP(r->out.return_authenticator);
   16054          17 :                 if (r->in.opaque_buffer) {
   16055          17 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.opaque_buffer, r->in.buffer_len));
   16056             :                 }
   16057             :         }
   16058          17 :         if (flags & NDR_OUT) {
   16059             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16060             :                 if (r->in.credential == NULL) {
   16061             :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   16062             :                         NDR_ZERO_STRUCTP(r->in.credential);
   16063             :                 }
   16064             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16065           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16066           0 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   16067             :                 }
   16068           0 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16069           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   16070           0 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   16071           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   16072           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   16073             :         }
   16074          17 :         return NDR_ERR_SUCCESS;
   16075             : }
   16076             : 
   16077           0 : _PUBLIC_ void ndr_print_netr_NetrLogonSendToSam(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_NetrLogonSendToSam *r)
   16078             : {
   16079           0 :         ndr_print_struct(ndr, name, "netr_NetrLogonSendToSam");
   16080           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16081           0 :         ndr->depth++;
   16082           0 :         if (flags & NDR_SET_VALUES) {
   16083           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16084             :         }
   16085           0 :         if (flags & NDR_IN) {
   16086           0 :                 ndr_print_struct(ndr, "in", "netr_NetrLogonSendToSam");
   16087           0 :                 ndr->depth++;
   16088           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   16089           0 :                 ndr->depth++;
   16090           0 :                 if (r->in.server_name) {
   16091           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   16092             :                 }
   16093           0 :                 ndr->depth--;
   16094           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   16095           0 :                 ndr->depth++;
   16096           0 :                 ndr_print_string(ndr, "computer_name", r->in.computer_name);
   16097           0 :                 ndr->depth--;
   16098           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   16099           0 :                 ndr->depth++;
   16100           0 :                 ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   16101           0 :                 ndr->depth--;
   16102           0 :                 ndr_print_ptr(ndr, "opaque_buffer", r->in.opaque_buffer);
   16103           0 :                 ndr->depth++;
   16104           0 :                 ndr_print_array_uint8(ndr, "opaque_buffer", r->in.opaque_buffer, r->in.buffer_len);
   16105           0 :                 ndr->depth--;
   16106           0 :                 ndr_print_uint32(ndr, "buffer_len", r->in.buffer_len);
   16107           0 :                 ndr->depth--;
   16108             :         }
   16109           0 :         if (flags & NDR_OUT) {
   16110           0 :                 ndr_print_struct(ndr, "out", "netr_NetrLogonSendToSam");
   16111           0 :                 ndr->depth++;
   16112           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   16113           0 :                 ndr->depth++;
   16114           0 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   16115           0 :                 ndr->depth--;
   16116           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   16117           0 :                 ndr->depth--;
   16118             :         }
   16119           0 :         ndr->depth--;
   16120             : }
   16121             : 
   16122         162 : static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesW(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsRAddressToSitenamesW *r)
   16123             : {
   16124          27 :         uint32_t cntr_addresses_1;
   16125         162 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16126         162 :         if (flags & NDR_IN) {
   16127          72 :                 if (r->in.addresses == NULL) {
   16128           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16129             :                 }
   16130          72 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   16131          72 :                 if (r->in.server_name) {
   16132          72 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   16133          72 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   16134          72 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   16135          72 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   16136             :                 }
   16137          72 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
   16138          72 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.count));
   16139         504 :                 for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
   16140         432 :                         NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1]));
   16141             :                 }
   16142         504 :                 for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
   16143         432 :                         NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1]));
   16144             :                 }
   16145             :         }
   16146         162 :         if (flags & NDR_OUT) {
   16147          90 :                 if (r->out.ctr == NULL) {
   16148           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16149             :                 }
   16150          90 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ctr));
   16151          90 :                 if (*r->out.ctr) {
   16152          90 :                         NDR_CHECK(ndr_push_netr_DsRAddressToSitenamesWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
   16153             :                 }
   16154          90 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16155             :         }
   16156         135 :         return NDR_ERR_SUCCESS;
   16157             : }
   16158             : 
   16159         144 : static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesW(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsRAddressToSitenamesW *r)
   16160             : {
   16161          24 :         uint32_t _ptr_server_name;
   16162         144 :         uint32_t size_server_name_1 = 0;
   16163         144 :         uint32_t length_server_name_1 = 0;
   16164         144 :         uint32_t size_addresses_1 = 0;
   16165          24 :         uint32_t cntr_addresses_1;
   16166          24 :         uint32_t _ptr_ctr;
   16167         144 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   16168         144 :         TALLOC_CTX *_mem_save_addresses_1 = NULL;
   16169         144 :         TALLOC_CTX *_mem_save_ctr_0 = NULL;
   16170         144 :         TALLOC_CTX *_mem_save_ctr_1 = NULL;
   16171         144 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16172         144 :         if (flags & NDR_IN) {
   16173          72 :                 NDR_ZERO_STRUCT(r->out);
   16174             : 
   16175          72 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   16176          72 :                 if (_ptr_server_name) {
   16177          72 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   16178             :                 } else {
   16179           0 :                         r->in.server_name = NULL;
   16180             :                 }
   16181          72 :                 if (r->in.server_name) {
   16182          72 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16183          72 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   16184          72 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   16185          72 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   16186          72 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   16187          72 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   16188          72 :                         if (length_server_name_1 > size_server_name_1) {
   16189           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   16190             :                         }
   16191          72 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   16192          72 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   16193          72 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   16194             :                 }
   16195          72 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
   16196          72 :                 if (r->in.count > 32000) {
   16197           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.count), (uint32_t)(0), (uint32_t)(32000));
   16198             :                 }
   16199          72 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.addresses));
   16200          72 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.addresses, &size_addresses_1));
   16201          72 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16202          72 :                         NDR_PULL_ALLOC_N(ndr, r->in.addresses, size_addresses_1);
   16203             :                 }
   16204          72 :                 _mem_save_addresses_1 = NDR_PULL_GET_MEM_CTX(ndr);
   16205          72 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.addresses, 0);
   16206         504 :                 for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
   16207         432 :                         NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1]));
   16208             :                 }
   16209         504 :                 for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
   16210         432 :                         NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1]));
   16211             :                 }
   16212          72 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addresses_1, 0);
   16213          72 :                 NDR_PULL_ALLOC(ndr, r->out.ctr);
   16214          72 :                 NDR_ZERO_STRUCTP(r->out.ctr);
   16215          72 :                 if (r->in.addresses) {
   16216          72 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.addresses, r->in.count));
   16217             :                 }
   16218         504 :                 for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
   16219          72 :                 }
   16220             :         }
   16221         144 :         if (flags & NDR_OUT) {
   16222             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16223             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16224          72 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16225          18 :                         NDR_PULL_ALLOC(ndr, r->out.ctr);
   16226             :                 }
   16227          72 :                 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16228          72 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
   16229          72 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr));
   16230          72 :                 if (_ptr_ctr) {
   16231          72 :                         NDR_PULL_ALLOC(ndr, *r->out.ctr);
   16232             :                 } else {
   16233           0 :                         *r->out.ctr = NULL;
   16234             :                 }
   16235          72 :                 if (*r->out.ctr) {
   16236          72 :                         _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr);
   16237          72 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, 0);
   16238          72 :                         NDR_CHECK(ndr_pull_netr_DsRAddressToSitenamesWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
   16239          72 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, 0);
   16240             :                 }
   16241          72 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
   16242          72 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16243             :         }
   16244         120 :         return NDR_ERR_SUCCESS;
   16245             : }
   16246             : 
   16247          36 : _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsRAddressToSitenamesW *r)
   16248             : {
   16249           6 :         uint32_t cntr_addresses_1;
   16250          36 :         ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesW");
   16251          36 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16252          36 :         ndr->depth++;
   16253          36 :         if (flags & NDR_SET_VALUES) {
   16254           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16255             :         }
   16256          36 :         if (flags & NDR_IN) {
   16257           0 :                 ndr_print_struct(ndr, "in", "netr_DsRAddressToSitenamesW");
   16258           0 :                 ndr->depth++;
   16259           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   16260           0 :                 ndr->depth++;
   16261           0 :                 if (r->in.server_name) {
   16262           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   16263             :                 }
   16264           0 :                 ndr->depth--;
   16265           0 :                 ndr_print_uint32(ndr, "count", r->in.count);
   16266           0 :                 ndr_print_ptr(ndr, "addresses", r->in.addresses);
   16267           0 :                 ndr->depth++;
   16268           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "addresses", (uint32_t)(r->in.count));
   16269           0 :                 ndr->depth++;
   16270           0 :                 for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
   16271           0 :                         ndr_print_netr_DsRAddress(ndr, "addresses", &r->in.addresses[cntr_addresses_1]);
   16272             :                 }
   16273           0 :                 ndr->depth--;
   16274           0 :                 ndr->depth--;
   16275           0 :                 ndr->depth--;
   16276             :         }
   16277          36 :         if (flags & NDR_OUT) {
   16278          36 :                 ndr_print_struct(ndr, "out", "netr_DsRAddressToSitenamesW");
   16279          36 :                 ndr->depth++;
   16280          36 :                 ndr_print_ptr(ndr, "ctr", r->out.ctr);
   16281          36 :                 ndr->depth++;
   16282          36 :                 ndr_print_ptr(ndr, "ctr", *r->out.ctr);
   16283          36 :                 ndr->depth++;
   16284          36 :                 if (*r->out.ctr) {
   16285          36 :                         ndr_print_netr_DsRAddressToSitenamesWCtr(ndr, "ctr", *r->out.ctr);
   16286             :                 }
   16287          36 :                 ndr->depth--;
   16288          36 :                 ndr->depth--;
   16289          36 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   16290          36 :                 ndr->depth--;
   16291             :         }
   16292          36 :         ndr->depth--;
   16293             : }
   16294             : 
   16295         482 : static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx2(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsRGetDCNameEx2 *r)
   16296             : {
   16297         482 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16298         482 :         if (flags & NDR_IN) {
   16299         229 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
   16300         229 :                 if (r->in.server_unc) {
   16301         205 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
   16302         205 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   16303         205 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
   16304         205 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   16305             :                 }
   16306         229 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client_account));
   16307         229 :                 if (r->in.client_account) {
   16308          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.client_account, CH_UTF16)));
   16309          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   16310          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.client_account, CH_UTF16)));
   16311          24 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client_account, ndr_charset_length(r->in.client_account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   16312             :                 }
   16313         229 :                 NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->in.mask));
   16314         229 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
   16315         229 :                 if (r->in.domain_name) {
   16316          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
   16317          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   16318          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
   16319          84 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   16320             :                 }
   16321         229 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
   16322         229 :                 if (r->in.domain_guid) {
   16323           0 :                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
   16324             :                 }
   16325         229 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name));
   16326         229 :                 if (r->in.site_name) {
   16327           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
   16328           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   16329           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
   16330           4 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.site_name, ndr_charset_length(r->in.site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   16331             :                 }
   16332         247 :                 NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, r->in.flags));
   16333             :         }
   16334         482 :         if (flags & NDR_OUT) {
   16335         253 :                 if (r->out.info == NULL) {
   16336           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16337             :                 }
   16338         253 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
   16339         253 :                 if (*r->out.info) {
   16340         253 :                         NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
   16341             :                 }
   16342         253 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16343             :         }
   16344         442 :         return NDR_ERR_SUCCESS;
   16345             : }
   16346             : 
   16347         458 : static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx2(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsRGetDCNameEx2 *r)
   16348             : {
   16349          36 :         uint32_t _ptr_server_unc;
   16350         458 :         uint32_t size_server_unc_1 = 0;
   16351         458 :         uint32_t length_server_unc_1 = 0;
   16352          36 :         uint32_t _ptr_client_account;
   16353         458 :         uint32_t size_client_account_1 = 0;
   16354         458 :         uint32_t length_client_account_1 = 0;
   16355          36 :         uint32_t _ptr_domain_name;
   16356         458 :         uint32_t size_domain_name_1 = 0;
   16357         458 :         uint32_t length_domain_name_1 = 0;
   16358          36 :         uint32_t _ptr_domain_guid;
   16359          36 :         uint32_t _ptr_site_name;
   16360         458 :         uint32_t size_site_name_1 = 0;
   16361         458 :         uint32_t length_site_name_1 = 0;
   16362          36 :         uint32_t _ptr_info;
   16363         458 :         TALLOC_CTX *_mem_save_server_unc_0 = NULL;
   16364         458 :         TALLOC_CTX *_mem_save_client_account_0 = NULL;
   16365         458 :         TALLOC_CTX *_mem_save_domain_name_0 = NULL;
   16366         458 :         TALLOC_CTX *_mem_save_domain_guid_0 = NULL;
   16367         458 :         TALLOC_CTX *_mem_save_site_name_0 = NULL;
   16368         458 :         TALLOC_CTX *_mem_save_info_0 = NULL;
   16369         458 :         TALLOC_CTX *_mem_save_info_1 = NULL;
   16370         458 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16371         458 :         if (flags & NDR_IN) {
   16372         229 :                 NDR_ZERO_STRUCT(r->out);
   16373             : 
   16374         229 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
   16375         229 :                 if (_ptr_server_unc) {
   16376         205 :                         NDR_PULL_ALLOC(ndr, r->in.server_unc);
   16377             :                 } else {
   16378          24 :                         r->in.server_unc = NULL;
   16379             :                 }
   16380         229 :                 if (r->in.server_unc) {
   16381         205 :                         _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16382         205 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
   16383         205 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
   16384         205 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
   16385         205 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_unc, &size_server_unc_1));
   16386         205 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_unc, &length_server_unc_1));
   16387         205 :                         if (length_server_unc_1 > size_server_unc_1) {
   16388           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_unc_1, length_server_unc_1);
   16389             :                         }
   16390         205 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
   16391         205 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
   16392         205 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
   16393             :                 }
   16394         229 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_account));
   16395         229 :                 if (_ptr_client_account) {
   16396          24 :                         NDR_PULL_ALLOC(ndr, r->in.client_account);
   16397             :                 } else {
   16398         205 :                         r->in.client_account = NULL;
   16399             :                 }
   16400         229 :                 if (r->in.client_account) {
   16401          24 :                         _mem_save_client_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16402          24 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.client_account, 0);
   16403          24 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client_account));
   16404          24 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client_account));
   16405          24 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.client_account, &size_client_account_1));
   16406          24 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.client_account, &length_client_account_1));
   16407          24 :                         if (length_client_account_1 > size_client_account_1) {
   16408           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_client_account_1, length_client_account_1);
   16409             :                         }
   16410          24 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_client_account_1, sizeof(uint16_t)));
   16411          24 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client_account, length_client_account_1, sizeof(uint16_t), CH_UTF16));
   16412          24 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_account_0, 0);
   16413             :                 }
   16414         229 :                 NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->in.mask));
   16415         229 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
   16416         229 :                 if (_ptr_domain_name) {
   16417          84 :                         NDR_PULL_ALLOC(ndr, r->in.domain_name);
   16418             :                 } else {
   16419         145 :                         r->in.domain_name = NULL;
   16420             :                 }
   16421         229 :                 if (r->in.domain_name) {
   16422          84 :                         _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16423          84 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
   16424          84 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
   16425          84 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
   16426          84 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain_name, &size_domain_name_1));
   16427          84 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain_name, &length_domain_name_1));
   16428          84 :                         if (length_domain_name_1 > size_domain_name_1) {
   16429           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
   16430             :                         }
   16431          84 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
   16432          84 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
   16433          84 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
   16434             :                 }
   16435         229 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
   16436         229 :                 if (_ptr_domain_guid) {
   16437           0 :                         NDR_PULL_ALLOC(ndr, r->in.domain_guid);
   16438             :                 } else {
   16439         229 :                         r->in.domain_guid = NULL;
   16440             :                 }
   16441         229 :                 if (r->in.domain_guid) {
   16442           0 :                         _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16443           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
   16444           0 :                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
   16445           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
   16446             :                 }
   16447         229 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
   16448         229 :                 if (_ptr_site_name) {
   16449           4 :                         NDR_PULL_ALLOC(ndr, r->in.site_name);
   16450             :                 } else {
   16451         225 :                         r->in.site_name = NULL;
   16452             :                 }
   16453         229 :                 if (r->in.site_name) {
   16454           4 :                         _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16455           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
   16456           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
   16457           4 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
   16458           4 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.site_name, &size_site_name_1));
   16459           4 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.site_name, &length_site_name_1));
   16460           4 :                         if (length_site_name_1 > size_site_name_1) {
   16461           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_name_1, length_site_name_1);
   16462             :                         }
   16463           4 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
   16464           4 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
   16465           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
   16466             :                 }
   16467         247 :                 NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, &r->in.flags));
   16468         229 :                 NDR_PULL_ALLOC(ndr, r->out.info);
   16469         229 :                 NDR_ZERO_STRUCTP(r->out.info);
   16470             :         }
   16471         458 :         if (flags & NDR_OUT) {
   16472             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16473             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16474         229 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16475         157 :                         NDR_PULL_ALLOC(ndr, r->out.info);
   16476             :                 }
   16477         229 :                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16478         229 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
   16479         229 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
   16480         229 :                 if (_ptr_info) {
   16481         229 :                         NDR_PULL_ALLOC(ndr, *r->out.info);
   16482             :                 } else {
   16483           0 :                         *r->out.info = NULL;
   16484             :                 }
   16485         229 :                 if (*r->out.info) {
   16486         229 :                         _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
   16487         229 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
   16488         229 :                         NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
   16489         229 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
   16490             :                 }
   16491         229 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
   16492         229 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16493             :         }
   16494         422 :         return NDR_ERR_SUCCESS;
   16495             : }
   16496             : 
   16497          48 : _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsRGetDCNameEx2 *r)
   16498             : {
   16499          48 :         ndr_print_struct(ndr, name, "netr_DsRGetDCNameEx2");
   16500          48 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16501          48 :         ndr->depth++;
   16502          48 :         if (flags & NDR_SET_VALUES) {
   16503           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16504             :         }
   16505          48 :         if (flags & NDR_IN) {
   16506           0 :                 ndr_print_struct(ndr, "in", "netr_DsRGetDCNameEx2");
   16507           0 :                 ndr->depth++;
   16508           0 :                 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
   16509           0 :                 ndr->depth++;
   16510           0 :                 if (r->in.server_unc) {
   16511           0 :                         ndr_print_string(ndr, "server_unc", r->in.server_unc);
   16512             :                 }
   16513           0 :                 ndr->depth--;
   16514           0 :                 ndr_print_ptr(ndr, "client_account", r->in.client_account);
   16515           0 :                 ndr->depth++;
   16516           0 :                 if (r->in.client_account) {
   16517           0 :                         ndr_print_string(ndr, "client_account", r->in.client_account);
   16518             :                 }
   16519           0 :                 ndr->depth--;
   16520           0 :                 ndr_print_samr_AcctFlags(ndr, "mask", r->in.mask);
   16521           0 :                 ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
   16522           0 :                 ndr->depth++;
   16523           0 :                 if (r->in.domain_name) {
   16524           0 :                         ndr_print_string(ndr, "domain_name", r->in.domain_name);
   16525             :                 }
   16526           0 :                 ndr->depth--;
   16527           0 :                 ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
   16528           0 :                 ndr->depth++;
   16529           0 :                 if (r->in.domain_guid) {
   16530           0 :                         ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
   16531             :                 }
   16532           0 :                 ndr->depth--;
   16533           0 :                 ndr_print_ptr(ndr, "site_name", r->in.site_name);
   16534           0 :                 ndr->depth++;
   16535           0 :                 if (r->in.site_name) {
   16536           0 :                         ndr_print_string(ndr, "site_name", r->in.site_name);
   16537             :                 }
   16538           0 :                 ndr->depth--;
   16539           0 :                 ndr_print_netr_DsRGetDCName_flags(ndr, "flags", r->in.flags);
   16540           0 :                 ndr->depth--;
   16541             :         }
   16542          48 :         if (flags & NDR_OUT) {
   16543          48 :                 ndr_print_struct(ndr, "out", "netr_DsRGetDCNameEx2");
   16544          48 :                 ndr->depth++;
   16545          48 :                 ndr_print_ptr(ndr, "info", r->out.info);
   16546          48 :                 ndr->depth++;
   16547          48 :                 ndr_print_ptr(ndr, "info", *r->out.info);
   16548          48 :                 ndr->depth++;
   16549          48 :                 if (*r->out.info) {
   16550          48 :                         ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info);
   16551             :                 }
   16552          48 :                 ndr->depth--;
   16553          48 :                 ndr->depth--;
   16554          48 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   16555          48 :                 ndr->depth--;
   16556             :         }
   16557          48 :         ndr->depth--;
   16558             : }
   16559             : 
   16560           0 : static enum ndr_err_code ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
   16561             : {
   16562           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16563           0 :         if (flags & NDR_IN) {
   16564           0 :         }
   16565           0 :         if (flags & NDR_OUT) {
   16566           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16567             :         }
   16568           0 :         return NDR_ERR_SUCCESS;
   16569             : }
   16570             : 
   16571           0 : static enum ndr_err_code ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
   16572             : {
   16573           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16574           0 :         if (flags & NDR_IN) {
   16575           0 :         }
   16576           0 :         if (flags & NDR_OUT) {
   16577             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16578             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16579           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16580             :         }
   16581           0 :         return NDR_ERR_SUCCESS;
   16582             : }
   16583             : 
   16584           0 : _PUBLIC_ void ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
   16585             : {
   16586           0 :         ndr_print_struct(ndr, name, "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
   16587           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16588           0 :         ndr->depth++;
   16589           0 :         if (flags & NDR_SET_VALUES) {
   16590           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16591             :         }
   16592           0 :         if (flags & NDR_IN) {
   16593           0 :                 ndr_print_struct(ndr, "in", "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
   16594           0 :                 ndr->depth++;
   16595           0 :                 ndr->depth--;
   16596             :         }
   16597           0 :         if (flags & NDR_OUT) {
   16598           0 :                 ndr_print_struct(ndr, "out", "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
   16599           0 :                 ndr->depth++;
   16600           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   16601           0 :                 ndr->depth--;
   16602             :         }
   16603           0 :         ndr->depth--;
   16604             : }
   16605             : 
   16606          24 : static enum ndr_err_code ndr_push_netr_NetrEnumerateTrustedDomainsEx(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_NetrEnumerateTrustedDomainsEx *r)
   16607             : {
   16608          24 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16609          24 :         if (flags & NDR_IN) {
   16610          24 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   16611          24 :                 if (r->in.server_name) {
   16612          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   16613          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   16614          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   16615          24 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   16616             :                 }
   16617             :         }
   16618          24 :         if (flags & NDR_OUT) {
   16619           0 :                 if (r->out.dom_trust_list == NULL) {
   16620           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16621             :                 }
   16622           0 :                 NDR_CHECK(ndr_push_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dom_trust_list));
   16623           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16624             :         }
   16625          20 :         return NDR_ERR_SUCCESS;
   16626             : }
   16627             : 
   16628          24 : static enum ndr_err_code ndr_pull_netr_NetrEnumerateTrustedDomainsEx(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_NetrEnumerateTrustedDomainsEx *r)
   16629             : {
   16630           4 :         uint32_t _ptr_server_name;
   16631          24 :         uint32_t size_server_name_1 = 0;
   16632          24 :         uint32_t length_server_name_1 = 0;
   16633          24 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   16634          24 :         TALLOC_CTX *_mem_save_dom_trust_list_0 = NULL;
   16635          24 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16636          24 :         if (flags & NDR_IN) {
   16637          24 :                 NDR_ZERO_STRUCT(r->out);
   16638             : 
   16639          24 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   16640          24 :                 if (_ptr_server_name) {
   16641          24 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   16642             :                 } else {
   16643           0 :                         r->in.server_name = NULL;
   16644             :                 }
   16645          24 :                 if (r->in.server_name) {
   16646          24 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16647          24 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   16648          24 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   16649          24 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   16650          24 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   16651          24 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   16652          24 :                         if (length_server_name_1 > size_server_name_1) {
   16653           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   16654             :                         }
   16655          24 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   16656          24 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   16657          24 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   16658             :                 }
   16659          24 :                 NDR_PULL_ALLOC(ndr, r->out.dom_trust_list);
   16660          24 :                 NDR_ZERO_STRUCTP(r->out.dom_trust_list);
   16661             :         }
   16662          24 :         if (flags & NDR_OUT) {
   16663             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16664             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16665           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16666           0 :                         NDR_PULL_ALLOC(ndr, r->out.dom_trust_list);
   16667             :                 }
   16668           0 :                 _mem_save_dom_trust_list_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16669           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.dom_trust_list, LIBNDR_FLAG_REF_ALLOC);
   16670           0 :                 NDR_CHECK(ndr_pull_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dom_trust_list));
   16671           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_trust_list_0, LIBNDR_FLAG_REF_ALLOC);
   16672           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16673             :         }
   16674          20 :         return NDR_ERR_SUCCESS;
   16675             : }
   16676             : 
   16677           0 : _PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomainsEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_NetrEnumerateTrustedDomainsEx *r)
   16678             : {
   16679           0 :         ndr_print_struct(ndr, name, "netr_NetrEnumerateTrustedDomainsEx");
   16680           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16681           0 :         ndr->depth++;
   16682           0 :         if (flags & NDR_SET_VALUES) {
   16683           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16684             :         }
   16685           0 :         if (flags & NDR_IN) {
   16686           0 :                 ndr_print_struct(ndr, "in", "netr_NetrEnumerateTrustedDomainsEx");
   16687           0 :                 ndr->depth++;
   16688           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   16689           0 :                 ndr->depth++;
   16690           0 :                 if (r->in.server_name) {
   16691           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   16692             :                 }
   16693           0 :                 ndr->depth--;
   16694           0 :                 ndr->depth--;
   16695             :         }
   16696           0 :         if (flags & NDR_OUT) {
   16697           0 :                 ndr_print_struct(ndr, "out", "netr_NetrEnumerateTrustedDomainsEx");
   16698           0 :                 ndr->depth++;
   16699           0 :                 ndr_print_ptr(ndr, "dom_trust_list", r->out.dom_trust_list);
   16700           0 :                 ndr->depth++;
   16701           0 :                 ndr_print_netr_DomainTrustList(ndr, "dom_trust_list", r->out.dom_trust_list);
   16702           0 :                 ndr->depth--;
   16703           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   16704           0 :                 ndr->depth--;
   16705             :         }
   16706           0 :         ndr->depth--;
   16707             : }
   16708             : 
   16709         162 : static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesExW(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsRAddressToSitenamesExW *r)
   16710             : {
   16711          27 :         uint32_t cntr_addresses_1;
   16712         162 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16713         162 :         if (flags & NDR_IN) {
   16714          72 :                 if (r->in.addresses == NULL) {
   16715           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16716             :                 }
   16717          72 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   16718          72 :                 if (r->in.server_name) {
   16719          72 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   16720          72 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   16721          72 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   16722          72 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   16723             :                 }
   16724          72 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
   16725          72 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.count));
   16726         504 :                 for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
   16727         432 :                         NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1]));
   16728             :                 }
   16729         504 :                 for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
   16730         432 :                         NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1]));
   16731             :                 }
   16732             :         }
   16733         162 :         if (flags & NDR_OUT) {
   16734          90 :                 if (r->out.ctr == NULL) {
   16735           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16736             :                 }
   16737          90 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ctr));
   16738          90 :                 if (*r->out.ctr) {
   16739          90 :                         NDR_CHECK(ndr_push_netr_DsRAddressToSitenamesExWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
   16740             :                 }
   16741          90 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16742             :         }
   16743         135 :         return NDR_ERR_SUCCESS;
   16744             : }
   16745             : 
   16746         144 : static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesExW(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsRAddressToSitenamesExW *r)
   16747             : {
   16748          24 :         uint32_t _ptr_server_name;
   16749         144 :         uint32_t size_server_name_1 = 0;
   16750         144 :         uint32_t length_server_name_1 = 0;
   16751         144 :         uint32_t size_addresses_1 = 0;
   16752          24 :         uint32_t cntr_addresses_1;
   16753          24 :         uint32_t _ptr_ctr;
   16754         144 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   16755         144 :         TALLOC_CTX *_mem_save_addresses_1 = NULL;
   16756         144 :         TALLOC_CTX *_mem_save_ctr_0 = NULL;
   16757         144 :         TALLOC_CTX *_mem_save_ctr_1 = NULL;
   16758         144 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16759         144 :         if (flags & NDR_IN) {
   16760          72 :                 NDR_ZERO_STRUCT(r->out);
   16761             : 
   16762          72 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   16763          72 :                 if (_ptr_server_name) {
   16764          72 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   16765             :                 } else {
   16766           0 :                         r->in.server_name = NULL;
   16767             :                 }
   16768          72 :                 if (r->in.server_name) {
   16769          72 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16770          72 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   16771          72 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   16772          72 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   16773          72 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   16774          72 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   16775          72 :                         if (length_server_name_1 > size_server_name_1) {
   16776           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   16777             :                         }
   16778          72 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   16779          72 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   16780          72 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   16781             :                 }
   16782          72 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
   16783          72 :                 if (r->in.count > 32000) {
   16784           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.count), (uint32_t)(0), (uint32_t)(32000));
   16785             :                 }
   16786          72 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.addresses));
   16787          72 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.addresses, &size_addresses_1));
   16788          72 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16789          72 :                         NDR_PULL_ALLOC_N(ndr, r->in.addresses, size_addresses_1);
   16790             :                 }
   16791          72 :                 _mem_save_addresses_1 = NDR_PULL_GET_MEM_CTX(ndr);
   16792          72 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.addresses, 0);
   16793         504 :                 for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
   16794         432 :                         NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1]));
   16795             :                 }
   16796         504 :                 for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
   16797         432 :                         NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1]));
   16798             :                 }
   16799          72 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addresses_1, 0);
   16800          72 :                 NDR_PULL_ALLOC(ndr, r->out.ctr);
   16801          72 :                 NDR_ZERO_STRUCTP(r->out.ctr);
   16802          72 :                 if (r->in.addresses) {
   16803          72 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.addresses, r->in.count));
   16804             :                 }
   16805         504 :                 for (cntr_addresses_1 = 0; cntr_addresses_1 < (size_addresses_1); cntr_addresses_1++) {
   16806          72 :                 }
   16807             :         }
   16808         144 :         if (flags & NDR_OUT) {
   16809             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16810             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16811          72 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16812          18 :                         NDR_PULL_ALLOC(ndr, r->out.ctr);
   16813             :                 }
   16814          72 :                 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16815          72 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
   16816          72 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr));
   16817          72 :                 if (_ptr_ctr) {
   16818          72 :                         NDR_PULL_ALLOC(ndr, *r->out.ctr);
   16819             :                 } else {
   16820           0 :                         *r->out.ctr = NULL;
   16821             :                 }
   16822          72 :                 if (*r->out.ctr) {
   16823          72 :                         _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr);
   16824          72 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, 0);
   16825          72 :                         NDR_CHECK(ndr_pull_netr_DsRAddressToSitenamesExWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
   16826          72 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, 0);
   16827             :                 }
   16828          72 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
   16829          72 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16830             :         }
   16831         120 :         return NDR_ERR_SUCCESS;
   16832             : }
   16833             : 
   16834          36 : _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsRAddressToSitenamesExW *r)
   16835             : {
   16836           6 :         uint32_t cntr_addresses_1;
   16837          36 :         ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesExW");
   16838          36 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16839          36 :         ndr->depth++;
   16840          36 :         if (flags & NDR_SET_VALUES) {
   16841           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16842             :         }
   16843          36 :         if (flags & NDR_IN) {
   16844           0 :                 ndr_print_struct(ndr, "in", "netr_DsRAddressToSitenamesExW");
   16845           0 :                 ndr->depth++;
   16846           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   16847           0 :                 ndr->depth++;
   16848           0 :                 if (r->in.server_name) {
   16849           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   16850             :                 }
   16851           0 :                 ndr->depth--;
   16852           0 :                 ndr_print_uint32(ndr, "count", r->in.count);
   16853           0 :                 ndr_print_ptr(ndr, "addresses", r->in.addresses);
   16854           0 :                 ndr->depth++;
   16855           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "addresses", (uint32_t)(r->in.count));
   16856           0 :                 ndr->depth++;
   16857           0 :                 for (cntr_addresses_1 = 0; cntr_addresses_1 < (r->in.count); cntr_addresses_1++) {
   16858           0 :                         ndr_print_netr_DsRAddress(ndr, "addresses", &r->in.addresses[cntr_addresses_1]);
   16859             :                 }
   16860           0 :                 ndr->depth--;
   16861           0 :                 ndr->depth--;
   16862           0 :                 ndr->depth--;
   16863             :         }
   16864          36 :         if (flags & NDR_OUT) {
   16865          36 :                 ndr_print_struct(ndr, "out", "netr_DsRAddressToSitenamesExW");
   16866          36 :                 ndr->depth++;
   16867          36 :                 ndr_print_ptr(ndr, "ctr", r->out.ctr);
   16868          36 :                 ndr->depth++;
   16869          36 :                 ndr_print_ptr(ndr, "ctr", *r->out.ctr);
   16870          36 :                 ndr->depth++;
   16871          36 :                 if (*r->out.ctr) {
   16872          36 :                         ndr_print_netr_DsRAddressToSitenamesExWCtr(ndr, "ctr", *r->out.ctr);
   16873             :                 }
   16874          36 :                 ndr->depth--;
   16875          36 :                 ndr->depth--;
   16876          36 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   16877          36 :                 ndr->depth--;
   16878             :         }
   16879          36 :         ndr->depth--;
   16880             : }
   16881             : 
   16882          64 : static enum ndr_err_code ndr_push_netr_DsrGetDcSiteCoverageW(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsrGetDcSiteCoverageW *r)
   16883             : {
   16884          64 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16885          64 :         if (flags & NDR_IN) {
   16886          29 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   16887          29 :                 if (r->in.server_name) {
   16888          29 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   16889          29 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   16890          29 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   16891          29 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   16892             :                 }
   16893             :         }
   16894          64 :         if (flags & NDR_OUT) {
   16895          35 :                 if (r->out.ctr == NULL) {
   16896           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16897             :                 }
   16898          35 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ctr));
   16899          35 :                 if (*r->out.ctr) {
   16900          35 :                         NDR_CHECK(ndr_push_DcSitesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
   16901             :                 }
   16902          35 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16903             :         }
   16904          55 :         return NDR_ERR_SUCCESS;
   16905             : }
   16906             : 
   16907          58 : static enum ndr_err_code ndr_pull_netr_DsrGetDcSiteCoverageW(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsrGetDcSiteCoverageW *r)
   16908             : {
   16909           8 :         uint32_t _ptr_server_name;
   16910          58 :         uint32_t size_server_name_1 = 0;
   16911          58 :         uint32_t length_server_name_1 = 0;
   16912           8 :         uint32_t _ptr_ctr;
   16913          58 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   16914          58 :         TALLOC_CTX *_mem_save_ctr_0 = NULL;
   16915          58 :         TALLOC_CTX *_mem_save_ctr_1 = NULL;
   16916          58 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16917          58 :         if (flags & NDR_IN) {
   16918          29 :                 NDR_ZERO_STRUCT(r->out);
   16919             : 
   16920          29 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   16921          29 :                 if (_ptr_server_name) {
   16922          29 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   16923             :                 } else {
   16924           0 :                         r->in.server_name = NULL;
   16925             :                 }
   16926          29 :                 if (r->in.server_name) {
   16927          29 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16928          29 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   16929          29 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   16930          29 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   16931          29 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   16932          29 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   16933          29 :                         if (length_server_name_1 > size_server_name_1) {
   16934           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   16935             :                         }
   16936          29 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   16937          29 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   16938          29 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   16939             :                 }
   16940          29 :                 NDR_PULL_ALLOC(ndr, r->out.ctr);
   16941          29 :                 NDR_ZERO_STRUCTP(r->out.ctr);
   16942             :         }
   16943          58 :         if (flags & NDR_OUT) {
   16944             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16945             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16946          29 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16947          11 :                         NDR_PULL_ALLOC(ndr, r->out.ctr);
   16948             :                 }
   16949          29 :                 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16950          29 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
   16951          29 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr));
   16952          29 :                 if (_ptr_ctr) {
   16953          29 :                         NDR_PULL_ALLOC(ndr, *r->out.ctr);
   16954             :                 } else {
   16955           0 :                         *r->out.ctr = NULL;
   16956             :                 }
   16957          29 :                 if (*r->out.ctr) {
   16958          29 :                         _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr);
   16959          29 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, 0);
   16960          29 :                         NDR_CHECK(ndr_pull_DcSitesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr));
   16961          29 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, 0);
   16962             :                 }
   16963          29 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
   16964          29 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16965             :         }
   16966          50 :         return NDR_ERR_SUCCESS;
   16967             : }
   16968             : 
   16969          12 : _PUBLIC_ void ndr_print_netr_DsrGetDcSiteCoverageW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsrGetDcSiteCoverageW *r)
   16970             : {
   16971          12 :         ndr_print_struct(ndr, name, "netr_DsrGetDcSiteCoverageW");
   16972          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16973          12 :         ndr->depth++;
   16974          12 :         if (flags & NDR_SET_VALUES) {
   16975           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16976             :         }
   16977          12 :         if (flags & NDR_IN) {
   16978           0 :                 ndr_print_struct(ndr, "in", "netr_DsrGetDcSiteCoverageW");
   16979           0 :                 ndr->depth++;
   16980           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   16981           0 :                 ndr->depth++;
   16982           0 :                 if (r->in.server_name) {
   16983           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   16984             :                 }
   16985           0 :                 ndr->depth--;
   16986           0 :                 ndr->depth--;
   16987             :         }
   16988          12 :         if (flags & NDR_OUT) {
   16989          12 :                 ndr_print_struct(ndr, "out", "netr_DsrGetDcSiteCoverageW");
   16990          12 :                 ndr->depth++;
   16991          12 :                 ndr_print_ptr(ndr, "ctr", r->out.ctr);
   16992          12 :                 ndr->depth++;
   16993          12 :                 ndr_print_ptr(ndr, "ctr", *r->out.ctr);
   16994          12 :                 ndr->depth++;
   16995          12 :                 if (*r->out.ctr) {
   16996          12 :                         ndr_print_DcSitesCtr(ndr, "ctr", *r->out.ctr);
   16997             :                 }
   16998          12 :                 ndr->depth--;
   16999          12 :                 ndr->depth--;
   17000          12 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   17001          12 :                 ndr->depth--;
   17002             :         }
   17003          12 :         ndr->depth--;
   17004             : }
   17005             : 
   17006       14191 : static enum ndr_err_code ndr_push_netr_LogonSamLogonEx(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonSamLogonEx *r)
   17007             : {
   17008       14191 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   17009       14191 :         if (flags & NDR_IN) {
   17010        6585 :                 if (r->in.logon == NULL) {
   17011           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17012             :                 }
   17013        6585 :                 if (r->in.flags == NULL) {
   17014           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17015             :                 }
   17016        6585 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   17017        6585 :                 if (r->in.server_name) {
   17018        6585 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   17019        6585 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   17020        6585 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   17021        6585 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   17022             :                 }
   17023        6585 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
   17024        6585 :                 if (r->in.computer_name) {
   17025        6585 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   17026        6585 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   17027        6585 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   17028        6585 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   17029             :                 }
   17030        6585 :                 NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
   17031        6585 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level));
   17032        6585 :                 NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
   17033        6585 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
   17034        6585 :                 NDR_CHECK(ndr_push_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, *r->in.flags));
   17035             :         }
   17036       14191 :         if (flags & NDR_OUT) {
   17037        7606 :                 if (r->out.validation == NULL) {
   17038           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17039             :                 }
   17040        7606 :                 if (r->out.authoritative == NULL) {
   17041           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17042             :                 }
   17043        7606 :                 if (r->out.flags == NULL) {
   17044           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17045             :                 }
   17046        7606 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.validation, r->in.validation_level));
   17047        7606 :                 NDR_CHECK(ndr_push_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
   17048        7606 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.authoritative));
   17049        7606 :                 NDR_CHECK(ndr_push_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, *r->out.flags));
   17050        7606 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   17051             :         }
   17052       12981 :         return NDR_ERR_SUCCESS;
   17053             : }
   17054             : 
   17055       13531 : static enum ndr_err_code ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonSamLogonEx *r)
   17056             : {
   17057        1100 :         uint32_t _ptr_server_name;
   17058       13531 :         uint32_t size_server_name_1 = 0;
   17059       13531 :         uint32_t length_server_name_1 = 0;
   17060        1100 :         uint32_t _ptr_computer_name;
   17061       13531 :         uint32_t size_computer_name_1 = 0;
   17062       13531 :         uint32_t length_computer_name_1 = 0;
   17063       13531 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   17064       13531 :         TALLOC_CTX *_mem_save_computer_name_0 = NULL;
   17065       13531 :         TALLOC_CTX *_mem_save_logon_0 = NULL;
   17066       13531 :         TALLOC_CTX *_mem_save_validation_0 = NULL;
   17067       13531 :         TALLOC_CTX *_mem_save_authoritative_0 = NULL;
   17068       13531 :         TALLOC_CTX *_mem_save_flags_0 = NULL;
   17069       13531 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   17070       13531 :         if (flags & NDR_IN) {
   17071        6946 :                 NDR_ZERO_STRUCT(r->out);
   17072             : 
   17073        6946 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   17074        6946 :                 if (_ptr_server_name) {
   17075        6946 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   17076             :                 } else {
   17077           0 :                         r->in.server_name = NULL;
   17078             :                 }
   17079        6946 :                 if (r->in.server_name) {
   17080        6946 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17081        6946 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   17082        6946 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   17083        6946 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   17084        6946 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   17085        6946 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   17086        6946 :                         if (length_server_name_1 > size_server_name_1) {
   17087           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   17088             :                         }
   17089        6946 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   17090        6946 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   17091        6946 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   17092             :                 }
   17093        6946 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
   17094        6946 :                 if (_ptr_computer_name) {
   17095        6946 :                         NDR_PULL_ALLOC(ndr, r->in.computer_name);
   17096             :                 } else {
   17097           0 :                         r->in.computer_name = NULL;
   17098             :                 }
   17099        6946 :                 if (r->in.computer_name) {
   17100        6946 :                         _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17101        6946 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
   17102        6946 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   17103        6946 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   17104        6946 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   17105        6946 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   17106        6946 :                         if (length_computer_name_1 > size_computer_name_1) {
   17107           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   17108             :                         }
   17109        6946 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   17110        6946 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   17111        6946 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
   17112             :                 }
   17113        6946 :                 NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
   17114        6946 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17115        6946 :                         NDR_PULL_ALLOC(ndr, r->in.logon);
   17116             :                 }
   17117        6946 :                 _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17118        6946 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC);
   17119        6946 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level));
   17120        6946 :                 NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
   17121        6946 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC);
   17122        6946 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
   17123        6946 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17124        6946 :                         NDR_PULL_ALLOC(ndr, r->in.flags);
   17125             :                 }
   17126        6946 :                 _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17127        6946 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.flags, LIBNDR_FLAG_REF_ALLOC);
   17128        6946 :                 NDR_CHECK(ndr_pull_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, r->in.flags));
   17129        6946 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
   17130        6946 :                 NDR_PULL_ALLOC(ndr, r->out.validation);
   17131        6946 :                 NDR_ZERO_STRUCTP(r->out.validation);
   17132        6946 :                 NDR_PULL_ALLOC(ndr, r->out.authoritative);
   17133        6946 :                 NDR_ZERO_STRUCTP(r->out.authoritative);
   17134        6946 :                 NDR_PULL_ALLOC(ndr, r->out.flags);
   17135        6946 :                 *r->out.flags = *r->in.flags;
   17136             :         }
   17137       13531 :         if (flags & NDR_OUT) {
   17138             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   17139             :                 if (r->in.logon == NULL) {
   17140             :                         NDR_PULL_ALLOC(ndr, r->in.logon);
   17141             :                         NDR_ZERO_STRUCTP(r->in.logon);
   17142             :                 }
   17143             :                 if (r->in.flags == NULL) {
   17144             :                         NDR_PULL_ALLOC(ndr, r->in.flags);
   17145             :                         NDR_ZERO_STRUCTP(r->in.flags);
   17146             :                 }
   17147             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   17148        6585 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17149         887 :                         NDR_PULL_ALLOC(ndr, r->out.validation);
   17150             :                 }
   17151        6585 :                 _mem_save_validation_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17152        6585 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.validation, LIBNDR_FLAG_REF_ALLOC);
   17153        6585 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.validation, r->in.validation_level));
   17154        6585 :                 NDR_CHECK(ndr_pull_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
   17155        6585 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_validation_0, LIBNDR_FLAG_REF_ALLOC);
   17156        6585 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17157         887 :                         NDR_PULL_ALLOC(ndr, r->out.authoritative);
   17158             :                 }
   17159        6585 :                 _mem_save_authoritative_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17160        6585 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.authoritative, LIBNDR_FLAG_REF_ALLOC);
   17161        6585 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.authoritative));
   17162        6585 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authoritative_0, LIBNDR_FLAG_REF_ALLOC);
   17163        6585 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17164         887 :                         NDR_PULL_ALLOC(ndr, r->out.flags);
   17165             :                 }
   17166        6585 :                 _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17167        6585 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.flags, LIBNDR_FLAG_REF_ALLOC);
   17168        6585 :                 NDR_CHECK(ndr_pull_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, r->out.flags));
   17169        6585 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
   17170        6585 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   17171             :         }
   17172       12431 :         return NDR_ERR_SUCCESS;
   17173             : }
   17174             : 
   17175        1320 : _PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonSamLogonEx *r)
   17176             : {
   17177        1320 :         ndr_print_struct(ndr, name, "netr_LogonSamLogonEx");
   17178        1320 :         if (r == NULL) { ndr_print_null(ndr); return; }
   17179        1320 :         ndr->depth++;
   17180        1320 :         if (flags & NDR_SET_VALUES) {
   17181           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   17182             :         }
   17183        1320 :         if (flags & NDR_IN) {
   17184           0 :                 ndr_print_struct(ndr, "in", "netr_LogonSamLogonEx");
   17185           0 :                 ndr->depth++;
   17186           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   17187           0 :                 ndr->depth++;
   17188           0 :                 if (r->in.server_name) {
   17189           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   17190             :                 }
   17191           0 :                 ndr->depth--;
   17192           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   17193           0 :                 ndr->depth++;
   17194           0 :                 if (r->in.computer_name) {
   17195           0 :                         ndr_print_string(ndr, "computer_name", r->in.computer_name);
   17196             :                 }
   17197           0 :                 ndr->depth--;
   17198           0 :                 ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
   17199           0 :                 ndr_print_ptr(ndr, "logon", r->in.logon);
   17200           0 :                 ndr->depth++;
   17201           0 :                 ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level);
   17202           0 :                 ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon);
   17203           0 :                 ndr->depth--;
   17204           0 :                 ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
   17205           0 :                 ndr_print_ptr(ndr, "flags", r->in.flags);
   17206           0 :                 ndr->depth++;
   17207           0 :                 ndr_print_netr_LogonSamLogon_flags(ndr, "flags", *r->in.flags);
   17208           0 :                 ndr->depth--;
   17209           0 :                 ndr->depth--;
   17210             :         }
   17211        1320 :         if (flags & NDR_OUT) {
   17212        1320 :                 ndr_print_struct(ndr, "out", "netr_LogonSamLogonEx");
   17213        1320 :                 ndr->depth++;
   17214        1320 :                 ndr_print_ptr(ndr, "validation", r->out.validation);
   17215        1320 :                 ndr->depth++;
   17216        1320 :                 ndr_print_set_switch_value(ndr, r->out.validation, r->in.validation_level);
   17217        1320 :                 ndr_print_netr_Validation(ndr, "validation", r->out.validation);
   17218        1320 :                 ndr->depth--;
   17219        1320 :                 ndr_print_ptr(ndr, "authoritative", r->out.authoritative);
   17220        1320 :                 ndr->depth++;
   17221        1320 :                 ndr_print_uint8(ndr, "authoritative", *r->out.authoritative);
   17222        1320 :                 ndr->depth--;
   17223        1320 :                 ndr_print_ptr(ndr, "flags", r->out.flags);
   17224        1320 :                 ndr->depth++;
   17225        1320 :                 ndr_print_netr_LogonSamLogon_flags(ndr, "flags", *r->out.flags);
   17226        1320 :                 ndr->depth--;
   17227        1320 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   17228        1320 :                 ndr->depth--;
   17229             :         }
   17230        1320 :         ndr->depth--;
   17231             : }
   17232             : 
   17233         114 : static enum ndr_err_code ndr_push_netr_DsrEnumerateDomainTrusts(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsrEnumerateDomainTrusts *r)
   17234             : {
   17235         114 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   17236         114 :         if (flags & NDR_IN) {
   17237          48 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   17238          48 :                 if (r->in.server_name) {
   17239          48 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   17240          48 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   17241          48 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   17242          48 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   17243             :                 }
   17244          48 :                 NDR_CHECK(ndr_push_netr_TrustFlags(ndr, NDR_SCALARS, r->in.trust_flags));
   17245             :         }
   17246         114 :         if (flags & NDR_OUT) {
   17247          66 :                 if (r->out.trusts == NULL) {
   17248           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17249             :                 }
   17250          66 :                 NDR_CHECK(ndr_push_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusts));
   17251          66 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   17252             :         }
   17253         105 :         return NDR_ERR_SUCCESS;
   17254             : }
   17255             : 
   17256         108 : static enum ndr_err_code ndr_pull_netr_DsrEnumerateDomainTrusts(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsrEnumerateDomainTrusts *r)
   17257             : {
   17258           8 :         uint32_t _ptr_server_name;
   17259         108 :         uint32_t size_server_name_1 = 0;
   17260         108 :         uint32_t length_server_name_1 = 0;
   17261         108 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   17262         108 :         TALLOC_CTX *_mem_save_trusts_0 = NULL;
   17263         108 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   17264         108 :         if (flags & NDR_IN) {
   17265          60 :                 NDR_ZERO_STRUCT(r->out);
   17266             : 
   17267          60 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   17268          60 :                 if (_ptr_server_name) {
   17269          60 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   17270             :                 } else {
   17271           0 :                         r->in.server_name = NULL;
   17272             :                 }
   17273          60 :                 if (r->in.server_name) {
   17274          60 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17275          60 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   17276          60 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   17277          60 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   17278          60 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   17279          60 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   17280          60 :                         if (length_server_name_1 > size_server_name_1) {
   17281           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   17282             :                         }
   17283          60 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   17284          60 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   17285          60 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   17286             :                 }
   17287          60 :                 NDR_CHECK(ndr_pull_netr_TrustFlags(ndr, NDR_SCALARS, &r->in.trust_flags));
   17288          60 :                 NDR_PULL_ALLOC(ndr, r->out.trusts);
   17289          60 :                 NDR_ZERO_STRUCTP(r->out.trusts);
   17290             :         }
   17291         108 :         if (flags & NDR_OUT) {
   17292             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   17293             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   17294          48 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17295          30 :                         NDR_PULL_ALLOC(ndr, r->out.trusts);
   17296             :                 }
   17297          48 :                 _mem_save_trusts_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17298          48 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.trusts, LIBNDR_FLAG_REF_ALLOC);
   17299          48 :                 NDR_CHECK(ndr_pull_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusts));
   17300          48 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_0, LIBNDR_FLAG_REF_ALLOC);
   17301          48 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   17302             :         }
   17303         100 :         return NDR_ERR_SUCCESS;
   17304             : }
   17305             : 
   17306          12 : _PUBLIC_ void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsrEnumerateDomainTrusts *r)
   17307             : {
   17308          12 :         ndr_print_struct(ndr, name, "netr_DsrEnumerateDomainTrusts");
   17309          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
   17310          12 :         ndr->depth++;
   17311          12 :         if (flags & NDR_SET_VALUES) {
   17312           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   17313             :         }
   17314          12 :         if (flags & NDR_IN) {
   17315           0 :                 ndr_print_struct(ndr, "in", "netr_DsrEnumerateDomainTrusts");
   17316           0 :                 ndr->depth++;
   17317           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   17318           0 :                 ndr->depth++;
   17319           0 :                 if (r->in.server_name) {
   17320           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   17321             :                 }
   17322           0 :                 ndr->depth--;
   17323           0 :                 ndr_print_netr_TrustFlags(ndr, "trust_flags", r->in.trust_flags);
   17324           0 :                 ndr->depth--;
   17325             :         }
   17326          12 :         if (flags & NDR_OUT) {
   17327          12 :                 ndr_print_struct(ndr, "out", "netr_DsrEnumerateDomainTrusts");
   17328          12 :                 ndr->depth++;
   17329          12 :                 ndr_print_ptr(ndr, "trusts", r->out.trusts);
   17330          12 :                 ndr->depth++;
   17331          12 :                 ndr_print_netr_DomainTrustList(ndr, "trusts", r->out.trusts);
   17332          12 :                 ndr->depth--;
   17333          12 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   17334          12 :                 ndr->depth--;
   17335             :         }
   17336          12 :         ndr->depth--;
   17337             : }
   17338             : 
   17339           0 : static enum ndr_err_code ndr_push_netr_DsrDeregisterDNSHostRecords(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsrDeregisterDNSHostRecords *r)
   17340             : {
   17341           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   17342           0 :         if (flags & NDR_IN) {
   17343           0 :                 if (r->in.dns_host == NULL) {
   17344           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17345             :                 }
   17346           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   17347           0 :                 if (r->in.server_name) {
   17348           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   17349           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   17350           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   17351           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   17352             :                 }
   17353           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain));
   17354           0 :                 if (r->in.domain) {
   17355           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_UTF16)));
   17356           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   17357           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_UTF16)));
   17358           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain, ndr_charset_length(r->in.domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   17359             :                 }
   17360           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
   17361           0 :                 if (r->in.domain_guid) {
   17362           0 :                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
   17363             :                 }
   17364           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dsa_guid));
   17365           0 :                 if (r->in.dsa_guid) {
   17366           0 :                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.dsa_guid));
   17367             :                 }
   17368           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_host, CH_UTF16)));
   17369           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   17370           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_host, CH_UTF16)));
   17371           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dns_host, ndr_charset_length(r->in.dns_host, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   17372             :         }
   17373           0 :         if (flags & NDR_OUT) {
   17374           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   17375             :         }
   17376           0 :         return NDR_ERR_SUCCESS;
   17377             : }
   17378             : 
   17379           0 : static enum ndr_err_code ndr_pull_netr_DsrDeregisterDNSHostRecords(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsrDeregisterDNSHostRecords *r)
   17380             : {
   17381           0 :         uint32_t _ptr_server_name;
   17382           0 :         uint32_t size_server_name_1 = 0;
   17383           0 :         uint32_t length_server_name_1 = 0;
   17384           0 :         uint32_t _ptr_domain;
   17385           0 :         uint32_t size_domain_1 = 0;
   17386           0 :         uint32_t length_domain_1 = 0;
   17387           0 :         uint32_t _ptr_domain_guid;
   17388           0 :         uint32_t _ptr_dsa_guid;
   17389           0 :         uint32_t size_dns_host_1 = 0;
   17390           0 :         uint32_t length_dns_host_1 = 0;
   17391           0 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   17392           0 :         TALLOC_CTX *_mem_save_domain_0 = NULL;
   17393           0 :         TALLOC_CTX *_mem_save_domain_guid_0 = NULL;
   17394           0 :         TALLOC_CTX *_mem_save_dsa_guid_0 = NULL;
   17395           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   17396           0 :         if (flags & NDR_IN) {
   17397           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   17398           0 :                 if (_ptr_server_name) {
   17399           0 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   17400             :                 } else {
   17401           0 :                         r->in.server_name = NULL;
   17402             :                 }
   17403           0 :                 if (r->in.server_name) {
   17404           0 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17405           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   17406           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   17407           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   17408           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   17409           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   17410           0 :                         if (length_server_name_1 > size_server_name_1) {
   17411           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   17412             :                         }
   17413           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   17414           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   17415           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   17416             :                 }
   17417           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
   17418           0 :                 if (_ptr_domain) {
   17419           0 :                         NDR_PULL_ALLOC(ndr, r->in.domain);
   17420             :                 } else {
   17421           0 :                         r->in.domain = NULL;
   17422             :                 }
   17423           0 :                 if (r->in.domain) {
   17424           0 :                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17425           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.domain, 0);
   17426           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain));
   17427           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain));
   17428           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.domain, &size_domain_1));
   17429           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.domain, &length_domain_1));
   17430           0 :                         if (length_domain_1 > size_domain_1) {
   17431           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_1, length_domain_1);
   17432             :                         }
   17433           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
   17434           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
   17435           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
   17436             :                 }
   17437           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
   17438           0 :                 if (_ptr_domain_guid) {
   17439           0 :                         NDR_PULL_ALLOC(ndr, r->in.domain_guid);
   17440             :                 } else {
   17441           0 :                         r->in.domain_guid = NULL;
   17442             :                 }
   17443           0 :                 if (r->in.domain_guid) {
   17444           0 :                         _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17445           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
   17446           0 :                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid));
   17447           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
   17448             :                 }
   17449           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dsa_guid));
   17450           0 :                 if (_ptr_dsa_guid) {
   17451           0 :                         NDR_PULL_ALLOC(ndr, r->in.dsa_guid);
   17452             :                 } else {
   17453           0 :                         r->in.dsa_guid = NULL;
   17454             :                 }
   17455           0 :                 if (r->in.dsa_guid) {
   17456           0 :                         _mem_save_dsa_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17457           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.dsa_guid, 0);
   17458           0 :                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.dsa_guid));
   17459           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dsa_guid_0, 0);
   17460             :                 }
   17461           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_host));
   17462           0 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_host));
   17463           0 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.dns_host, &size_dns_host_1));
   17464           0 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.dns_host, &length_dns_host_1));
   17465           0 :                 if (length_dns_host_1 > size_dns_host_1) {
   17466           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_host_1, length_dns_host_1);
   17467             :                 }
   17468           0 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_host_1, sizeof(uint16_t)));
   17469           0 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dns_host, length_dns_host_1, sizeof(uint16_t), CH_UTF16));
   17470             :         }
   17471           0 :         if (flags & NDR_OUT) {
   17472             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   17473             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   17474           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   17475             :         }
   17476           0 :         return NDR_ERR_SUCCESS;
   17477             : }
   17478             : 
   17479           0 : _PUBLIC_ void ndr_print_netr_DsrDeregisterDNSHostRecords(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsrDeregisterDNSHostRecords *r)
   17480             : {
   17481           0 :         ndr_print_struct(ndr, name, "netr_DsrDeregisterDNSHostRecords");
   17482           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   17483           0 :         ndr->depth++;
   17484           0 :         if (flags & NDR_SET_VALUES) {
   17485           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   17486             :         }
   17487           0 :         if (flags & NDR_IN) {
   17488           0 :                 ndr_print_struct(ndr, "in", "netr_DsrDeregisterDNSHostRecords");
   17489           0 :                 ndr->depth++;
   17490           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   17491           0 :                 ndr->depth++;
   17492           0 :                 if (r->in.server_name) {
   17493           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   17494             :                 }
   17495           0 :                 ndr->depth--;
   17496           0 :                 ndr_print_ptr(ndr, "domain", r->in.domain);
   17497           0 :                 ndr->depth++;
   17498           0 :                 if (r->in.domain) {
   17499           0 :                         ndr_print_string(ndr, "domain", r->in.domain);
   17500             :                 }
   17501           0 :                 ndr->depth--;
   17502           0 :                 ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
   17503           0 :                 ndr->depth++;
   17504           0 :                 if (r->in.domain_guid) {
   17505           0 :                         ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
   17506             :                 }
   17507           0 :                 ndr->depth--;
   17508           0 :                 ndr_print_ptr(ndr, "dsa_guid", r->in.dsa_guid);
   17509           0 :                 ndr->depth++;
   17510           0 :                 if (r->in.dsa_guid) {
   17511           0 :                         ndr_print_GUID(ndr, "dsa_guid", r->in.dsa_guid);
   17512             :                 }
   17513           0 :                 ndr->depth--;
   17514           0 :                 ndr_print_ptr(ndr, "dns_host", r->in.dns_host);
   17515           0 :                 ndr->depth++;
   17516           0 :                 ndr_print_string(ndr, "dns_host", r->in.dns_host);
   17517           0 :                 ndr->depth--;
   17518           0 :                 ndr->depth--;
   17519             :         }
   17520           0 :         if (flags & NDR_OUT) {
   17521           0 :                 ndr_print_struct(ndr, "out", "netr_DsrDeregisterDNSHostRecords");
   17522           0 :                 ndr->depth++;
   17523           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   17524           0 :                 ndr->depth--;
   17525             :         }
   17526           0 :         ndr->depth--;
   17527             : }
   17528             : 
   17529          54 : static enum ndr_err_code ndr_push_netr_ServerTrustPasswordsGet(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerTrustPasswordsGet *r)
   17530             : {
   17531          54 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   17532          54 :         if (flags & NDR_IN) {
   17533          24 :                 if (r->in.account_name == NULL) {
   17534           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17535             :                 }
   17536          24 :                 if (r->in.computer_name == NULL) {
   17537           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17538             :                 }
   17539          24 :                 if (r->in.credential == NULL) {
   17540           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17541             :                 }
   17542          24 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   17543          24 :                 if (r->in.server_name) {
   17544          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   17545          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   17546          24 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   17547          24 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   17548             :                 }
   17549          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   17550          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   17551          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   17552          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   17553          24 :                 NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
   17554          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   17555          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   17556          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   17557          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   17558          24 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   17559             :         }
   17560          54 :         if (flags & NDR_OUT) {
   17561          30 :                 if (r->out.return_authenticator == NULL) {
   17562           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17563             :                 }
   17564          30 :                 if (r->out.new_owf_password == NULL) {
   17565           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17566             :                 }
   17567          30 :                 if (r->out.old_owf_password == NULL) {
   17568           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17569             :                 }
   17570          30 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   17571          30 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.new_owf_password));
   17572          30 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.old_owf_password));
   17573          30 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   17574             :         }
   17575          45 :         return NDR_ERR_SUCCESS;
   17576             : }
   17577             : 
   17578          48 : static enum ndr_err_code ndr_pull_netr_ServerTrustPasswordsGet(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerTrustPasswordsGet *r)
   17579             : {
   17580           8 :         uint32_t _ptr_server_name;
   17581          48 :         uint32_t size_server_name_1 = 0;
   17582          48 :         uint32_t length_server_name_1 = 0;
   17583          48 :         uint32_t size_account_name_1 = 0;
   17584          48 :         uint32_t length_account_name_1 = 0;
   17585          48 :         uint32_t size_computer_name_1 = 0;
   17586          48 :         uint32_t length_computer_name_1 = 0;
   17587          48 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   17588          48 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   17589          48 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   17590          48 :         TALLOC_CTX *_mem_save_new_owf_password_0 = NULL;
   17591          48 :         TALLOC_CTX *_mem_save_old_owf_password_0 = NULL;
   17592          48 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   17593          48 :         if (flags & NDR_IN) {
   17594          24 :                 NDR_ZERO_STRUCT(r->out);
   17595             : 
   17596          24 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   17597          24 :                 if (_ptr_server_name) {
   17598          24 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   17599             :                 } else {
   17600           0 :                         r->in.server_name = NULL;
   17601             :                 }
   17602          24 :                 if (r->in.server_name) {
   17603          24 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17604          24 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   17605          24 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   17606          24 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   17607          24 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   17608          24 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   17609          24 :                         if (length_server_name_1 > size_server_name_1) {
   17610           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   17611             :                         }
   17612          24 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   17613          24 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   17614          24 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   17615             :                 }
   17616          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
   17617          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
   17618          24 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
   17619          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
   17620          24 :                 if (length_account_name_1 > size_account_name_1) {
   17621           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
   17622             :                 }
   17623          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
   17624          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
   17625          24 :                 NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
   17626          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   17627          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   17628          24 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   17629          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   17630          24 :                 if (length_computer_name_1 > size_computer_name_1) {
   17631           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   17632             :                 }
   17633          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   17634          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   17635          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17636          24 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   17637             :                 }
   17638          24 :                 _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17639          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
   17640          24 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   17641          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
   17642          24 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   17643          24 :                 NDR_ZERO_STRUCTP(r->out.return_authenticator);
   17644          24 :                 NDR_PULL_ALLOC(ndr, r->out.new_owf_password);
   17645          24 :                 NDR_ZERO_STRUCTP(r->out.new_owf_password);
   17646          24 :                 NDR_PULL_ALLOC(ndr, r->out.old_owf_password);
   17647          24 :                 NDR_ZERO_STRUCTP(r->out.old_owf_password);
   17648             :         }
   17649          48 :         if (flags & NDR_OUT) {
   17650             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   17651             :                 if (r->in.credential == NULL) {
   17652             :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   17653             :                         NDR_ZERO_STRUCTP(r->in.credential);
   17654             :                 }
   17655             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   17656          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17657           6 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   17658             :                 }
   17659          24 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17660          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   17661          24 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   17662          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   17663          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17664           6 :                         NDR_PULL_ALLOC(ndr, r->out.new_owf_password);
   17665             :                 }
   17666          24 :                 _mem_save_new_owf_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17667          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.new_owf_password, LIBNDR_FLAG_REF_ALLOC);
   17668          24 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.new_owf_password));
   17669          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_owf_password_0, LIBNDR_FLAG_REF_ALLOC);
   17670          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17671           6 :                         NDR_PULL_ALLOC(ndr, r->out.old_owf_password);
   17672             :                 }
   17673          24 :                 _mem_save_old_owf_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17674          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.old_owf_password, LIBNDR_FLAG_REF_ALLOC);
   17675          24 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.old_owf_password));
   17676          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_owf_password_0, LIBNDR_FLAG_REF_ALLOC);
   17677          24 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   17678             :         }
   17679          40 :         return NDR_ERR_SUCCESS;
   17680             : }
   17681             : 
   17682          12 : _PUBLIC_ void ndr_print_netr_ServerTrustPasswordsGet(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerTrustPasswordsGet *r)
   17683             : {
   17684          12 :         ndr_print_struct(ndr, name, "netr_ServerTrustPasswordsGet");
   17685          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
   17686          12 :         ndr->depth++;
   17687          12 :         if (flags & NDR_SET_VALUES) {
   17688           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   17689             :         }
   17690          12 :         if (flags & NDR_IN) {
   17691           0 :                 ndr_print_struct(ndr, "in", "netr_ServerTrustPasswordsGet");
   17692           0 :                 ndr->depth++;
   17693           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   17694           0 :                 ndr->depth++;
   17695           0 :                 if (r->in.server_name) {
   17696           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   17697             :                 }
   17698           0 :                 ndr->depth--;
   17699           0 :                 ndr_print_ptr(ndr, "account_name", r->in.account_name);
   17700           0 :                 ndr->depth++;
   17701           0 :                 ndr_print_string(ndr, "account_name", r->in.account_name);
   17702           0 :                 ndr->depth--;
   17703           0 :                 ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
   17704           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   17705           0 :                 ndr->depth++;
   17706           0 :                 ndr_print_string(ndr, "computer_name", r->in.computer_name);
   17707           0 :                 ndr->depth--;
   17708           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   17709           0 :                 ndr->depth++;
   17710           0 :                 ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   17711           0 :                 ndr->depth--;
   17712           0 :                 ndr->depth--;
   17713             :         }
   17714          12 :         if (flags & NDR_OUT) {
   17715          12 :                 ndr_print_struct(ndr, "out", "netr_ServerTrustPasswordsGet");
   17716          12 :                 ndr->depth++;
   17717          12 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   17718          12 :                 ndr->depth++;
   17719          12 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   17720          12 :                 ndr->depth--;
   17721          12 :                 ndr_print_ptr(ndr, "new_owf_password", r->out.new_owf_password);
   17722          12 :                 ndr->depth++;
   17723          12 :                 ndr_print_samr_Password(ndr, "new_owf_password", r->out.new_owf_password);
   17724          12 :                 ndr->depth--;
   17725          12 :                 ndr_print_ptr(ndr, "old_owf_password", r->out.old_owf_password);
   17726          12 :                 ndr->depth++;
   17727          12 :                 ndr_print_samr_Password(ndr, "old_owf_password", r->out.old_owf_password);
   17728          12 :                 ndr->depth--;
   17729          12 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   17730          12 :                 ndr->depth--;
   17731             :         }
   17732          12 :         ndr->depth--;
   17733             : }
   17734             : 
   17735         370 : static enum ndr_err_code ndr_push_netr_DsRGetForestTrustInformation(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsRGetForestTrustInformation *r)
   17736             : {
   17737         370 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   17738         370 :         if (flags & NDR_IN) {
   17739         182 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   17740         182 :                 if (r->in.server_name) {
   17741         182 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   17742         182 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   17743         182 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   17744         182 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   17745             :                 }
   17746         182 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.trusted_domain_name));
   17747         182 :                 if (r->in.trusted_domain_name) {
   17748          20 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.trusted_domain_name, CH_UTF16)));
   17749          20 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   17750          20 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.trusted_domain_name, CH_UTF16)));
   17751          20 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.trusted_domain_name, ndr_charset_length(r->in.trusted_domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   17752             :                 }
   17753         182 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
   17754             :         }
   17755         370 :         if (flags & NDR_OUT) {
   17756         188 :                 if (r->out.forest_trust_info == NULL) {
   17757           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17758             :                 }
   17759         188 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.forest_trust_info));
   17760         188 :                 if (*r->out.forest_trust_info) {
   17761         184 :                         NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
   17762             :                 }
   17763         188 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   17764             :         }
   17765         353 :         return NDR_ERR_SUCCESS;
   17766             : }
   17767             : 
   17768         364 : static enum ndr_err_code ndr_pull_netr_DsRGetForestTrustInformation(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsRGetForestTrustInformation *r)
   17769             : {
   17770          16 :         uint32_t _ptr_server_name;
   17771         364 :         uint32_t size_server_name_1 = 0;
   17772         364 :         uint32_t length_server_name_1 = 0;
   17773          16 :         uint32_t _ptr_trusted_domain_name;
   17774         364 :         uint32_t size_trusted_domain_name_1 = 0;
   17775         364 :         uint32_t length_trusted_domain_name_1 = 0;
   17776          16 :         uint32_t _ptr_forest_trust_info;
   17777         364 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   17778         364 :         TALLOC_CTX *_mem_save_trusted_domain_name_0 = NULL;
   17779         364 :         TALLOC_CTX *_mem_save_forest_trust_info_0 = NULL;
   17780         364 :         TALLOC_CTX *_mem_save_forest_trust_info_1 = NULL;
   17781         364 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   17782         364 :         if (flags & NDR_IN) {
   17783         182 :                 NDR_ZERO_STRUCT(r->out);
   17784             : 
   17785         182 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   17786         182 :                 if (_ptr_server_name) {
   17787         182 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   17788             :                 } else {
   17789           0 :                         r->in.server_name = NULL;
   17790             :                 }
   17791         182 :                 if (r->in.server_name) {
   17792         182 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17793         182 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   17794         182 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   17795         182 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   17796         182 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   17797         182 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   17798         182 :                         if (length_server_name_1 > size_server_name_1) {
   17799           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   17800             :                         }
   17801         182 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   17802         182 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   17803         182 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   17804             :                 }
   17805         182 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domain_name));
   17806         182 :                 if (_ptr_trusted_domain_name) {
   17807          20 :                         NDR_PULL_ALLOC(ndr, r->in.trusted_domain_name);
   17808             :                 } else {
   17809         162 :                         r->in.trusted_domain_name = NULL;
   17810             :                 }
   17811         182 :                 if (r->in.trusted_domain_name) {
   17812          20 :                         _mem_save_trusted_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17813          20 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain_name, 0);
   17814          20 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.trusted_domain_name));
   17815          20 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.trusted_domain_name));
   17816          20 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.trusted_domain_name, &size_trusted_domain_name_1));
   17817          20 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.trusted_domain_name, &length_trusted_domain_name_1));
   17818          20 :                         if (length_trusted_domain_name_1 > size_trusted_domain_name_1) {
   17819           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_trusted_domain_name_1, length_trusted_domain_name_1);
   17820             :                         }
   17821          20 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_trusted_domain_name_1, sizeof(uint16_t)));
   17822          20 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.trusted_domain_name, length_trusted_domain_name_1, sizeof(uint16_t), CH_UTF16));
   17823          20 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_name_0, 0);
   17824             :                 }
   17825         182 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
   17826         182 :                 NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
   17827         182 :                 NDR_ZERO_STRUCTP(r->out.forest_trust_info);
   17828             :         }
   17829         364 :         if (flags & NDR_OUT) {
   17830             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   17831             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   17832         182 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17833         164 :                         NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
   17834             :                 }
   17835         182 :                 _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17836         182 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC);
   17837         182 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_info));
   17838         182 :                 if (_ptr_forest_trust_info) {
   17839         178 :                         NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info);
   17840             :                 } else {
   17841           4 :                         *r->out.forest_trust_info = NULL;
   17842             :                 }
   17843         182 :                 if (*r->out.forest_trust_info) {
   17844         178 :                         _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
   17845         178 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, 0);
   17846         178 :                         NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
   17847         178 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, 0);
   17848             :                 }
   17849         182 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC);
   17850         182 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   17851             :         }
   17852         348 :         return NDR_ERR_SUCCESS;
   17853             : }
   17854             : 
   17855          12 : _PUBLIC_ void ndr_print_netr_DsRGetForestTrustInformation(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsRGetForestTrustInformation *r)
   17856             : {
   17857          12 :         ndr_print_struct(ndr, name, "netr_DsRGetForestTrustInformation");
   17858          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
   17859          12 :         ndr->depth++;
   17860          12 :         if (flags & NDR_SET_VALUES) {
   17861           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   17862             :         }
   17863          12 :         if (flags & NDR_IN) {
   17864           0 :                 ndr_print_struct(ndr, "in", "netr_DsRGetForestTrustInformation");
   17865           0 :                 ndr->depth++;
   17866           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   17867           0 :                 ndr->depth++;
   17868           0 :                 if (r->in.server_name) {
   17869           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   17870             :                 }
   17871           0 :                 ndr->depth--;
   17872           0 :                 ndr_print_ptr(ndr, "trusted_domain_name", r->in.trusted_domain_name);
   17873           0 :                 ndr->depth++;
   17874           0 :                 if (r->in.trusted_domain_name) {
   17875           0 :                         ndr_print_string(ndr, "trusted_domain_name", r->in.trusted_domain_name);
   17876             :                 }
   17877           0 :                 ndr->depth--;
   17878           0 :                 ndr_print_uint32(ndr, "flags", r->in.flags);
   17879           0 :                 ndr->depth--;
   17880             :         }
   17881          12 :         if (flags & NDR_OUT) {
   17882          12 :                 ndr_print_struct(ndr, "out", "netr_DsRGetForestTrustInformation");
   17883          12 :                 ndr->depth++;
   17884          12 :                 ndr_print_ptr(ndr, "forest_trust_info", r->out.forest_trust_info);
   17885          12 :                 ndr->depth++;
   17886          12 :                 ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info);
   17887          12 :                 ndr->depth++;
   17888          12 :                 if (*r->out.forest_trust_info) {
   17889          12 :                         ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info);
   17890             :                 }
   17891          12 :                 ndr->depth--;
   17892          12 :                 ndr->depth--;
   17893          12 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   17894          12 :                 ndr->depth--;
   17895             :         }
   17896          12 :         ndr->depth--;
   17897             : }
   17898             : 
   17899          83 : static enum ndr_err_code ndr_push_netr_GetForestTrustInformation(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_GetForestTrustInformation *r)
   17900             : {
   17901          83 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   17902          83 :         if (flags & NDR_IN) {
   17903          28 :                 if (r->in.computer_name == NULL) {
   17904           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17905             :                 }
   17906          28 :                 if (r->in.credential == NULL) {
   17907           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17908             :                 }
   17909          28 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   17910          28 :                 if (r->in.server_name) {
   17911          28 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   17912          28 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   17913          28 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   17914          28 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   17915             :                 }
   17916          28 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   17917          28 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   17918          28 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   17919          28 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   17920          28 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   17921          28 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
   17922             :         }
   17923          83 :         if (flags & NDR_OUT) {
   17924          55 :                 if (r->out.return_authenticator == NULL) {
   17925           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17926             :                 }
   17927          55 :                 if (r->out.forest_trust_info == NULL) {
   17928           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17929             :                 }
   17930          55 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   17931          55 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.forest_trust_info));
   17932          55 :                 if (*r->out.forest_trust_info) {
   17933          25 :                         NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
   17934             :                 }
   17935          55 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   17936             :         }
   17937          74 :         return NDR_ERR_SUCCESS;
   17938             : }
   17939             : 
   17940          76 : static enum ndr_err_code ndr_pull_netr_GetForestTrustInformation(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_GetForestTrustInformation *r)
   17941             : {
   17942           8 :         uint32_t _ptr_server_name;
   17943          76 :         uint32_t size_server_name_1 = 0;
   17944          76 :         uint32_t length_server_name_1 = 0;
   17945          76 :         uint32_t size_computer_name_1 = 0;
   17946          76 :         uint32_t length_computer_name_1 = 0;
   17947           8 :         uint32_t _ptr_forest_trust_info;
   17948          76 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   17949          76 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   17950          76 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   17951          76 :         TALLOC_CTX *_mem_save_forest_trust_info_0 = NULL;
   17952          76 :         TALLOC_CTX *_mem_save_forest_trust_info_1 = NULL;
   17953          76 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   17954          76 :         if (flags & NDR_IN) {
   17955          48 :                 NDR_ZERO_STRUCT(r->out);
   17956             : 
   17957          48 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   17958          48 :                 if (_ptr_server_name) {
   17959          48 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   17960             :                 } else {
   17961           0 :                         r->in.server_name = NULL;
   17962             :                 }
   17963          48 :                 if (r->in.server_name) {
   17964          48 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17965          48 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   17966          48 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   17967          48 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   17968          48 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   17969          48 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   17970          48 :                         if (length_server_name_1 > size_server_name_1) {
   17971           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   17972             :                         }
   17973          48 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   17974          48 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   17975          48 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   17976             :                 }
   17977          48 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   17978          48 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   17979          48 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   17980          48 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   17981          48 :                 if (length_computer_name_1 > size_computer_name_1) {
   17982           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   17983             :                 }
   17984          48 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   17985          48 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   17986          48 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17987          48 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   17988             :                 }
   17989          48 :                 _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17990          48 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
   17991          48 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   17992          48 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
   17993          48 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
   17994          48 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   17995          48 :                 NDR_ZERO_STRUCTP(r->out.return_authenticator);
   17996          48 :                 NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
   17997          48 :                 NDR_ZERO_STRUCTP(r->out.forest_trust_info);
   17998             :         }
   17999          76 :         if (flags & NDR_OUT) {
   18000             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   18001             :                 if (r->in.credential == NULL) {
   18002             :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   18003             :                         NDR_ZERO_STRUCTP(r->in.credential);
   18004             :                 }
   18005             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   18006          28 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18007           7 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   18008             :                 }
   18009          28 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18010          28 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   18011          28 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   18012          28 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   18013          28 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18014           7 :                         NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
   18015             :                 }
   18016          28 :                 _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18017          28 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC);
   18018          28 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_info));
   18019          28 :                 if (_ptr_forest_trust_info) {
   18020           4 :                         NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info);
   18021             :                 } else {
   18022          24 :                         *r->out.forest_trust_info = NULL;
   18023             :                 }
   18024          28 :                 if (*r->out.forest_trust_info) {
   18025           4 :                         _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
   18026           4 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, 0);
   18027           4 :                         NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
   18028           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, 0);
   18029             :                 }
   18030          28 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC);
   18031          28 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   18032             :         }
   18033          68 :         return NDR_ERR_SUCCESS;
   18034             : }
   18035             : 
   18036          14 : _PUBLIC_ void ndr_print_netr_GetForestTrustInformation(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_GetForestTrustInformation *r)
   18037             : {
   18038          14 :         ndr_print_struct(ndr, name, "netr_GetForestTrustInformation");
   18039          14 :         if (r == NULL) { ndr_print_null(ndr); return; }
   18040          14 :         ndr->depth++;
   18041          14 :         if (flags & NDR_SET_VALUES) {
   18042           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   18043             :         }
   18044          14 :         if (flags & NDR_IN) {
   18045           0 :                 ndr_print_struct(ndr, "in", "netr_GetForestTrustInformation");
   18046           0 :                 ndr->depth++;
   18047           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   18048           0 :                 ndr->depth++;
   18049           0 :                 if (r->in.server_name) {
   18050           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   18051             :                 }
   18052           0 :                 ndr->depth--;
   18053           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   18054           0 :                 ndr->depth++;
   18055           0 :                 ndr_print_string(ndr, "computer_name", r->in.computer_name);
   18056           0 :                 ndr->depth--;
   18057           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   18058           0 :                 ndr->depth++;
   18059           0 :                 ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   18060           0 :                 ndr->depth--;
   18061           0 :                 ndr_print_uint32(ndr, "flags", r->in.flags);
   18062           0 :                 ndr->depth--;
   18063             :         }
   18064          14 :         if (flags & NDR_OUT) {
   18065          14 :                 ndr_print_struct(ndr, "out", "netr_GetForestTrustInformation");
   18066          14 :                 ndr->depth++;
   18067          14 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   18068          14 :                 ndr->depth++;
   18069          14 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   18070          14 :                 ndr->depth--;
   18071          14 :                 ndr_print_ptr(ndr, "forest_trust_info", r->out.forest_trust_info);
   18072          14 :                 ndr->depth++;
   18073          14 :                 ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info);
   18074          14 :                 ndr->depth++;
   18075          14 :                 if (*r->out.forest_trust_info) {
   18076           2 :                         ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info);
   18077             :                 }
   18078          14 :                 ndr->depth--;
   18079          14 :                 ndr->depth--;
   18080          14 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   18081          14 :                 ndr->depth--;
   18082             :         }
   18083          14 :         ndr->depth--;
   18084             : }
   18085             : 
   18086        4162 : static enum ndr_err_code ndr_push_netr_LogonSamLogonWithFlags(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_LogonSamLogonWithFlags *r)
   18087             : {
   18088        4162 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   18089        4162 :         if (flags & NDR_IN) {
   18090        2081 :                 if (r->in.logon == NULL) {
   18091           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18092             :                 }
   18093        2081 :                 if (r->in.flags == NULL) {
   18094           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18095             :                 }
   18096        2081 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   18097        2081 :                 if (r->in.server_name) {
   18098        2081 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   18099        2081 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   18100        2081 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   18101        2081 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   18102             :                 }
   18103        2081 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
   18104        2081 :                 if (r->in.computer_name) {
   18105        2081 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   18106        2081 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   18107        2081 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   18108        2081 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   18109             :                 }
   18110        2081 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.credential));
   18111        2081 :                 if (r->in.credential) {
   18112        2081 :                         NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   18113             :                 }
   18114        2081 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.return_authenticator));
   18115        2081 :                 if (r->in.return_authenticator) {
   18116        2081 :                         NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   18117             :                 }
   18118        2081 :                 NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
   18119        2081 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level));
   18120        2081 :                 NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
   18121        2081 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
   18122        2081 :                 NDR_CHECK(ndr_push_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, *r->in.flags));
   18123             :         }
   18124        4162 :         if (flags & NDR_OUT) {
   18125        2081 :                 if (r->out.validation == NULL) {
   18126           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18127             :                 }
   18128        2081 :                 if (r->out.authoritative == NULL) {
   18129           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18130             :                 }
   18131        2081 :                 if (r->out.flags == NULL) {
   18132           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18133             :                 }
   18134        2081 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator));
   18135        2081 :                 if (r->out.return_authenticator) {
   18136        2081 :                         NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   18137             :                 }
   18138        2081 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.validation, r->in.validation_level));
   18139        2081 :                 NDR_CHECK(ndr_push_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
   18140        2081 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.authoritative));
   18141        2081 :                 NDR_CHECK(ndr_push_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, *r->out.flags));
   18142        2081 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   18143             :         }
   18144        4162 :         return NDR_ERR_SUCCESS;
   18145             : }
   18146             : 
   18147        4162 : static enum ndr_err_code ndr_pull_netr_LogonSamLogonWithFlags(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_LogonSamLogonWithFlags *r)
   18148             : {
   18149           0 :         uint32_t _ptr_server_name;
   18150        4162 :         uint32_t size_server_name_1 = 0;
   18151        4162 :         uint32_t length_server_name_1 = 0;
   18152           0 :         uint32_t _ptr_computer_name;
   18153        4162 :         uint32_t size_computer_name_1 = 0;
   18154        4162 :         uint32_t length_computer_name_1 = 0;
   18155           0 :         uint32_t _ptr_credential;
   18156           0 :         uint32_t _ptr_return_authenticator;
   18157        4162 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   18158        4162 :         TALLOC_CTX *_mem_save_computer_name_0 = NULL;
   18159        4162 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   18160        4162 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   18161        4162 :         TALLOC_CTX *_mem_save_logon_0 = NULL;
   18162        4162 :         TALLOC_CTX *_mem_save_validation_0 = NULL;
   18163        4162 :         TALLOC_CTX *_mem_save_authoritative_0 = NULL;
   18164        4162 :         TALLOC_CTX *_mem_save_flags_0 = NULL;
   18165        4162 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   18166        4162 :         if (flags & NDR_IN) {
   18167        2081 :                 NDR_ZERO_STRUCT(r->out);
   18168             : 
   18169        2081 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   18170        2081 :                 if (_ptr_server_name) {
   18171        2081 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   18172             :                 } else {
   18173           0 :                         r->in.server_name = NULL;
   18174             :                 }
   18175        2081 :                 if (r->in.server_name) {
   18176        2081 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18177        2081 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   18178        2081 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   18179        2081 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   18180        2081 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   18181        2081 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   18182        2081 :                         if (length_server_name_1 > size_server_name_1) {
   18183           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   18184             :                         }
   18185        2081 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   18186        2081 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   18187        2081 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   18188             :                 }
   18189        2081 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
   18190        2081 :                 if (_ptr_computer_name) {
   18191        2081 :                         NDR_PULL_ALLOC(ndr, r->in.computer_name);
   18192             :                 } else {
   18193           0 :                         r->in.computer_name = NULL;
   18194             :                 }
   18195        2081 :                 if (r->in.computer_name) {
   18196        2081 :                         _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18197        2081 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
   18198        2081 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   18199        2081 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   18200        2081 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   18201        2081 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   18202        2081 :                         if (length_computer_name_1 > size_computer_name_1) {
   18203           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   18204             :                         }
   18205        2081 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   18206        2081 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   18207        2081 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
   18208             :                 }
   18209        2081 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_credential));
   18210        2081 :                 if (_ptr_credential) {
   18211        2081 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   18212             :                 } else {
   18213           0 :                         r->in.credential = NULL;
   18214             :                 }
   18215        2081 :                 if (r->in.credential) {
   18216        2081 :                         _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18217        2081 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, 0);
   18218        2081 :                         NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   18219        2081 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, 0);
   18220             :                 }
   18221        2081 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
   18222        2081 :                 if (_ptr_return_authenticator) {
   18223        2081 :                         NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
   18224             :                 } else {
   18225           0 :                         r->in.return_authenticator = NULL;
   18226             :                 }
   18227        2081 :                 if (r->in.return_authenticator) {
   18228        2081 :                         _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18229        2081 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, 0);
   18230        2081 :                         NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
   18231        2081 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
   18232             :                 }
   18233        2081 :                 NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
   18234        2081 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18235        2081 :                         NDR_PULL_ALLOC(ndr, r->in.logon);
   18236             :                 }
   18237        2081 :                 _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18238        2081 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC);
   18239        2081 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level));
   18240        2081 :                 NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
   18241        2081 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC);
   18242        2081 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
   18243        2081 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18244        2081 :                         NDR_PULL_ALLOC(ndr, r->in.flags);
   18245             :                 }
   18246        2081 :                 _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18247        2081 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.flags, LIBNDR_FLAG_REF_ALLOC);
   18248        2081 :                 NDR_CHECK(ndr_pull_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, r->in.flags));
   18249        2081 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
   18250        2081 :                 NDR_PULL_ALLOC(ndr, r->out.validation);
   18251        2081 :                 NDR_ZERO_STRUCTP(r->out.validation);
   18252        2081 :                 NDR_PULL_ALLOC(ndr, r->out.authoritative);
   18253        2081 :                 NDR_ZERO_STRUCTP(r->out.authoritative);
   18254        2081 :                 NDR_PULL_ALLOC(ndr, r->out.flags);
   18255        2081 :                 *r->out.flags = *r->in.flags;
   18256             :         }
   18257        4162 :         if (flags & NDR_OUT) {
   18258             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   18259             :                 if (r->in.logon == NULL) {
   18260             :                         NDR_PULL_ALLOC(ndr, r->in.logon);
   18261             :                         NDR_ZERO_STRUCTP(r->in.logon);
   18262             :                 }
   18263             :                 if (r->in.flags == NULL) {
   18264             :                         NDR_PULL_ALLOC(ndr, r->in.flags);
   18265             :                         NDR_ZERO_STRUCTP(r->in.flags);
   18266             :                 }
   18267             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   18268        2081 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
   18269        2081 :                 if (_ptr_return_authenticator) {
   18270        2081 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   18271             :                 } else {
   18272           0 :                         r->out.return_authenticator = NULL;
   18273             :                 }
   18274        2081 :                 if (r->out.return_authenticator) {
   18275        2081 :                         _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18276        2081 :                         NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, 0);
   18277        2081 :                         NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   18278        2081 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
   18279             :                 }
   18280        2081 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18281          22 :                         NDR_PULL_ALLOC(ndr, r->out.validation);
   18282             :                 }
   18283        2081 :                 _mem_save_validation_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18284        2081 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.validation, LIBNDR_FLAG_REF_ALLOC);
   18285        2081 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.validation, r->in.validation_level));
   18286        2081 :                 NDR_CHECK(ndr_pull_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
   18287        2081 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_validation_0, LIBNDR_FLAG_REF_ALLOC);
   18288        2081 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18289          22 :                         NDR_PULL_ALLOC(ndr, r->out.authoritative);
   18290             :                 }
   18291        2081 :                 _mem_save_authoritative_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18292        2081 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.authoritative, LIBNDR_FLAG_REF_ALLOC);
   18293        2081 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.authoritative));
   18294        2081 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authoritative_0, LIBNDR_FLAG_REF_ALLOC);
   18295        2081 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18296          22 :                         NDR_PULL_ALLOC(ndr, r->out.flags);
   18297             :                 }
   18298        2081 :                 _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18299        2081 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.flags, LIBNDR_FLAG_REF_ALLOC);
   18300        2081 :                 NDR_CHECK(ndr_pull_netr_LogonSamLogon_flags(ndr, NDR_SCALARS, r->out.flags));
   18301        2081 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
   18302        2081 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   18303             :         }
   18304        4162 :         return NDR_ERR_SUCCESS;
   18305             : }
   18306             : 
   18307           0 : _PUBLIC_ void ndr_print_netr_LogonSamLogonWithFlags(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_LogonSamLogonWithFlags *r)
   18308             : {
   18309           0 :         ndr_print_struct(ndr, name, "netr_LogonSamLogonWithFlags");
   18310           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   18311           0 :         ndr->depth++;
   18312           0 :         if (flags & NDR_SET_VALUES) {
   18313           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   18314             :         }
   18315           0 :         if (flags & NDR_IN) {
   18316           0 :                 ndr_print_struct(ndr, "in", "netr_LogonSamLogonWithFlags");
   18317           0 :                 ndr->depth++;
   18318           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   18319           0 :                 ndr->depth++;
   18320           0 :                 if (r->in.server_name) {
   18321           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   18322             :                 }
   18323           0 :                 ndr->depth--;
   18324           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   18325           0 :                 ndr->depth++;
   18326           0 :                 if (r->in.computer_name) {
   18327           0 :                         ndr_print_string(ndr, "computer_name", r->in.computer_name);
   18328             :                 }
   18329           0 :                 ndr->depth--;
   18330           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   18331           0 :                 ndr->depth++;
   18332           0 :                 if (r->in.credential) {
   18333           0 :                         ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   18334             :                 }
   18335           0 :                 ndr->depth--;
   18336           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
   18337           0 :                 ndr->depth++;
   18338           0 :                 if (r->in.return_authenticator) {
   18339           0 :                         ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
   18340             :                 }
   18341           0 :                 ndr->depth--;
   18342           0 :                 ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
   18343           0 :                 ndr_print_ptr(ndr, "logon", r->in.logon);
   18344           0 :                 ndr->depth++;
   18345           0 :                 ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level);
   18346           0 :                 ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon);
   18347           0 :                 ndr->depth--;
   18348           0 :                 ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
   18349           0 :                 ndr_print_ptr(ndr, "flags", r->in.flags);
   18350           0 :                 ndr->depth++;
   18351           0 :                 ndr_print_netr_LogonSamLogon_flags(ndr, "flags", *r->in.flags);
   18352           0 :                 ndr->depth--;
   18353           0 :                 ndr->depth--;
   18354             :         }
   18355           0 :         if (flags & NDR_OUT) {
   18356           0 :                 ndr_print_struct(ndr, "out", "netr_LogonSamLogonWithFlags");
   18357           0 :                 ndr->depth++;
   18358           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   18359           0 :                 ndr->depth++;
   18360           0 :                 if (r->out.return_authenticator) {
   18361           0 :                         ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   18362             :                 }
   18363           0 :                 ndr->depth--;
   18364           0 :                 ndr_print_ptr(ndr, "validation", r->out.validation);
   18365           0 :                 ndr->depth++;
   18366           0 :                 ndr_print_set_switch_value(ndr, r->out.validation, r->in.validation_level);
   18367           0 :                 ndr_print_netr_Validation(ndr, "validation", r->out.validation);
   18368           0 :                 ndr->depth--;
   18369           0 :                 ndr_print_ptr(ndr, "authoritative", r->out.authoritative);
   18370           0 :                 ndr->depth++;
   18371           0 :                 ndr_print_uint8(ndr, "authoritative", *r->out.authoritative);
   18372           0 :                 ndr->depth--;
   18373           0 :                 ndr_print_ptr(ndr, "flags", r->out.flags);
   18374           0 :                 ndr->depth++;
   18375           0 :                 ndr_print_netr_LogonSamLogon_flags(ndr, "flags", *r->out.flags);
   18376           0 :                 ndr->depth--;
   18377           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   18378           0 :                 ndr->depth--;
   18379             :         }
   18380           0 :         ndr->depth--;
   18381             : }
   18382             : 
   18383         164 : static enum ndr_err_code ndr_push_netr_ServerGetTrustInfo(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_ServerGetTrustInfo *r)
   18384             : {
   18385         164 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   18386         164 :         if (flags & NDR_IN) {
   18387          52 :                 if (r->in.account_name == NULL) {
   18388           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18389             :                 }
   18390          52 :                 if (r->in.computer_name == NULL) {
   18391           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18392             :                 }
   18393          52 :                 if (r->in.credential == NULL) {
   18394           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18395             :                 }
   18396          52 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   18397          52 :                 if (r->in.server_name) {
   18398          52 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   18399          52 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   18400          52 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   18401          52 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   18402             :                 }
   18403          52 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   18404          52 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   18405          52 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
   18406          52 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   18407          52 :                 NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
   18408          52 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   18409          52 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   18410          52 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   18411          52 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   18412          52 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   18413             :         }
   18414         164 :         if (flags & NDR_OUT) {
   18415         112 :                 if (r->out.return_authenticator == NULL) {
   18416           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18417             :                 }
   18418         112 :                 if (r->out.new_owf_password == NULL) {
   18419           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18420             :                 }
   18421         112 :                 if (r->out.old_owf_password == NULL) {
   18422           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18423             :                 }
   18424         112 :                 if (r->out.trust_info == NULL) {
   18425           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18426             :                 }
   18427         112 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   18428         112 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.new_owf_password));
   18429         112 :                 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.old_owf_password));
   18430         112 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.trust_info));
   18431         112 :                 if (*r->out.trust_info) {
   18432          52 :                         NDR_CHECK(ndr_push_netr_TrustInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.trust_info));
   18433             :                 }
   18434         112 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   18435             :         }
   18436         146 :         return NDR_ERR_SUCCESS;
   18437             : }
   18438             : 
   18439         151 : static enum ndr_err_code ndr_pull_netr_ServerGetTrustInfo(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_ServerGetTrustInfo *r)
   18440             : {
   18441          16 :         uint32_t _ptr_server_name;
   18442         151 :         uint32_t size_server_name_1 = 0;
   18443         151 :         uint32_t length_server_name_1 = 0;
   18444         151 :         uint32_t size_account_name_1 = 0;
   18445         151 :         uint32_t length_account_name_1 = 0;
   18446         151 :         uint32_t size_computer_name_1 = 0;
   18447         151 :         uint32_t length_computer_name_1 = 0;
   18448          16 :         uint32_t _ptr_trust_info;
   18449         151 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   18450         151 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   18451         151 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   18452         151 :         TALLOC_CTX *_mem_save_new_owf_password_0 = NULL;
   18453         151 :         TALLOC_CTX *_mem_save_old_owf_password_0 = NULL;
   18454         151 :         TALLOC_CTX *_mem_save_trust_info_0 = NULL;
   18455         151 :         TALLOC_CTX *_mem_save_trust_info_1 = NULL;
   18456         151 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   18457         151 :         if (flags & NDR_IN) {
   18458          99 :                 NDR_ZERO_STRUCT(r->out);
   18459             : 
   18460          99 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   18461          99 :                 if (_ptr_server_name) {
   18462          99 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   18463             :                 } else {
   18464           0 :                         r->in.server_name = NULL;
   18465             :                 }
   18466          99 :                 if (r->in.server_name) {
   18467          99 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18468          99 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   18469          99 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   18470          99 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   18471          99 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   18472          99 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   18473          99 :                         if (length_server_name_1 > size_server_name_1) {
   18474           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   18475             :                         }
   18476          99 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   18477          99 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   18478          99 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   18479             :                 }
   18480          99 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
   18481          99 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
   18482          99 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.account_name, &size_account_name_1));
   18483          99 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.account_name, &length_account_name_1));
   18484          99 :                 if (length_account_name_1 > size_account_name_1) {
   18485           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_1, length_account_name_1);
   18486             :                 }
   18487          99 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_1, sizeof(uint16_t)));
   18488          99 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, length_account_name_1, sizeof(uint16_t), CH_UTF16));
   18489          99 :                 NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
   18490          99 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   18491          99 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   18492          99 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   18493          99 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   18494          99 :                 if (length_computer_name_1 > size_computer_name_1) {
   18495           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   18496             :                 }
   18497          99 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   18498          99 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   18499          99 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18500          99 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   18501             :                 }
   18502          99 :                 _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18503          99 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
   18504          99 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   18505          99 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
   18506          99 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   18507          99 :                 NDR_ZERO_STRUCTP(r->out.return_authenticator);
   18508          99 :                 NDR_PULL_ALLOC(ndr, r->out.new_owf_password);
   18509          99 :                 NDR_ZERO_STRUCTP(r->out.new_owf_password);
   18510          99 :                 NDR_PULL_ALLOC(ndr, r->out.old_owf_password);
   18511          99 :                 NDR_ZERO_STRUCTP(r->out.old_owf_password);
   18512          99 :                 NDR_PULL_ALLOC(ndr, r->out.trust_info);
   18513          99 :                 NDR_ZERO_STRUCTP(r->out.trust_info);
   18514             :         }
   18515         151 :         if (flags & NDR_OUT) {
   18516             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   18517             :                 if (r->in.credential == NULL) {
   18518             :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   18519             :                         NDR_ZERO_STRUCTP(r->in.credential);
   18520             :                 }
   18521             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   18522          52 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18523          13 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   18524             :                 }
   18525          52 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18526          52 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   18527          52 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   18528          52 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   18529          52 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18530          13 :                         NDR_PULL_ALLOC(ndr, r->out.new_owf_password);
   18531             :                 }
   18532          52 :                 _mem_save_new_owf_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18533          52 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.new_owf_password, LIBNDR_FLAG_REF_ALLOC);
   18534          52 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.new_owf_password));
   18535          52 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_owf_password_0, LIBNDR_FLAG_REF_ALLOC);
   18536          52 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18537          13 :                         NDR_PULL_ALLOC(ndr, r->out.old_owf_password);
   18538             :                 }
   18539          52 :                 _mem_save_old_owf_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18540          52 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.old_owf_password, LIBNDR_FLAG_REF_ALLOC);
   18541          52 :                 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.old_owf_password));
   18542          52 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_owf_password_0, LIBNDR_FLAG_REF_ALLOC);
   18543          52 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18544          13 :                         NDR_PULL_ALLOC(ndr, r->out.trust_info);
   18545             :                 }
   18546          52 :                 _mem_save_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18547          52 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.trust_info, LIBNDR_FLAG_REF_ALLOC);
   18548          52 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trust_info));
   18549          52 :                 if (_ptr_trust_info) {
   18550           4 :                         NDR_PULL_ALLOC(ndr, *r->out.trust_info);
   18551             :                 } else {
   18552          48 :                         *r->out.trust_info = NULL;
   18553             :                 }
   18554          52 :                 if (*r->out.trust_info) {
   18555           4 :                         _mem_save_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
   18556           4 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.trust_info, 0);
   18557           4 :                         NDR_CHECK(ndr_pull_netr_TrustInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.trust_info));
   18558           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trust_info_1, 0);
   18559             :                 }
   18560          52 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trust_info_0, LIBNDR_FLAG_REF_ALLOC);
   18561          52 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   18562             :         }
   18563         135 :         return NDR_ERR_SUCCESS;
   18564             : }
   18565             : 
   18566          26 : _PUBLIC_ void ndr_print_netr_ServerGetTrustInfo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_ServerGetTrustInfo *r)
   18567             : {
   18568          26 :         ndr_print_struct(ndr, name, "netr_ServerGetTrustInfo");
   18569          26 :         if (r == NULL) { ndr_print_null(ndr); return; }
   18570          26 :         ndr->depth++;
   18571          26 :         if (flags & NDR_SET_VALUES) {
   18572           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   18573             :         }
   18574          26 :         if (flags & NDR_IN) {
   18575           0 :                 ndr_print_struct(ndr, "in", "netr_ServerGetTrustInfo");
   18576           0 :                 ndr->depth++;
   18577           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   18578           0 :                 ndr->depth++;
   18579           0 :                 if (r->in.server_name) {
   18580           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   18581             :                 }
   18582           0 :                 ndr->depth--;
   18583           0 :                 ndr_print_ptr(ndr, "account_name", r->in.account_name);
   18584           0 :                 ndr->depth++;
   18585           0 :                 ndr_print_string(ndr, "account_name", r->in.account_name);
   18586           0 :                 ndr->depth--;
   18587           0 :                 ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
   18588           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   18589           0 :                 ndr->depth++;
   18590           0 :                 ndr_print_string(ndr, "computer_name", r->in.computer_name);
   18591           0 :                 ndr->depth--;
   18592           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   18593           0 :                 ndr->depth++;
   18594           0 :                 ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   18595           0 :                 ndr->depth--;
   18596           0 :                 ndr->depth--;
   18597             :         }
   18598          26 :         if (flags & NDR_OUT) {
   18599          26 :                 ndr_print_struct(ndr, "out", "netr_ServerGetTrustInfo");
   18600          26 :                 ndr->depth++;
   18601          26 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   18602          26 :                 ndr->depth++;
   18603          26 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   18604          26 :                 ndr->depth--;
   18605          26 :                 ndr_print_ptr(ndr, "new_owf_password", r->out.new_owf_password);
   18606          26 :                 ndr->depth++;
   18607          26 :                 ndr_print_samr_Password(ndr, "new_owf_password", r->out.new_owf_password);
   18608          26 :                 ndr->depth--;
   18609          26 :                 ndr_print_ptr(ndr, "old_owf_password", r->out.old_owf_password);
   18610          26 :                 ndr->depth++;
   18611          26 :                 ndr_print_samr_Password(ndr, "old_owf_password", r->out.old_owf_password);
   18612          26 :                 ndr->depth--;
   18613          26 :                 ndr_print_ptr(ndr, "trust_info", r->out.trust_info);
   18614          26 :                 ndr->depth++;
   18615          26 :                 ndr_print_ptr(ndr, "trust_info", *r->out.trust_info);
   18616          26 :                 ndr->depth++;
   18617          26 :                 if (*r->out.trust_info) {
   18618           2 :                         ndr_print_netr_TrustInfo(ndr, "trust_info", *r->out.trust_info);
   18619             :                 }
   18620          26 :                 ndr->depth--;
   18621          26 :                 ndr->depth--;
   18622          26 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   18623          26 :                 ndr->depth--;
   18624             :         }
   18625          26 :         ndr->depth--;
   18626             : }
   18627             : 
   18628           0 : static enum ndr_err_code ndr_push_netr_Unused47(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_Unused47 *r)
   18629             : {
   18630           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   18631           0 :         if (flags & NDR_IN) {
   18632           0 :         }
   18633           0 :         if (flags & NDR_OUT) {
   18634           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   18635             :         }
   18636           0 :         return NDR_ERR_SUCCESS;
   18637             : }
   18638             : 
   18639           0 : static enum ndr_err_code ndr_pull_netr_Unused47(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_Unused47 *r)
   18640             : {
   18641           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   18642           0 :         if (flags & NDR_IN) {
   18643           0 :         }
   18644           0 :         if (flags & NDR_OUT) {
   18645             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   18646             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   18647           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   18648             :         }
   18649           0 :         return NDR_ERR_SUCCESS;
   18650             : }
   18651             : 
   18652           0 : _PUBLIC_ void ndr_print_netr_Unused47(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_Unused47 *r)
   18653             : {
   18654           0 :         ndr_print_struct(ndr, name, "netr_Unused47");
   18655           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   18656           0 :         ndr->depth++;
   18657           0 :         if (flags & NDR_SET_VALUES) {
   18658           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   18659             :         }
   18660           0 :         if (flags & NDR_IN) {
   18661           0 :                 ndr_print_struct(ndr, "in", "netr_Unused47");
   18662           0 :                 ndr->depth++;
   18663           0 :                 ndr->depth--;
   18664             :         }
   18665           0 :         if (flags & NDR_OUT) {
   18666           0 :                 ndr_print_struct(ndr, "out", "netr_Unused47");
   18667           0 :                 ndr->depth++;
   18668           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   18669           0 :                 ndr->depth--;
   18670             :         }
   18671           0 :         ndr->depth--;
   18672             : }
   18673             : 
   18674           5 : static enum ndr_err_code ndr_push_netr_DsrUpdateReadOnlyServerDnsRecords(struct ndr_push *ndr, ndr_flags_type flags, const struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
   18675             : {
   18676           5 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   18677           5 :         if (flags & NDR_IN) {
   18678           0 :                 if (r->in.computer_name == NULL) {
   18679           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18680             :                 }
   18681           0 :                 if (r->in.credential == NULL) {
   18682           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18683             :                 }
   18684           0 :                 if (r->in.dns_names == NULL) {
   18685           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18686             :                 }
   18687           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
   18688           0 :                 if (r->in.server_name) {
   18689           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   18690           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   18691           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
   18692           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   18693             :                 }
   18694           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   18695           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   18696           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
   18697           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   18698           0 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   18699           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name));
   18700           0 :                 if (r->in.site_name) {
   18701           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
   18702           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   18703           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
   18704           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.site_name, ndr_charset_length(r->in.site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   18705             :                 }
   18706           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dns_ttl));
   18707           0 :                 NDR_CHECK(ndr_push_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dns_names));
   18708             :         }
   18709           5 :         if (flags & NDR_OUT) {
   18710           5 :                 if (r->out.return_authenticator == NULL) {
   18711           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18712             :                 }
   18713           5 :                 if (r->out.dns_names == NULL) {
   18714           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   18715             :                 }
   18716           5 :                 NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   18717           5 :                 NDR_CHECK(ndr_push_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dns_names));
   18718           5 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
   18719             :         }
   18720           5 :         return NDR_ERR_SUCCESS;
   18721             : }
   18722             : 
   18723           5 : static enum ndr_err_code ndr_pull_netr_DsrUpdateReadOnlyServerDnsRecords(struct ndr_pull *ndr, ndr_flags_type flags, struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
   18724             : {
   18725           0 :         uint32_t _ptr_server_name;
   18726           5 :         uint32_t size_server_name_1 = 0;
   18727           5 :         uint32_t length_server_name_1 = 0;
   18728           5 :         uint32_t size_computer_name_1 = 0;
   18729           5 :         uint32_t length_computer_name_1 = 0;
   18730           0 :         uint32_t _ptr_site_name;
   18731           5 :         uint32_t size_site_name_1 = 0;
   18732           5 :         uint32_t length_site_name_1 = 0;
   18733           5 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
   18734           5 :         TALLOC_CTX *_mem_save_credential_0 = NULL;
   18735           5 :         TALLOC_CTX *_mem_save_return_authenticator_0 = NULL;
   18736           5 :         TALLOC_CTX *_mem_save_site_name_0 = NULL;
   18737           5 :         TALLOC_CTX *_mem_save_dns_names_0 = NULL;
   18738           5 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   18739           5 :         if (flags & NDR_IN) {
   18740           5 :                 NDR_ZERO_STRUCT(r->out);
   18741             : 
   18742           5 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
   18743           5 :                 if (_ptr_server_name) {
   18744           5 :                         NDR_PULL_ALLOC(ndr, r->in.server_name);
   18745             :                 } else {
   18746           0 :                         r->in.server_name = NULL;
   18747             :                 }
   18748           5 :                 if (r->in.server_name) {
   18749           5 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18750           5 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
   18751           5 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
   18752           5 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
   18753           5 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.server_name, &size_server_name_1));
   18754           5 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.server_name, &length_server_name_1));
   18755           5 :                         if (length_server_name_1 > size_server_name_1) {
   18756           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_name_1, length_server_name_1);
   18757             :                         }
   18758           5 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
   18759           5 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
   18760           5 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
   18761             :                 }
   18762           5 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
   18763           5 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
   18764           5 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.computer_name, &size_computer_name_1));
   18765           5 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.computer_name, &length_computer_name_1));
   18766           5 :                 if (length_computer_name_1 > size_computer_name_1) {
   18767           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
   18768             :                 }
   18769           5 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
   18770           5 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
   18771           5 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18772           5 :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   18773             :                 }
   18774           5 :                 _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18775           5 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
   18776           5 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
   18777           5 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
   18778           5 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
   18779           5 :                 if (_ptr_site_name) {
   18780           5 :                         NDR_PULL_ALLOC(ndr, r->in.site_name);
   18781             :                 } else {
   18782           0 :                         r->in.site_name = NULL;
   18783             :                 }
   18784           5 :                 if (r->in.site_name) {
   18785           5 :                         _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18786           5 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
   18787           5 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
   18788           5 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
   18789           5 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.site_name, &size_site_name_1));
   18790           5 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.site_name, &length_site_name_1));
   18791           5 :                         if (length_site_name_1 > size_site_name_1) {
   18792           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_name_1, length_site_name_1);
   18793             :                         }
   18794           5 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
   18795           5 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
   18796           5 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
   18797             :                 }
   18798           5 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dns_ttl));
   18799           5 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18800           5 :                         NDR_PULL_ALLOC(ndr, r->in.dns_names);
   18801             :                 }
   18802           5 :                 _mem_save_dns_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18803           5 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.dns_names, LIBNDR_FLAG_REF_ALLOC);
   18804           5 :                 NDR_CHECK(ndr_pull_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dns_names));
   18805           5 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_names_0, LIBNDR_FLAG_REF_ALLOC);
   18806           5 :                 NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   18807           5 :                 NDR_ZERO_STRUCTP(r->out.return_authenticator);
   18808           5 :                 NDR_PULL_ALLOC(ndr, r->out.dns_names);
   18809           5 :                 *r->out.dns_names = *r->in.dns_names;
   18810             :         }
   18811           5 :         if (flags & NDR_OUT) {
   18812             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   18813             :                 if (r->in.credential == NULL) {
   18814             :                         NDR_PULL_ALLOC(ndr, r->in.credential);
   18815             :                         NDR_ZERO_STRUCTP(r->in.credential);
   18816             :                 }
   18817             :                 if (r->in.dns_names == NULL) {
   18818             :                         NDR_PULL_ALLOC(ndr, r->in.dns_names);
   18819             :                         NDR_ZERO_STRUCTP(r->in.dns_names);
   18820             :                 }
   18821             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   18822           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18823           0 :                         NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
   18824             :                 }
   18825           0 :                 _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18826           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
   18827           0 :                 NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
   18828           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
   18829           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   18830           0 :                         NDR_PULL_ALLOC(ndr, r->out.dns_names);
   18831             :                 }
   18832           0 :                 _mem_save_dns_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
   18833           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.dns_names, LIBNDR_FLAG_REF_ALLOC);
   18834           0 :                 NDR_CHECK(ndr_pull_NL_DNS_NAME_INFO_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dns_names));
   18835           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_names_0, LIBNDR_FLAG_REF_ALLOC);
   18836           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
   18837             :         }
   18838           5 :         return NDR_ERR_SUCCESS;
   18839             : }
   18840             : 
   18841           0 : _PUBLIC_ void ndr_print_netr_DsrUpdateReadOnlyServerDnsRecords(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
   18842             : {
   18843           0 :         ndr_print_struct(ndr, name, "netr_DsrUpdateReadOnlyServerDnsRecords");
   18844           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   18845           0 :         ndr->depth++;
   18846           0 :         if (flags & NDR_SET_VALUES) {
   18847           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   18848             :         }
   18849           0 :         if (flags & NDR_IN) {
   18850           0 :                 ndr_print_struct(ndr, "in", "netr_DsrUpdateReadOnlyServerDnsRecords");
   18851           0 :                 ndr->depth++;
   18852           0 :                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
   18853           0 :                 ndr->depth++;
   18854           0 :                 if (r->in.server_name) {
   18855           0 :                         ndr_print_string(ndr, "server_name", r->in.server_name);
   18856             :                 }
   18857           0 :                 ndr->depth--;
   18858           0 :                 ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
   18859           0 :                 ndr->depth++;
   18860           0 :                 ndr_print_string(ndr, "computer_name", r->in.computer_name);
   18861           0 :                 ndr->depth--;
   18862           0 :                 ndr_print_ptr(ndr, "credential", r->in.credential);
   18863           0 :                 ndr->depth++;
   18864           0 :                 ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
   18865           0 :                 ndr->depth--;
   18866           0 :                 ndr_print_ptr(ndr, "site_name", r->in.site_name);
   18867           0 :                 ndr->depth++;
   18868           0 :                 if (r->in.site_name) {
   18869           0 :                         ndr_print_string(ndr, "site_name", r->in.site_name);
   18870             :                 }
   18871           0 :                 ndr->depth--;
   18872           0 :                 ndr_print_uint32(ndr, "dns_ttl", r->in.dns_ttl);
   18873           0 :                 ndr_print_ptr(ndr, "dns_names", r->in.dns_names);
   18874           0 :                 ndr->depth++;
   18875           0 :                 ndr_print_NL_DNS_NAME_INFO_ARRAY(ndr, "dns_names", r->in.dns_names);
   18876           0 :                 ndr->depth--;
   18877           0 :                 ndr->depth--;
   18878             :         }
   18879           0 :         if (flags & NDR_OUT) {
   18880           0 :                 ndr_print_struct(ndr, "out", "netr_DsrUpdateReadOnlyServerDnsRecords");
   18881           0 :                 ndr->depth++;
   18882           0 :                 ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
   18883           0 :                 ndr->depth++;
   18884           0 :                 ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
   18885           0 :                 ndr->depth--;
   18886           0 :                 ndr_print_ptr(ndr, "dns_names", r->out.dns_names);
   18887           0 :                 ndr->depth++;
   18888           0 :                 ndr_print_NL_DNS_NAME_INFO_ARRAY(ndr, "dns_names", r->out.dns_names);
   18889           0 :                 ndr->depth--;
   18890           0 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
   18891           0 :                 ndr->depth--;
   18892             :         }
   18893           0 :         ndr->depth--;
   18894             : }
   18895             : 
   18896             : #ifndef SKIP_NDR_TABLE_netlogon
   18897             : static const struct ndr_interface_public_struct netlogon_public_structs[] = {
   18898             :         {
   18899             :                 .name = "netr_AcctLockStr",
   18900             :                 .struct_size = sizeof(struct netr_AcctLockStr ),
   18901             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_AcctLockStr,
   18902             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_AcctLockStr,
   18903             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_AcctLockStr,
   18904             :         },
   18905             :         {
   18906             :                 .name = "netr_UserSessionKey",
   18907             :                 .struct_size = sizeof(struct netr_UserSessionKey ),
   18908             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_UserSessionKey,
   18909             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_UserSessionKey,
   18910             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_UserSessionKey,
   18911             :         },
   18912             :         {
   18913             :                 .name = "netr_LMSessionKey",
   18914             :                 .struct_size = sizeof(struct netr_LMSessionKey ),
   18915             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_LMSessionKey,
   18916             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_LMSessionKey,
   18917             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_LMSessionKey,
   18918             :         },
   18919             :         {
   18920             :                 .name = "netr_SidAttr",
   18921             :                 .struct_size = sizeof(struct netr_SidAttr ),
   18922             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_SidAttr,
   18923             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_SidAttr,
   18924             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_SidAttr,
   18925             :         },
   18926             :         {
   18927             :                 .name = "netr_SamInfo3",
   18928             :                 .struct_size = sizeof(struct netr_SamInfo3 ),
   18929             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_SamInfo3,
   18930             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_SamInfo3,
   18931             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_SamInfo3,
   18932             :         },
   18933             :         {
   18934             :                 .name = "netr_Credential",
   18935             :                 .struct_size = sizeof(struct netr_Credential ),
   18936             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_Credential,
   18937             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_Credential,
   18938             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_Credential,
   18939             :         },
   18940             :         {
   18941             :                 .name = "netlogon_server_pipe_state",
   18942             :                 .struct_size = sizeof(struct netlogon_server_pipe_state ),
   18943             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_netlogon_server_pipe_state,
   18944             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netlogon_server_pipe_state,
   18945             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_netlogon_server_pipe_state,
   18946             :         },
   18947             :         {
   18948             :                 .name = "netr_Authenticator",
   18949             :                 .struct_size = sizeof(struct netr_Authenticator ),
   18950             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_Authenticator,
   18951             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_Authenticator,
   18952             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_Authenticator,
   18953             :         },
   18954             :         {
   18955             :                 .name = "netr_USER_KEYS",
   18956             :                 .struct_size = sizeof(struct netr_USER_KEYS ),
   18957             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_USER_KEYS,
   18958             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_USER_KEYS,
   18959             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_USER_KEYS,
   18960             :         },
   18961             :         {
   18962             :                 .name = "netr_ChangeLogEntry",
   18963             :                 .struct_size = sizeof(struct netr_ChangeLogEntry ),
   18964             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_ChangeLogEntry,
   18965             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_ChangeLogEntry,
   18966             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_ChangeLogEntry,
   18967             :         },
   18968             :         {
   18969             :                 .name = "netr_DsRGetDCNameInfo",
   18970             :                 .struct_size = sizeof(struct netr_DsRGetDCNameInfo ),
   18971             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCNameInfo,
   18972             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCNameInfo,
   18973             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_DsRGetDCNameInfo,
   18974             :         },
   18975             :         {
   18976             :                 .name = "netr_SendToSamBase",
   18977             :                 .struct_size = sizeof(struct netr_SendToSamBase ),
   18978             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_SendToSamBase,
   18979             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_SendToSamBase,
   18980             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_SendToSamBase,
   18981             :         },
   18982             :         {
   18983             :                 .name = "netr_DomainTrust",
   18984             :                 .struct_size = sizeof(struct netr_DomainTrust ),
   18985             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_DomainTrust,
   18986             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_DomainTrust,
   18987             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_DomainTrust,
   18988             :         },
   18989             :         {
   18990             :                 .name = "netr_DomainTrustList",
   18991             :                 .struct_size = sizeof(struct netr_DomainTrustList ),
   18992             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_DomainTrustList,
   18993             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netr_DomainTrustList,
   18994             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_netr_DomainTrustList,
   18995             :         },
   18996             :         {
   18997             :                 .name = "NL_DNS_NAME_INFO_ARRAY",
   18998             :                 .struct_size = sizeof(struct NL_DNS_NAME_INFO_ARRAY ),
   18999             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_NL_DNS_NAME_INFO_ARRAY,
   19000             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NL_DNS_NAME_INFO_ARRAY,
   19001             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_NL_DNS_NAME_INFO_ARRAY,
   19002             :         },
   19003             :         { .name = NULL }
   19004             : };
   19005             : 
   19006             : static const struct ndr_interface_call netlogon_calls[] = {
   19007             :         {
   19008             :                 "netr_LogonUasLogon",
   19009             :                 sizeof(struct netr_LogonUasLogon),
   19010             :                 (ndr_push_flags_fn_t) ndr_push_netr_LogonUasLogon,
   19011             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_LogonUasLogon,
   19012             :                 (ndr_print_function_t) ndr_print_netr_LogonUasLogon,
   19013             :                 { 0, NULL },
   19014             :                 { 0, NULL },
   19015             :         },
   19016             :         {
   19017             :                 "netr_LogonUasLogoff",
   19018             :                 sizeof(struct netr_LogonUasLogoff),
   19019             :                 (ndr_push_flags_fn_t) ndr_push_netr_LogonUasLogoff,
   19020             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_LogonUasLogoff,
   19021             :                 (ndr_print_function_t) ndr_print_netr_LogonUasLogoff,
   19022             :                 { 0, NULL },
   19023             :                 { 0, NULL },
   19024             :         },
   19025             :         {
   19026             :                 "netr_LogonSamLogon",
   19027             :                 sizeof(struct netr_LogonSamLogon),
   19028             :                 (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogon,
   19029             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogon,
   19030             :                 (ndr_print_function_t) ndr_print_netr_LogonSamLogon,
   19031             :                 { 0, NULL },
   19032             :                 { 0, NULL },
   19033             :         },
   19034             :         {
   19035             :                 "netr_LogonSamLogoff",
   19036             :                 sizeof(struct netr_LogonSamLogoff),
   19037             :                 (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogoff,
   19038             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogoff,
   19039             :                 (ndr_print_function_t) ndr_print_netr_LogonSamLogoff,
   19040             :                 { 0, NULL },
   19041             :                 { 0, NULL },
   19042             :         },
   19043             :         {
   19044             :                 "netr_ServerReqChallenge",
   19045             :                 sizeof(struct netr_ServerReqChallenge),
   19046             :                 (ndr_push_flags_fn_t) ndr_push_netr_ServerReqChallenge,
   19047             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_ServerReqChallenge,
   19048             :                 (ndr_print_function_t) ndr_print_netr_ServerReqChallenge,
   19049             :                 { 0, NULL },
   19050             :                 { 0, NULL },
   19051             :         },
   19052             :         {
   19053             :                 "netr_ServerAuthenticate",
   19054             :                 sizeof(struct netr_ServerAuthenticate),
   19055             :                 (ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate,
   19056             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate,
   19057             :                 (ndr_print_function_t) ndr_print_netr_ServerAuthenticate,
   19058             :                 { 0, NULL },
   19059             :                 { 0, NULL },
   19060             :         },
   19061             :         {
   19062             :                 "netr_ServerPasswordSet",
   19063             :                 sizeof(struct netr_ServerPasswordSet),
   19064             :                 (ndr_push_flags_fn_t) ndr_push_netr_ServerPasswordSet,
   19065             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_ServerPasswordSet,
   19066             :                 (ndr_print_function_t) ndr_print_netr_ServerPasswordSet,
   19067             :                 { 0, NULL },
   19068             :                 { 0, NULL },
   19069             :         },
   19070             :         {
   19071             :                 "netr_DatabaseDeltas",
   19072             :                 sizeof(struct netr_DatabaseDeltas),
   19073             :                 (ndr_push_flags_fn_t) ndr_push_netr_DatabaseDeltas,
   19074             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseDeltas,
   19075             :                 (ndr_print_function_t) ndr_print_netr_DatabaseDeltas,
   19076             :                 { 0, NULL },
   19077             :                 { 0, NULL },
   19078             :         },
   19079             :         {
   19080             :                 "netr_DatabaseSync",
   19081             :                 sizeof(struct netr_DatabaseSync),
   19082             :                 (ndr_push_flags_fn_t) ndr_push_netr_DatabaseSync,
   19083             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseSync,
   19084             :                 (ndr_print_function_t) ndr_print_netr_DatabaseSync,
   19085             :                 { 0, NULL },
   19086             :                 { 0, NULL },
   19087             :         },
   19088             :         {
   19089             :                 "netr_AccountDeltas",
   19090             :                 sizeof(struct netr_AccountDeltas),
   19091             :                 (ndr_push_flags_fn_t) ndr_push_netr_AccountDeltas,
   19092             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_AccountDeltas,
   19093             :                 (ndr_print_function_t) ndr_print_netr_AccountDeltas,
   19094             :                 { 0, NULL },
   19095             :                 { 0, NULL },
   19096             :         },
   19097             :         {
   19098             :                 "netr_AccountSync",
   19099             :                 sizeof(struct netr_AccountSync),
   19100             :                 (ndr_push_flags_fn_t) ndr_push_netr_AccountSync,
   19101             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_AccountSync,
   19102             :                 (ndr_print_function_t) ndr_print_netr_AccountSync,
   19103             :                 { 0, NULL },
   19104             :                 { 0, NULL },
   19105             :         },
   19106             :         {
   19107             :                 "netr_GetDcName",
   19108             :                 sizeof(struct netr_GetDcName),
   19109             :                 (ndr_push_flags_fn_t) ndr_push_netr_GetDcName,
   19110             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_GetDcName,
   19111             :                 (ndr_print_function_t) ndr_print_netr_GetDcName,
   19112             :                 { 0, NULL },
   19113             :                 { 0, NULL },
   19114             :         },
   19115             :         {
   19116             :                 "netr_LogonControl",
   19117             :                 sizeof(struct netr_LogonControl),
   19118             :                 (ndr_push_flags_fn_t) ndr_push_netr_LogonControl,
   19119             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl,
   19120             :                 (ndr_print_function_t) ndr_print_netr_LogonControl,
   19121             :                 { 0, NULL },
   19122             :                 { 0, NULL },
   19123             :         },
   19124             :         {
   19125             :                 "netr_GetAnyDCName",
   19126             :                 sizeof(struct netr_GetAnyDCName),
   19127             :                 (ndr_push_flags_fn_t) ndr_push_netr_GetAnyDCName,
   19128             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_GetAnyDCName,
   19129             :                 (ndr_print_function_t) ndr_print_netr_GetAnyDCName,
   19130             :                 { 0, NULL },
   19131             :                 { 0, NULL },
   19132             :         },
   19133             :         {
   19134             :                 "netr_LogonControl2",
   19135             :                 sizeof(struct netr_LogonControl2),
   19136             :                 (ndr_push_flags_fn_t) ndr_push_netr_LogonControl2,
   19137             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl2,
   19138             :                 (ndr_print_function_t) ndr_print_netr_LogonControl2,
   19139             :                 { 0, NULL },
   19140             :                 { 0, NULL },
   19141             :         },
   19142             :         {
   19143             :                 "netr_ServerAuthenticate2",
   19144             :                 sizeof(struct netr_ServerAuthenticate2),
   19145             :                 (ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate2,
   19146             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate2,
   19147             :                 (ndr_print_function_t) ndr_print_netr_ServerAuthenticate2,
   19148             :                 { 0, NULL },
   19149             :                 { 0, NULL },
   19150             :         },
   19151             :         {
   19152             :                 "netr_DatabaseSync2",
   19153             :                 sizeof(struct netr_DatabaseSync2),
   19154             :                 (ndr_push_flags_fn_t) ndr_push_netr_DatabaseSync2,
   19155             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseSync2,
   19156             :                 (ndr_print_function_t) ndr_print_netr_DatabaseSync2,
   19157             :                 { 0, NULL },
   19158             :                 { 0, NULL },
   19159             :         },
   19160             :         {
   19161             :                 "netr_DatabaseRedo",
   19162             :                 sizeof(struct netr_DatabaseRedo),
   19163             :                 (ndr_push_flags_fn_t) ndr_push_netr_DatabaseRedo,
   19164             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseRedo,
   19165             :                 (ndr_print_function_t) ndr_print_netr_DatabaseRedo,
   19166             :                 { 0, NULL },
   19167             :                 { 0, NULL },
   19168             :         },
   19169             :         {
   19170             :                 "netr_LogonControl2Ex",
   19171             :                 sizeof(struct netr_LogonControl2Ex),
   19172             :                 (ndr_push_flags_fn_t) ndr_push_netr_LogonControl2Ex,
   19173             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl2Ex,
   19174             :                 (ndr_print_function_t) ndr_print_netr_LogonControl2Ex,
   19175             :                 { 0, NULL },
   19176             :                 { 0, NULL },
   19177             :         },
   19178             :         {
   19179             :                 "netr_NetrEnumerateTrustedDomains",
   19180             :                 sizeof(struct netr_NetrEnumerateTrustedDomains),
   19181             :                 (ndr_push_flags_fn_t) ndr_push_netr_NetrEnumerateTrustedDomains,
   19182             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_NetrEnumerateTrustedDomains,
   19183             :                 (ndr_print_function_t) ndr_print_netr_NetrEnumerateTrustedDomains,
   19184             :                 { 0, NULL },
   19185             :                 { 0, NULL },
   19186             :         },
   19187             :         {
   19188             :                 "netr_DsRGetDCName",
   19189             :                 sizeof(struct netr_DsRGetDCName),
   19190             :                 (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCName,
   19191             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCName,
   19192             :                 (ndr_print_function_t) ndr_print_netr_DsRGetDCName,
   19193             :                 { 0, NULL },
   19194             :                 { 0, NULL },
   19195             :         },
   19196             :         {
   19197             :                 "netr_LogonGetCapabilities",
   19198             :                 sizeof(struct netr_LogonGetCapabilities),
   19199             :                 (ndr_push_flags_fn_t) ndr_push_netr_LogonGetCapabilities,
   19200             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_LogonGetCapabilities,
   19201             :                 (ndr_print_function_t) ndr_print_netr_LogonGetCapabilities,
   19202             :                 { 0, NULL },
   19203             :                 { 0, NULL },
   19204             :         },
   19205             :         {
   19206             :                 "netr_NETRLOGONSETSERVICEBITS",
   19207             :                 sizeof(struct netr_NETRLOGONSETSERVICEBITS),
   19208             :                 (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONSETSERVICEBITS,
   19209             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONSETSERVICEBITS,
   19210             :                 (ndr_print_function_t) ndr_print_netr_NETRLOGONSETSERVICEBITS,
   19211             :                 { 0, NULL },
   19212             :                 { 0, NULL },
   19213             :         },
   19214             :         {
   19215             :                 "netr_LogonGetTrustRid",
   19216             :                 sizeof(struct netr_LogonGetTrustRid),
   19217             :                 (ndr_push_flags_fn_t) ndr_push_netr_LogonGetTrustRid,
   19218             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_LogonGetTrustRid,
   19219             :                 (ndr_print_function_t) ndr_print_netr_LogonGetTrustRid,
   19220             :                 { 0, NULL },
   19221             :                 { 0, NULL },
   19222             :         },
   19223             :         {
   19224             :                 "netr_NETRLOGONCOMPUTESERVERDIGEST",
   19225             :                 sizeof(struct netr_NETRLOGONCOMPUTESERVERDIGEST),
   19226             :                 (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST,
   19227             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST,
   19228             :                 (ndr_print_function_t) ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST,
   19229             :                 { 0, NULL },
   19230             :                 { 0, NULL },
   19231             :         },
   19232             :         {
   19233             :                 "netr_NETRLOGONCOMPUTECLIENTDIGEST",
   19234             :                 sizeof(struct netr_NETRLOGONCOMPUTECLIENTDIGEST),
   19235             :                 (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST,
   19236             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST,
   19237             :                 (ndr_print_function_t) ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST,
   19238             :                 { 0, NULL },
   19239             :                 { 0, NULL },
   19240             :         },
   19241             :         {
   19242             :                 "netr_ServerAuthenticate3",
   19243             :                 sizeof(struct netr_ServerAuthenticate3),
   19244             :                 (ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate3,
   19245             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate3,
   19246             :                 (ndr_print_function_t) ndr_print_netr_ServerAuthenticate3,
   19247             :                 { 0, NULL },
   19248             :                 { 0, NULL },
   19249             :         },
   19250             :         {
   19251             :                 "netr_DsRGetDCNameEx",
   19252             :                 sizeof(struct netr_DsRGetDCNameEx),
   19253             :                 (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCNameEx,
   19254             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCNameEx,
   19255             :                 (ndr_print_function_t) ndr_print_netr_DsRGetDCNameEx,
   19256             :                 { 0, NULL },
   19257             :                 { 0, NULL },
   19258             :         },
   19259             :         {
   19260             :                 "netr_DsRGetSiteName",
   19261             :                 sizeof(struct netr_DsRGetSiteName),
   19262             :                 (ndr_push_flags_fn_t) ndr_push_netr_DsRGetSiteName,
   19263             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetSiteName,
   19264             :                 (ndr_print_function_t) ndr_print_netr_DsRGetSiteName,
   19265             :                 { 0, NULL },
   19266             :                 { 0, NULL },
   19267             :         },
   19268             :         {
   19269             :                 "netr_LogonGetDomainInfo",
   19270             :                 sizeof(struct netr_LogonGetDomainInfo),
   19271             :                 (ndr_push_flags_fn_t) ndr_push_netr_LogonGetDomainInfo,
   19272             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_LogonGetDomainInfo,
   19273             :                 (ndr_print_function_t) ndr_print_netr_LogonGetDomainInfo,
   19274             :                 { 0, NULL },
   19275             :                 { 0, NULL },
   19276             :         },
   19277             :         {
   19278             :                 "netr_ServerPasswordSet2",
   19279             :                 sizeof(struct netr_ServerPasswordSet2),
   19280             :                 (ndr_push_flags_fn_t) ndr_push_netr_ServerPasswordSet2,
   19281             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_ServerPasswordSet2,
   19282             :                 (ndr_print_function_t) ndr_print_netr_ServerPasswordSet2,
   19283             :                 { 0, NULL },
   19284             :                 { 0, NULL },
   19285             :         },
   19286             :         {
   19287             :                 "netr_ServerPasswordGet",
   19288             :                 sizeof(struct netr_ServerPasswordGet),
   19289             :                 (ndr_push_flags_fn_t) ndr_push_netr_ServerPasswordGet,
   19290             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_ServerPasswordGet,
   19291             :                 (ndr_print_function_t) ndr_print_netr_ServerPasswordGet,
   19292             :                 { 0, NULL },
   19293             :                 { 0, NULL },
   19294             :         },
   19295             :         {
   19296             :                 "netr_NetrLogonSendToSam",
   19297             :                 sizeof(struct netr_NetrLogonSendToSam),
   19298             :                 (ndr_push_flags_fn_t) ndr_push_netr_NetrLogonSendToSam,
   19299             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_NetrLogonSendToSam,
   19300             :                 (ndr_print_function_t) ndr_print_netr_NetrLogonSendToSam,
   19301             :                 { 0, NULL },
   19302             :                 { 0, NULL },
   19303             :         },
   19304             :         {
   19305             :                 "netr_DsRAddressToSitenamesW",
   19306             :                 sizeof(struct netr_DsRAddressToSitenamesW),
   19307             :                 (ndr_push_flags_fn_t) ndr_push_netr_DsRAddressToSitenamesW,
   19308             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DsRAddressToSitenamesW,
   19309             :                 (ndr_print_function_t) ndr_print_netr_DsRAddressToSitenamesW,
   19310             :                 { 0, NULL },
   19311             :                 { 0, NULL },
   19312             :         },
   19313             :         {
   19314             :                 "netr_DsRGetDCNameEx2",
   19315             :                 sizeof(struct netr_DsRGetDCNameEx2),
   19316             :                 (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCNameEx2,
   19317             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCNameEx2,
   19318             :                 (ndr_print_function_t) ndr_print_netr_DsRGetDCNameEx2,
   19319             :                 { 0, NULL },
   19320             :                 { 0, NULL },
   19321             :         },
   19322             :         {
   19323             :                 "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN",
   19324             :                 sizeof(struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN),
   19325             :                 (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
   19326             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
   19327             :                 (ndr_print_function_t) ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
   19328             :                 { 0, NULL },
   19329             :                 { 0, NULL },
   19330             :         },
   19331             :         {
   19332             :                 "netr_NetrEnumerateTrustedDomainsEx",
   19333             :                 sizeof(struct netr_NetrEnumerateTrustedDomainsEx),
   19334             :                 (ndr_push_flags_fn_t) ndr_push_netr_NetrEnumerateTrustedDomainsEx,
   19335             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_NetrEnumerateTrustedDomainsEx,
   19336             :                 (ndr_print_function_t) ndr_print_netr_NetrEnumerateTrustedDomainsEx,
   19337             :                 { 0, NULL },
   19338             :                 { 0, NULL },
   19339             :         },
   19340             :         {
   19341             :                 "netr_DsRAddressToSitenamesExW",
   19342             :                 sizeof(struct netr_DsRAddressToSitenamesExW),
   19343             :                 (ndr_push_flags_fn_t) ndr_push_netr_DsRAddressToSitenamesExW,
   19344             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DsRAddressToSitenamesExW,
   19345             :                 (ndr_print_function_t) ndr_print_netr_DsRAddressToSitenamesExW,
   19346             :                 { 0, NULL },
   19347             :                 { 0, NULL },
   19348             :         },
   19349             :         {
   19350             :                 "netr_DsrGetDcSiteCoverageW",
   19351             :                 sizeof(struct netr_DsrGetDcSiteCoverageW),
   19352             :                 (ndr_push_flags_fn_t) ndr_push_netr_DsrGetDcSiteCoverageW,
   19353             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DsrGetDcSiteCoverageW,
   19354             :                 (ndr_print_function_t) ndr_print_netr_DsrGetDcSiteCoverageW,
   19355             :                 { 0, NULL },
   19356             :                 { 0, NULL },
   19357             :         },
   19358             :         {
   19359             :                 "netr_LogonSamLogonEx",
   19360             :                 sizeof(struct netr_LogonSamLogonEx),
   19361             :                 (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogonEx,
   19362             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogonEx,
   19363             :                 (ndr_print_function_t) ndr_print_netr_LogonSamLogonEx,
   19364             :                 { 0, NULL },
   19365             :                 { 0, NULL },
   19366             :         },
   19367             :         {
   19368             :                 "netr_DsrEnumerateDomainTrusts",
   19369             :                 sizeof(struct netr_DsrEnumerateDomainTrusts),
   19370             :                 (ndr_push_flags_fn_t) ndr_push_netr_DsrEnumerateDomainTrusts,
   19371             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DsrEnumerateDomainTrusts,
   19372             :                 (ndr_print_function_t) ndr_print_netr_DsrEnumerateDomainTrusts,
   19373             :                 { 0, NULL },
   19374             :                 { 0, NULL },
   19375             :         },
   19376             :         {
   19377             :                 "netr_DsrDeregisterDNSHostRecords",
   19378             :                 sizeof(struct netr_DsrDeregisterDNSHostRecords),
   19379             :                 (ndr_push_flags_fn_t) ndr_push_netr_DsrDeregisterDNSHostRecords,
   19380             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DsrDeregisterDNSHostRecords,
   19381             :                 (ndr_print_function_t) ndr_print_netr_DsrDeregisterDNSHostRecords,
   19382             :                 { 0, NULL },
   19383             :                 { 0, NULL },
   19384             :         },
   19385             :         {
   19386             :                 "netr_ServerTrustPasswordsGet",
   19387             :                 sizeof(struct netr_ServerTrustPasswordsGet),
   19388             :                 (ndr_push_flags_fn_t) ndr_push_netr_ServerTrustPasswordsGet,
   19389             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_ServerTrustPasswordsGet,
   19390             :                 (ndr_print_function_t) ndr_print_netr_ServerTrustPasswordsGet,
   19391             :                 { 0, NULL },
   19392             :                 { 0, NULL },
   19393             :         },
   19394             :         {
   19395             :                 "netr_DsRGetForestTrustInformation",
   19396             :                 sizeof(struct netr_DsRGetForestTrustInformation),
   19397             :                 (ndr_push_flags_fn_t) ndr_push_netr_DsRGetForestTrustInformation,
   19398             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetForestTrustInformation,
   19399             :                 (ndr_print_function_t) ndr_print_netr_DsRGetForestTrustInformation,
   19400             :                 { 0, NULL },
   19401             :                 { 0, NULL },
   19402             :         },
   19403             :         {
   19404             :                 "netr_GetForestTrustInformation",
   19405             :                 sizeof(struct netr_GetForestTrustInformation),
   19406             :                 (ndr_push_flags_fn_t) ndr_push_netr_GetForestTrustInformation,
   19407             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_GetForestTrustInformation,
   19408             :                 (ndr_print_function_t) ndr_print_netr_GetForestTrustInformation,
   19409             :                 { 0, NULL },
   19410             :                 { 0, NULL },
   19411             :         },
   19412             :         {
   19413             :                 "netr_LogonSamLogonWithFlags",
   19414             :                 sizeof(struct netr_LogonSamLogonWithFlags),
   19415             :                 (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogonWithFlags,
   19416             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogonWithFlags,
   19417             :                 (ndr_print_function_t) ndr_print_netr_LogonSamLogonWithFlags,
   19418             :                 { 0, NULL },
   19419             :                 { 0, NULL },
   19420             :         },
   19421             :         {
   19422             :                 "netr_ServerGetTrustInfo",
   19423             :                 sizeof(struct netr_ServerGetTrustInfo),
   19424             :                 (ndr_push_flags_fn_t) ndr_push_netr_ServerGetTrustInfo,
   19425             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_ServerGetTrustInfo,
   19426             :                 (ndr_print_function_t) ndr_print_netr_ServerGetTrustInfo,
   19427             :                 { 0, NULL },
   19428             :                 { 0, NULL },
   19429             :         },
   19430             :         {
   19431             :                 "netr_Unused47",
   19432             :                 sizeof(struct netr_Unused47),
   19433             :                 (ndr_push_flags_fn_t) ndr_push_netr_Unused47,
   19434             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_Unused47,
   19435             :                 (ndr_print_function_t) ndr_print_netr_Unused47,
   19436             :                 { 0, NULL },
   19437             :                 { 0, NULL },
   19438             :         },
   19439             :         {
   19440             :                 "netr_DsrUpdateReadOnlyServerDnsRecords",
   19441             :                 sizeof(struct netr_DsrUpdateReadOnlyServerDnsRecords),
   19442             :                 (ndr_push_flags_fn_t) ndr_push_netr_DsrUpdateReadOnlyServerDnsRecords,
   19443             :                 (ndr_pull_flags_fn_t) ndr_pull_netr_DsrUpdateReadOnlyServerDnsRecords,
   19444             :                 (ndr_print_function_t) ndr_print_netr_DsrUpdateReadOnlyServerDnsRecords,
   19445             :                 { 0, NULL },
   19446             :                 { 0, NULL },
   19447             :         },
   19448             :         { .name = NULL }
   19449             : };
   19450             : 
   19451             : static const char * const netlogon_endpoint_strings[] = {
   19452             :         "ncacn_np:[\\pipe\\netlogon]", 
   19453             :         "ncacn_ip_tcp:", 
   19454             :         "ncalrpc:", 
   19455             : };
   19456             : 
   19457             : static const struct ndr_interface_string_array netlogon_endpoints = {
   19458             :         .count  = 3,
   19459             :         .names  = netlogon_endpoint_strings
   19460             : };
   19461             : 
   19462             : static const char * const netlogon_authservice_strings[] = {
   19463             :         "host", 
   19464             : };
   19465             : 
   19466             : static const struct ndr_interface_string_array netlogon_authservices = {
   19467             :         .count  = 1,
   19468             :         .names  = netlogon_authservice_strings
   19469             : };
   19470             : 
   19471             : 
   19472             : const struct ndr_interface_table ndr_table_netlogon = {
   19473             :         .name           = "netlogon",
   19474             :         .syntax_id      = {
   19475             :                 {0x12345678,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0xcf,0xfb}},
   19476             :                 NDR_NETLOGON_VERSION
   19477             :         },
   19478             :         .helpstring     = NDR_NETLOGON_HELPSTRING,
   19479             :         .num_calls      = 49,
   19480             :         .calls          = netlogon_calls,
   19481             :         .num_public_structs     = 15,
   19482             :         .public_structs         = netlogon_public_structs,
   19483             :         .endpoints      = &netlogon_endpoints,
   19484             :         .authservices   = &netlogon_authservices
   19485             : };
   19486             : 
   19487             : #endif /* SKIP_NDR_TABLE_netlogon */

Generated by: LCOV version 1.14