~ubuntu-branches/ubuntu/quantal/samba/quantal

« back to all changes in this revision

Viewing changes to source3/librpc/gen_ndr/ndr_wbint.c

  • Committer: Package Import Robot
  • Author(s): Tyler Hicks
  • Date: 2012-04-12 05:28:44 UTC
  • Revision ID: package-import@ubuntu.com-20120412052844-i2u39y7vkrcx61u4
Tags: 2:3.6.3-2ubuntu2
* SECURITY UPDATE: Unauthenticated remote code execution via
  RPC calls (LP: #978458)
  - debian/patches/CVE-2012-1182-1.patch: Fix PIDL compiler to generate code
    that uses the same value for array allocation and array length checks.
    Based on upstream patch.
  - debian/patches/CVE-2012-1182-2.patch: Regenerate PIDL generated files
    with the patched PIDL compiler
  - CVE-2012-1182

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
 
70
70
static enum ndr_err_code ndr_pull_wbint_TransIDArray(struct ndr_pull *ndr, int ndr_flags, struct wbint_TransIDArray *r)
71
71
{
 
72
        uint32_t size_ids_0 = 0;
72
73
        uint32_t cntr_ids_0;
73
74
        TALLOC_CTX *_mem_save_ids_0;
74
75
        if (ndr_flags & NDR_SCALARS) {
75
76
                NDR_CHECK(ndr_pull_array_size(ndr, &r->ids));
76
77
                NDR_CHECK(ndr_pull_align(ndr, 8));
77
78
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_ids));
78
 
                NDR_PULL_ALLOC_N(ndr, r->ids, ndr_get_array_size(ndr, &r->ids));
 
79
                size_ids_0 = ndr_get_array_size(ndr, &r->ids);
 
80
                NDR_PULL_ALLOC_N(ndr, r->ids, size_ids_0);
79
81
                _mem_save_ids_0 = NDR_PULL_GET_MEM_CTX(ndr);
80
82
                NDR_PULL_SET_MEM_CTX(ndr, r->ids, 0);
81
 
                for (cntr_ids_0 = 0; cntr_ids_0 < r->num_ids; cntr_ids_0++) {
 
83
                for (cntr_ids_0 = 0; cntr_ids_0 < size_ids_0; cntr_ids_0++) {
82
84
                        NDR_CHECK(ndr_pull_wbint_TransID(ndr, NDR_SCALARS, &r->ids[cntr_ids_0]));
83
85
                }
84
86
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_0, 0);
153
155
_PUBLIC_ enum ndr_err_code ndr_pull_wbint_userinfo(struct ndr_pull *ndr, int ndr_flags, struct wbint_userinfo *r)
154
156
{
155
157
        uint32_t _ptr_acct_name;
 
158
        uint32_t size_acct_name_1 = 0;
 
159
        uint32_t length_acct_name_1 = 0;
156
160
        TALLOC_CTX *_mem_save_acct_name_0;
157
161
        uint32_t _ptr_full_name;
 
162
        uint32_t size_full_name_1 = 0;
 
163
        uint32_t length_full_name_1 = 0;
158
164
        TALLOC_CTX *_mem_save_full_name_0;
159
165
        uint32_t _ptr_homedir;
 
166
        uint32_t size_homedir_1 = 0;
 
167
        uint32_t length_homedir_1 = 0;
160
168
        TALLOC_CTX *_mem_save_homedir_0;
161
169
        uint32_t _ptr_shell;
 
170
        uint32_t size_shell_1 = 0;
 
171
        uint32_t length_shell_1 = 0;
162
172
        TALLOC_CTX *_mem_save_shell_0;
163
173
        if (ndr_flags & NDR_SCALARS) {
164
174
                NDR_CHECK(ndr_pull_align(ndr, 8));
197
207
                        NDR_PULL_SET_MEM_CTX(ndr, r->acct_name, 0);
198
208
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->acct_name));
199
209
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->acct_name));
200
 
                        if (ndr_get_array_length(ndr, &r->acct_name) > ndr_get_array_size(ndr, &r->acct_name)) {
201
 
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->acct_name), ndr_get_array_length(ndr, &r->acct_name));
 
210
                        size_acct_name_1 = ndr_get_array_size(ndr, &r->acct_name);
 
211
                        length_acct_name_1 = ndr_get_array_length(ndr, &r->acct_name);
 
