~ubuntu-branches/ubuntu/vivid/samba/vivid

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
#include "librpc/gen_ndr/ndr_lsa.h"
7
7
#include "librpc/gen_ndr/ndr_netlogon.h"
 
8
#include "librpc/gen_ndr/ndr_misc.h"
 
9
#include "librpc/gen_ndr/ndr_security.h"
 
10
#include "librpc/gen_ndr/ndr_idmap.h"
 
11
static enum ndr_err_code ndr_push_wbint_TransID(struct ndr_push *ndr, int ndr_flags, const struct wbint_TransID *r)
 
12
{
 
13
        if (ndr_flags & NDR_SCALARS) {
 
14
                NDR_CHECK(ndr_push_align(ndr, 8));
 
15
                NDR_CHECK(ndr_push_id_type(ndr, NDR_SCALARS, r->type));
 
16
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->domain_index));
 
17
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
 
18
                NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unix_id));
 
19
                NDR_CHECK(ndr_push_trailer_align(ndr, 8));
 
20
        }
 
21
        if (ndr_flags & NDR_BUFFERS) {
 
22
        }
 
23
        return NDR_ERR_SUCCESS;
 
24
}
 
25
 
 
26
static enum ndr_err_code ndr_pull_wbint_TransID(struct ndr_pull *ndr, int ndr_flags, struct wbint_TransID *r)
 
27
{
 
28
        if (ndr_flags & NDR_SCALARS) {
 
29
                NDR_CHECK(ndr_pull_align(ndr, 8));
 
30
                NDR_CHECK(ndr_pull_id_type(ndr, NDR_SCALARS, &r->type));
 
31
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->domain_index));
 
32
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
 
33
                NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unix_id));
 
34
                NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
 
35
        }
 
36
        if (ndr_flags & NDR_BUFFERS) {
 
37
        }
 
38
        return NDR_ERR_SUCCESS;
 
39
}
 
40
 
 
41
_PUBLIC_ void ndr_print_wbint_TransID(struct ndr_print *ndr, const char *name, const struct wbint_TransID *r)
 
42
{
 
43
        ndr_print_struct(ndr, name, "wbint_TransID");
 
44
        if (r == NULL) { ndr_print_null(ndr); return; }
 
45
        ndr->depth++;
 
46
        ndr_print_id_type(ndr, "type", r->type);
 
47
        ndr_print_uint32(ndr, "domain_index", r->domain_index);
 
48
        ndr_print_uint32(ndr, "rid", r->rid);
 
49
        ndr_print_hyper(ndr, "unix_id", r->unix_id);
 
50
        ndr->depth--;
 
51
}
 
52
 
 
53
static enum ndr_err_code ndr_push_wbint_TransIDArray(struct ndr_push *ndr, int ndr_flags, const struct wbint_TransIDArray *r)
 
54
{
 
55
        uint32_t cntr_ids_0;
 
56
        if (ndr_flags & NDR_SCALARS) {
 
57
                NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_ids));
 
58
                NDR_CHECK(ndr_push_align(ndr, 8));
 
59
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_ids));
 
60
                for (cntr_ids_0 = 0; cntr_ids_0 < r->num_ids; cntr_ids_0++) {
 
61
                        NDR_CHECK(ndr_push_wbint_TransID(ndr, NDR_SCALARS, &r->ids[cntr_ids_0]));
 
62
                }
 
63
                NDR_CHECK(ndr_push_trailer_align(ndr, 8));
 
64
        }
 
65
        if (ndr_flags & NDR_BUFFERS) {
 
66
        }
 
67
        return NDR_ERR_SUCCESS;
 
68
}
 
69
 
 
70
static enum ndr_err_code ndr_pull_wbint_TransIDArray(struct ndr_pull *ndr, int ndr_flags, struct wbint_TransIDArray *r)
 
71
{
 
72
        uint32_t cntr_ids_0;
 
73
        TALLOC_CTX *_mem_save_ids_0;
 
74
        if (ndr_flags & NDR_SCALARS) {
 
75
                NDR_CHECK(ndr_pull_array_size(ndr, &r->ids));
 
76
                NDR_CHECK(ndr_pull_align(ndr, 8));
 
77
                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
                _mem_save_ids_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
80
                NDR_PULL_SET_MEM_CTX(ndr, r->ids, 0);
 
81
                for (cntr_ids_0 = 0; cntr_ids_0 < r->num_ids; cntr_ids_0++) {
 
82
                        NDR_CHECK(ndr_pull_wbint_TransID(ndr, NDR_SCALARS, &r->ids[cntr_ids_0]));
 
83
                }
 
84
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_0, 0);
 
85
                if (r->ids) {
 
86
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ids, r->num_ids));
 
87
                }
 
88
                NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
 
89
        }
 
90
        if (ndr_flags & NDR_BUFFERS) {
 
91
        }
 
92
        return NDR_ERR_SUCCESS;
 
93
}
 
94
 
 
95
_PUBLIC_ void ndr_print_wbint_TransIDArray(struct ndr_print *ndr, const char *name, const struct wbint_TransIDArray *r)
 
96
{
 
97
        uint32_t cntr_ids_0;
 
98
        ndr_print_struct(ndr, name, "wbint_TransIDArray");
 
99
        if (r == NULL) { ndr_print_null(ndr); return; }
 
100
        ndr->depth++;
 
101
        ndr_print_uint32(ndr, "num_ids", r->num_ids);
 
102
        ndr->print(ndr, "%s: ARRAY(%d)", "ids", (int)r->num_ids);
 
103
        ndr->depth++;
 
104
        for (cntr_ids_0=0;cntr_ids_0<r->num_ids;cntr_ids_0++) {
 
105
                ndr_print_wbint_TransID(ndr, "ids", &r->ids[cntr_ids_0]);
 
106
        }
 
107
        ndr->depth--;
 
108
        ndr->depth--;
 
109
}
 
110
 