212
                        if (length_acct_name_1 > size_acct_name_1) {
 
213
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_acct_name_1, length_acct_name_1);
202
214
                        }
203
 
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->acct_name), sizeof(uint8_t)));
204
 
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->acct_name, ndr_get_array_length(ndr, &r->acct_name), sizeof(uint8_t), CH_UTF8));
 
215
                        NDR_CHECK(ndr_check_string_terminator(ndr, length_acct_name_1, sizeof(uint8_t)));
 
216
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->acct_name, length_acct_name_1, sizeof(uint8_t), CH_UTF8));
205
217
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_name_0, 0);
206
218
                }
207
219
                if (r->full_name) {
209
221
                        NDR_PULL_SET_MEM_CTX(ndr, r->full_name, 0);
210
222
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->full_name));
211
223
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->full_name));
212
 
                        if (ndr_get_array_length(ndr, &r->full_name) > ndr_get_array_size(ndr, &r->full_name)) {
213
 
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->full_name), ndr_get_array_length(ndr, &r->full_name));
 
224
                        size_full_name_1 = ndr_get_array_size(ndr, &r->full_name);
 
225
                        length_full_name_1 = ndr_get_array_length(ndr, &r->full_name);
 
226
                        if (length_full_name_1 > size_full_name_1) {
 
227
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_full_name_1, length_full_name_1);
214
228
                        }
215
 
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->full_name), sizeof(uint8_t)));
216
 
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->full_name, ndr_get_array_length(ndr, &r->full_name), sizeof(uint8_t), CH_UTF8));
 
229
                        NDR_CHECK(ndr_check_string_terminator(ndr, length_full_name_1, sizeof(uint8_t)));
 
230
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->full_name, length_full_name_1, sizeof(uint8_t), CH_UTF8));
217
231
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_full_name_0, 0);
218
232
                }
219
233
                if (r->homedir) {
221
235
                        NDR_PULL_SET_MEM_CTX(ndr, r->homedir, 0);
222
236
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->homedir));
223
237
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->homedir));
224
 
                        if (ndr_get_array_length(ndr, &r->homedir) > ndr_get_array_size(ndr, &r->homedir)) {
225
 
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->homedir), ndr_get_array_length(ndr, &r->homedir));
 
238
                        size_homedir_1 = ndr_get_array_size(ndr, &r->homedir);
 
239
                        length_homedir_1 = ndr_get_array_length(ndr, &r->homedir);
 
240
                        if (length_homedir_1 > size_homedir_1) {
 
241
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_homedir_1, length_homedir_1);
226
242
                        }
227
 
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->homedir), sizeof(uint8_t)));
228
 
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->homedir, ndr_get_array_length(ndr, &r->homedir), sizeof(uint8_t), CH_UTF8));
 
243
                        NDR_CHECK(ndr_check_string_terminator(ndr, length_homedir_1, sizeof(uint8_t)));
 
244
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->homedir, length_homedir_1, sizeof(uint8_t), CH_UTF8));
229
245
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_homedir_0, 0);
230
246
                }
231
247
                if (r->shell) {
233
249
                        NDR_PULL_SET_MEM_CTX(ndr, r->shell, 0);
234
250
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->shell));
235
251
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->shell));
236
 
                        if (ndr_get_array_length(ndr, &r->shell) > ndr_get_array_size(ndr, &r->shell)) {
237
 
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->shell), ndr_get_array_length(ndr, &r->shell));
 
252
                        size_shell_1 = ndr_get_array_size(ndr, &r->shell);
 
253
                        length_shell_1 = ndr_get_array_length(ndr, &r->shell);
 
254
                        if (length_shell_1 > size_shell_1) {
 
255
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_shell_1, length_shell_1);
238
256
                        }
239
 
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->shell), sizeof(uint8_t)));
240
 
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->shell, ndr_get_array_length(ndr, &r->shell), sizeof(uint8_t), CH_UTF8));
 
257
                        NDR_CHECK(ndr_check_string_terminator(ndr, length_shell_1, sizeof(uint8_t)));
 
258
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->shell, length_shell_1, sizeof(uint8_t), CH_UTF8));
241
259
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_shell_0, 0);
242
260
                }
243
261
        }
298
316
 
299
317
_PUBLIC_ enum ndr_err_code ndr_pull_wbint_SidArray(struct ndr_pull *ndr, int ndr_flags, struct wbint_SidArray *r)
300
318
{
 
319
        uint32_t size_sids_0 = 0;
301
320
        uint32_t cntr_sids_0;
302
321
        TALLOC_CTX *_mem_save_sids_0;
303
322
        if (ndr_flags & NDR_SCALARS) {
304
323
                NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
305
324
                NDR_CHECK(ndr_pull_align(ndr, 4));
306
325
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
307
 
                NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
 
326
                size_sids_0 = ndr_get_array_size(ndr, &r->sids);
 
327
                NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_0);
308
328
                _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
309
329
                NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
310
 
                for (cntr_sids_0 = 0; cntr_sids_0 < r->num_sids; cntr_sids_0++) {
 
330
                for (cntr_sids_0 = 0; cntr_sids_0 < size_sids_0; cntr_sids_0++) {
311
331
                        NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->sids[cntr_sids_0]));
312
332
                }
313
333
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
356
376
 
357
377
_PUBLIC_ enum ndr_err_code ndr_pull_wbint_RidArray(struct ndr_pull *ndr, int ndr_flags, struct wbint_RidArray *r)
358
378
{
 
379
        uint32_t size_rids_0 = 0;
359
380
        uint32_t cntr_rids_0;
360
381
        TALLOC_CTX *_mem_save_rids_0;
361
382
        if (ndr_flags & NDR_SCALARS) {
362
383
                NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
363
384
                NDR_CHECK(ndr_pull_align(ndr, 4));
364
385
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_rids));
365
 
                NDR_PULL_ALLOC_N(ndr, r->rids, ndr_get_array_size(ndr, &r->rids));
 
386
                size_rids_0 = ndr_get_array_size(ndr, &r->rids);
 
387
                NDR_PULL_ALLOC_N(ndr, r->rids, size_rids_0);
366
388
                _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
367
389
                NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
368
 
                for (cntr_rids_0 = 0; cntr_rids_0 < r->num_rids; cntr_rids_0++) {
 
390
                for (cntr_rids_0 = 0; cntr_rids_0 < size_rids_0; cntr_rids_0++) {
369
391
                        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rids[cntr_rids_0]));
370
392
                }
371
393
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
418
440
_PUBLIC_ enum ndr_err_code ndr_pull_wbint_Principal(struct ndr_pull *ndr, int ndr_flags, struct wbint_Principal *r)
419
441
{
420
442
        uint32_t _ptr_name;
 
443
        uint32_t size_name_1 = 0;
 
444
        uint32_t length_name_1 = 0;
421
445
        TALLOC_CTX *_mem_save_name_0;
422
446
        if (ndr_flags & NDR_SCALARS) {
423
447
                NDR_CHECK(ndr_pull_align(ndr, 5));
437
461
                        NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
438
462
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
439
463
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
440
 
                        if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
441
 
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
 
464
                        size_name_1 = ndr_get_array_size(ndr, &r->name);
 
465
                        length_name_1 = ndr_get_array_length(ndr, &r->name);
 
466
                        if (length_name_1 > size_name_1) {
 
467
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
442
468
                        }
443
 
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint8_t)));
444
 
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint8_t), CH_UTF8));
 
469
                        NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint8_t)));
 
470
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint8_t), CH_UTF8));
445
471
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
446
472
                }
447
473
        }
486
512
 
487
513
_PUBLIC_ enum ndr_err_code ndr_pull_wbint_Principals(struct ndr_pull *ndr, int ndr_flags, struct wbint_Principals *r)
488
514
{
 
515
        uint32_t size_principals_0 = 0;
489
516
        uint32_t cntr_principals_0;
490
517
        TALLOC_CTX *_mem_save_principals_0;
491
518
        if (ndr_flags & NDR_SCALARS) {
492
519
                NDR_CHECK(ndr_pull_array_size(ndr, &r->principals));
493
520
                NDR_CHECK(ndr_pull_align(ndr, 5));
494
521
                NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->num_principals));
495
 
                NDR_PULL_ALLOC_N(ndr, r->principals, ndr_get_array_size(ndr, &r->principals));
 
522
                size_principals_0 = ndr_get_array_size(ndr, &r->principals);
 
523
                NDR_PULL_ALLOC_N(ndr, r->principals, size_principals_0);