8
111
_PUBLIC_ enum ndr_err_code ndr_push_wbint_userinfo(struct ndr_push *ndr, int ndr_flags, const struct wbint_userinfo *r)
9
112
{
10
113
        if (ndr_flags & NDR_SCALARS) {
144
247
_PUBLIC_ void ndr_print_wbint_userinfo(struct ndr_print *ndr, const char *name, const struct wbint_userinfo *r)
145
248
{
146
249
        ndr_print_struct(ndr, name, "wbint_userinfo");
 
250
        if (r == NULL) { ndr_print_null(ndr); return; }
147
251
        ndr->depth++;
148
252
        ndr_print_ptr(ndr, "acct_name", r->acct_name);
149
253
        ndr->depth++;
221
325
{
222
326
        uint32_t cntr_sids_0;
223
327
        ndr_print_struct(ndr, name, "wbint_SidArray");
 
328
        if (r == NULL) { ndr_print_null(ndr); return; }
224
329
        ndr->depth++;
225
330
        ndr_print_uint32(ndr, "num_sids", r->num_sids);
226
331
        ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->num_sids);
227
332
        ndr->depth++;
228
333
        for (cntr_sids_0=0;cntr_sids_0<r->num_sids;cntr_sids_0++) {
229
 
                char *idx_0=NULL;
230
 
                if (asprintf(&idx_0, "[%d]", cntr_sids_0) != -1) {
231
 
                        ndr_print_dom_sid(ndr, "sids", &r->sids[cntr_sids_0]);
232
 
                        free(idx_0);
233
 
                }
 
334
                ndr_print_dom_sid(ndr, "sids", &r->sids[cntr_sids_0]);
234
335
        }
235
336
        ndr->depth--;
236
337
        ndr->depth--;
282
383
{
283
384
        uint32_t cntr_rids_0;
284
385
        ndr_print_struct(ndr, name, "wbint_RidArray");
 
386
        if (r == NULL) { ndr_print_null(ndr); return; }
285
387
        ndr->depth++;
286
388
        ndr_print_uint32(ndr, "num_rids", r->num_rids);
287
389
        ndr->print(ndr, "%s: ARRAY(%d)", "rids", (int)r->num_rids);
288
390
        ndr->depth++;
289
391
        for (cntr_rids_0=0;cntr_rids_0<r->num_rids;cntr_rids_0++) {
290
 
                char *idx_0=NULL;
291
 
                if (asprintf(&idx_0, "[%d]", cntr_rids_0) != -1) {
292
 
                        ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_0]);
293
 
                        free(idx_0);
294
 
                }
 
392
                ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_0]);
295
393
        }
296
394
        ndr->depth--;
297
395
        ndr->depth--;
353
451
_PUBLIC_ void ndr_print_wbint_Principal(struct ndr_print *ndr, const char *name, const struct wbint_Principal *r)
354
452
{
355
453
        ndr_print_struct(ndr, name, "wbint_Principal");
 
454
        if (r == NULL) { ndr_print_null(ndr); return; }
356
455
        ndr->depth++;
357
456
        ndr_print_dom_sid(ndr, "sid", &r->sid);
358
457
        ndr_print_lsa_SidType(ndr, "type", r->type);
420
519
{
421
520
        uint32_t cntr_principals_0;
422
521
        ndr_print_struct(ndr, name, "wbint_Principals");
 
522
        if (r == NULL) { ndr_print_null(ndr); return; }
423
523
        ndr->depth++;
424
524
        ndr_print_int32(ndr, "num_principals", r->num_principals);
425
525
        ndr->print(ndr, "%s: ARRAY(%d)", "principals", (int)r->num_principals);
426
526
        ndr->depth++;
427
527
        for (cntr_principals_0=0;cntr_principals_0<r->num_principals;cntr_principals_0++) {
428
 
                char *idx_0=NULL;
429
 
                if (asprintf(&idx_0, "[%d]", cntr_principals_0) != -1) {
430
 
                        ndr_print_wbint_Principal(ndr, "principals", &r->principals[cntr_principals_0]);
431
 
                        free(idx_0);
432
 
                }
 
528
                ndr_print_wbint_Principal(ndr, "principals", &r->principals[cntr_principals_0]);
433
529
        }
434
530
        ndr->depth--;
435
531
        ndr->depth--;
490
586
{
491
587
        uint32_t cntr_userinfos_0;
492
588
        ndr_print_struct(ndr, name, "wbint_userinfos");
 
589
        if (r == NULL) { ndr_print_null(ndr); return; }
493
590
        ndr->depth++;
494
591
        ndr_print_uint32(ndr, "num_userinfos", r->num_userinfos);
495
592
        ndr->print(ndr, "%s: ARRAY(%d)", "userinfos", (int)r->num_userinfos);
496
593
        ndr->depth++;
497
594
        for (cntr_userinfos_0=0;cntr_userinfos_0<r->num_userinfos;cntr_userinfos_0++) {
498
 
                char *idx_0=NULL;
499
 
                if (asprintf(&idx_0, "[%d]", cntr_userinfos_0) != -1) {
500
 
                        ndr_print_wbint_userinfo(ndr, "userinfos", &r->userinfos[cntr_userinfos_0]);
501
 
                        free(idx_0);
502
 
                }
503
 
        }
504
 
        ndr->depth--;
505
 
        ndr->depth--;
506
 
}
507
 
 
508
 
_PUBLIC_ enum ndr_err_code ndr_push_wbint_IdType(struct ndr_push *ndr, int ndr_flags, enum wbint_IdType r)
509
 
{
510
 
        NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
511
 
        return NDR_ERR_SUCCESS;
512
 
}
513
 
 
514
 
_PUBLIC_ enum ndr_err_code ndr_pull_wbint_IdType(struct ndr_pull *ndr, int ndr_flags, enum wbint_IdType *r)
515
 
{
516
 
        uint16_t v;
517
 
        NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
518
 
        *r = v;
519
 
        return NDR_ERR_SUCCESS;
520
 
}
521
 
 
522
 
_PUBLIC_ void ndr_print_wbint_IdType(struct ndr_print *ndr, const char *name, enum wbint_IdType r)
523
 
{
524
 
        const char *val = NULL;
525
 
 
526
 
        switch (r) {
527
 
                case WBINT_ID_TYPE_NOT_SPECIFIED: val = "WBINT_ID_TYPE_NOT_SPECIFIED"; break;
528
 
                case WBINT_ID_TYPE_UID: val = "WBINT_ID_TYPE_UID"; break;
529
 
                case WBINT_ID_TYPE_GID: val = "WBINT_ID_TYPE_GID"; break;
530
 
        }
531
 
        ndr_print_enum(ndr, name, "ENUM", val, r);
 
595
                ndr_print_wbint_userinfo(ndr, "userinfos", &r->userinfos[cntr_userinfos_0]);
 
596
        }
 
597
        ndr->depth--;
 
598
        ndr->depth--;
532
599
}
533
600
 
534
601
static enum ndr_err_code ndr_push_wbint_Ping(struct ndr_push *ndr, int flags, const struct wbint_Ping *r)
570
637
_PUBLIC_ void ndr_print_wbint_Ping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Ping *r)
571
638
{
572
639
        ndr_print_struct(ndr, name, "wbint_Ping");
 
640
        if (r == NULL) { ndr_print_null(ndr); return; }
573
641
        ndr->depth++;
574
642
        if (flags & NDR_SET_VALUES) {
575
643
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
721
789
_PUBLIC_ void ndr_print_wbint_LookupSid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupSid *r)
722
790
{
723
791
        ndr_print_struct(ndr, name, "wbint_LookupSid");
 
792
        if (r == NULL) { ndr_print_null(ndr); return; }
724
793
        ndr->depth++;
725
794
        if (flags & NDR_SET_VALUES) {
726
795
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
765
834
        ndr->depth--;
766
835
}
767
836
 
 
837
static enum ndr_err_code ndr_push_wbint_LookupSids(struct ndr_push *ndr, int flags, const struct wbint_LookupSids *r)
 
838
{
 
839
        if (flags & NDR_IN) {
 
840
                if (r->in.sids == NULL) {
 
841
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
842
                }
 
843
                NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
 
844
        }
 
845
        if (flags & NDR_OUT) {
 
846
                if (r->out.domains == NULL) {
 
847
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
848
                }
 
849
                NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
 
850
                if (r->out.names == NULL) {
 
851
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
852
                }
 
853
                NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
 
854
                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
 
855
        }
 
856
        return NDR_ERR_SUCCESS;
 
857
}
 
858
 
 
859
static enum ndr_err_code ndr_pull_wbint_LookupSids(struct ndr_pull *ndr, int flags, struct wbint_LookupSids *r)
 
860
{
 
861
        TALLOC_CTX *_mem_save_sids_0;
 
862
        TALLOC_CTX *_mem_save_domains_0;
 
863
        TALLOC_CTX *_mem_save_names_0;
 
864
        if (flags & NDR_IN) {
 
865
                ZERO_STRUCT(r->out);
 
866
 
 
867
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
868
                        NDR_PULL_ALLOC(ndr, r->in.sids);
 
869
                }
 
870
                _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
871
                NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
 
872
                NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
 
873
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
 
874
                NDR_PULL_ALLOC(ndr, r->out.domains);
 
875
                ZERO_STRUCTP(r->out.domains);
 
876
                NDR_PULL_ALLOC(ndr, r->out.names);
 
877
                ZERO_STRUCTP(r->out.names);
 
878
        }
 
879
        if (flags & NDR_OUT) {
 
880
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
881
                        NDR_PULL_ALLOC(ndr, r->out.domains);
 
882
                }
 
883
                _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
884
                NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
 
885
                NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
 
886
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
 
887
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
888
                        NDR_PULL_ALLOC(ndr, r->out.names);
 
889
                }
 
890
                _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
891
                NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
 
892
                NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
 
893
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
 
894
                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
 
895
        }
 
896
        return NDR_ERR_SUCCESS;
 
897
}
 
898
 
 
899
_PUBLIC_ void ndr_print_wbint_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupSids *r)
 
900
{
 
901
        ndr_print_struct(ndr, name, "wbint_LookupSids");
 
902
        if (r == NULL) { ndr_print_null(ndr); return; }
 
903
        ndr->depth++;
 
904
        if (flags & NDR_SET_VALUES) {
 
905
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
906
        }
 
907
        if (flags & NDR_IN) {
 
908
                ndr_print_struct(ndr, "in", "wbint_LookupSids");
 
909
                ndr->depth++;
 
910
                ndr_print_ptr(ndr, "sids", r->in.sids);
 
911
                ndr->depth++;
 
912
                ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
 
913
                ndr->depth--;
 
914
                ndr->depth--;
 
915
        }
 
916
        if (flags & NDR_OUT) {
 
917
                ndr_print_struct(ndr, "out", "wbint_LookupSids");
 
918
                ndr->depth++;
 
919
                ndr_print_ptr(ndr, "domains", r->out.domains);
 
920
                ndr->depth++;
 
921
                ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
 
922
                ndr->depth--;
 
923
                ndr_print_ptr(ndr, "names", r->out.names);
 
924
                ndr->depth++;
 
925
                ndr_print_lsa_TransNameArray(ndr, "names", r->out.names);
 
926
                ndr->depth--;
 
927
                ndr_print_NTSTATUS(ndr, "result", r->out.result);
 
928
                ndr->depth--;
 
929
        }
 
930
        ndr->depth--;
 
931
}
 
932
 
768
933
static enum ndr_err_code ndr_push_wbint_LookupName(struct ndr_push *ndr, int flags, const struct wbint_LookupName *r)
769
934
{
770
935
        if (flags & NDR_IN) {
848
1013
_PUBLIC_ void ndr_print_wbint_LookupName(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupName *r)
849
1014
{
850
1015
        ndr_print_struct(ndr, name, "wbint_LookupName");
 
1016
        if (r == NULL) { ndr_print_null(ndr); return; }
851
1017
        ndr->depth++;
852
1018
        if (flags & NDR_SET_VALUES) {
853
1019
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
961
1127
_PUBLIC_ void ndr_print_wbint_Sid2Uid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sid2Uid *r)
962
1128
{
963
1129
        ndr_print_struct(ndr, name, "wbint_Sid2Uid");
 
1130
        if (r == NULL) { ndr_print_null(ndr); return; }
964
1131
        ndr->depth++;
965
1132
        if (flags & NDR_SET_VALUES) {
966
1133
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1071
1238
_PUBLIC_ void ndr_print_wbint_Sid2Gid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sid2Gid *r)
1072
1239
{
1073
1240
        ndr_print_struct(ndr, name, "wbint_Sid2Gid");
 
1241
        if (r == NULL) { ndr_print_null(ndr); return; }
1074
1242
        ndr->depth++;
1075
1243
        if (flags & NDR_SET_VALUES) {
1076
1244
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1103
1271
        ndr->depth--;
1104
1272
}
1105
1273
 
 
1274
static enum ndr_err_code ndr_push_wbint_Sids2UnixIDs(struct ndr_push *ndr, int flags, const struct wbint_Sids2UnixIDs *r)
 
1275
{
 
1276
        if (flags & NDR_IN) {
 
1277
                if (r->in.domains == NULL) {
 
1278
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
1279
                }
 
1280
                NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domains));
 
1281
                if (r->in.ids == NULL) {
 
1282
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
1283
                }
 
1284
                NDR_CHECK(ndr_push_wbint_TransIDArray(ndr, NDR_SCALARS, r->in.ids));
 
1285
        }
 
1286
        if (flags & NDR_OUT) {
 
1287
                if (r->out.ids == NULL) {
 
1288
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 
1289
                }
 
1290
                NDR_CHECK(ndr_push_wbint_TransIDArray(ndr, NDR_SCALARS, r->out.ids));
 
1291
                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
 
1292
        }
 
1293
        return NDR_ERR_SUCCESS;
 
1294
}
 
1295
 
 
1296
static enum ndr_err_code ndr_pull_wbint_Sids2UnixIDs(struct ndr_pull *ndr, int flags, struct wbint_Sids2UnixIDs *r)
 
1297
{
 
1298
        TALLOC_CTX *_mem_save_domains_0;
 
1299
        TALLOC_CTX *_mem_save_ids_0;
 
1300
        if (flags & NDR_IN) {
 
1301
                ZERO_STRUCT(r->out);
 
1302
 
 
1303
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
1304
                        NDR_PULL_ALLOC(ndr, r->in.domains);
 
1305
                }
 
1306
                _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1307
                NDR_PULL_SET_MEM_CTX(ndr, r->in.domains, LIBNDR_FLAG_REF_ALLOC);
 
1308
                NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domains));
 
1309
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
 
1310
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
1311
                        NDR_PULL_ALLOC(ndr, r->in.ids);
 
1312
                }
 
1313
                _mem_save_ids_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1314
                NDR_PULL_SET_MEM_CTX(ndr, r->in.ids, LIBNDR_FLAG_REF_ALLOC);
 
1315
                NDR_CHECK(ndr_pull_wbint_TransIDArray(ndr, NDR_SCALARS, r->in.ids));
 
1316
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_0, LIBNDR_FLAG_REF_ALLOC);
 