496
524
                _mem_save_principals_0 = NDR_PULL_GET_MEM_CTX(ndr);
497
525
                NDR_PULL_SET_MEM_CTX(ndr, r->principals, 0);
498
 
                for (cntr_principals_0 = 0; cntr_principals_0 < r->num_principals; cntr_principals_0++) {
 
526
                for (cntr_principals_0 = 0; cntr_principals_0 < size_principals_0; cntr_principals_0++) {
499
527
                        NDR_CHECK(ndr_pull_wbint_Principal(ndr, NDR_SCALARS, &r->principals[cntr_principals_0]));
500
528
                }
501
529
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_principals_0, 0);
505
533
                NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
506
534
        }
507
535
        if (ndr_flags & NDR_BUFFERS) {
 
536
                size_principals_0 = ndr_get_array_size(ndr, &r->principals);
508
537
                _mem_save_principals_0 = NDR_PULL_GET_MEM_CTX(ndr);
509
538
                NDR_PULL_SET_MEM_CTX(ndr, r->principals, 0);
510
 
                for (cntr_principals_0 = 0; cntr_principals_0 < r->num_principals; cntr_principals_0++) {
 
539
                for (cntr_principals_0 = 0; cntr_principals_0 < size_principals_0; cntr_principals_0++) {
511
540
                        NDR_CHECK(ndr_pull_wbint_Principal(ndr, NDR_BUFFERS, &r->principals[cntr_principals_0]));
512
541
                }
513
542
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_principals_0, 0);
553
582
 
554
583
_PUBLIC_ enum ndr_err_code ndr_pull_wbint_userinfos(struct ndr_pull *ndr, int ndr_flags, struct wbint_userinfos *r)
555
584
{
 
585
        uint32_t size_userinfos_0 = 0;
556
586
        uint32_t cntr_userinfos_0;
557
587
        TALLOC_CTX *_mem_save_userinfos_0;
558
588
        if (ndr_flags & NDR_SCALARS) {
559
589
                NDR_CHECK(ndr_pull_array_size(ndr, &r->userinfos));
560
590
                NDR_CHECK(ndr_pull_align(ndr, 8));
561
591
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_userinfos));
562
 
                NDR_PULL_ALLOC_N(ndr, r->userinfos, ndr_get_array_size(ndr, &r->userinfos));
 
592
                size_userinfos_0 = ndr_get_array_size(ndr, &r->userinfos);
 
593
                NDR_PULL_ALLOC_N(ndr, r->userinfos, size_userinfos_0);
563
594
                _mem_save_userinfos_0 = NDR_PULL_GET_MEM_CTX(ndr);
564
595
                NDR_PULL_SET_MEM_CTX(ndr, r->userinfos, 0);
565
 
                for (cntr_userinfos_0 = 0; cntr_userinfos_0 < r->num_userinfos; cntr_userinfos_0++) {
 
596
                for (cntr_userinfos_0 = 0; cntr_userinfos_0 < size_userinfos_0; cntr_userinfos_0++) {
566
597
                        NDR_CHECK(ndr_pull_wbint_userinfo(ndr, NDR_SCALARS, &r->userinfos[cntr_userinfos_0]));
567
598
                }
568
599
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userinfos_0, 0);
572
603
                NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
573
604
        }
574
605
        if (ndr_flags & NDR_BUFFERS) {
 
606
                size_userinfos_0 = ndr_get_array_size(ndr, &r->userinfos);
575
607
                _mem_save_userinfos_0 = NDR_PULL_GET_MEM_CTX(ndr);
576
608
                NDR_PULL_SET_MEM_CTX(ndr, r->userinfos, 0);
577
 
                for (cntr_userinfos_0 = 0; cntr_userinfos_0 < r->num_userinfos; cntr_userinfos_0++) {
 
609
                for (cntr_userinfos_0 = 0; cntr_userinfos_0 < size_userinfos_0; cntr_userinfos_0++) {
578
610
                        NDR_CHECK(ndr_pull_wbint_userinfo(ndr, NDR_BUFFERS, &r->userinfos[cntr_userinfos_0]));
579
611
                }
580
612
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userinfos_0, 0);
701
733
static enum ndr_err_code ndr_pull_wbint_LookupSid(struct ndr_pull *ndr, int flags, struct wbint_LookupSid *r)
702
734
{
703
735
        uint32_t _ptr_domain;
 
736
        uint32_t size_domain_2 = 0;
 
737
        uint32_t length_domain_2 = 0;
704
738
        uint32_t _ptr_name;
 
739
        uint32_t size_name_2 = 0;
 
740
        uint32_t length_name_2 = 0;
705
741
        TALLOC_CTX *_mem_save_sid_0;
706
742
        TALLOC_CTX *_mem_save_type_0;
707
743
        TALLOC_CTX *_mem_save_domain_0;
749
785
                        NDR_PULL_SET_MEM_CTX(ndr, *r->out.domain, 0);
750
786
                        NDR_CHECK(ndr_pull_array_size(ndr, r->out.domain));
751
787
                        NDR_CHECK(ndr_pull_array_length(ndr, r->out.domain));
752
 
                        if (ndr_get_array_length(ndr, r->out.domain) > ndr_get_array_size(ndr, r->out.domain)) {
753
 
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.domain), ndr_get_array_length(ndr, r->out.domain));
 
788
                        size_domain_2 = ndr_get_array_size(ndr, r->out.domain);
 
789
                        length_domain_2 = ndr_get_array_length(ndr, r->out.domain);
 
790
                        if (length_domain_2 > size_domain_2) {
 
791
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_2, length_domain_2);
754
792
                        }
755
 
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.domain), sizeof(uint8_t)));
756
 
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.domain, ndr_get_array_length(ndr, r->out.domain), sizeof(uint8_t), CH_UTF8));
 
793
                        NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_2, sizeof(uint8_t)));
 
794
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.domain, length_domain_2, sizeof(uint8_t), CH_UTF8));
757
795
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_1, 0);
758
796
                }
759
797
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, LIBNDR_FLAG_REF_ALLOC);
773
811
                        NDR_PULL_SET_MEM_CTX(ndr, *r->out.name, 0);
774
812
                        NDR_CHECK(ndr_pull_array_size(ndr, r->out.name));
775
813
                        NDR_CHECK(ndr_pull_array_length(ndr, r->out.name));
776
 
                        if (ndr_get_array_length(ndr, r->out.name) > ndr_get_array_size(ndr, r->out.name)) {
777
 
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.name), ndr_get_array_length(ndr, r->out.name));
 
814
                        size_name_2 = ndr_get_array_size(ndr, r->out.name);
 
815
                        length_name_2 = ndr_get_array_length(ndr, r->out.name);
 
816
                        if (length_name_2 > size_name_2) {
 
817
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_2, length_name_2);
778
818
                        }
779
 
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.name), sizeof(uint8_t)));
780
 
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.name, ndr_get_array_length(ndr, r->out.name), sizeof(uint8_t), CH_UTF8));
 
819
                        NDR_CHECK(ndr_check_string_terminator(ndr, length_name_2, sizeof(uint8_t)));
 
820
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.name, length_name_2, sizeof(uint8_t), CH_UTF8));
781
821
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_1, 0);
782
822
                }
783
823
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
965
1005
 
966
1006
static enum ndr_err_code ndr_pull_wbint_LookupName(struct ndr_pull *ndr, int flags, struct wbint_LookupName *r)
967
1007
{
 
1008
        uint32_t size_domain_1 = 0;
 
1009
        uint32_t length_domain_1 = 0;
 
1010
        uint32_t size_name_1 = 0;
 
1011
        uint32_t length_name_1 = 0;
968
1012
        TALLOC_CTX *_mem_save_type_0;
969
1013
        TALLOC_CTX *_mem_save_sid_0;
970
1014
        if (flags & NDR_IN) {
972
1016
 
973
1017
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain));
974
1018
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain));
975
 
                if (ndr_get_array_length(ndr, &r->in.domain) > ndr_get_array_size(ndr, &r->in.domain)) {
976
 
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.domain), ndr_get_array_length(ndr, &r->in.domain));
 
1019
                size_domain_1 = ndr_get_array_size(ndr, &r->in.domain);
 
1020
                length_domain_1 = ndr_get_array_length(ndr, &r->in.domain);
 
1021
                if (length_domain_1 > size_domain_1) {
 
1022
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
977
1023
                }
978
 
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domain), sizeof(uint8_t)));
979
 
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain, ndr_get_array_length(ndr, &r->in.domain), sizeof(uint8_t), CH_UTF8));
 