1317
                NDR_PULL_ALLOC(ndr, r->out.ids);
 
1318
                *r->out.ids = *r->in.ids;
 
1319
        }
 
1320
        if (flags & NDR_OUT) {
 
1321
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 
1322
                        NDR_PULL_ALLOC(ndr, r->out.ids);
 
1323
                }
 
1324
                _mem_save_ids_0 = NDR_PULL_GET_MEM_CTX(ndr);
 
1325
                NDR_PULL_SET_MEM_CTX(ndr, r->out.ids, LIBNDR_FLAG_REF_ALLOC);
 
1326
                NDR_CHECK(ndr_pull_wbint_TransIDArray(ndr, NDR_SCALARS, r->out.ids));
 
1327
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_0, LIBNDR_FLAG_REF_ALLOC);
 
1328
                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
 
1329
        }
 
1330
        return NDR_ERR_SUCCESS;
 
1331
}
 
1332
 
 
1333
_PUBLIC_ void ndr_print_wbint_Sids2UnixIDs(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Sids2UnixIDs *r)
 
1334
{
 
1335
        ndr_print_struct(ndr, name, "wbint_Sids2UnixIDs");
 
1336
        if (r == NULL) { ndr_print_null(ndr); return; }
 
1337
        ndr->depth++;
 
1338
        if (flags & NDR_SET_VALUES) {
 
1339
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
 
1340
        }
 
1341
        if (flags & NDR_IN) {
 
1342
                ndr_print_struct(ndr, "in", "wbint_Sids2UnixIDs");
 
1343
                ndr->depth++;
 
1344
                ndr_print_ptr(ndr, "domains", r->in.domains);
 
1345
                ndr->depth++;
 
1346
                ndr_print_lsa_RefDomainList(ndr, "domains", r->in.domains);
 
1347
                ndr->depth--;
 
1348
                ndr_print_ptr(ndr, "ids", r->in.ids);
 
1349
                ndr->depth++;
 
1350
                ndr_print_wbint_TransIDArray(ndr, "ids", r->in.ids);
 
1351
                ndr->depth--;
 
1352
                ndr->depth--;
 
1353
        }
 
1354
        if (flags & NDR_OUT) {
 
1355
                ndr_print_struct(ndr, "out", "wbint_Sids2UnixIDs");
 
1356
                ndr->depth++;
 
1357
                ndr_print_ptr(ndr, "ids", r->out.ids);
 
1358
                ndr->depth++;
 
1359
                ndr_print_wbint_TransIDArray(ndr, "ids", r->out.ids);
 
1360
                ndr->depth--;
 
1361
                ndr_print_NTSTATUS(ndr, "result", r->out.result);
 
1362
                ndr->depth--;
 
1363
        }
 
1364
        ndr->depth--;
 
1365
}
 
1366
 