1024
                NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint8_t)));
 
1025
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain, length_domain_1, sizeof(uint8_t), CH_UTF8));
980
1026
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name));
981
1027
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name));
982
 
                if (ndr_get_array_length(ndr, &r->in.name) > ndr_get_array_size(ndr, &r->in.name)) {
983
 
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.name), ndr_get_array_length(ndr, &r->in.name));
 
1028
                size_name_1 = ndr_get_array_size(ndr, &r->in.name);
 
1029
                length_name_1 = ndr_get_array_length(ndr, &r->in.name);
 
1030
                if (length_name_1 > size_name_1) {
 
1031
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
984
1032
                }
985
 
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name), sizeof(uint8_t)));
986
 
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, ndr_get_array_length(ndr, &r->in.name), sizeof(uint8_t), CH_UTF8));
 
1033
                NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint8_t)));
 
1034
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, length_name_1, sizeof(uint8_t), CH_UTF8));
987
1035
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
988
1036
                NDR_PULL_ALLOC(ndr, r->out.type);
989
1037
                ZERO_STRUCTP(r->out.type);
1077
1125
static enum ndr_err_code ndr_pull_wbint_Sid2Uid(struct ndr_pull *ndr, int flags, struct wbint_Sid2Uid *r)
1078
1126
{
1079
1127
        uint32_t _ptr_dom_name;
 
1128
        uint32_t size_dom_name_1 = 0;
 
1129
        uint32_t length_dom_name_1 = 0;
1080
1130
        TALLOC_CTX *_mem_save_dom_name_0;
1081
1131
        TALLOC_CTX *_mem_save_sid_0;
1082
1132
        TALLOC_CTX *_mem_save_uid_0;
1094
1144
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_name, 0);
1095
1145
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dom_name));
1096
1146
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dom_name));
1097
 
                        if (ndr_get_array_length(ndr, &r->in.dom_name) > ndr_get_array_size(ndr, &r->in.dom_name)) {
1098
 
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dom_name), ndr_get_array_length(ndr, &r->in.dom_name));
 
1147
                        size_dom_name_1 = ndr_get_array_size(ndr, &r->in.dom_name);
 
1148
                        length_dom_name_1 = ndr_get_array_length(ndr, &r->in.dom_name);
 
1149
                        if (length_dom_name_1 > size_dom_name_1) {
 
1150
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dom_name_1, length_dom_name_1);
1099
1151
                        }
1100
 
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t)));
1101
 
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t), CH_UTF8));
 
1152
                        NDR_CHECK(ndr_check_string_terminator(ndr, length_dom_name_1, sizeof(uint8_t)));
 
1153
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, length_dom_name_1, sizeof(uint8_t), CH_UTF8));
1102
1154
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_name_0, 0);
1103
1155
                }
1104
1156
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1188
1240
static enum ndr_err_code ndr_pull_wbint_Sid2Gid(struct ndr_pull *ndr, int flags, struct wbint_Sid2Gid *r)
1189
1241
{
1190
1242
        uint32_t _ptr_dom_name;
 
1243
        uint32_t size_dom_name_1 = 0;
 
1244
        uint32_t length_dom_name_1 = 0;
1191
1245
        TALLOC_CTX *_mem_save_dom_name_0;
1192
1246
        TALLOC_CTX *_mem_save_sid_0;
1193
1247
        TALLOC_CTX *_mem_save_gid_0;
1205
1259
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_name, 0);
1206
1260
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dom_name));
1207
1261
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dom_name));
1208
 
                        if (ndr_get_array_length(ndr, &r->in.dom_name) > ndr_get_array_size(ndr, &r->in.dom_name)) {
1209
 
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dom_name), ndr_get_array_length(ndr, &r->in.dom_name));
 
1262
                        size_dom_name_1 = ndr_get_array_size(ndr, &r->in.dom_name);
 
1263
                        length_dom_name_1 = ndr_get_array_length(ndr, &r->in.dom_name);
 
1264
                        if (length_dom_name_1 > size_dom_name_1) {
 
1265
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dom_name_1, length_dom_name_1);
1210
1266
                        }
1211
 
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t)));
1212
 
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t), CH_UTF8));
 
1267
                        NDR_CHECK(ndr_check_string_terminator(ndr, length_dom_name_1, sizeof(uint8_t)));
 
1268
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, length_dom_name_1, sizeof(uint8_t), CH_UTF8));
1213
1269
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_name_0, 0);
1214
1270
                }
1215
1271
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1389
1445
static enum ndr_err_code ndr_pull_wbint_Uid2Sid(struct ndr_pull *ndr, int flags, struct wbint_Uid2Sid *r)
1390
1446
{
1391
1447
        uint32_t _ptr_dom_name;
 
1448
        uint32_t size_dom_name_1 = 0;
 
1449
        uint32_t length_dom_name_1 = 0;
1392
1450
        TALLOC_CTX *_mem_save_dom_name_0;
1393
1451
        TALLOC_CTX *_mem_save_sid_0;
1394
1452
        if (flags & NDR_IN) {
1405
1463
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_name, 0);
1406
1464
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dom_name));
1407
1465
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dom_name));
1408
 
                        if (ndr_get_array_length(ndr, &r->in.dom_name) > ndr_get_array_size(ndr, &r->in.dom_name)) {
1409
 
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dom_name), ndr_get_array_length(ndr, &r->in.dom_name));
 
1466
                        size_dom_name_1 = ndr_get_array_size(ndr, &r->in.dom_name);
 
1467
                        length_dom_name_1 = ndr_get_array_length(ndr, &r->in.dom_name);
 
1468
                        if (length_dom_name_1 > size_dom_name_1) {
 
1469
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dom_name_1, length_dom_name_1);
1410
1470
                        }
1411
 
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t)));
1412
 
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t), CH_UTF8));
 
1471
                        NDR_CHECK(ndr_check_string_terminator(ndr, length_dom_name_1, sizeof(uint8_t)));
 
1472
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, length_dom_name_1, sizeof(uint8_t), CH_UTF8));
1413
1473
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_name_0, 0);
1414
1474
                }
1415
1475
                NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uid));
1487
1547
static enum ndr_err_code ndr_pull_wbint_Gid2Sid(struct ndr_pull *ndr, int flags, struct wbint_Gid2Sid *r)
1488
1548
{
1489
1549
        uint32_t _ptr_dom_name;
 
1550
        uint32_t size_dom_name_1 = 0;
 
1551
        uint32_t length_dom_name_1 = 0;
1490
1552
        TALLOC_CTX *_mem_save_dom_name_0;
1491
1553
        TALLOC_CTX *_mem_save_sid_0;
1492
1554
        if (flags & NDR_IN) {
1503
1565
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_name, 0);
1504
1566
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dom_name));
1505
1567
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dom_name));
1506
 
                        if (ndr_get_array_length(ndr, &r->in.dom_name) > ndr_get_array_size(ndr, &r->in.dom_name)) {
1507
 
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dom_name), ndr_get_array_length(ndr, &r->in.dom_name));
 
1568
                        size_dom_name_1 = ndr_get_array_size(ndr, &r->in.dom_name);
 
1569
                        length_dom_name_1 = ndr_get_array_length(ndr, &r->in.dom_name);
 
1570
                        if (length_dom_name_1 > size_dom_name_1) {
 
1571
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dom_name_1, length_dom_name_1);
1508
1572
                        }
1509
 
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t)));
1510
 
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, ndr_get_array_length(ndr, &r->in.dom_name), sizeof(uint8_t), CH_UTF8));
 
1573
                        NDR_CHECK(ndr_check_string_terminator(ndr, length_dom_name_1, sizeof(uint8_t)));
 
1574
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dom_name, length_dom_name_1, sizeof(uint8_t), CH_UTF8));
1511
1575
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_name_0, 0);
1512
1576
                }
1513
1577
                NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.gid));
2223
2287
 
2224
2288
static enum ndr_err_code ndr_pull_wbint_DsGetDcName(struct ndr_pull *ndr, int flags, struct wbint_DsGetDcName *r)
2225
2289
{
 
2290
        uint32_t size_domain_name_1 = 0;
 
2291
        uint32_t length_domain_name_1 = 0;
2226
2292
        uint32_t _ptr_domain_guid;
2227
2293
        uint32_t _ptr_site_name;
 
2294
        uint32_t size_site_name_1 = 0;
 
2295
        uint32_t length_site_name_1 = 0;
2228
2296
        uint32_t _ptr_dc_info;
2229
2297
        TALLOC_CTX *_mem_save_domain_guid_0;
2230
2298
        TALLOC_CTX *_mem_save_site_name_0;
2235
2303
 
2236
2304
                NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
2237
2305
                NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
2238
 
                if (ndr_get_array_length(ndr, &r->in.domain_name) > ndr_get_array_size(ndr, &r->in.domain_name)) {
2239
 
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.domain_name), ndr_get_array_length(ndr, &r->in.domain_name));
 