1106
1367
static enum ndr_err_code ndr_push_wbint_Uid2Sid(struct ndr_push *ndr, int flags, const struct wbint_Uid2Sid *r)
1107
1368
{
1108
1369
        if (flags & NDR_IN) {
1171
1432
_PUBLIC_ void ndr_print_wbint_Uid2Sid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Uid2Sid *r)
1172
1433
{
1173
1434
        ndr_print_struct(ndr, name, "wbint_Uid2Sid");
 
1435
        if (r == NULL) { ndr_print_null(ndr); return; }
1174
1436
        ndr->depth++;
1175
1437
        if (flags & NDR_SET_VALUES) {
1176
1438
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1268
1530
_PUBLIC_ void ndr_print_wbint_Gid2Sid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Gid2Sid *r)
1269
1531
{
1270
1532
        ndr_print_struct(ndr, name, "wbint_Gid2Sid");
 
1533
        if (r == NULL) { ndr_print_null(ndr); return; }
1271
1534
        ndr->depth++;
1272
1535
        if (flags & NDR_SET_VALUES) {
1273
1536
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1336
1599
_PUBLIC_ void ndr_print_wbint_AllocateUid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_AllocateUid *r)
1337
1600
{
1338
1601
        ndr_print_struct(ndr, name, "wbint_AllocateUid");
 
1602
        if (r == NULL) { ndr_print_null(ndr); return; }
1339
1603
        ndr->depth++;
1340
1604
        if (flags & NDR_SET_VALUES) {
1341
1605
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1397
1661
_PUBLIC_ void ndr_print_wbint_AllocateGid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_AllocateGid *r)
1398
1662
{
1399
1663
        ndr_print_struct(ndr, name, "wbint_AllocateGid");
 
1664
        if (r == NULL) { ndr_print_null(ndr); return; }
1400
1665
        ndr->depth++;
1401
1666
        if (flags & NDR_SET_VALUES) {
1402
1667
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1470
1735
_PUBLIC_ void ndr_print_wbint_QueryUser(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QueryUser *r)
1471
1736
{
1472
1737
        ndr_print_struct(ndr, name, "wbint_QueryUser");
 
1738
        if (r == NULL) { ndr_print_null(ndr); return; }
1473
1739
        ndr->depth++;
1474
1740
        if (flags & NDR_SET_VALUES) {
1475
1741
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1547
1813
_PUBLIC_ void ndr_print_wbint_LookupUserAliases(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupUserAliases *r)
1548
1814
{
1549
1815
        ndr_print_struct(ndr, name, "wbint_LookupUserAliases");
 
1816
        if (r == NULL) { ndr_print_null(ndr); return; }
1550
1817
        ndr->depth++;
1551
1818
        if (flags & NDR_SET_VALUES) {
1552
1819
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1624
1891
_PUBLIC_ void ndr_print_wbint_LookupUserGroups(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupUserGroups *r)
1625
1892
{
1626
1893
        ndr_print_struct(ndr, name, "wbint_LookupUserGroups");
 
1894
        if (r == NULL) { ndr_print_null(ndr); return; }
1627
1895
        ndr->depth++;
1628
1896
        if (flags & NDR_SET_VALUES) {
1629
1897
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1689
1957
_PUBLIC_ void ndr_print_wbint_QuerySequenceNumber(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QuerySequenceNumber *r)
1690
1958
{
1691
1959
        ndr_print_struct(ndr, name, "wbint_QuerySequenceNumber");
 
1960
        if (r == NULL) { ndr_print_null(ndr); return; }
1692
1961
        ndr->depth++;
1693
1962
        if (flags & NDR_SET_VALUES) {
1694
1963
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1764
2033
_PUBLIC_ void ndr_print_wbint_LookupGroupMembers(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupGroupMembers *r)
1765
2034
{
1766
2035
        ndr_print_struct(ndr, name, "wbint_LookupGroupMembers");
 
2036
        if (r == NULL) { ndr_print_null(ndr); return; }
1767
2037
        ndr->depth++;
1768
2038
        if (flags & NDR_SET_VALUES) {
1769
2039
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1830
2100
_PUBLIC_ void ndr_print_wbint_QueryUserList(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QueryUserList *r)
1831
2101
{
1832
2102
        ndr_print_struct(ndr, name, "wbint_QueryUserList");
 
2103
        if (r == NULL) { ndr_print_null(ndr); return; }
1833
2104
        ndr->depth++;
1834
2105
        if (flags & NDR_SET_VALUES) {
1835
2106
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1891
2162
_PUBLIC_ void ndr_print_wbint_QueryGroupList(struct ndr_print *ndr, const char *name, int flags, const struct wbint_QueryGroupList *r)
1892
2163
{
1893
2164
        ndr_print_struct(ndr, name, "wbint_QueryGroupList");
 
2165
        if (r == NULL) { ndr_print_null(ndr); return; }
1894
2166
        ndr->depth++;
1895
2167
        if (flags & NDR_SET_VALUES) {
1896
2168
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2029
2301
_PUBLIC_ void ndr_print_wbint_DsGetDcName(struct ndr_print *ndr, const char *name, int flags, const struct wbint_DsGetDcName *r)
2030
2302
{
2031
2303
        ndr_print_struct(ndr, name, "wbint_DsGetDcName");
 
2304
        if (r == NULL) { ndr_print_null(ndr); return; }
2032
2305
        ndr->depth++;
2033
2306
        if (flags & NDR_SET_VALUES) {
2034
2307
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2175
2448
_PUBLIC_ void ndr_print_wbint_LookupRids(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupRids *r)
2176
2449
{
2177
2450
        ndr_print_struct(ndr, name, "wbint_LookupRids");
 
2451
        if (r == NULL) { ndr_print_null(ndr); return; }
2178
2452
        ndr->depth++;
2179
2453
        if (flags & NDR_SET_VALUES) {
2180
2454
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2237
2511
_PUBLIC_ void ndr_print_wbint_CheckMachineAccount(struct ndr_print *ndr, const char *name, int flags, const struct wbint_CheckMachineAccount *r)
2238
2512
{
2239
2513
        ndr_print_struct(ndr, name, "wbint_CheckMachineAccount");
 
2514
        if (r == NULL) { ndr_print_null(ndr); return; }
2240
2515
        ndr->depth++;
2241
2516
        if (flags & NDR_SET_VALUES) {
2242
2517
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2278
2553
_PUBLIC_ void ndr_print_wbint_ChangeMachineAccount(struct ndr_print *ndr, const char *name, int flags, const struct wbint_ChangeMachineAccount *r)
2279
2554
{
2280
2555
        ndr_print_struct(ndr, name, "wbint_ChangeMachineAccount");
 
2556
        if (r == NULL) { ndr_print_null(ndr); return; }
2281
2557
        ndr->depth++;
2282
2558
        if (flags & NDR_SET_VALUES) {
2283
2559
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2319
2595
_PUBLIC_ void ndr_print_wbint_PingDc(struct ndr_print *ndr, const char *name, int flags, const struct wbint_PingDc *r)
2320
2596
{
2321
2597
        ndr_print_struct(ndr, name, "wbint_PingDc");
 
2598
        if (r == NULL) { ndr_print_null(ndr); return; }
2322
2599
        ndr->depth++;
2323
2600
        if (flags & NDR_SET_VALUES) {
2324
2601
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2337
2614
        ndr->depth--;
2338
2615
}
2339
2616
 
2340
 
static enum ndr_err_code ndr_push_wbint_SetMapping(struct ndr_push *ndr, int flags, const struct wbint_SetMapping *r)
2341
 
{
2342
 
        if (flags & NDR_IN) {
2343
 
                if (r->in.sid == NULL) {
2344
 
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2345
 
                }
2346
 
                NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
2347
 
                NDR_CHECK(ndr_push_wbint_IdType(ndr, NDR_SCALARS, r->in.type));
2348
 
                NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.id));
2349
 
        }
2350
 
        if (flags & NDR_OUT) {
2351
 
                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2352
 
        }
2353
 
        return NDR_ERR_SUCCESS;
2354
 
}
2355
 
 
2356
 
static enum ndr_err_code ndr_pull_wbint_SetMapping(struct ndr_pull *ndr, int flags, struct wbint_SetMapping *r)
2357
 
{
2358
 
        TALLOC_CTX *_mem_save_sid_0;
2359
 
        if (flags & NDR_IN) {
2360
 
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2361
 
                        NDR_PULL_ALLOC(ndr, r->in.sid);
2362
 
                }
2363
 
                _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
2364
 
                NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
2365
 
                NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
2366
 
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
2367
 
                NDR_CHECK(ndr_pull_wbint_IdType(ndr, NDR_SCALARS, &r->in.type));
2368
 
                NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.id));
2369
 
        }
2370
 
        if (flags & NDR_OUT) {
2371
 
                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2372
 
        }
2373
 
        return NDR_ERR_SUCCESS;
2374
 
}
2375
 
 
2376
 
_PUBLIC_ void ndr_print_wbint_SetMapping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_SetMapping *r)
2377
 
{
2378
 
        ndr_print_struct(ndr, name, "wbint_SetMapping");
2379
 
        ndr->depth++;
2380
 
        if (flags & NDR_SET_VALUES) {
2381
 
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2382
 
        }
2383
 
        if (flags & NDR_IN) {
2384
 
                ndr_print_struct(ndr, "in", "wbint_SetMapping");
2385
 
                ndr->depth++;
2386
 
                ndr_print_ptr(ndr, "sid", r->in.sid);
2387
 
                ndr->depth++;
2388
 
                ndr_print_dom_sid(ndr, "sid", r->in.sid);
2389
 
                ndr->depth--;
2390
 
                ndr_print_wbint_IdType(ndr, "type", r->in.type);
2391
 
                ndr_print_hyper(ndr, "id", r->in.id);
2392
 
                ndr->depth--;
2393
 
        }
2394
 
        if (flags & NDR_OUT) {
2395
 
                ndr_print_struct(ndr, "out", "wbint_SetMapping");
2396
 
                ndr->depth++;
2397
 
                ndr_print_NTSTATUS(ndr, "result", r->out.result);
2398
 
                ndr->depth--;
2399
 
        }
2400
 
        ndr->depth--;
2401
 
}
2402
 
 
2403
 
static enum ndr_err_code ndr_push_wbint_RemoveMapping(struct ndr_push *ndr, int flags, const struct wbint_RemoveMapping *r)
2404
 
{
2405
 
        if (flags & NDR_IN) {
2406
 
                if (r->in.sid == NULL) {
2407
 
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2408
 
                }
2409
 
                NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.sid));
2410
 
                NDR_CHECK(ndr_push_wbint_IdType(ndr, NDR_SCALARS, r->in.type));
2411
 
                NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.id));
2412
 
        }
2413
 
        if (flags & NDR_OUT) {
2414
 
                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2415
 
        }
2416
 
        return NDR_ERR_SUCCESS;
2417
 
}
2418
 
 
2419
 
static enum ndr_err_code ndr_pull_wbint_RemoveMapping(struct ndr_pull *ndr, int flags, struct wbint_RemoveMapping *r)
2420
 
{
2421
 
        TALLOC_CTX *_mem_save_sid_0;
2422
 
        if (flags & NDR_IN) {
2423
 
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2424
 
                        NDR_PULL_ALLOC(ndr, r->in.sid);
2425
 
                }
2426
 
                _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
2427
 
                NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
2428
 
                NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.sid));
2429
 
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
2430
 
                NDR_CHECK(ndr_pull_wbint_IdType(ndr, NDR_SCALARS, &r->in.type));
2431
 
                NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.id));
2432
 
        }
2433
 
        if (flags & NDR_OUT) {
2434
 
                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2435
 
        }
2436
 
        return NDR_ERR_SUCCESS;
2437
 
}
2438
 
 
2439
 
_PUBLIC_ void ndr_print_wbint_RemoveMapping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_RemoveMapping *r)
2440
 
{
2441
 
        ndr_print_struct(ndr, name, "wbint_RemoveMapping");
2442
 
        ndr->depth++;
2443
 
        if (flags & NDR_SET_VALUES) {
2444
 
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2445
 
        }
2446
 
        if (flags & NDR_IN) {
2447
 
                ndr_print_struct(ndr, "in", "wbint_RemoveMapping");
2448
 
                ndr->depth++;
2449
 
                ndr_print_ptr(ndr, "sid", r->in.sid);
2450
 
                ndr->depth++;
2451
 
                ndr_print_dom_sid(ndr, "sid", r->in.sid);
2452
 
                ndr->depth--;
2453
 
                ndr_print_wbint_IdType(ndr, "type", r->in.type);
2454
 
                ndr_print_hyper(ndr, "id", r->in.id);
2455
 
                ndr->depth--;
2456
 
        }
2457
 
        if (flags & NDR_OUT) {
2458
 
                ndr_print_struct(ndr, "out", "wbint_RemoveMapping");
2459
 
                ndr->depth++;
2460
 
                ndr_print_NTSTATUS(ndr, "result", r->out.result);
2461
 
                ndr->depth--;
2462
 
        }
2463
 
        ndr->depth--;
2464
 
}
2465
 
 
2466
 
static enum ndr_err_code ndr_push_wbint_SetHWM(struct ndr_push *ndr, int flags, const struct wbint_SetHWM *r)
2467
 
{
2468
 
        if (flags & NDR_IN) {
2469
 
                NDR_CHECK(ndr_push_wbint_IdType(ndr, NDR_SCALARS, r->in.type));
2470
 
                NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.id));
2471
 
        }
2472
 
        if (flags & NDR_OUT) {
2473
 
                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2474
 
        }
2475
 
        return NDR_ERR_SUCCESS;
2476
 
}
2477
 
 
2478
 
static enum ndr_err_code ndr_pull_wbint_SetHWM(struct ndr_pull *ndr, int flags, struct wbint_SetHWM *r)
2479
 
{
2480
 
        if (flags & NDR_IN) {
2481
 
                NDR_CHECK(ndr_pull_wbint_IdType(ndr, NDR_SCALARS, &r->in.type));
2482
 
                NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.id));
2483
 
        }
2484
 
        if (flags & NDR_OUT) {
2485
 
                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2486
 
        }
2487
 
        return NDR_ERR_SUCCESS;
2488
 
}
2489
 
 
2490
 
_PUBLIC_ void ndr_print_wbint_SetHWM(struct ndr_print *ndr, const char *name, int flags, const struct wbint_SetHWM *r)
2491
 
{
2492
 
        ndr_print_struct(ndr, name, "wbint_SetHWM");
2493
 
        ndr->depth++;
2494
 
        if (flags & NDR_SET_VALUES) {
2495
 
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2496
 
        }
2497
 
        if (flags & NDR_IN) {
2498
 
                ndr_print_struct(ndr, "in", "wbint_SetHWM");
2499
 
                ndr->depth++;
2500
 
                ndr_print_wbint_IdType(ndr, "type", r->in.type);
2501
 
                ndr_print_hyper(ndr, "id", r->in.id);
2502
 
                ndr->depth--;
2503
 
        }
2504
 
        if (flags & NDR_OUT) {
2505
 
                ndr_print_struct(ndr, "out", "wbint_SetHWM");
2506
 
                ndr->depth++;
2507
 
                ndr_print_NTSTATUS(ndr, "result", r->out.result);
2508
 
                ndr->depth--;
2509
 
        }
2510
 
        ndr->depth--;
2511
 
}
2512
 
 
2513
2617
static const struct ndr_interface_call wbint_calls[] = {
2514
2618
        {
2515
2619
                "wbint_Ping",
2517
2621
                (ndr_push_flags_fn_t) ndr_push_wbint_Ping,
2518
2622
                (ndr_pull_flags_fn_t) ndr_pull_wbint_Ping,
2519
2623
                (ndr_print_function_t) ndr_print_wbint_Ping,
2520
 
                false,
 
2624
                { 0, NULL },
 
2625
                { 0, NULL },
2521
2626
        },
2522
2627
        {
2523
2628
                "wbint_LookupSid",
2525
2630
                (ndr_push_flags_fn_t) ndr_push_wbint_LookupSid,
2526
2631
                (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupSid,
2527
2632
                (ndr_print_function_t) ndr_print_wbint_LookupSid,
2528
 
                false,
 
2633
                { 0, NULL },
 
2634
                { 0, NULL },
 
2635
        },
 
2636
        {
 
2637
                "wbint_LookupSids",
 
2638
                sizeof(struct wbint_LookupSids),
 
2639
                (ndr_push_flags_fn_t) ndr_push_wbint_LookupSids,
 
2640
                (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupSids,
 
2641
                (ndr_print_function_t) ndr_print_wbint_LookupSids,
 
2642
                { 0, NULL },
 
2643
                { 0, NULL },
2529
2644
        },
2530
2645
        {
2531
2646
                "wbint_LookupName",
2533
2648
                (ndr_push_flags_fn_t) ndr_push_wbint_LookupName,
2534
2649
                (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupName,
2535
2650
                (ndr_print_function_t) ndr_print_wbint_LookupName,
2536
 
                false,
 
2651
                { 0, NULL },
 
2652
                { 0, NULL },
2537
2653
        },
2538
2654
        {
2539
2655
                "wbint_Sid2Uid",
2541
2657
                (ndr_push_flags_fn_t) ndr_push_wbint_Sid2Uid,
2542
2658
                (ndr_pull_flags_fn_t) ndr_pull_wbint_Sid2Uid,
2543
2659
                (ndr_print_function_t) ndr_print_wbint_Sid2Uid,
2544
 
                false,
 
2660
                { 0, NULL },
 
2661
                { 0, NULL },
2545
2662
        },
2546
2663
        {
2547
2664
                "wbint_Sid2Gid",
2549
2666
                (ndr_push_flags_fn_t) ndr_push_wbint_Sid2Gid,
2550
2667
                (ndr_pull_flags_fn_t) ndr_pull_wbint_Sid2Gid,
2551
2668
                (ndr_print_function_t) ndr_print_wbint_Sid2Gid,
2552
 
                false,
 
2669
                { 0, NULL },
 
2670
                { 0, NULL },
 
2671
        },
 
2672
        {
 
2673
                "wbint_Sids2UnixIDs",
 
2674
                sizeof(struct wbint_Sids2UnixIDs),
 
2675
                (ndr_push_flags_fn_t) ndr_push_wbint_Sids2UnixIDs,
 
2676
                (ndr_pull_flags_fn_t) ndr_pull_wbint_Sids2UnixIDs,
 
2677
                (ndr_print_function_t) ndr_print_wbint_Sids2UnixIDs,
 
2678
                { 0, NULL },
 
2679
                { 0, NULL },
2553
2680
        },
2554
2681
        {
2555
2682
                "wbint_Uid2Sid",
2557
2684
                (ndr_push_flags_fn_t) ndr_push_wbint_Uid2Sid,
2558
2685
                (ndr_pull_flags_fn_t) ndr_pull_wbint_Uid2Sid,
2559
2686
                (ndr_print_function_t) ndr_print_wbint_Uid2Sid,
2560
 
                false,
 
2687
                { 0, NULL },
 
2688
                { 0, NULL },
2561
2689
        },
2562
2690
        {
2563
2691
                "wbint_Gid2Sid",
2565
2693
                (ndr_push_flags_fn_t) ndr_push_wbint_Gid2Sid,
2566
2694
                (ndr_pull_flags_fn_t) ndr_pull_wbint_Gid2Sid,
2567
2695
                (ndr_print_function_t) ndr_print_wbint_Gid2Sid,
2568
 
                false,
 
2696
                { 0, NULL },
 
2697
                { 0, NULL },
2569
2698
        },
2570
2699
        {
2571
2700
                "wbint_AllocateUid",
2573
2702
                (ndr_push_flags_fn_t) ndr_push_wbint_AllocateUid,
2574
2703
                (ndr_pull_flags_fn_t) ndr_pull_wbint_AllocateUid,
2575
2704
                (ndr_print_function_t) ndr_print_wbint_AllocateUid,
2576
 
                false,
 
2705
                { 0, NULL },
 
2706
                { 0, NULL },
2577
2707
        },
2578
2708
        {
2579
2709
                "wbint_AllocateGid",
2581
2711
                (ndr_push_flags_fn_t) ndr_push_wbint_AllocateGid,
2582
2712
                (ndr_pull_flags_fn_t) ndr_pull_wbint_AllocateGid,
2583
2713
                (ndr_print_function_t) ndr_print_wbint_AllocateGid,
2584
 
                false,
 
2714
                { 0, NULL },
 
2715
                { 0, NULL },
2585
2716
        },
2586
2717
        {
2587
2718
                "wbint_QueryUser",
2589
2720
                (ndr_push_flags_fn_t) ndr_push_wbint_QueryUser,
2590
2721
                (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryUser,
2591
2722
                (ndr_print_function_t) ndr_print_wbint_QueryUser,
2592
 
                false,
 
2723
                { 0, NULL },
 
2724
                { 0, NULL },
2593
2725
        },
2594
2726
        {
2595
2727
                "wbint_LookupUserAliases",
2597
2729
                (ndr_push_flags_fn_t) ndr_push_wbint_LookupUserAliases,
2598
2730
                (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupUserAliases,
2599
2731
                (ndr_print_function_t) ndr_print_wbint_LookupUserAliases,
2600
 
                false,
 
2732
                { 0, NULL },
 
2733
                { 0, NULL },
2601
2734
        },
2602
2735
        {
2603
2736
                "wbint_LookupUserGroups",
2605
2738
                (ndr_push_flags_fn_t) ndr_push_wbint_LookupUserGroups,
2606
2739
                (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupUserGroups,
2607
2740
                (ndr_print_function_t) ndr_print_wbint_LookupUserGroups,
2608
 
                false,
 
2741
                { 0, NULL },
 
2742
                { 0, NULL },
2609
2743
        },
2610
2744
        {
2611
2745
                "wbint_QuerySequenceNumber",
2613
2747
                (ndr_push_flags_fn_t) ndr_push_wbint_QuerySequenceNumber,
2614
2748
                (ndr_pull_flags_fn_t) ndr_pull_wbint_QuerySequenceNumber,
2615
2749
                (ndr_print_function_t) ndr_print_wbint_QuerySequenceNumber,
2616
 
                false,
 
2750
                { 0, NULL },
 
2751
                { 0, NULL },
2617
2752
        },
2618
2753
        {
2619
2754
                "wbint_LookupGroupMembers",
2621
2756
                (ndr_push_flags_fn_t) ndr_push_wbint_LookupGroupMembers,
2622
2757
                (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupGroupMembers,
2623
2758
                (ndr_print_function_t) ndr_print_wbint_LookupGroupMembers,
2624
 
                false,
 
2759
                { 0, NULL },
 
2760
                { 0, NULL },
2625
2761
        },
2626
2762
        {
2627
2763
                "wbint_QueryUserList",
2629
2765
                (ndr_push_flags_fn_t) ndr_push_wbint_QueryUserList,
2630
2766
                (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryUserList,
2631
2767
                (ndr_print_function_t) ndr_print_wbint_QueryUserList,
2632
 
                false,
 
2768
                { 0, NULL },
 
2769
                { 0, NULL },
2633
2770
        },
2634
2771
        {
2635
2772
                "wbint_QueryGroupList",
2637
2774
                (ndr_push_flags_fn_t) ndr_push_wbint_QueryGroupList,
2638
2775
                (ndr_pull_flags_fn_t) ndr_pull_wbint_QueryGroupList,
2639
2776
                (ndr_print_function_t) ndr_print_wbint_QueryGroupList,
2640
 
                false,
 
2777
                { 0, NULL },
 
2778
                { 0, NULL },
2641
2779
        },
2642
2780
        {
2643
2781
                "wbint_DsGetDcName",
2645
2783
                (ndr_push_flags_fn_t) ndr_push_wbint_DsGetDcName,
2646
2784
                (ndr_pull_flags_fn_t) ndr_pull_wbint_DsGetDcName,
2647
2785
                (ndr_print_function_t) ndr_print_wbint_DsGetDcName,
2648
 
                false,
 
2786
                { 0, NULL },
 
2787
                { 0, NULL },
2649
2788
        },
2650
2789
        {
2651
2790
                "wbint_LookupRids",
2653
2792
                (ndr_push_flags_fn_t) ndr_push_wbint_LookupRids,
2654
2793
                (ndr_pull_flags_fn_t) ndr_pull_wbint_LookupRids,
2655
2794
                (ndr_print_function_t) ndr_print_wbint_LookupRids,
2656
 
                false,
 
2795
                { 0, NULL },
 
2796
                { 0, NULL },
2657
2797
        },
2658
2798
        {
2659
2799
                "wbint_CheckMachineAccount",
2661
2801
                (ndr_push_flags_fn_t) ndr_push_wbint_CheckMachineAccount,
2662
2802
                (ndr_pull_flags_fn_t) ndr_pull_wbint_CheckMachineAccount,
2663
2803
                (ndr_print_function_t) ndr_print_wbint_CheckMachineAccount,
2664
 
                false,
 
2804
                { 0, NULL },
 
2805
                { 0, NULL },
2665
2806
        },
2666
2807
        {
2667
2808
                "wbint_ChangeMachineAccount",
2669
2810
                (ndr_push_flags_fn_t) ndr_push_wbint_ChangeMachineAccount,
2670
2811
                (ndr_pull_flags_fn_t) ndr_pull_wbint_ChangeMachineAccount,
2671
2812
                (ndr_print_function_t) ndr_print_wbint_ChangeMachineAccount,
2672
 
                false,
 
2813
                { 0, NULL },
 
2814
                { 0, NULL },
2673
2815
        },
2674
2816
        {
2675
2817
                "wbint_PingDc",
2677
2819
                (ndr_push_flags_fn_t) ndr_push_wbint_PingDc,
2678
2820
                (ndr_pull_flags_fn_t) ndr_pull_wbint_PingDc,
2679
2821
                (ndr_print_function_t) ndr_print_wbint_PingDc,
2680
 
                false,
2681
 
        },
2682
 
        {
2683
 
                "wbint_SetMapping",
2684
 
                sizeof(struct wbint_SetMapping),
2685
 
                (ndr_push_flags_fn_t) ndr_push_wbint_SetMapping,
2686
 
                (ndr_pull_flags_fn_t) ndr_pull_wbint_SetMapping,
2687
 
                (ndr_print_function_t) ndr_print_wbint_SetMapping,
2688
 
                false,
2689
 
        },
2690
 
        {
2691
 
                "wbint_RemoveMapping",
2692
 
                sizeof(struct wbint_RemoveMapping),
2693
 
                (ndr_push_flags_fn_t) ndr_push_wbint_RemoveMapping,
2694
 
                (ndr_pull_flags_fn_t) ndr_pull_wbint_RemoveMapping,
2695
 
                (ndr_print_function_t) ndr_print_wbint_RemoveMapping,
2696
 
                false,
2697
 
        },
2698
 
        {
2699
 
                "wbint_SetHWM",
2700
 
                sizeof(struct wbint_SetHWM),
2701
 
                (ndr_push_flags_fn_t) ndr_push_wbint_SetHWM,
2702
 
                (ndr_pull_flags_fn_t) ndr_pull_wbint_SetHWM,
2703
 
                (ndr_print_function_t) ndr_print_wbint_SetHWM,
2704
 
                false,
2705
 
        },
2706
 
        { NULL, 0, NULL, NULL, NULL, false }
 
2822
                { 0, NULL },
 
2823
                { 0, NULL },
 
2824
        },
 
2825
        { NULL, 0, NULL, NULL, NULL }
2707
2826
};
2708
2827
 
2709
2828
static const char * const wbint_endpoint_strings[] = {
2732
2851
                NDR_WBINT_VERSION
2733
2852
        },
2734
2853
        .helpstring     = NDR_WBINT_HELPSTRING,
2735
 
        .num_calls      = 24,
 
2854
        .num_calls      = 23,
2736
2855
        .calls          = wbint_calls,
2737
2856
        .endpoints      = &wbint_endpoints,
2738
2857
        .authservices   = &wbint_authservices