2306
                size_domain_name_1 = ndr_get_array_size(ndr, &r->in.domain_name);
 
2307
                length_domain_name_1 = ndr_get_array_length(ndr, &r->in.domain_name);
 
2308
                if (length_domain_name_1 > size_domain_name_1) {
 
2309
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_name_1, length_domain_name_1);
2240
2310
                }
2241
 
                NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domain_name), sizeof(uint8_t)));
2242
 
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, ndr_get_array_length(ndr, &r->in.domain_name), sizeof(uint8_t), CH_UTF8));
 
2311
                NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint8_t)));
 
2312
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, length_domain_name_1, sizeof(uint8_t), CH_UTF8));
2243
2313
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
2244
2314
                if (_ptr_domain_guid) {
2245
2315
                        NDR_PULL_ALLOC(ndr, r->in.domain_guid);
2263
2333
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
2264
2334
                        NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
2265
2335
                        NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
2266
 
                        if (ndr_get_array_length(ndr, &r->in.site_name) > ndr_get_array_size(ndr, &r->in.site_name)) {
2267
 
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.site_name), ndr_get_array_length(ndr, &r->in.site_name));
 
2336
                        size_site_name_1 = ndr_get_array_size(ndr, &r->in.site_name);
 
2337
                        length_site_name_1 = ndr_get_array_length(ndr, &r->in.site_name);
 
2338
                        if (length_site_name_1 > size_site_name_1) {
 
2339
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_site_name_1, length_site_name_1);
2268
2340
                        }
2269
 
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.site_name), sizeof(uint8_t)));
2270
 
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, ndr_get_array_length(ndr, &r->in.site_name), sizeof(uint8_t), CH_UTF8));
 
2341
                        NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint8_t)));
 
2342
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, length_site_name_1, sizeof(uint8_t), CH_UTF8));
2271
2343
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
2272
2344
                }
2273
2345
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
2381
2453
static enum ndr_err_code ndr_pull_wbint_LookupRids(struct ndr_pull *ndr, int flags, struct wbint_LookupRids *r)
2382
2454
{
2383
2455
        uint32_t _ptr_domain_name;
 
2456
        uint32_t size_domain_name_2 = 0;
 
2457
        uint32_t length_domain_name_2 = 0;
2384
2458
        TALLOC_CTX *_mem_save_domain_sid_0;
2385
2459
        TALLOC_CTX *_mem_save_rids_0;
2386
2460
        TALLOC_CTX *_mem_save_domain_name_0;
2425
2499
                        NDR_PULL_SET_MEM_CTX(ndr, *r->out.domain_name, 0);
2426
2500
                        NDR_CHECK(ndr_pull_array_size(ndr, r->out.domain_name));
2427
2501
                        NDR_CHECK(ndr_pull_array_length(ndr, r->out.domain_name));
2428
 
                        if (ndr_get_array_length(ndr, r->out.domain_name) > ndr_get_array_size(ndr, r->out.domain_name)) {
2429
 
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.domain_name), ndr_get_array_length(ndr, r->out.domain_name));
 
2502
                        size_domain_name_2 = ndr_get_array_size(ndr, r->out.domain_name);
 
2503
                        length_domain_name_2 = ndr_get_array_length(ndr, r->out.domain_name);
 
2504
                        if (length_domain_name_2 > size_domain_name_2) {
 
2505
                                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_name_2, length_domain_name_2);
2430
2506
                        }
2431
 
                        NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.domain_name), sizeof(uint8_t)));
2432
 
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.domain_name, ndr_get_array_length(ndr, r->out.domain_name), sizeof(uint8_t), CH_UTF8));
 
2507
                        NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_2, sizeof(uint8_t)));
 
2508
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.domain_name, length_domain_name_2, sizeof(uint8_t), CH_UTF8));
2433
2509
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_1, 0);
2434
2510
                }
2435
2511
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, LIBNDR_FLAG_REF_ALLOC);