diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-20 11:09:53 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-20 11:09:53 +0000 |
commit | b0083691759c9d0561a5e9d436d927a44c82b388 (patch) | |
tree | f4e0178a4fdb82a8685150b5a61f2ecb78e3fec4 /source4/librpc/ndr | |
parent | fe6fd991ee42aee36a5141f11295f7936091447f (diff) | |
download | samba-b0083691759c9d0561a5e9d436d927a44c82b388.tar.gz samba-b0083691759c9d0561a5e9d436d927a44c82b388.tar.bz2 samba-b0083691759c9d0561a5e9d436d927a44c82b388.zip |
moved the pidl auto-generated files out of CVS
(This used to be commit 49c72d42766a55e2833c004e721a47115000626b)
Diffstat (limited to 'source4/librpc/ndr')
-rw-r--r-- | source4/librpc/ndr/ndr_atsvc.c | 431 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_atsvc.h | 90 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_dfs.c | 1909 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_dfs.h | 206 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_echo.c | 574 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_echo.h | 127 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_lsa.c | 3240 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_lsa.h | 783 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_misc.c | 225 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_misc.h | 33 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_samr.c | 5257 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_samr.h | 1198 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_spoolss.c | 4095 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_spoolss.h | 1242 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_srvsvc.c | 5349 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_srvsvc.h | 834 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_wkssvc.c | 1692 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_wkssvc.h | 450 |
18 files changed, 0 insertions, 27735 deletions
diff --git a/source4/librpc/ndr/ndr_atsvc.c b/source4/librpc/ndr/ndr_atsvc.c deleted file mode 100644 index d502add2b0..0000000000 --- a/source4/librpc/ndr/ndr_atsvc.c +++ /dev/null @@ -1,431 +0,0 @@ -/* parser auto-generated by pidl */ - -#include "includes.h" - -NTSTATUS ndr_push_atsvc_JobInfo(struct ndr_push *ndr, int ndr_flags, struct atsvc_JobInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->job_time)); - NDR_CHECK(ndr_push_uint32(ndr, r->days_of_month)); - NDR_CHECK(ndr_push_uint8(ndr, r->days_of_week)); - NDR_CHECK(ndr_push_uint8(ndr, r->flags)); - NDR_CHECK(ndr_push_ptr(ndr, r->command)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->command) { - NDR_CHECK(ndr_push_unistr(ndr, r->command)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_atsvc_JobAdd(struct ndr_push *ndr, struct atsvc_JobAdd *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.servername)); - if (r->in.servername) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.servername)); - } - NDR_CHECK(ndr_push_atsvc_JobInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.job_info)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_atsvc_JobDel(struct ndr_push *ndr, struct atsvc_JobDel *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.servername)); - if (r->in.servername) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.servername)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.min_job_id)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.max_job_id)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_atsvc_JobEnumInfo(struct ndr_push *ndr, int ndr_flags, struct atsvc_JobEnumInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->job_id)); - NDR_CHECK(ndr_push_uint32(ndr, r->job_time)); - NDR_CHECK(ndr_push_uint32(ndr, r->days_of_month)); - NDR_CHECK(ndr_push_uint8(ndr, r->days_of_week)); - NDR_CHECK(ndr_push_uint8(ndr, r->flags)); - NDR_CHECK(ndr_push_ptr(ndr, r->command)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->command) { - NDR_CHECK(ndr_push_unistr(ndr, r->command)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_atsvc_enum_ctr(struct ndr_push *ndr, int ndr_flags, struct atsvc_enum_ctr *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->entries_read)); - NDR_CHECK(ndr_push_ptr(ndr, r->first_entry)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->first_entry) { - NDR_CHECK(ndr_push_uint32(ndr, r->entries_read)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->first_entry, sizeof(r->first_entry[0]), r->entries_read, (ndr_push_flags_fn_t)ndr_push_atsvc_JobEnumInfo)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_atsvc_JobEnum(struct ndr_push *ndr, struct atsvc_JobEnum *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.servername)); - if (r->in.servername) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.servername)); - } - NDR_CHECK(ndr_push_atsvc_enum_ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_max_len)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); - if (r->in.resume_handle) { - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_atsvc_JobGetInfo(struct ndr_push *ndr, struct atsvc_JobGetInfo *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.servername)); - if (r->in.servername) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.servername)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.job_id)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_atsvc_JobInfo(struct ndr_pull *ndr, int ndr_flags, struct atsvc_JobInfo *r) -{ - uint32 _ptr_command; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->job_time)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->days_of_month)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->days_of_week)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->flags)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_command)); - if (_ptr_command) { - NDR_ALLOC(ndr, r->command); - } else { - r->command = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->command) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->command)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_atsvc_JobAdd(struct ndr_pull *ndr, struct atsvc_JobAdd *r) -{ - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.job_id)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_atsvc_JobDel(struct ndr_pull *ndr, struct atsvc_JobDel *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_atsvc_JobEnumInfo(struct ndr_pull *ndr, int ndr_flags, struct atsvc_JobEnumInfo *r) -{ - uint32 _ptr_command; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->job_id)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->job_time)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->days_of_month)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->days_of_week)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->flags)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_command)); - if (_ptr_command) { - NDR_ALLOC(ndr, r->command); - } else { - r->command = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->command) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->command)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_atsvc_enum_ctr(struct ndr_pull *ndr, int ndr_flags, struct atsvc_enum_ctr *r) -{ - uint32 _ptr_first_entry; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->entries_read)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_first_entry)); - if (_ptr_first_entry) { - NDR_ALLOC(ndr, r->first_entry); - } else { - r->first_entry = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->first_entry) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->entries_read > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->entries_read); - } - } - NDR_ALLOC_N_SIZE(ndr, r->first_entry, r->entries_read, sizeof(r->first_entry[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->first_entry, sizeof(r->first_entry[0]), r->entries_read, (ndr_pull_flags_fn_t)ndr_pull_atsvc_JobEnumInfo)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_atsvc_JobEnum(struct ndr_pull *ndr, struct atsvc_JobEnum *r) -{ - uint32 _ptr_resume_handle; - NDR_CHECK(ndr_pull_atsvc_enum_ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.total_entries)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); - if (_ptr_resume_handle) { - NDR_ALLOC(ndr, r->out.resume_handle); - } else { - r->out.resume_handle = NULL; - } - if (r->out.resume_handle) { - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_atsvc_JobGetInfo(struct ndr_pull *ndr, struct atsvc_JobGetInfo *r) -{ - uint32 _ptr_job_info; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_job_info)); - if (_ptr_job_info) { - NDR_ALLOC(ndr, r->out.job_info); - } else { - r->out.job_info = NULL; - } - if (r->out.job_info) { - NDR_CHECK(ndr_pull_atsvc_JobInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.job_info)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -void ndr_print_atsvc_JobInfo(struct ndr_print *ndr, const char *name, struct atsvc_JobInfo *r) -{ - ndr_print_struct(ndr, name, "atsvc_JobInfo"); - ndr->depth++; - ndr_print_uint32(ndr, "job_time", r->job_time); - ndr_print_uint32(ndr, "days_of_month", r->days_of_month); - ndr_print_uint8(ndr, "days_of_week", r->days_of_week); - ndr_print_uint8(ndr, "flags", r->flags); - ndr_print_ptr(ndr, "command", r->command); - ndr->depth++; - if (r->command) { - ndr_print_unistr(ndr, "command", r->command); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_atsvc_JobAdd(struct ndr_print *ndr, const char *name, int flags, struct atsvc_JobAdd *r) -{ - ndr_print_struct(ndr, name, "atsvc_JobAdd"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "atsvc_JobAdd"); - ndr->depth++; - ndr_print_ptr(ndr, "servername", r->in.servername); - ndr->depth++; - if (r->in.servername) { - ndr_print_unistr(ndr, "servername", r->in.servername); - } - ndr->depth--; - ndr_print_ptr(ndr, "job_info", r->in.job_info); - ndr->depth++; - ndr_print_atsvc_JobInfo(ndr, "job_info", r->in.job_info); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "atsvc_JobAdd"); - ndr->depth++; - ndr_print_uint32(ndr, "job_id", r->out.job_id); - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_atsvc_JobDel(struct ndr_print *ndr, const char *name, int flags, struct atsvc_JobDel *r) -{ - ndr_print_struct(ndr, name, "atsvc_JobDel"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "atsvc_JobDel"); - ndr->depth++; - ndr_print_ptr(ndr, "servername", r->in.servername); - ndr->depth++; - if (r->in.servername) { - ndr_print_unistr(ndr, "servername", r->in.servername); - } - ndr->depth--; - ndr_print_uint32(ndr, "min_job_id", r->in.min_job_id); - ndr_print_uint32(ndr, "max_job_id", r->in.max_job_id); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "atsvc_JobDel"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_atsvc_JobEnumInfo(struct ndr_print *ndr, const char *name, struct atsvc_JobEnumInfo *r) -{ - ndr_print_struct(ndr, name, "atsvc_JobEnumInfo"); - ndr->depth++; - ndr_print_uint32(ndr, "job_id", r->job_id); - ndr_print_uint32(ndr, "job_time", r->job_time); - ndr_print_uint32(ndr, "days_of_month", r->days_of_month); - ndr_print_uint8(ndr, "days_of_week", r->days_of_week); - ndr_print_uint8(ndr, "flags", r->flags); - ndr_print_ptr(ndr, "command", r->command); - ndr->depth++; - if (r->command) { - ndr_print_unistr(ndr, "command", r->command); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_atsvc_enum_ctr(struct ndr_print *ndr, const char *name, struct atsvc_enum_ctr *r) -{ - ndr_print_struct(ndr, name, "atsvc_enum_ctr"); - ndr->depth++; - ndr_print_uint32(ndr, "entries_read", r->entries_read); - ndr_print_ptr(ndr, "first_entry", r->first_entry); - ndr->depth++; - if (r->first_entry) { - ndr_print_array(ndr, "first_entry", r->first_entry, sizeof(r->first_entry[0]), r->entries_read, (ndr_print_fn_t)ndr_print_atsvc_JobEnumInfo); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_atsvc_JobEnum(struct ndr_print *ndr, const char *name, int flags, struct atsvc_JobEnum *r) -{ - ndr_print_struct(ndr, name, "atsvc_JobEnum"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "atsvc_JobEnum"); - ndr->depth++; - ndr_print_ptr(ndr, "servername", r->in.servername); - ndr->depth++; - if (r->in.servername) { - ndr_print_unistr(ndr, "servername", r->in.servername); - } - ndr->depth--; - ndr_print_ptr(ndr, "ctr", r->in.ctr); - ndr->depth++; - ndr_print_atsvc_enum_ctr(ndr, "ctr", r->in.ctr); - ndr->depth--; - ndr_print_uint32(ndr, "preferred_max_len", r->in.preferred_max_len); - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - if (r->in.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "atsvc_JobEnum"); - ndr->depth++; - ndr_print_ptr(ndr, "ctr", r->out.ctr); - ndr->depth++; - ndr_print_atsvc_enum_ctr(ndr, "ctr", r->out.ctr); - ndr->depth--; - ndr_print_uint32(ndr, "total_entries", r->out.total_entries); - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - if (r->out.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_atsvc_JobGetInfo(struct ndr_print *ndr, const char *name, int flags, struct atsvc_JobGetInfo *r) -{ - ndr_print_struct(ndr, name, "atsvc_JobGetInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "atsvc_JobGetInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "servername", r->in.servername); - ndr->depth++; - if (r->in.servername) { - ndr_print_unistr(ndr, "servername", r->in.servername); - } - ndr->depth--; - ndr_print_uint32(ndr, "job_id", r->in.job_id); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "atsvc_JobGetInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "job_info", r->out.job_info); - ndr->depth++; - if (r->out.job_info) { - ndr_print_atsvc_JobInfo(ndr, "job_info", r->out.job_info); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - diff --git a/source4/librpc/ndr/ndr_atsvc.h b/source4/librpc/ndr/ndr_atsvc.h deleted file mode 100644 index e8e7276de2..0000000000 --- a/source4/librpc/ndr/ndr_atsvc.h +++ /dev/null @@ -1,90 +0,0 @@ -/* header auto-generated by pidl */ - -#define DCERPC_ATSVC_UUID "1ff70682-0a51-30e8-076d-740be8cee98b" -#define DCERPC_ATSVC_VERSION 1.0 -#define DCERPC_ATSVC_NAME "atsvc" - -#define DCERPC_ATSVC_JOBADD 0 -#define DCERPC_ATSVC_JOBDEL 1 -#define DCERPC_ATSVC_JOBENUM 2 -#define DCERPC_ATSVC_JOBGETINFO 3 - - -struct atsvc_JobInfo { - uint32 job_time; - uint32 days_of_month; - uint8 days_of_week; - uint8 flags; - const char *command; -}; - -struct atsvc_JobAdd { - struct { - const char *servername; - struct atsvc_JobInfo *job_info; - } in; - - struct { - uint32 job_id; - NTSTATUS result; - } out; - -}; - -struct atsvc_JobDel { - struct { - const char *servername; - uint32 min_job_id; - uint32 max_job_id; - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct atsvc_JobEnumInfo { - uint32 job_id; - uint32 job_time; - uint32 days_of_month; - uint8 days_of_week; - uint8 flags; - const char *command; -}; - -struct atsvc_enum_ctr { - uint32 entries_read; - struct atsvc_JobEnumInfo *first_entry; -}; - -struct atsvc_JobEnum { - struct { - const char *servername; - struct atsvc_enum_ctr *ctr; - uint32 preferred_max_len; - uint32 *resume_handle; - } in; - - struct { - struct atsvc_enum_ctr *ctr; - uint32 total_entries; - uint32 *resume_handle; - NTSTATUS result; - } out; - -}; - -struct atsvc_JobGetInfo { - struct { - const char *servername; - uint32 job_id; - } in; - - struct { - struct atsvc_JobInfo *job_info; - NTSTATUS result; - } out; - -}; - diff --git a/source4/librpc/ndr/ndr_dfs.c b/source4/librpc/ndr/ndr_dfs.c deleted file mode 100644 index d6a6679700..0000000000 --- a/source4/librpc/ndr/ndr_dfs.c +++ /dev/null @@ -1,1909 +0,0 @@ -/* parser auto-generated by pidl */ - -#include "includes.h" - -NTSTATUS ndr_push_dfs_Exist(struct ndr_push *ndr, struct dfs_Exist *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_Add(struct ndr_push *ndr, struct dfs_Add *r) -{ - NDR_CHECK(ndr_push_unistr(ndr, r->in.path)); - NDR_CHECK(ndr_push_unistr(ndr, r->in.server)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.share)); - if (r->in.share) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.share)); - } - NDR_CHECK(ndr_push_ptr(ndr, r->in.comment)); - if (r->in.comment) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.comment)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.flags)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, struct dfs_Remove *r) -{ - NDR_CHECK(ndr_push_unistr(ndr, r->in.path)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.server)); - if (r->in.server) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.server)); - } - NDR_CHECK(ndr_push_ptr(ndr, r->in.share)); - if (r->in.share) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.share)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, struct dfs_SetInfo *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, struct dfs_Info1 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->path)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->path) { - NDR_CHECK(ndr_push_unistr(ndr, r->path)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, struct dfs_Info2 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->path)); - NDR_CHECK(ndr_push_ptr(ndr, r->comment)); - NDR_CHECK(ndr_push_uint32(ndr, r->state)); - NDR_CHECK(ndr_push_uint32(ndr, r->num_stores)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->path) { - NDR_CHECK(ndr_push_unistr(ndr, r->path)); - } - if (r->comment) { - NDR_CHECK(ndr_push_unistr(ndr, r->comment)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, struct dfs_StorageInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->state)); - NDR_CHECK(ndr_push_ptr(ndr, r->server)); - NDR_CHECK(ndr_push_ptr(ndr, r->share)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->server) { - NDR_CHECK(ndr_push_unistr(ndr, r->server)); - } - if (r->share) { - NDR_CHECK(ndr_push_unistr(ndr, r->share)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, struct dfs_Info3 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->path)); - NDR_CHECK(ndr_push_ptr(ndr, r->comment)); - NDR_CHECK(ndr_push_uint32(ndr, r->state)); - NDR_CHECK(ndr_push_uint32(ndr, r->num_stores)); - NDR_CHECK(ndr_push_ptr(ndr, r->stores)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->path) { - NDR_CHECK(ndr_push_unistr(ndr, r->path)); - } - if (r->comment) { - NDR_CHECK(ndr_push_unistr(ndr, r->comment)); - } - if (r->stores) { - NDR_CHECK(ndr_push_uint32(ndr, r->num_stores)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->stores, sizeof(r->stores[0]), r->num_stores, (ndr_push_flags_fn_t)ndr_push_dfs_StorageInfo)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, struct dfs_Info4 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->path)); - NDR_CHECK(ndr_push_ptr(ndr, r->comment)); - NDR_CHECK(ndr_push_uint32(ndr, r->state)); - NDR_CHECK(ndr_push_uint32(ndr, r->timeout)); - NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid)); - NDR_CHECK(ndr_push_uint32(ndr, r->num_stores)); - NDR_CHECK(ndr_push_ptr(ndr, r->stores)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->path) { - NDR_CHECK(ndr_push_unistr(ndr, r->path)); - } - if (r->comment) { - NDR_CHECK(ndr_push_unistr(ndr, r->comment)); - } - NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid)); - if (r->stores) { - NDR_CHECK(ndr_push_uint32(ndr, r->num_stores)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->stores, sizeof(r->stores[0]), r->num_stores, (ndr_push_flags_fn_t)ndr_push_dfs_StorageInfo)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, struct dfs_Info200 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->dom_root)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->dom_root) { - NDR_CHECK(ndr_push_unistr(ndr, r->dom_root)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, struct dfs_Info300 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->flags)); - NDR_CHECK(ndr_push_ptr(ndr, r->dom_root)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->dom_root) { - NDR_CHECK(ndr_push_unistr(ndr, r->dom_root)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, struct dfs_GetInfo *r) -{ - NDR_CHECK(ndr_push_unistr(ndr, r->in.path)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.server)); - if (r->in.server) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.server)); - } - NDR_CHECK(ndr_push_ptr(ndr, r->in.share)); - if (r->in.share) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.share)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray1 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->s)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->s) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->s, sizeof(r->s[0]), r->count, (ndr_push_flags_fn_t)ndr_push_dfs_Info1)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray2 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->s)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->s) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->s, sizeof(r->s[0]), r->count, (ndr_push_flags_fn_t)ndr_push_dfs_Info2)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray3 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->s)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->s) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->s, sizeof(r->s[0]), r->count, (ndr_push_flags_fn_t)ndr_push_dfs_Info3)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray4 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->s)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->s) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->s, sizeof(r->s[0]), r->count, (ndr_push_flags_fn_t)ndr_push_dfs_Info4)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray200 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->s)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->s) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->s, sizeof(r->s[0]), r->count, (ndr_push_flags_fn_t)ndr_push_dfs_Info200)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray300 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->s)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->s) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->s, sizeof(r->s[0]), r->count, (ndr_push_flags_fn_t)ndr_push_dfs_Info300)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, uint16 level, union dfs_EnumInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - switch (level) { - case 1: - NDR_CHECK(ndr_push_ptr(ndr, r->info1)); - break; - - case 2: - NDR_CHECK(ndr_push_ptr(ndr, r->info2)); - break; - - case 3: - NDR_CHECK(ndr_push_ptr(ndr, r->info3)); - break; - - case 4: - NDR_CHECK(ndr_push_ptr(ndr, r->info4)); - break; - - case 200: - NDR_CHECK(ndr_push_ptr(ndr, r->info200)); - break; - - case 300: - NDR_CHECK(ndr_push_ptr(ndr, r->info300)); - break; - - default: - return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 1: - if (r->info1) { - NDR_CHECK(ndr_push_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1)); - } - break; - - case 2: - if (r->info2) { - NDR_CHECK(ndr_push_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2)); - } - break; - - case 3: - if (r->info3) { - NDR_CHECK(ndr_push_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3)); - } - break; - - case 4: - if (r->info4) { - NDR_CHECK(ndr_push_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4)); - } - break; - - case 200: - if (r->info200) { - NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200)); - } - break; - - case 300: - if (r->info300) { - NDR_CHECK(ndr_push_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300)); - } - break; - - default: - return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumStruct *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->level)); - NDR_CHECK(ndr_push_uint32(ndr, r->level)); - NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_SCALARS, r->level, &r->e)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_uint32(ndr, r->level)); - NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, r->level, &r->e)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_dfs_Enum(struct ndr_push *ndr, struct dfs_Enum *r) -{ - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.bufsize)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.info)); - if (r->in.info) { - NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); - } - NDR_CHECK(ndr_push_ptr(ndr, r->in.unknown)); - if (r->in.unknown) { - NDR_CHECK(ndr_push_uint32(ndr, *r->in.unknown)); - } - NDR_CHECK(ndr_push_ptr(ndr, r->in.total)); - if (r->in.total) { - NDR_CHECK(ndr_push_uint32(ndr, *r->in.total)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Exist(struct ndr_pull *ndr, struct dfs_Exist *r) -{ - NDR_CHECK(ndr_pull_uint32(ndr, r->out.exist_flag)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Add(struct ndr_pull *ndr, struct dfs_Add *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Remove(struct ndr_pull *ndr, struct dfs_Remove *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, struct dfs_SetInfo *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r) -{ - uint32 _ptr_path; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_path)); - if (_ptr_path) { - NDR_ALLOC(ndr, r->path); - } else { - r->path = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->path) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->path)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r) -{ - uint32 _ptr_path; - uint32 _ptr_comment; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_path)); - if (_ptr_path) { - NDR_ALLOC(ndr, r->path); - } else { - r->path = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_comment)); - if (_ptr_comment) { - NDR_ALLOC(ndr, r->comment); - } else { - r->comment = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->state)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_stores)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->path) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->path)); - } - if (r->comment) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->comment)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r) -{ - uint32 _ptr_server; - uint32 _ptr_share; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->state)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_server)); - if (_ptr_server) { - NDR_ALLOC(ndr, r->server); - } else { - r->server = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_share)); - if (_ptr_share) { - NDR_ALLOC(ndr, r->share); - } else { - r->share = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->server) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->server)); - } - if (r->share) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->share)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r) -{ - uint32 _ptr_path; - uint32 _ptr_comment; - uint32 _ptr_stores; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_path)); - if (_ptr_path) { - NDR_ALLOC(ndr, r->path); - } else { - r->path = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_comment)); - if (_ptr_comment) { - NDR_ALLOC(ndr, r->comment); - } else { - r->comment = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->state)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_stores)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_stores)); - if (_ptr_stores) { - NDR_ALLOC(ndr, r->stores); - } else { - r->stores = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->path) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->path)); - } - if (r->comment) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->comment)); - } - if (r->stores) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->num_stores > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->num_stores); - } - } - NDR_ALLOC_N_SIZE(ndr, r->stores, r->num_stores, sizeof(r->stores[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->stores, sizeof(r->stores[0]), r->num_stores, (ndr_pull_flags_fn_t)ndr_pull_dfs_StorageInfo)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r) -{ - uint32 _ptr_path; - uint32 _ptr_comment; - uint32 _ptr_stores; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_path)); - if (_ptr_path) { - NDR_ALLOC(ndr, r->path); - } else { - r->path = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_comment)); - if (_ptr_comment) { - NDR_ALLOC(ndr, r->comment); - } else { - r->comment = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->state)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->timeout)); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_stores)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_stores)); - if (_ptr_stores) { - NDR_ALLOC(ndr, r->stores); - } else { - r->stores = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->path) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->path)); - } - if (r->comment) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->comment)); - } - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid)); - if (r->stores) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->num_stores > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->num_stores); - } - } - NDR_ALLOC_N_SIZE(ndr, r->stores, r->num_stores, sizeof(r->stores[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->stores, sizeof(r->stores[0]), r->num_stores, (ndr_pull_flags_fn_t)ndr_pull_dfs_StorageInfo)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r) -{ - uint32 _ptr_comment; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_comment)); - if (_ptr_comment) { - NDR_ALLOC(ndr, r->comment); - } else { - r->comment = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->comment) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->comment)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->state)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->timeout)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r) -{ - uint32 _ptr_dom_root; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_dom_root)); - if (_ptr_dom_root) { - NDR_ALLOC(ndr, r->dom_root); - } else { - r->dom_root = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->dom_root) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->dom_root)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r) -{ - uint32 _ptr_dom_root; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->flags)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_dom_root)); - if (_ptr_dom_root) { - NDR_ALLOC(ndr, r->dom_root); - } else { - r->dom_root = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->dom_root) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->dom_root)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, uint16 level, union dfs_Info *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 1: { - uint32 _ptr_info1; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info1)); - if (_ptr_info1) { - NDR_ALLOC(ndr, r->info1); - } else { - r->info1 = NULL; - } - break; } - - case 2: { - uint32 _ptr_info2; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info2)); - if (_ptr_info2) { - NDR_ALLOC(ndr, r->info2); - } else { - r->info2 = NULL; - } - break; } - - case 3: { - uint32 _ptr_info3; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info3)); - if (_ptr_info3) { - NDR_ALLOC(ndr, r->info3); - } else { - r->info3 = NULL; - } - break; } - - case 4: { - uint32 _ptr_info4; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info4)); - if (_ptr_info4) { - NDR_ALLOC(ndr, r->info4); - } else { - r->info4 = NULL; - } - break; } - - case 100: { - uint32 _ptr_info100; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info100)); - if (_ptr_info100) { - NDR_ALLOC(ndr, r->info100); - } else { - r->info100 = NULL; - } - break; } - - case 101: { - uint32 _ptr_info101; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info101)); - if (_ptr_info101) { - NDR_ALLOC(ndr, r->info101); - } else { - r->info101 = NULL; - } - break; } - - case 102: { - uint32 _ptr_info102; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info102)); - if (_ptr_info102) { - NDR_ALLOC(ndr, r->info102); - } else { - r->info102 = NULL; - } - break; } - - case 200: { - uint32 _ptr_info200; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info200)); - if (_ptr_info200) { - NDR_ALLOC(ndr, r->info200); - } else { - r->info200 = NULL; - } - break; } - - case 300: { - uint32 _ptr_info300; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info300)); - if (_ptr_info300) { - NDR_ALLOC(ndr, r->info300); - } else { - r->info300 = NULL; - } - break; } - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 1: - if (r->info1) { - NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1)); - } - break; - - case 2: - if (r->info2) { - NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2)); - } - break; - - case 3: - if (r->info3) { - NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3)); - } - break; - - case 4: - if (r->info4) { - NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4)); - } - break; - - case 100: - if (r->info100) { - NDR_CHECK(ndr_pull_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100)); - } - break; - - case 101: - if (r->info101) { - NDR_CHECK(ndr_pull_dfs_Info101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101)); - } - break; - - case 102: - if (r->info102) { - NDR_CHECK(ndr_pull_dfs_Info102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102)); - } - break; - - case 200: - if (r->info200) { - NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200)); - } - break; - - case 300: - if (r->info300) { - NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300)); - } - break; - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, struct dfs_GetInfo *r) -{ - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint32 _level; - NDR_CHECK(ndr_pull_uint32(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); - } - NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->out.info)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r) -{ - uint32 _ptr_s; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_s)); - if (_ptr_s) { - NDR_ALLOC(ndr, r->s); - } else { - r->s = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->s) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->s, r->count, sizeof(r->s[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->s, sizeof(r->s[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_dfs_Info1)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r) -{ - uint32 _ptr_s; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_s)); - if (_ptr_s) { - NDR_ALLOC(ndr, r->s); - } else { - r->s = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->s) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->s, r->count, sizeof(r->s[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->s, sizeof(r->s[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_dfs_Info2)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r) -{ - uint32 _ptr_s; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_s)); - if (_ptr_s) { - NDR_ALLOC(ndr, r->s); - } else { - r->s = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->s) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->s, r->count, sizeof(r->s[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->s, sizeof(r->s[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_dfs_Info3)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r) -{ - uint32 _ptr_s; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_s)); - if (_ptr_s) { - NDR_ALLOC(ndr, r->s); - } else { - r->s = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->s) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->s, r->count, sizeof(r->s[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->s, sizeof(r->s[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_dfs_Info4)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r) -{ - uint32 _ptr_s; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_s)); - if (_ptr_s) { - NDR_ALLOC(ndr, r->s); - } else { - r->s = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->s) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->s, r->count, sizeof(r->s[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->s, sizeof(r->s[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_dfs_Info200)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r) -{ - uint32 _ptr_s; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_s)); - if (_ptr_s) { - NDR_ALLOC(ndr, r->s); - } else { - r->s = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->s) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->s, r->count, sizeof(r->s[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->s, sizeof(r->s[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_dfs_Info300)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, uint16 level, union dfs_EnumInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 1: { - uint32 _ptr_info1; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info1)); - if (_ptr_info1) { - NDR_ALLOC(ndr, r->info1); - } else { - r->info1 = NULL; - } - break; } - - case 2: { - uint32 _ptr_info2; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info2)); - if (_ptr_info2) { - NDR_ALLOC(ndr, r->info2); - } else { - r->info2 = NULL; - } - break; } - - case 3: { - uint32 _ptr_info3; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info3)); - if (_ptr_info3) { - NDR_ALLOC(ndr, r->info3); - } else { - r->info3 = NULL; - } - break; } - - case 4: { - uint32 _ptr_info4; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info4)); - if (_ptr_info4) { - NDR_ALLOC(ndr, r->info4); - } else { - r->info4 = NULL; - } - break; } - - case 200: { - uint32 _ptr_info200; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info200)); - if (_ptr_info200) { - NDR_ALLOC(ndr, r->info200); - } else { - r->info200 = NULL; - } - break; } - - case 300: { - uint32 _ptr_info300; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info300)); - if (_ptr_info300) { - NDR_ALLOC(ndr, r->info300); - } else { - r->info300 = NULL; - } - break; } - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 1: - if (r->info1) { - NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1)); - } - break; - - case 2: - if (r->info2) { - NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2)); - } - break; - - case 3: - if (r->info3) { - NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3)); - } - break; - - case 4: - if (r->info4) { - NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4)); - } - break; - - case 200: - if (r->info200) { - NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200)); - } - break; - - case 300: - if (r->info300) { - NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300)); - } - break; - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->level)); - if ((NDR_SCALARS) & NDR_SCALARS) { - uint32 _level; - NDR_CHECK(ndr_pull_uint32(ndr, &_level)); - if (_level != r->level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in e"); - } - NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, r->level, &r->e)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if ((NDR_BUFFERS) & NDR_SCALARS) { - uint32 _level; - NDR_CHECK(ndr_pull_uint32(ndr, &_level)); - if (_level != r->level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in e"); - } - NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, r->level, &r->e)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dfs_Enum(struct ndr_pull *ndr, struct dfs_Enum *r) -{ - uint32 _ptr_info; - uint32 _ptr_total; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info)); - if (_ptr_info) { - NDR_ALLOC(ndr, r->out.info); - } else { - r->out.info = NULL; - } - if (r->out.info) { - NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_total)); - if (_ptr_total) { - NDR_ALLOC(ndr, r->out.total); - } else { - r->out.total = NULL; - } - if (r->out.total) { - NDR_CHECK(ndr_pull_uint32(ndr, r->out.total)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -void ndr_print_dfs_Exist(struct ndr_print *ndr, const char *name, int flags, struct dfs_Exist *r) -{ - ndr_print_struct(ndr, name, "dfs_Exist"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "dfs_Exist"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "dfs_Exist"); - ndr->depth++; - ndr_print_ptr(ndr, "exist_flag", r->out.exist_flag); - ndr->depth++; - ndr_print_uint32(ndr, "exist_flag", *r->out.exist_flag); - ndr->depth--; - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, struct dfs_Add *r) -{ - ndr_print_struct(ndr, name, "dfs_Add"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "dfs_Add"); - ndr->depth++; - ndr_print_ptr(ndr, "path", r->in.path); - ndr->depth++; - ndr_print_unistr(ndr, "path", r->in.path); - ndr->depth--; - ndr_print_ptr(ndr, "server", r->in.server); - ndr->depth++; - ndr_print_unistr(ndr, "server", r->in.server); - ndr->depth--; - ndr_print_ptr(ndr, "share", r->in.share); - ndr->depth++; - if (r->in.share) { - ndr_print_unistr(ndr, "share", r->in.share); - } - ndr->depth--; - ndr_print_ptr(ndr, "comment", r->in.comment); - ndr->depth++; - if (r->in.comment) { - ndr_print_unistr(ndr, "comment", r->in.comment); - } - ndr->depth--; - ndr_print_uint32(ndr, "flags", r->in.flags); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "dfs_Add"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, struct dfs_Remove *r) -{ - ndr_print_struct(ndr, name, "dfs_Remove"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "dfs_Remove"); - ndr->depth++; - ndr_print_ptr(ndr, "path", r->in.path); - ndr->depth++; - ndr_print_unistr(ndr, "path", r->in.path); - ndr->depth--; - ndr_print_ptr(ndr, "server", r->in.server); - ndr->depth++; - if (r->in.server) { - ndr_print_unistr(ndr, "server", r->in.server); - } - ndr->depth--; - ndr_print_ptr(ndr, "share", r->in.share); - ndr->depth++; - if (r->in.share) { - ndr_print_unistr(ndr, "share", r->in.share); - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "dfs_Remove"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, struct dfs_SetInfo *r) -{ - ndr_print_struct(ndr, name, "dfs_SetInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "dfs_SetInfo"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "dfs_SetInfo"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, struct dfs_Info1 *r) -{ - ndr_print_struct(ndr, name, "dfs_Info1"); - ndr->depth++; - ndr_print_ptr(ndr, "path", r->path); - ndr->depth++; - if (r->path) { - ndr_print_unistr(ndr, "path", r->path); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, struct dfs_Info2 *r) -{ - ndr_print_struct(ndr, name, "dfs_Info2"); - ndr->depth++; - ndr_print_ptr(ndr, "path", r->path); - ndr->depth++; - if (r->path) { - ndr_print_unistr(ndr, "path", r->path); - } - ndr->depth--; - ndr_print_ptr(ndr, "comment", r->comment); - ndr->depth++; - if (r->comment) { - ndr_print_unistr(ndr, "comment", r->comment); - } - ndr->depth--; - ndr_print_uint32(ndr, "state", r->state); - ndr_print_uint32(ndr, "num_stores", r->num_stores); - ndr->depth--; -} - -void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, struct dfs_StorageInfo *r) -{ - ndr_print_struct(ndr, name, "dfs_StorageInfo"); - ndr->depth++; - ndr_print_uint32(ndr, "state", r->state); - ndr_print_ptr(ndr, "server", r->server); - ndr->depth++; - if (r->server) { - ndr_print_unistr(ndr, "server", r->server); - } - ndr->depth--; - ndr_print_ptr(ndr, "share", r->share); - ndr->depth++; - if (r->share) { - ndr_print_unistr(ndr, "share", r->share); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, struct dfs_Info3 *r) -{ - ndr_print_struct(ndr, name, "dfs_Info3"); - ndr->depth++; - ndr_print_ptr(ndr, "path", r->path); - ndr->depth++; - if (r->path) { - ndr_print_unistr(ndr, "path", r->path); - } - ndr->depth--; - ndr_print_ptr(ndr, "comment", r->comment); - ndr->depth++; - if (r->comment) { - ndr_print_unistr(ndr, "comment", r->comment); - } - ndr->depth--; - ndr_print_uint32(ndr, "state", r->state); - ndr_print_uint32(ndr, "num_stores", r->num_stores); - ndr_print_ptr(ndr, "stores", r->stores); - ndr->depth++; - if (r->stores) { - ndr_print_array(ndr, "stores", r->stores, sizeof(r->stores[0]), r->num_stores, (ndr_print_fn_t)ndr_print_dfs_StorageInfo); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, struct dfs_Info4 *r) -{ - ndr_print_struct(ndr, name, "dfs_Info4"); - ndr->depth++; - ndr_print_ptr(ndr, "path", r->path); - ndr->depth++; - if (r->path) { - ndr_print_unistr(ndr, "path", r->path); - } - ndr->depth--; - ndr_print_ptr(ndr, "comment", r->comment); - ndr->depth++; - if (r->comment) { - ndr_print_unistr(ndr, "comment", r->comment); - } - ndr->depth--; - ndr_print_uint32(ndr, "state", r->state); - ndr_print_uint32(ndr, "timeout", r->timeout); - ndr_print_GUID(ndr, "guid", &r->guid); - ndr_print_uint32(ndr, "num_stores", r->num_stores); - ndr_print_ptr(ndr, "stores", r->stores); - ndr->depth++; - if (r->stores) { - ndr_print_array(ndr, "stores", r->stores, sizeof(r->stores[0]), r->num_stores, (ndr_print_fn_t)ndr_print_dfs_StorageInfo); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, struct dfs_Info100 *r) -{ - ndr_print_struct(ndr, name, "dfs_Info100"); - ndr->depth++; - ndr_print_ptr(ndr, "comment", r->comment); - ndr->depth++; - if (r->comment) { - ndr_print_unistr(ndr, "comment", r->comment); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, struct dfs_Info101 *r) -{ - ndr_print_struct(ndr, name, "dfs_Info101"); - ndr->depth++; - ndr_print_uint32(ndr, "state", r->state); - ndr->depth--; -} - -void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, struct dfs_Info102 *r) -{ - ndr_print_struct(ndr, name, "dfs_Info102"); - ndr->depth++; - ndr_print_uint32(ndr, "timeout", r->timeout); - ndr->depth--; -} - -void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, struct dfs_Info200 *r) -{ - ndr_print_struct(ndr, name, "dfs_Info200"); - ndr->depth++; - ndr_print_ptr(ndr, "dom_root", r->dom_root); - ndr->depth++; - if (r->dom_root) { - ndr_print_unistr(ndr, "dom_root", r->dom_root); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, struct dfs_Info300 *r) -{ - ndr_print_struct(ndr, name, "dfs_Info300"); - ndr->depth++; - ndr_print_uint32(ndr, "flags", r->flags); - ndr_print_ptr(ndr, "dom_root", r->dom_root); - ndr->depth++; - if (r->dom_root) { - ndr_print_unistr(ndr, "dom_root", r->dom_root); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, uint16 level, union dfs_Info *r) -{ - ndr_print_union(ndr, name, level, "dfs_Info"); - switch (level) { - case 1: - ndr_print_ptr(ndr, "info1", r->info1); - ndr->depth++; - if (r->info1) { - ndr_print_dfs_Info1(ndr, "info1", r->info1); - } - ndr->depth--; - break; - - case 2: - ndr_print_ptr(ndr, "info2", r->info2); - ndr->depth++; - if (r->info2) { - ndr_print_dfs_Info2(ndr, "info2", r->info2); - } - ndr->depth--; - break; - - case 3: - ndr_print_ptr(ndr, "info3", r->info3); - ndr->depth++; - if (r->info3) { - ndr_print_dfs_Info3(ndr, "info3", r->info3); - } - ndr->depth--; - break; - - case 4: - ndr_print_ptr(ndr, "info4", r->info4); - ndr->depth++; - if (r->info4) { - ndr_print_dfs_Info4(ndr, "info4", r->info4); - } - ndr->depth--; - break; - - case 100: - ndr_print_ptr(ndr, "info100", r->info100); - ndr->depth++; - if (r->info100) { - ndr_print_dfs_Info100(ndr, "info100", r->info100); - } - ndr->depth--; - break; - - case 101: - ndr_print_ptr(ndr, "info101", r->info101); - ndr->depth++; - if (r->info101) { - ndr_print_dfs_Info101(ndr, "info101", r->info101); - } - ndr->depth--; - break; - - case 102: - ndr_print_ptr(ndr, "info102", r->info102); - ndr->depth++; - if (r->info102) { - ndr_print_dfs_Info102(ndr, "info102", r->info102); - } - ndr->depth--; - break; - - case 200: - ndr_print_ptr(ndr, "info200", r->info200); - ndr->depth++; - if (r->info200) { - ndr_print_dfs_Info200(ndr, "info200", r->info200); - } - ndr->depth--; - break; - - case 300: - ndr_print_ptr(ndr, "info300", r->info300); - ndr->depth++; - if (r->info300) { - ndr_print_dfs_Info300(ndr, "info300", r->info300); - } - ndr->depth--; - break; - - default: - ndr_print_bad_level(ndr, name, level); - } -} - -void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, struct dfs_GetInfo *r) -{ - ndr_print_struct(ndr, name, "dfs_GetInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "dfs_GetInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "path", r->in.path); - ndr->depth++; - ndr_print_unistr(ndr, "path", r->in.path); - ndr->depth--; - ndr_print_ptr(ndr, "server", r->in.server); - ndr->depth++; - if (r->in.server) { - ndr_print_unistr(ndr, "server", r->in.server); - } - ndr->depth--; - ndr_print_ptr(ndr, "share", r->in.share); - ndr->depth++; - if (r->in.share) { - ndr_print_unistr(ndr, "share", r->in.share); - } - ndr->depth--; - ndr_print_uint32(ndr, "level", r->in.level); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "dfs_GetInfo"); - ndr->depth++; - ndr_print_dfs_Info(ndr, "info", r->in.level, &r->out.info); - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, struct dfs_EnumArray1 *r) -{ - ndr_print_struct(ndr, name, "dfs_EnumArray1"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "s", r->s); - ndr->depth++; - if (r->s) { - ndr_print_array(ndr, "s", r->s, sizeof(r->s[0]), r->count, (ndr_print_fn_t)ndr_print_dfs_Info1); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, struct dfs_EnumArray2 *r) -{ - ndr_print_struct(ndr, name, "dfs_EnumArray2"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "s", r->s); - ndr->depth++; - if (r->s) { - ndr_print_array(ndr, "s", r->s, sizeof(r->s[0]), r->count, (ndr_print_fn_t)ndr_print_dfs_Info2); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, struct dfs_EnumArray3 *r) -{ - ndr_print_struct(ndr, name, "dfs_EnumArray3"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "s", r->s); - ndr->depth++; - if (r->s) { - ndr_print_array(ndr, "s", r->s, sizeof(r->s[0]), r->count, (ndr_print_fn_t)ndr_print_dfs_Info3); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, struct dfs_EnumArray4 *r) -{ - ndr_print_struct(ndr, name, "dfs_EnumArray4"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "s", r->s); - ndr->depth++; - if (r->s) { - ndr_print_array(ndr, "s", r->s, sizeof(r->s[0]), r->count, (ndr_print_fn_t)ndr_print_dfs_Info4); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, struct dfs_EnumArray200 *r) -{ - ndr_print_struct(ndr, name, "dfs_EnumArray200"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "s", r->s); - ndr->depth++; - if (r->s) { - ndr_print_array(ndr, "s", r->s, sizeof(r->s[0]), r->count, (ndr_print_fn_t)ndr_print_dfs_Info200); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, struct dfs_EnumArray300 *r) -{ - ndr_print_struct(ndr, name, "dfs_EnumArray300"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "s", r->s); - ndr->depth++; - if (r->s) { - ndr_print_array(ndr, "s", r->s, sizeof(r->s[0]), r->count, (ndr_print_fn_t)ndr_print_dfs_Info300); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, uint16 level, union dfs_EnumInfo *r) -{ - ndr_print_union(ndr, name, level, "dfs_EnumInfo"); - switch (level) { - case 1: - ndr_print_ptr(ndr, "info1", r->info1); - ndr->depth++; - if (r->info1) { - ndr_print_dfs_EnumArray1(ndr, "info1", r->info1); - } - ndr->depth--; - break; - - case 2: - ndr_print_ptr(ndr, "info2", r->info2); - ndr->depth++; - if (r->info2) { - ndr_print_dfs_EnumArray2(ndr, "info2", r->info2); - } - ndr->depth--; - break; - - case 3: - ndr_print_ptr(ndr, "info3", r->info3); - ndr->depth++; - if (r->info3) { - ndr_print_dfs_EnumArray3(ndr, "info3", r->info3); - } - ndr->depth--; - break; - - case 4: - ndr_print_ptr(ndr, "info4", r->info4); - ndr->depth++; - if (r->info4) { - ndr_print_dfs_EnumArray4(ndr, "info4", r->info4); - } - ndr->depth--; - break; - - case 200: - ndr_print_ptr(ndr, "info200", r->info200); - ndr->depth++; - if (r->info200) { - ndr_print_dfs_EnumArray200(ndr, "info200", r->info200); - } - ndr->depth--; - break; - - case 300: - ndr_print_ptr(ndr, "info300", r->info300); - ndr->depth++; - if (r->info300) { - ndr_print_dfs_EnumArray300(ndr, "info300", r->info300); - } - ndr->depth--; - break; - - default: - ndr_print_bad_level(ndr, name, level); - } -} - -void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, struct dfs_EnumStruct *r) -{ - ndr_print_struct(ndr, name, "dfs_EnumStruct"); - ndr->depth++; - ndr_print_uint32(ndr, "level", r->level); - ndr_print_dfs_EnumInfo(ndr, "e", r->level, &r->e); - ndr->depth--; -} - -void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, struct dfs_Enum *r) -{ - ndr_print_struct(ndr, name, "dfs_Enum"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "dfs_Enum"); - ndr->depth++; - ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_uint32(ndr, "bufsize", r->in.bufsize); - ndr_print_ptr(ndr, "info", r->in.info); - ndr->depth++; - if (r->in.info) { - ndr_print_dfs_EnumStruct(ndr, "info", r->in.info); - } - ndr->depth--; - ndr_print_ptr(ndr, "unknown", r->in.unknown); - ndr->depth++; - if (r->in.unknown) { - ndr_print_uint32(ndr, "unknown", *r->in.unknown); - } - ndr->depth--; - ndr_print_ptr(ndr, "total", r->in.total); - ndr->depth++; - if (r->in.total) { - ndr_print_uint32(ndr, "total", *r->in.total); - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "dfs_Enum"); - ndr->depth++; - ndr_print_ptr(ndr, "info", r->out.info); - ndr->depth++; - if (r->out.info) { - ndr_print_dfs_EnumStruct(ndr, "info", r->out.info); - } - ndr->depth--; - ndr_print_ptr(ndr, "total", r->out.total); - ndr->depth++; - if (r->out.total) { - ndr_print_uint32(ndr, "total", *r->out.total); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - diff --git a/source4/librpc/ndr/ndr_dfs.h b/source4/librpc/ndr/ndr_dfs.h deleted file mode 100644 index 9a27c7040a..0000000000 --- a/source4/librpc/ndr/ndr_dfs.h +++ /dev/null @@ -1,206 +0,0 @@ -/* header auto-generated by pidl */ - -#define DCERPC_NETDFS_UUID "4fc742e0-4a10-11cf-8273-00aa004ae673" -#define DCERPC_NETDFS_VERSION 3.0 -#define DCERPC_NETDFS_NAME "netdfs" - -#define DCERPC_DFS_EXIST 0 -#define DCERPC_DFS_ADD 1 -#define DCERPC_DFS_REMOVE 2 -#define DCERPC_DFS_SETINFO 3 -#define DCERPC_DFS_GETINFO 4 -#define DCERPC_DFS_ENUM 5 - - -struct dfs_Exist { - struct { - } in; - - struct { - uint32 *exist_flag; - } out; - -}; - -struct dfs_Add { - struct { - const char *path; - const char *server; - const char *share; - const char *comment; - uint32 flags; - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct dfs_Remove { - struct { - const char *path; - const char *server; - const char *share; - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct dfs_SetInfo { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct dfs_Info1 { - const char *path; -}; - -struct dfs_Info2 { - const char *path; - const char *comment; - uint32 state; - uint32 num_stores; -}; - -struct dfs_StorageInfo { - uint32 state; - const char *server; - const char *share; -}; - -struct dfs_Info3 { - const char *path; - const char *comment; - uint32 state; - uint32 num_stores; - struct dfs_StorageInfo *stores; -}; - -struct dfs_Info4 { - const char *path; - const char *comment; - uint32 state; - uint32 timeout; - struct GUID guid; - uint32 num_stores; - struct dfs_StorageInfo *stores; -}; - -struct dfs_Info100 { - const char *comment; -}; - -struct dfs_Info101 { - uint32 state; -}; - -struct dfs_Info102 { - uint32 timeout; -}; - -struct dfs_Info200 { - const char *dom_root; -}; - -struct dfs_Info300 { - uint32 flags; - const char *dom_root; -}; - -union dfs_Info { -/* [case(1)] */ struct dfs_Info1 *info1; -/* [case(2)] */ struct dfs_Info2 *info2; -/* [case(3)] */ struct dfs_Info3 *info3; -/* [case(4)] */ struct dfs_Info4 *info4; -/* [case(100)] */ struct dfs_Info100 *info100; -/* [case(101)] */ struct dfs_Info101 *info101; -/* [case(102)] */ struct dfs_Info102 *info102; -/* [case(200)] */ struct dfs_Info200 *info200; -/* [case(300)] */ struct dfs_Info300 *info300; -}; - -struct dfs_GetInfo { - struct { - const char *path; - const char *server; - const char *share; - uint32 level; - } in; - - struct { - union dfs_Info info; - NTSTATUS result; - } out; - -}; - -struct dfs_EnumArray1 { - uint32 count; - struct dfs_Info1 *s; -}; - -struct dfs_EnumArray2 { - uint32 count; - struct dfs_Info2 *s; -}; - -struct dfs_EnumArray3 { - uint32 count; - struct dfs_Info3 *s; -}; - -struct dfs_EnumArray4 { - uint32 count; - struct dfs_Info4 *s; -}; - -struct dfs_EnumArray200 { - uint32 count; - struct dfs_Info200 *s; -}; - -struct dfs_EnumArray300 { - uint32 count; - struct dfs_Info300 *s; -}; - -union dfs_EnumInfo { -/* [case(1)] */ struct dfs_EnumArray1 *info1; -/* [case(2)] */ struct dfs_EnumArray2 *info2; -/* [case(3)] */ struct dfs_EnumArray3 *info3; -/* [case(4)] */ struct dfs_EnumArray4 *info4; -/* [case(200)] */ struct dfs_EnumArray200 *info200; -/* [case(300)] */ struct dfs_EnumArray300 *info300; -}; - -struct dfs_EnumStruct { - uint32 level; - union dfs_EnumInfo e; -}; - -struct dfs_Enum { - struct { - uint32 level; - uint32 bufsize; - struct dfs_EnumStruct *info; - uint32 *unknown; - uint32 *total; - } in; - - struct { - struct dfs_EnumStruct *info; - uint32 *total; - NTSTATUS result; - } out; - -}; - diff --git a/source4/librpc/ndr/ndr_echo.c b/source4/librpc/ndr/ndr_echo.c deleted file mode 100644 index 9ddc64354a..0000000000 --- a/source4/librpc/ndr/ndr_echo.c +++ /dev/null @@ -1,574 +0,0 @@ -/* parser auto-generated by pidl */ - -#include "includes.h" - -NTSTATUS ndr_push_echo_AddOne(struct ndr_push *ndr, struct echo_AddOne *r) -{ - NDR_CHECK(ndr_push_uint32(ndr, *r->in.v)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_echo_EchoData(struct ndr_push *ndr, struct echo_EchoData *r) -{ - NDR_CHECK(ndr_push_uint32(ndr, r->in.len)); - if (r->in.in_data) { - NDR_CHECK(ndr_push_uint32(ndr, r->in.len)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.in_data, r->in.len)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_echo_SinkData(struct ndr_push *ndr, struct echo_SinkData *r) -{ - NDR_CHECK(ndr_push_uint32(ndr, r->in.len)); - if (r->in.data) { - NDR_CHECK(ndr_push_uint32(ndr, r->in.len)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data, r->in.len)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_echo_SourceData(struct ndr_push *ndr, struct echo_SourceData *r) -{ - NDR_CHECK(ndr_push_uint32(ndr, r->in.len)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_TestCall(struct ndr_push *ndr, struct TestCall *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.s1)); - if (r->in.s1) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.s1)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_TestCall2(struct ndr_push *ndr, struct TestCall2 *r) -{ - NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_echo_AddOne(struct ndr_pull *ndr, struct echo_AddOne *r) -{ - NDR_CHECK(ndr_pull_uint32(ndr, r->out.v)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_echo_EchoData(struct ndr_pull *ndr, struct echo_EchoData *r) -{ - if (r->out.out_data) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->in.len > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->in.len); - } - } - NDR_ALLOC_N_SIZE(ndr, r->out.out_data, r->in.len, sizeof(r->out.out_data[0])); - { - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.out_data, r->in.len)); - } - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_echo_SinkData(struct ndr_pull *ndr, struct echo_SinkData *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_echo_SourceData(struct ndr_pull *ndr, struct echo_SourceData *r) -{ - if (r->out.data) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->in.len > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->in.len); - } - } - { - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.data, r->in.len)); - } - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_TestCall(struct ndr_pull *ndr, struct TestCall *r) -{ - uint32 _ptr_s2; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_s2)); - if (_ptr_s2) { - NDR_ALLOC(ndr, r->out.s2); - } else { - r->out.s2 = NULL; - } - if (r->out.s2) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->out.s2)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_echo_info1(struct ndr_pull *ndr, int ndr_flags, struct echo_info1 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 1)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->v)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_echo_info2(struct ndr_pull *ndr, int ndr_flags, struct echo_info2 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 2)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->v)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_echo_info3(struct ndr_pull *ndr, int ndr_flags, struct echo_info3 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->v)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_echo_info4(struct ndr_pull *ndr, int ndr_flags, struct echo_info4 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 8)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->v)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_echo_info5(struct ndr_pull *ndr, int ndr_flags, struct echo_info5 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 8)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->v1)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->v2)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_echo_info6(struct ndr_pull *ndr, int ndr_flags, struct echo_info6 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 1)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->v1)); - NDR_CHECK(ndr_pull_echo_info1(ndr, NDR_SCALARS, &r->info1)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_echo_info1(ndr, NDR_BUFFERS, &r->info1)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_echo_info7(struct ndr_pull *ndr, int ndr_flags, struct echo_info7 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 8)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->v1)); - NDR_CHECK(ndr_pull_echo_info4(ndr, NDR_SCALARS, &r->info4)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_echo_info4(ndr, NDR_BUFFERS, &r->info4)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_echo_Info(struct ndr_pull *ndr, int ndr_flags, uint16 level, union echo_Info *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 1: { - NDR_CHECK(ndr_pull_echo_info1(ndr, NDR_SCALARS, &r->info1)); - break; } - - case 2: { - NDR_CHECK(ndr_pull_echo_info2(ndr, NDR_SCALARS, &r->info2)); - break; } - - case 3: { - NDR_CHECK(ndr_pull_echo_info3(ndr, NDR_SCALARS, &r->info3)); - break; } - - case 4: { - NDR_CHECK(ndr_pull_echo_info4(ndr, NDR_SCALARS, &r->info4)); - break; } - - case 5: { - NDR_CHECK(ndr_pull_echo_info5(ndr, NDR_SCALARS, &r->info5)); - break; } - - case 6: { - NDR_CHECK(ndr_pull_echo_info6(ndr, NDR_SCALARS, &r->info6)); - break; } - - case 7: { - NDR_CHECK(ndr_pull_echo_info7(ndr, NDR_SCALARS, &r->info7)); - break; } - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 1: - NDR_CHECK(ndr_pull_echo_info1(ndr, NDR_BUFFERS, &r->info1)); - break; - - case 2: - NDR_CHECK(ndr_pull_echo_info2(ndr, NDR_BUFFERS, &r->info2)); - break; - - case 3: - NDR_CHECK(ndr_pull_echo_info3(ndr, NDR_BUFFERS, &r->info3)); - break; - - case 4: - NDR_CHECK(ndr_pull_echo_info4(ndr, NDR_BUFFERS, &r->info4)); - break; - - case 5: - NDR_CHECK(ndr_pull_echo_info5(ndr, NDR_BUFFERS, &r->info5)); - break; - - case 6: - NDR_CHECK(ndr_pull_echo_info6(ndr, NDR_BUFFERS, &r->info6)); - break; - - case 7: - NDR_CHECK(ndr_pull_echo_info7(ndr, NDR_BUFFERS, &r->info7)); - break; - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_TestCall2(struct ndr_pull *ndr, struct TestCall2 *r) -{ - uint32 _ptr_info; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info)); - if (_ptr_info) { - NDR_ALLOC(ndr, r->out.info); - } else { - r->out.info = NULL; - } - if (r->out.info) { - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint16 _level; - NDR_CHECK(ndr_pull_uint16(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); - } - NDR_CHECK(ndr_pull_echo_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, r->out.info)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -void ndr_print_echo_AddOne(struct ndr_print *ndr, const char *name, int flags, struct echo_AddOne *r) -{ - ndr_print_struct(ndr, name, "echo_AddOne"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "echo_AddOne"); - ndr->depth++; - ndr_print_ptr(ndr, "v", r->in.v); - ndr->depth++; - ndr_print_uint32(ndr, "v", *r->in.v); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "echo_AddOne"); - ndr->depth++; - ndr_print_ptr(ndr, "v", r->out.v); - ndr->depth++; - ndr_print_uint32(ndr, "v", *r->out.v); - ndr->depth--; - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_echo_EchoData(struct ndr_print *ndr, const char *name, int flags, struct echo_EchoData *r) -{ - ndr_print_struct(ndr, name, "echo_EchoData"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "echo_EchoData"); - ndr->depth++; - ndr_print_uint32(ndr, "len", r->in.len); - ndr_print_ptr(ndr, "in_data", r->in.in_data); - ndr->depth++; - ndr_print_array_uint8(ndr, "in_data", r->in.in_data, r->in.len); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "echo_EchoData"); - ndr->depth++; - ndr_print_ptr(ndr, "out_data", r->out.out_data); - ndr->depth++; - ndr_print_array_uint8(ndr, "out_data", r->out.out_data, r->in.len); - ndr->depth--; - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_echo_SinkData(struct ndr_print *ndr, const char *name, int flags, struct echo_SinkData *r) -{ - ndr_print_struct(ndr, name, "echo_SinkData"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "echo_SinkData"); - ndr->depth++; - ndr_print_uint32(ndr, "len", r->in.len); - ndr_print_ptr(ndr, "data", r->in.data); - ndr->depth++; - ndr_print_array_uint8(ndr, "data", r->in.data, r->in.len); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "echo_SinkData"); - ndr->depth++; - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_echo_SourceData(struct ndr_print *ndr, const char *name, int flags, struct echo_SourceData *r) -{ - ndr_print_struct(ndr, name, "echo_SourceData"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "echo_SourceData"); - ndr->depth++; - ndr_print_uint32(ndr, "len", r->in.len); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "echo_SourceData"); - ndr->depth++; - ndr_print_ptr(ndr, "data", r->out.data); - ndr->depth++; - ndr_print_array_uint8(ndr, "data", r->out.data, r->in.len); - ndr->depth--; - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_TestCall(struct ndr_print *ndr, const char *name, int flags, struct TestCall *r) -{ - ndr_print_struct(ndr, name, "TestCall"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "TestCall"); - ndr->depth++; - ndr_print_ptr(ndr, "s1", r->in.s1); - ndr->depth++; - if (r->in.s1) { - ndr_print_unistr(ndr, "s1", r->in.s1); - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "TestCall"); - ndr->depth++; - ndr_print_ptr(ndr, "s2", r->out.s2); - ndr->depth++; - if (r->out.s2) { - ndr_print_unistr(ndr, "s2", r->out.s2); - } - ndr->depth--; - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_echo_info1(struct ndr_print *ndr, const char *name, struct echo_info1 *r) -{ - ndr_print_struct(ndr, name, "echo_info1"); - ndr->depth++; - ndr_print_uint8(ndr, "v", r->v); - ndr->depth--; -} - -void ndr_print_echo_info2(struct ndr_print *ndr, const char *name, struct echo_info2 *r) -{ - ndr_print_struct(ndr, name, "echo_info2"); - ndr->depth++; - ndr_print_uint16(ndr, "v", r->v); - ndr->depth--; -} - -void ndr_print_echo_info3(struct ndr_print *ndr, const char *name, struct echo_info3 *r) -{ - ndr_print_struct(ndr, name, "echo_info3"); - ndr->depth++; - ndr_print_uint32(ndr, "v", r->v); - ndr->depth--; -} - -void ndr_print_echo_info4(struct ndr_print *ndr, const char *name, struct echo_info4 *r) -{ - ndr_print_struct(ndr, name, "echo_info4"); - ndr->depth++; - ndr_print_HYPER_T(ndr, "v", r->v); - ndr->depth--; -} - -void ndr_print_echo_info5(struct ndr_print *ndr, const char *name, struct echo_info5 *r) -{ - ndr_print_struct(ndr, name, "echo_info5"); - ndr->depth++; - ndr_print_uint8(ndr, "v1", r->v1); - ndr_print_HYPER_T(ndr, "v2", r->v2); - ndr->depth--; -} - -void ndr_print_echo_info6(struct ndr_print *ndr, const char *name, struct echo_info6 *r) -{ - ndr_print_struct(ndr, name, "echo_info6"); - ndr->depth++; - ndr_print_uint8(ndr, "v1", r->v1); - ndr_print_echo_info1(ndr, "info1", &r->info1); - ndr->depth--; -} - -void ndr_print_echo_XXX(struct ndr_print *ndr, const char *name, uint16 level, union echo_XXX *r) -{ - ndr_print_union(ndr, name, level, "echo_XXX"); - switch (level) { - case 1: - ndr_print_echo_info1(ndr, "info1", &r->info1); - break; - - default: - ndr_print_bad_level(ndr, name, level); - } -} - -void ndr_print_echo_info7(struct ndr_print *ndr, const char *name, struct echo_info7 *r) -{ - ndr_print_struct(ndr, name, "echo_info7"); - ndr->depth++; - ndr_print_uint8(ndr, "v1", r->v1); - ndr_print_echo_info4(ndr, "info4", &r->info4); - ndr->depth--; -} - -void ndr_print_echo_Info(struct ndr_print *ndr, const char *name, uint16 level, union echo_Info *r) -{ - ndr_print_union(ndr, name, level, "echo_Info"); - switch (level) { - case 1: - ndr_print_echo_info1(ndr, "info1", &r->info1); - break; - - case 2: - ndr_print_echo_info2(ndr, "info2", &r->info2); - break; - - case 3: - ndr_print_echo_info3(ndr, "info3", &r->info3); - break; - - case 4: - ndr_print_echo_info4(ndr, "info4", &r->info4); - break; - - case 5: - ndr_print_echo_info5(ndr, "info5", &r->info5); - break; - - case 6: - ndr_print_echo_info6(ndr, "info6", &r->info6); - break; - - case 7: - ndr_print_echo_info7(ndr, "info7", &r->info7); - break; - - default: - ndr_print_bad_level(ndr, name, level); - } -} - -void ndr_print_TestCall2(struct ndr_print *ndr, const char *name, int flags, struct TestCall2 *r) -{ - ndr_print_struct(ndr, name, "TestCall2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "TestCall2"); - ndr->depth++; - ndr_print_uint16(ndr, "level", r->in.level); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "TestCall2"); - ndr->depth++; - ndr_print_ptr(ndr, "info", r->out.info); - ndr->depth++; - if (r->out.info) { - ndr_print_echo_Info(ndr, "info", r->in.level, r->out.info); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - diff --git a/source4/librpc/ndr/ndr_echo.h b/source4/librpc/ndr/ndr_echo.h deleted file mode 100644 index 1e33a48516..0000000000 --- a/source4/librpc/ndr/ndr_echo.h +++ /dev/null @@ -1,127 +0,0 @@ -/* header auto-generated by pidl */ - -#define DCERPC_RPCECHO_UUID "60a15ec5-4de8-11d7-a637-005056a20182" -#define DCERPC_RPCECHO_VERSION 1.0 -#define DCERPC_RPCECHO_NAME "rpcecho" - -#define DCERPC_ECHO_ADDONE 0 -#define DCERPC_ECHO_ECHODATA 1 -#define DCERPC_ECHO_SINKDATA 2 -#define DCERPC_ECHO_SOURCEDATA 3 -#define DCERPC_TESTCALL 4 -#define DCERPC_TESTCALL2 5 - - -struct echo_AddOne { - struct { - uint32 *v; - } in; - - struct { - uint32 *v; - } out; - -}; - -struct echo_EchoData { - struct { - uint32 len; - uint8 *in_data; - } in; - - struct { - uint8 *out_data; - } out; - -}; - -struct echo_SinkData { - struct { - uint32 len; - uint8 *data; - } in; - - struct { - } out; - -}; - -struct echo_SourceData { - struct { - uint32 len; - } in; - - struct { - uint8 *data; - } out; - -}; - -struct TestCall { - struct { - const char *s1; - } in; - - struct { - const char *s2; - } out; - -}; - -struct echo_info1 { - uint8 v; -}; - -struct echo_info2 { - uint16 v; -}; - -struct echo_info3 { - uint32 v; -}; - -struct echo_info4 { - HYPER_T v; -}; - -struct echo_info5 { - uint8 v1; - HYPER_T v2; -}; - -struct echo_info6 { - uint8 v1; - struct echo_info1 info1; -}; - -union echo_XXX { -/* [case(1)] */ struct echo_info1 info1; -}; - -struct echo_info7 { - uint8 v1; - struct echo_info4 info4; -}; - -union echo_Info { -/* [case(1)] */ struct echo_info1 info1; -/* [case(2)] */ struct echo_info2 info2; -/* [case(3)] */ struct echo_info3 info3; -/* [case(4)] */ struct echo_info4 info4; -/* [case(5)] */ struct echo_info5 info5; -/* [case(6)] */ struct echo_info6 info6; -/* [case(7)] */ struct echo_info7 info7; -}; - -struct TestCall2 { - struct { - uint16 level; - } in; - - struct { - union echo_Info *info; - NTSTATUS result; - } out; - -}; - diff --git a/source4/librpc/ndr/ndr_lsa.c b/source4/librpc/ndr/ndr_lsa.c deleted file mode 100644 index b246fbc170..0000000000 --- a/source4/librpc/ndr/ndr_lsa.c +++ /dev/null @@ -1,3240 +0,0 @@ -/* parser auto-generated by pidl */ - -#include "includes.h" - -NTSTATUS ndr_push_lsa_Close(struct ndr_push *ndr, struct lsa_Close *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_Delete(struct ndr_push *ndr, struct lsa_Delete *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_Name(struct ndr_push *ndr, int ndr_flags, struct lsa_Name *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint16(ndr, 2*strlen_m(r->name))); - NDR_CHECK(ndr_push_uint16(ndr, r->name_len)); - NDR_CHECK(ndr_push_ptr(ndr, r->name)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_push_unistr_noterm(ndr, r->name)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, struct lsa_EnumPrivs *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.max_count)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_QuerySecObj(struct ndr_push *ndr, struct lsa_QuerySecObj *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.sec_info)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_SetSecObj(struct ndr_push *ndr, struct lsa_SetSecObj *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_ChangePassword(struct ndr_push *ndr, struct lsa_ChangePassword *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_QosInfo(struct ndr_push *ndr, int ndr_flags, struct lsa_QosInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->len)); - NDR_CHECK(ndr_push_uint16(ndr, r->impersonation_level)); - NDR_CHECK(ndr_push_uint8(ndr, r->context_mode)); - NDR_CHECK(ndr_push_uint8(ndr, r->effective_only)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_ObjectAttribute(struct ndr_push *ndr, int ndr_flags, struct lsa_ObjectAttribute *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->len)); - NDR_CHECK(ndr_push_ptr(ndr, r->root_dir)); - NDR_CHECK(ndr_push_ptr(ndr, r->object_name)); - NDR_CHECK(ndr_push_uint32(ndr, r->attributes)); - NDR_CHECK(ndr_push_ptr(ndr, r->sec_desc)); - NDR_CHECK(ndr_push_ptr(ndr, r->sec_qos)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->root_dir) { - NDR_CHECK(ndr_push_uint8(ndr, *r->root_dir)); - } - if (r->object_name) { - NDR_CHECK(ndr_push_unistr(ndr, r->object_name)); - } - if (r->sec_desc) { - NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->sec_desc)); - } - if (r->sec_qos) { - NDR_CHECK(ndr_push_lsa_QosInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->sec_qos)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, struct lsa_OpenPolicy *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.system_name)); - if (r->in.system_name) { - NDR_CHECK(ndr_push_uint16(ndr, *r->in.system_name)); - } - NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.desired_access)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_QueryInfoPolicy(struct ndr_push *ndr, struct lsa_QueryInfoPolicy *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_SetInfoPolicy(struct ndr_push *ndr, struct lsa_SetInfoPolicy *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_ClearAuditLog(struct ndr_push *ndr, struct lsa_ClearAuditLog *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_CreateAccount(struct ndr_push *ndr, struct lsa_CreateAccount *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_SidPtr(struct ndr_push *ndr, int ndr_flags, struct lsa_SidPtr *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->sid)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->sid) { - NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, struct lsa_SidArray *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->num_sids)); - NDR_CHECK(ndr_push_ptr(ndr, r->sids)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->sids) { - NDR_CHECK(ndr_push_uint32(ndr, r->num_sids)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->sids, sizeof(r->sids[0]), r->num_sids, (ndr_push_flags_fn_t)ndr_push_lsa_SidPtr)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, struct lsa_EnumAccounts *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.num_entries)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_CreateTrustDom(struct ndr_push *ndr, struct lsa_CreateTrustDom *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_EnumTrustDom(struct ndr_push *ndr, struct lsa_EnumTrustDom *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.num_entries)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_TranslatedSid(struct ndr_push *ndr, int ndr_flags, struct lsa_TranslatedSid *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint16(ndr, r->sid_type)); - NDR_CHECK(ndr_push_uint32(ndr, r->rid)); - NDR_CHECK(ndr_push_uint32(ndr, r->sid_index)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_TransSidArray(struct ndr_push *ndr, int ndr_flags, struct lsa_TransSidArray *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->sids)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->sids) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->sids, sizeof(r->sids[0]), r->count, (ndr_push_flags_fn_t)ndr_push_lsa_TranslatedSid)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_LookupNames(struct ndr_push *ndr, struct lsa_LookupNames *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.num_names)); - if (r->in.names) { - NDR_CHECK(ndr_push_uint32(ndr, r->in.num_names)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names, sizeof(r->in.names[0]), r->in.num_names, (ndr_push_flags_fn_t)ndr_push_lsa_Name)); - } - NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); - NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); - NDR_CHECK(ndr_push_uint32(ndr, *r->in.count)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_TranslatedName(struct ndr_push *ndr, int ndr_flags, struct lsa_TranslatedName *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint16(ndr, r->sid_type)); - NDR_CHECK(ndr_push_lsa_Name(ndr, NDR_SCALARS, &r->name)); - NDR_CHECK(ndr_push_uint32(ndr, r->sid_index)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_lsa_Name(ndr, NDR_BUFFERS, &r->name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_TransNameArray(struct ndr_push *ndr, int ndr_flags, struct lsa_TransNameArray *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->names)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->names) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->names, sizeof(r->names[0]), r->count, (ndr_push_flags_fn_t)ndr_push_lsa_TranslatedName)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_LookupSids(struct ndr_push *ndr, struct lsa_LookupSids *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); - NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names)); - NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); - NDR_CHECK(ndr_push_uint32(ndr, *r->in.count)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_CREATESECRET(struct ndr_push *ndr, struct CREATESECRET *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_OpenAccount(struct ndr_push *ndr, struct lsa_OpenAccount *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.desired_access)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_LUID(struct ndr_push *ndr, int ndr_flags, struct lsa_LUID *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->low)); - NDR_CHECK(ndr_push_uint32(ndr, r->high)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_EnumPrivsAccount(struct ndr_push *ndr, struct lsa_EnumPrivsAccount *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_ADDPRIVS(struct ndr_push *ndr, struct ADDPRIVS *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_REMOVEPRIVS(struct ndr_push *ndr, struct REMOVEPRIVS *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_GETQUOTAS(struct ndr_push *ndr, struct GETQUOTAS *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_SETQUOTAS(struct ndr_push *ndr, struct SETQUOTAS *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_GETSYSTEMACCOUNT(struct ndr_push *ndr, struct GETSYSTEMACCOUNT *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_SETSYSTEMACCOUNT(struct ndr_push *ndr, struct SETSYSTEMACCOUNT *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_OPENTRUSTDOM(struct ndr_push *ndr, struct OPENTRUSTDOM *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_QUERYTRUSTDOM(struct ndr_push *ndr, struct QUERYTRUSTDOM *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_SETINFOTRUSTDOM(struct ndr_push *ndr, struct SETINFOTRUSTDOM *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_OPENSECRET(struct ndr_push *ndr, struct OPENSECRET *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_SETSECRET(struct ndr_push *ndr, struct SETSECRET *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_QUERYSECRET(struct ndr_push *ndr, struct QUERYSECRET *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_LOOKUPPRIVVALUE(struct ndr_push *ndr, struct LOOKUPPRIVVALUE *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_LookupPrivName(struct ndr_push *ndr, struct lsa_LookupPrivName *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.luid)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_PRIV_GET_DISPNAME(struct ndr_push *ndr, struct PRIV_GET_DISPNAME *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_DELETEOBJECT(struct ndr_push *ndr, struct DELETEOBJECT *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_ENUMACCTWITHRIGHT(struct ndr_push *ndr, struct ENUMACCTWITHRIGHT *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_EnumAccountRights(struct ndr_push *ndr, struct lsa_EnumAccountRights *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_ADDACCTRIGHTS(struct ndr_push *ndr, struct ADDACCTRIGHTS *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_REMOVEACCTRIGHTS(struct ndr_push *ndr, struct REMOVEACCTRIGHTS *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_QUERYTRUSTDOMINFO(struct ndr_push *ndr, struct QUERYTRUSTDOMINFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_SETTRUSTDOMINFO(struct ndr_push *ndr, struct SETTRUSTDOMINFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_DELETETRUSTDOM(struct ndr_push *ndr, struct DELETETRUSTDOM *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_STOREPRIVDATA(struct ndr_push *ndr, struct STOREPRIVDATA *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_RETRPRIVDATA(struct ndr_push *ndr, struct RETRPRIVDATA *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, struct lsa_OpenPolicy2 *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.system_name)); - if (r->in.system_name) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.system_name)); - } - NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.desired_access)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_UNK_GET_CONNUSER(struct ndr_push *ndr, struct UNK_GET_CONNUSER *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_QUERYINFO2(struct ndr_push *ndr, struct QUERYINFO2 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_Close(struct ndr_pull *ndr, struct lsa_Close *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_Delete(struct ndr_pull *ndr, struct lsa_Delete *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_Name(struct ndr_pull *ndr, int ndr_flags, struct lsa_Name *r) -{ - uint32 _ptr_name; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->name_len)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->name_size)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); - if (_ptr_name) { - NDR_ALLOC(ndr, r->name); - } else { - r->name = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_pull_unistr_noterm(ndr, &r->name)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_PrivEntry(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivEntry *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->name)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->luid_low)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->luid_high)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_BUFFERS, &r->name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_PrivArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivArray *r) -{ - uint32 _ptr_privs; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_privs)); - if (_ptr_privs) { - NDR_ALLOC(ndr, r->privs); - } else { - r->privs = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->privs) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->privs, r->count, sizeof(r->privs[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->privs, sizeof(r->privs[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_lsa_PrivEntry)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, struct lsa_EnumPrivs *r) -{ - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - NDR_CHECK(ndr_pull_lsa_PrivArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_desc_buf *r) -{ - uint32 _ptr_sd; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->size)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sd)); - if (_ptr_sd) { - NDR_ALLOC(ndr, r->sd); - } else { - r->sd = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->sd) { - NDR_CHECK(ndr_pull_subcontext_flags_fn(ndr, r->sd, (ndr_pull_flags_fn_t) ndr_pull_security_descriptor)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_QuerySecObj(struct ndr_pull *ndr, struct lsa_QuerySecObj *r) -{ - uint32 _ptr_sd; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sd)); - if (_ptr_sd) { - NDR_ALLOC(ndr, r->out.sd); - } else { - r->out.sd = NULL; - } - if (r->out.sd) { - NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sd)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_SetSecObj(struct ndr_pull *ndr, struct lsa_SetSecObj *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_ChangePassword(struct ndr_pull *ndr, struct lsa_ChangePassword *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, struct lsa_OpenPolicy *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_AuditLogInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditLogInfo *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->percent_full)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->log_size)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->retention_time)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->shutdown_in_progress)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->time_to_shutdown)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->next_audit_record)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_AuditEventsInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditEventsInfo *r) -{ - uint32 _ptr_settings; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->auditing_mode)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_settings)); - if (_ptr_settings) { - NDR_ALLOC(ndr, r->settings); - } else { - r->settings = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->settings) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->settings, r->count, sizeof(r->settings[0])); - { - NDR_CHECK(ndr_pull_array_uint32(ndr, NDR_SCALARS|NDR_BUFFERS, r->settings, r->count)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_DomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfo *r) -{ - uint32 _ptr_sid; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->name)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sid)); - if (_ptr_sid) { - NDR_ALLOC(ndr, r->sid); - } else { - r->sid = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_BUFFERS, &r->name)); - if (r->sid) { - NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_PDAccountInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_PDAccountInfo *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->name)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_BUFFERS, &r->name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_ServerRole(struct ndr_pull *ndr, int ndr_flags, struct lsa_ServerRole *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 2)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->unknown)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->role)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ReplicaSourceInfo *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->source)); - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->account)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_BUFFERS, &r->source)); - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_BUFFERS, &r->account)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DefaultQuotaInfo *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 8)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->paged_pool)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->non_paged_pool)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->min_wss)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->max_wss)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->pagefile)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->unknown)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_ModificationInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ModificationInfo *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 8)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->modified_id)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->db_create_time)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullSetInfo *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 1)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->shutdown_on_full)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullQueryInfo *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 2)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->unknown)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->shutdown_on_full)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->log_is_full)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_DnsDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DnsDomainInfo *r) -{ - uint32 _ptr_sid; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->name)); - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->dns_domain)); - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->dns_forest)); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sid)); - if (_ptr_sid) { - NDR_ALLOC(ndr, r->sid); - } else { - r->sid = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_BUFFERS, &r->name)); - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_BUFFERS, &r->dns_domain)); - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_BUFFERS, &r->dns_forest)); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->domain_guid)); - if (r->sid) { - NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, int ndr_flags, uint16 level, union lsa_PolicyInformation *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 1: { - NDR_CHECK(ndr_pull_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log)); - break; } - - case 2: { - NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr, NDR_SCALARS, &r->audit_events)); - break; } - - case 3: { - NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain)); - break; } - - case 4: { - NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd)); - break; } - - case 5: { - NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain)); - break; } - - case 6: { - NDR_CHECK(ndr_pull_lsa_ServerRole(ndr, NDR_SCALARS, &r->role)); - break; } - - case 7: { - NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica)); - break; } - - case 8: { - NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota)); - break; } - - case 9: { - NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->db)); - break; } - - case 10: { - NDR_CHECK(ndr_pull_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset)); - break; } - - case 11: { - NDR_CHECK(ndr_pull_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery)); - break; } - - case 12: { - NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns)); - break; } - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 1: - NDR_CHECK(ndr_pull_lsa_AuditLogInfo(ndr, NDR_BUFFERS, &r->audit_log)); - break; - - case 2: - NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr, NDR_BUFFERS, &r->audit_events)); - break; - - case 3: - NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domain)); - break; - - case 4: - NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_BUFFERS, &r->pd)); - break; - - case 5: - NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->account_domain)); - break; - - case 6: - NDR_CHECK(ndr_pull_lsa_ServerRole(ndr, NDR_BUFFERS, &r->role)); - break; - - case 7: - NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_BUFFERS, &r->replica)); - break; - - case 8: - NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr, NDR_BUFFERS, &r->quota)); - break; - - case 9: - NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr, NDR_BUFFERS, &r->db)); - break; - - case 10: - NDR_CHECK(ndr_pull_lsa_AuditFullSetInfo(ndr, NDR_BUFFERS, &r->auditfullset)); - break; - - case 11: - NDR_CHECK(ndr_pull_lsa_AuditFullQueryInfo(ndr, NDR_BUFFERS, &r->auditfullquery)); - break; - - case 12: - NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns)); - break; - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull *ndr, struct lsa_QueryInfoPolicy *r) -{ - uint32 _ptr_info; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info)); - if (_ptr_info) { - NDR_ALLOC(ndr, r->out.info); - } else { - r->out.info = NULL; - } - if (r->out.info) { - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint16 _level; - NDR_CHECK(ndr_pull_uint16(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); - } - NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, r->out.info)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_SetInfoPolicy(struct ndr_pull *ndr, struct lsa_SetInfoPolicy *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_ClearAuditLog(struct ndr_pull *ndr, struct lsa_ClearAuditLog *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, struct lsa_CreateAccount *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_SidPtr(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidPtr *r) -{ - uint32 _ptr_sid; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sid)); - if (_ptr_sid) { - NDR_ALLOC(ndr, r->sid); - } else { - r->sid = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->sid) { - NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidArray *r) -{ - uint32 _ptr_sids; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_sids)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sids)); - if (_ptr_sids) { - NDR_ALLOC(ndr, r->sids); - } else { - r->sids = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->sids) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->num_sids > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->num_sids); - } - } - NDR_ALLOC_N_SIZE(ndr, r->sids, r->num_sids, sizeof(r->sids[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->sids, sizeof(r->sids[0]), r->num_sids, (ndr_pull_flags_fn_t)ndr_pull_lsa_SidPtr)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, struct lsa_EnumAccounts *r) -{ - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_CreateTrustDom(struct ndr_pull *ndr, struct lsa_CreateTrustDom *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_DomainInformation(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInformation *r) -{ - uint32 _ptr_sid; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->name)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sid)); - if (_ptr_sid) { - NDR_ALLOC(ndr, r->sid); - } else { - r->sid = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_BUFFERS, &r->name)); - if (r->sid) { - NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_DomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainList *r) -{ - uint32 _ptr_domains; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_domains)); - if (_ptr_domains) { - NDR_ALLOC(ndr, r->domains); - } else { - r->domains = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->domains) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->domains, r->count, sizeof(r->domains[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->domains, sizeof(r->domains[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_lsa_DomainInformation)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_EnumTrustDom(struct ndr_pull *ndr, struct lsa_EnumTrustDom *r) -{ - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - NDR_CHECK(ndr_pull_lsa_DomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_TranslatedSid(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->sid_type)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->rid)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->sid_index)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_TransSidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray *r) -{ - uint32 _ptr_sids; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sids)); - if (_ptr_sids) { - NDR_ALLOC(ndr, r->sids); - } else { - r->sids = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->sids) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->sids, r->count, sizeof(r->sids[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->sids, sizeof(r->sids[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_lsa_TranslatedSid)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_TrustInformation(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustInformation *r) -{ - uint32 _ptr_sid; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->name)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sid)); - if (_ptr_sid) { - NDR_ALLOC(ndr, r->sid); - } else { - r->sid = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_BUFFERS, &r->name)); - if (r->sid) { - NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_RefDomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_RefDomainList *r) -{ - uint32 _ptr_domains; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_domains)); - if (_ptr_domains) { - NDR_ALLOC(ndr, r->domains); - } else { - r->domains = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->max_count)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->domains) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->domains, r->count, sizeof(r->domains[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->domains, sizeof(r->domains[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_lsa_TrustInformation)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, struct lsa_LookupNames *r) -{ - uint32 _ptr_domains; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_domains)); - if (_ptr_domains) { - NDR_ALLOC(ndr, r->out.domains); - } else { - r->out.domains = NULL; - } - if (r->out.domains) { - NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); - } - NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids)); - NDR_CHECK(ndr_pull_uint32(ndr, r->out.count)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_TranslatedName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->sid_type)); - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->name)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->sid_index)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_BUFFERS, &r->name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_TransNameArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray *r) -{ - uint32 _ptr_names; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_names)); - if (_ptr_names) { - NDR_ALLOC(ndr, r->names); - } else { - r->names = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->names) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->names, r->count, sizeof(r->names[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->names, sizeof(r->names[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_lsa_TranslatedName)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, struct lsa_LookupSids *r) -{ - uint32 _ptr_domains; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_domains)); - if (_ptr_domains) { - NDR_ALLOC(ndr, r->out.domains); - } else { - r->out.domains = NULL; - } - if (r->out.domains) { - NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); - } - NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names)); - NDR_CHECK(ndr_pull_uint32(ndr, r->out.count)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_CREATESECRET(struct ndr_pull *ndr, struct CREATESECRET *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, struct lsa_OpenAccount *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.acct_handle)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_LUID(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUID *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->low)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->high)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_LUIDAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUIDAttribute *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, &r->luid)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->attribute)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_BUFFERS, &r->luid)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_PrivilegeSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivilegeSet *r) -{ - uint32 _conformant_size; - NDR_CHECK(ndr_pull_struct_start(ndr)); - NDR_CHECK(ndr_pull_uint32(ndr, &_conformant_size)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->count > _conformant_size) { - return ndr_pull_error(ndr, NDR_ERR_CONFORMANT_SIZE, "Bad conformant size %u should be %u", _conformant_size, r->count); - } - NDR_ALLOC_N_SIZE(ndr, r->set, _conformant_size, sizeof(r->set[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->set, sizeof(r->set[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_lsa_LUIDAttribute)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, struct lsa_EnumPrivsAccount *r) -{ - uint32 _ptr_privs; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_privs)); - if (_ptr_privs) { - NDR_ALLOC(ndr, r->out.privs); - } else { - r->out.privs = NULL; - } - if (r->out.privs) { - NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_ADDPRIVS(struct ndr_pull *ndr, struct ADDPRIVS *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_REMOVEPRIVS(struct ndr_pull *ndr, struct REMOVEPRIVS *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_GETQUOTAS(struct ndr_pull *ndr, struct GETQUOTAS *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_SETQUOTAS(struct ndr_pull *ndr, struct SETQUOTAS *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_GETSYSTEMACCOUNT(struct ndr_pull *ndr, struct GETSYSTEMACCOUNT *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_SETSYSTEMACCOUNT(struct ndr_pull *ndr, struct SETSYSTEMACCOUNT *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_OPENTRUSTDOM(struct ndr_pull *ndr, struct OPENTRUSTDOM *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_QUERYTRUSTDOM(struct ndr_pull *ndr, struct QUERYTRUSTDOM *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_SETINFOTRUSTDOM(struct ndr_pull *ndr, struct SETINFOTRUSTDOM *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_OPENSECRET(struct ndr_pull *ndr, struct OPENSECRET *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_SETSECRET(struct ndr_pull *ndr, struct SETSECRET *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_QUERYSECRET(struct ndr_pull *ndr, struct QUERYSECRET *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_LOOKUPPRIVVALUE(struct ndr_pull *ndr, struct LOOKUPPRIVVALUE *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_LookupPrivName(struct ndr_pull *ndr, struct lsa_LookupPrivName *r) -{ - uint32 _ptr_name; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); - if (_ptr_name) { - NDR_ALLOC(ndr, r->out.name); - } else { - r->out.name = NULL; - } - if (r->out.name) { - NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_PRIV_GET_DISPNAME(struct ndr_pull *ndr, struct PRIV_GET_DISPNAME *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_DELETEOBJECT(struct ndr_pull *ndr, struct DELETEOBJECT *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_ENUMACCTWITHRIGHT(struct ndr_pull *ndr, struct ENUMACCTWITHRIGHT *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_RightSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_RightSet *r) -{ - uint32 _ptr_names; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_names)); - if (_ptr_names) { - NDR_ALLOC(ndr, r->names); - } else { - r->names = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->names) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->names, r->count, sizeof(r->names[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->names, sizeof(r->names[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_lsa_Name)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_EnumAccountRights(struct ndr_pull *ndr, struct lsa_EnumAccountRights *r) -{ - NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rights)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_ADDACCTRIGHTS(struct ndr_pull *ndr, struct ADDACCTRIGHTS *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_REMOVEACCTRIGHTS(struct ndr_pull *ndr, struct REMOVEACCTRIGHTS *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_QUERYTRUSTDOMINFO(struct ndr_pull *ndr, struct QUERYTRUSTDOMINFO *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_SETTRUSTDOMINFO(struct ndr_pull *ndr, struct SETTRUSTDOMINFO *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_DELETETRUSTDOM(struct ndr_pull *ndr, struct DELETETRUSTDOM *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_STOREPRIVDATA(struct ndr_pull *ndr, struct STOREPRIVDATA *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_RETRPRIVDATA(struct ndr_pull *ndr, struct RETRPRIVDATA *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, struct lsa_OpenPolicy2 *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_UNK_GET_CONNUSER(struct ndr_pull *ndr, struct UNK_GET_CONNUSER *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_QUERYINFO2(struct ndr_pull *ndr, struct QUERYINFO2 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -void ndr_print_lsa_Close(struct ndr_print *ndr, const char *name, int flags, struct lsa_Close *r) -{ - ndr_print_struct(ndr, name, "lsa_Close"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_Close"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_Close"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->out.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->out.handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_Delete(struct ndr_print *ndr, const char *name, int flags, struct lsa_Delete *r) -{ - ndr_print_struct(ndr, name, "lsa_Delete"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_Delete"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_Delete"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_Name(struct ndr_print *ndr, const char *name, struct lsa_Name *r) -{ - ndr_print_struct(ndr, name, "lsa_Name"); - ndr->depth++; - ndr_print_uint16(ndr, "name_len", r->name_len); - ndr_print_uint16(ndr, "name_size", r->name_size); - ndr_print_ptr(ndr, "name", r->name); - ndr->depth++; - if (r->name) { - ndr_print_unistr_noterm(ndr, "name", r->name); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_PrivEntry(struct ndr_print *ndr, const char *name, struct lsa_PrivEntry *r) -{ - ndr_print_struct(ndr, name, "lsa_PrivEntry"); - ndr->depth++; - ndr_print_lsa_Name(ndr, "name", &r->name); - ndr_print_uint32(ndr, "luid_low", r->luid_low); - ndr_print_uint32(ndr, "luid_high", r->luid_high); - ndr->depth--; -} - -void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, struct lsa_PrivArray *r) -{ - ndr_print_struct(ndr, name, "lsa_PrivArray"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "privs", r->privs); - ndr->depth++; - if (r->privs) { - ndr_print_array(ndr, "privs", r->privs, sizeof(r->privs[0]), r->count, (ndr_print_fn_t)ndr_print_lsa_PrivEntry); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_EnumPrivs(struct ndr_print *ndr, const char *name, int flags, struct lsa_EnumPrivs *r) -{ - ndr_print_struct(ndr, name, "lsa_EnumPrivs"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_EnumPrivs"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - ndr->depth--; - ndr_print_uint32(ndr, "max_count", r->in.max_count); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_EnumPrivs"); - ndr->depth++; - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - ndr->depth--; - ndr_print_ptr(ndr, "privs", r->out.privs); - ndr->depth++; - ndr_print_lsa_PrivArray(ndr, "privs", r->out.privs); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_sec_desc_buf(struct ndr_print *ndr, const char *name, struct sec_desc_buf *r) -{ - ndr_print_struct(ndr, name, "sec_desc_buf"); - ndr->depth++; - ndr_print_uint32(ndr, "size", r->size); - ndr_print_ptr(ndr, "sd", r->sd); - ndr->depth++; - if (r->sd) { - ndr_print_security_descriptor(ndr, "sd", r->sd); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_QuerySecObj(struct ndr_print *ndr, const char *name, int flags, struct lsa_QuerySecObj *r) -{ - ndr_print_struct(ndr, name, "lsa_QuerySecObj"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_QuerySecObj"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "sec_info", r->in.sec_info); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_QuerySecObj"); - ndr->depth++; - ndr_print_ptr(ndr, "sd", r->out.sd); - ndr->depth++; - if (r->out.sd) { - ndr_print_sec_desc_buf(ndr, "sd", r->out.sd); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_SetSecObj(struct ndr_print *ndr, const char *name, int flags, struct lsa_SetSecObj *r) -{ - ndr_print_struct(ndr, name, "lsa_SetSecObj"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_SetSecObj"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_SetSecObj"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_ChangePassword(struct ndr_print *ndr, const char *name, int flags, struct lsa_ChangePassword *r) -{ - ndr_print_struct(ndr, name, "lsa_ChangePassword"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_ChangePassword"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_ChangePassword"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, struct lsa_QosInfo *r) -{ - ndr_print_struct(ndr, name, "lsa_QosInfo"); - ndr->depth++; - ndr_print_uint32(ndr, "len", r->len); - ndr_print_uint16(ndr, "impersonation_level", r->impersonation_level); - ndr_print_uint8(ndr, "context_mode", r->context_mode); - ndr_print_uint8(ndr, "effective_only", r->effective_only); - ndr->depth--; -} - -void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *name, struct lsa_ObjectAttribute *r) -{ - ndr_print_struct(ndr, name, "lsa_ObjectAttribute"); - ndr->depth++; - ndr_print_uint32(ndr, "len", r->len); - ndr_print_ptr(ndr, "root_dir", r->root_dir); - ndr->depth++; - if (r->root_dir) { - ndr_print_uint8(ndr, "root_dir", *r->root_dir); - } - ndr->depth--; - ndr_print_ptr(ndr, "object_name", r->object_name); - ndr->depth++; - if (r->object_name) { - ndr_print_unistr(ndr, "object_name", r->object_name); - } - ndr->depth--; - ndr_print_uint32(ndr, "attributes", r->attributes); - ndr_print_ptr(ndr, "sec_desc", r->sec_desc); - ndr->depth++; - if (r->sec_desc) { - ndr_print_security_descriptor(ndr, "sec_desc", r->sec_desc); - } - ndr->depth--; - ndr_print_ptr(ndr, "sec_qos", r->sec_qos); - ndr->depth++; - if (r->sec_qos) { - ndr_print_lsa_QosInfo(ndr, "sec_qos", r->sec_qos); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_OpenPolicy(struct ndr_print *ndr, const char *name, int flags, struct lsa_OpenPolicy *r) -{ - ndr_print_struct(ndr, name, "lsa_OpenPolicy"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_OpenPolicy"); - ndr->depth++; - ndr_print_ptr(ndr, "system_name", r->in.system_name); - ndr->depth++; - if (r->in.system_name) { - ndr_print_uint16(ndr, "system_name", *r->in.system_name); - } - ndr->depth--; - ndr_print_ptr(ndr, "attr", r->in.attr); - ndr->depth++; - ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr); - ndr->depth--; - ndr_print_uint32(ndr, "desired_access", r->in.desired_access); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_OpenPolicy"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->out.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->out.handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name, struct lsa_AuditLogInfo *r) -{ - ndr_print_struct(ndr, name, "lsa_AuditLogInfo"); - ndr->depth++; - ndr_print_uint32(ndr, "percent_full", r->percent_full); - ndr_print_uint32(ndr, "log_size", r->log_size); - ndr_print_NTTIME(ndr, "retention_time", r->retention_time); - ndr_print_uint8(ndr, "shutdown_in_progress", r->shutdown_in_progress); - ndr_print_NTTIME(ndr, "time_to_shutdown", r->time_to_shutdown); - ndr_print_uint32(ndr, "next_audit_record", r->next_audit_record); - ndr_print_uint32(ndr, "unknown", r->unknown); - ndr->depth--; -} - -void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, struct lsa_AuditEventsInfo *r) -{ - ndr_print_struct(ndr, name, "lsa_AuditEventsInfo"); - ndr->depth++; - ndr_print_uint32(ndr, "auditing_mode", r->auditing_mode); - ndr_print_ptr(ndr, "settings", r->settings); - ndr->depth++; - if (r->settings) { - ndr_print_array_uint32(ndr, "settings", r->settings, r->count); - } - ndr->depth--; - ndr_print_uint32(ndr, "count", r->count); - ndr->depth--; -} - -void ndr_print_lsa_DomainInfo(struct ndr_print *ndr, const char *name, struct lsa_DomainInfo *r) -{ - ndr_print_struct(ndr, name, "lsa_DomainInfo"); - ndr->depth++; - ndr_print_lsa_Name(ndr, "name", &r->name); - ndr_print_ptr(ndr, "sid", r->sid); - ndr->depth++; - if (r->sid) { - ndr_print_dom_sid2(ndr, "sid", r->sid); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *name, struct lsa_PDAccountInfo *r) -{ - ndr_print_struct(ndr, name, "lsa_PDAccountInfo"); - ndr->depth++; - ndr_print_lsa_Name(ndr, "name", &r->name); - ndr->depth--; -} - -void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, struct lsa_ServerRole *r) -{ - ndr_print_struct(ndr, name, "lsa_ServerRole"); - ndr->depth++; - ndr_print_uint16(ndr, "unknown", r->unknown); - ndr_print_uint16(ndr, "role", r->role); - ndr->depth--; -} - -void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print *ndr, const char *name, struct lsa_ReplicaSourceInfo *r) -{ - ndr_print_struct(ndr, name, "lsa_ReplicaSourceInfo"); - ndr->depth++; - ndr_print_lsa_Name(ndr, "source", &r->source); - ndr_print_lsa_Name(ndr, "account", &r->account); - ndr->depth--; -} - -void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print *ndr, const char *name, struct lsa_DefaultQuotaInfo *r) -{ - ndr_print_struct(ndr, name, "lsa_DefaultQuotaInfo"); - ndr->depth++; - ndr_print_uint32(ndr, "paged_pool", r->paged_pool); - ndr_print_uint32(ndr, "non_paged_pool", r->non_paged_pool); - ndr_print_uint32(ndr, "min_wss", r->min_wss); - ndr_print_uint32(ndr, "max_wss", r->max_wss); - ndr_print_uint32(ndr, "pagefile", r->pagefile); - ndr_print_HYPER_T(ndr, "unknown", r->unknown); - ndr->depth--; -} - -void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *name, struct lsa_ModificationInfo *r) -{ - ndr_print_struct(ndr, name, "lsa_ModificationInfo"); - ndr->depth++; - ndr_print_HYPER_T(ndr, "modified_id", r->modified_id); - ndr_print_NTTIME(ndr, "db_create_time", r->db_create_time); - ndr->depth--; -} - -void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *name, struct lsa_AuditFullSetInfo *r) -{ - ndr_print_struct(ndr, name, "lsa_AuditFullSetInfo"); - ndr->depth++; - ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full); - ndr->depth--; -} - -void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char *name, struct lsa_AuditFullQueryInfo *r) -{ - ndr_print_struct(ndr, name, "lsa_AuditFullQueryInfo"); - ndr->depth++; - ndr_print_uint16(ndr, "unknown", r->unknown); - ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full); - ndr_print_uint8(ndr, "log_is_full", r->log_is_full); - ndr->depth--; -} - -void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *name, struct lsa_DnsDomainInfo *r) -{ - ndr_print_struct(ndr, name, "lsa_DnsDomainInfo"); - ndr->depth++; - ndr_print_lsa_Name(ndr, "name", &r->name); - ndr_print_lsa_Name(ndr, "dns_domain", &r->dns_domain); - ndr_print_lsa_Name(ndr, "dns_forest", &r->dns_forest); - ndr_print_GUID(ndr, "domain_guid", &r->domain_guid); - ndr_print_ptr(ndr, "sid", r->sid); - ndr->depth++; - if (r->sid) { - ndr_print_dom_sid2(ndr, "sid", r->sid); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char *name, uint16 level, union lsa_PolicyInformation *r) -{ - ndr_print_union(ndr, name, level, "lsa_PolicyInformation"); - switch (level) { - case 1: - ndr_print_lsa_AuditLogInfo(ndr, "audit_log", &r->audit_log); - break; - - case 2: - ndr_print_lsa_AuditEventsInfo(ndr, "audit_events", &r->audit_events); - break; - - case 3: - ndr_print_lsa_DomainInfo(ndr, "domain", &r->domain); - break; - - case 4: - ndr_print_lsa_PDAccountInfo(ndr, "pd", &r->pd); - break; - - case 5: - ndr_print_lsa_DomainInfo(ndr, "account_domain", &r->account_domain); - break; - - case 6: - ndr_print_lsa_ServerRole(ndr, "role", &r->role); - break; - - case 7: - ndr_print_lsa_ReplicaSourceInfo(ndr, "replica", &r->replica); - break; - - case 8: - ndr_print_lsa_DefaultQuotaInfo(ndr, "quota", &r->quota); - break; - - case 9: - ndr_print_lsa_ModificationInfo(ndr, "db", &r->db); - break; - - case 10: - ndr_print_lsa_AuditFullSetInfo(ndr, "auditfullset", &r->auditfullset); - break; - - case 11: - ndr_print_lsa_AuditFullQueryInfo(ndr, "auditfullquery", &r->auditfullquery); - break; - - case 12: - ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns); - break; - - default: - ndr_print_bad_level(ndr, name, level); - } -} - -void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *name, int flags, struct lsa_QueryInfoPolicy *r) -{ - ndr_print_struct(ndr, name, "lsa_QueryInfoPolicy"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_QueryInfoPolicy"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_QueryInfoPolicy"); - ndr->depth++; - ndr_print_ptr(ndr, "info", r->out.info); - ndr->depth++; - if (r->out.info) { - ndr_print_lsa_PolicyInformation(ndr, "info", r->in.level, r->out.info); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_SetInfoPolicy(struct ndr_print *ndr, const char *name, int flags, struct lsa_SetInfoPolicy *r) -{ - ndr_print_struct(ndr, name, "lsa_SetInfoPolicy"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_SetInfoPolicy"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_SetInfoPolicy"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_ClearAuditLog(struct ndr_print *ndr, const char *name, int flags, struct lsa_ClearAuditLog *r) -{ - ndr_print_struct(ndr, name, "lsa_ClearAuditLog"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_ClearAuditLog"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_ClearAuditLog"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *name, int flags, struct lsa_CreateAccount *r) -{ - ndr_print_struct(ndr, name, "lsa_CreateAccount"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_CreateAccount"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_CreateAccount"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_SidPtr(struct ndr_print *ndr, const char *name, struct lsa_SidPtr *r) -{ - ndr_print_struct(ndr, name, "lsa_SidPtr"); - ndr->depth++; - ndr_print_ptr(ndr, "sid", r->sid); - ndr->depth++; - if (r->sid) { - ndr_print_dom_sid2(ndr, "sid", r->sid); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, struct lsa_SidArray *r) -{ - ndr_print_struct(ndr, name, "lsa_SidArray"); - ndr->depth++; - ndr_print_uint32(ndr, "num_sids", r->num_sids); - ndr_print_ptr(ndr, "sids", r->sids); - ndr->depth++; - if (r->sids) { - ndr_print_array(ndr, "sids", r->sids, sizeof(r->sids[0]), r->num_sids, (ndr_print_fn_t)ndr_print_lsa_SidPtr); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name, int flags, struct lsa_EnumAccounts *r) -{ - ndr_print_struct(ndr, name, "lsa_EnumAccounts"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_EnumAccounts"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - ndr->depth--; - ndr_print_uint32(ndr, "num_entries", r->in.num_entries); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_EnumAccounts"); - ndr->depth++; - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - ndr->depth--; - ndr_print_ptr(ndr, "sids", r->out.sids); - ndr->depth++; - ndr_print_lsa_SidArray(ndr, "sids", r->out.sids); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_CreateTrustDom(struct ndr_print *ndr, const char *name, int flags, struct lsa_CreateTrustDom *r) -{ - ndr_print_struct(ndr, name, "lsa_CreateTrustDom"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_CreateTrustDom"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_CreateTrustDom"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_DomainInformation(struct ndr_print *ndr, const char *name, struct lsa_DomainInformation *r) -{ - ndr_print_struct(ndr, name, "lsa_DomainInformation"); - ndr->depth++; - ndr_print_lsa_Name(ndr, "name", &r->name); - ndr_print_ptr(ndr, "sid", r->sid); - ndr->depth++; - if (r->sid) { - ndr_print_dom_sid2(ndr, "sid", r->sid); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, struct lsa_DomainList *r) -{ - ndr_print_struct(ndr, name, "lsa_DomainList"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "domains", r->domains); - ndr->depth++; - if (r->domains) { - ndr_print_array(ndr, "domains", r->domains, sizeof(r->domains[0]), r->count, (ndr_print_fn_t)ndr_print_lsa_DomainInformation); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_EnumTrustDom(struct ndr_print *ndr, const char *name, int flags, struct lsa_EnumTrustDom *r) -{ - ndr_print_struct(ndr, name, "lsa_EnumTrustDom"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_EnumTrustDom"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - ndr->depth--; - ndr_print_uint32(ndr, "num_entries", r->in.num_entries); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_EnumTrustDom"); - ndr->depth++; - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - ndr->depth--; - ndr_print_ptr(ndr, "domains", r->out.domains); - ndr->depth++; - ndr_print_lsa_DomainList(ndr, "domains", r->out.domains); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_TranslatedSid(struct ndr_print *ndr, const char *name, struct lsa_TranslatedSid *r) -{ - ndr_print_struct(ndr, name, "lsa_TranslatedSid"); - ndr->depth++; - ndr_print_uint16(ndr, "sid_type", r->sid_type); - ndr_print_uint32(ndr, "rid", r->rid); - ndr_print_uint32(ndr, "sid_index", r->sid_index); - ndr->depth--; -} - -void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *name, struct lsa_TransSidArray *r) -{ - ndr_print_struct(ndr, name, "lsa_TransSidArray"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "sids", r->sids); - ndr->depth++; - if (r->sids) { - ndr_print_array(ndr, "sids", r->sids, sizeof(r->sids[0]), r->count, (ndr_print_fn_t)ndr_print_lsa_TranslatedSid); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_TrustInformation(struct ndr_print *ndr, const char *name, struct lsa_TrustInformation *r) -{ - ndr_print_struct(ndr, name, "lsa_TrustInformation"); - ndr->depth++; - ndr_print_lsa_Name(ndr, "name", &r->name); - ndr_print_ptr(ndr, "sid", r->sid); - ndr->depth++; - if (r->sid) { - ndr_print_dom_sid2(ndr, "sid", r->sid); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *name, struct lsa_RefDomainList *r) -{ - ndr_print_struct(ndr, name, "lsa_RefDomainList"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "domains", r->domains); - ndr->depth++; - if (r->domains) { - ndr_print_array(ndr, "domains", r->domains, sizeof(r->domains[0]), r->count, (ndr_print_fn_t)ndr_print_lsa_TrustInformation); - } - ndr->depth--; - ndr_print_uint32(ndr, "max_count", r->max_count); - ndr->depth--; -} - -void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, int flags, struct lsa_LookupNames *r) -{ - ndr_print_struct(ndr, name, "lsa_LookupNames"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_LookupNames"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "num_names", r->in.num_names); - ndr_print_ptr(ndr, "names", r->in.names); - ndr->depth++; - ndr_print_array(ndr, "names", r->in.names, sizeof(r->in.names[0]), r->in.num_names, (ndr_print_fn_t)ndr_print_lsa_Name); - ndr->depth--; - ndr_print_ptr(ndr, "sids", r->in.sids); - ndr->depth++; - ndr_print_lsa_TransSidArray(ndr, "sids", r->in.sids); - ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); - ndr_print_ptr(ndr, "count", r->in.count); - ndr->depth++; - ndr_print_uint32(ndr, "count", *r->in.count); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_LookupNames"); - ndr->depth++; - ndr_print_ptr(ndr, "domains", r->out.domains); - ndr->depth++; - if (r->out.domains) { - ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains); - } - ndr->depth--; - ndr_print_ptr(ndr, "sids", r->out.sids); - ndr->depth++; - ndr_print_lsa_TransSidArray(ndr, "sids", r->out.sids); - ndr->depth--; - ndr_print_ptr(ndr, "count", r->out.count); - ndr->depth++; - ndr_print_uint32(ndr, "count", *r->out.count); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_TranslatedName(struct ndr_print *ndr, const char *name, struct lsa_TranslatedName *r) -{ - ndr_print_struct(ndr, name, "lsa_TranslatedName"); - ndr->depth++; - ndr_print_uint16(ndr, "sid_type", r->sid_type); - ndr_print_lsa_Name(ndr, "name", &r->name); - ndr_print_uint32(ndr, "sid_index", r->sid_index); - ndr->depth--; -} - -void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *name, struct lsa_TransNameArray *r) -{ - ndr_print_struct(ndr, name, "lsa_TransNameArray"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "names", r->names); - ndr->depth++; - if (r->names) { - ndr_print_array(ndr, "names", r->names, sizeof(r->names[0]), r->count, (ndr_print_fn_t)ndr_print_lsa_TranslatedName); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name, int flags, struct lsa_LookupSids *r) -{ - ndr_print_struct(ndr, name, "lsa_LookupSids"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_LookupSids"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "sids", r->in.sids); - ndr->depth++; - ndr_print_lsa_SidArray(ndr, "sids", r->in.sids); - ndr->depth--; - ndr_print_ptr(ndr, "names", r->in.names); - ndr->depth++; - ndr_print_lsa_TransNameArray(ndr, "names", r->in.names); - ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); - ndr_print_ptr(ndr, "count", r->in.count); - ndr->depth++; - ndr_print_uint32(ndr, "count", *r->in.count); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_LookupSids"); - ndr->depth++; - ndr_print_ptr(ndr, "domains", r->out.domains); - ndr->depth++; - if (r->out.domains) { - ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains); - } - ndr->depth--; - ndr_print_ptr(ndr, "names", r->out.names); - ndr->depth++; - ndr_print_lsa_TransNameArray(ndr, "names", r->out.names); - ndr->depth--; - ndr_print_ptr(ndr, "count", r->out.count); - ndr->depth++; - ndr_print_uint32(ndr, "count", *r->out.count); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_CREATESECRET(struct ndr_print *ndr, const char *name, int flags, struct CREATESECRET *r) -{ - ndr_print_struct(ndr, name, "CREATESECRET"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "CREATESECRET"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "CREATESECRET"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name, int flags, struct lsa_OpenAccount *r) -{ - ndr_print_struct(ndr, name, "lsa_OpenAccount"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_OpenAccount"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "sid", r->in.sid); - ndr->depth++; - ndr_print_dom_sid2(ndr, "sid", r->in.sid); - ndr->depth--; - ndr_print_uint32(ndr, "desired_access", r->in.desired_access); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_OpenAccount"); - ndr->depth++; - ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_LUID(struct ndr_print *ndr, const char *name, struct lsa_LUID *r) -{ - ndr_print_struct(ndr, name, "lsa_LUID"); - ndr->depth++; - ndr_print_uint32(ndr, "low", r->low); - ndr_print_uint32(ndr, "high", r->high); - ndr->depth--; -} - -void ndr_print_lsa_LUIDAttribute(struct ndr_print *ndr, const char *name, struct lsa_LUIDAttribute *r) -{ - ndr_print_struct(ndr, name, "lsa_LUIDAttribute"); - ndr->depth++; - ndr_print_lsa_LUID(ndr, "luid", &r->luid); - ndr_print_uint32(ndr, "attribute", r->attribute); - ndr->depth--; -} - -void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name, struct lsa_PrivilegeSet *r) -{ - ndr_print_struct(ndr, name, "lsa_PrivilegeSet"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_uint32(ndr, "unknown", r->unknown); - ndr_print_ptr(ndr, "set", r->set); - ndr->depth++; - ndr_print_array(ndr, "set", r->set, sizeof(r->set[0]), r->count, (ndr_print_fn_t)ndr_print_lsa_LUIDAttribute); - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *name, int flags, struct lsa_EnumPrivsAccount *r) -{ - ndr_print_struct(ndr, name, "lsa_EnumPrivsAccount"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_EnumPrivsAccount"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_EnumPrivsAccount"); - ndr->depth++; - ndr_print_ptr(ndr, "privs", r->out.privs); - ndr->depth++; - if (r->out.privs) { - ndr_print_lsa_PrivilegeSet(ndr, "privs", r->out.privs); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_ADDPRIVS(struct ndr_print *ndr, const char *name, int flags, struct ADDPRIVS *r) -{ - ndr_print_struct(ndr, name, "ADDPRIVS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "ADDPRIVS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "ADDPRIVS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_REMOVEPRIVS(struct ndr_print *ndr, const char *name, int flags, struct REMOVEPRIVS *r) -{ - ndr_print_struct(ndr, name, "REMOVEPRIVS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "REMOVEPRIVS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "REMOVEPRIVS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_GETQUOTAS(struct ndr_print *ndr, const char *name, int flags, struct GETQUOTAS *r) -{ - ndr_print_struct(ndr, name, "GETQUOTAS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "GETQUOTAS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "GETQUOTAS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_SETQUOTAS(struct ndr_print *ndr, const char *name, int flags, struct SETQUOTAS *r) -{ - ndr_print_struct(ndr, name, "SETQUOTAS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "SETQUOTAS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "SETQUOTAS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_GETSYSTEMACCOUNT(struct ndr_print *ndr, const char *name, int flags, struct GETSYSTEMACCOUNT *r) -{ - ndr_print_struct(ndr, name, "GETSYSTEMACCOUNT"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "GETSYSTEMACCOUNT"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "GETSYSTEMACCOUNT"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_SETSYSTEMACCOUNT(struct ndr_print *ndr, const char *name, int flags, struct SETSYSTEMACCOUNT *r) -{ - ndr_print_struct(ndr, name, "SETSYSTEMACCOUNT"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "SETSYSTEMACCOUNT"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "SETSYSTEMACCOUNT"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_OPENTRUSTDOM(struct ndr_print *ndr, const char *name, int flags, struct OPENTRUSTDOM *r) -{ - ndr_print_struct(ndr, name, "OPENTRUSTDOM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "OPENTRUSTDOM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "OPENTRUSTDOM"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_QUERYTRUSTDOM(struct ndr_print *ndr, const char *name, int flags, struct QUERYTRUSTDOM *r) -{ - ndr_print_struct(ndr, name, "QUERYTRUSTDOM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "QUERYTRUSTDOM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "QUERYTRUSTDOM"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_SETINFOTRUSTDOM(struct ndr_print *ndr, const char *name, int flags, struct SETINFOTRUSTDOM *r) -{ - ndr_print_struct(ndr, name, "SETINFOTRUSTDOM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "SETINFOTRUSTDOM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "SETINFOTRUSTDOM"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_OPENSECRET(struct ndr_print *ndr, const char *name, int flags, struct OPENSECRET *r) -{ - ndr_print_struct(ndr, name, "OPENSECRET"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "OPENSECRET"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "OPENSECRET"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_SETSECRET(struct ndr_print *ndr, const char *name, int flags, struct SETSECRET *r) -{ - ndr_print_struct(ndr, name, "SETSECRET"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "SETSECRET"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "SETSECRET"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_QUERYSECRET(struct ndr_print *ndr, const char *name, int flags, struct QUERYSECRET *r) -{ - ndr_print_struct(ndr, name, "QUERYSECRET"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "QUERYSECRET"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "QUERYSECRET"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_LOOKUPPRIVVALUE(struct ndr_print *ndr, const char *name, int flags, struct LOOKUPPRIVVALUE *r) -{ - ndr_print_struct(ndr, name, "LOOKUPPRIVVALUE"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "LOOKUPPRIVVALUE"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "LOOKUPPRIVVALUE"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_LookupPrivName(struct ndr_print *ndr, const char *name, int flags, struct lsa_LookupPrivName *r) -{ - ndr_print_struct(ndr, name, "lsa_LookupPrivName"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_LookupPrivName"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "luid", r->in.luid); - ndr->depth++; - ndr_print_lsa_LUID(ndr, "luid", r->in.luid); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_LookupPrivName"); - ndr->depth++; - ndr_print_ptr(ndr, "name", r->out.name); - ndr->depth++; - if (r->out.name) { - ndr_print_lsa_Name(ndr, "name", r->out.name); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_PRIV_GET_DISPNAME(struct ndr_print *ndr, const char *name, int flags, struct PRIV_GET_DISPNAME *r) -{ - ndr_print_struct(ndr, name, "PRIV_GET_DISPNAME"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "PRIV_GET_DISPNAME"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "PRIV_GET_DISPNAME"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_DELETEOBJECT(struct ndr_print *ndr, const char *name, int flags, struct DELETEOBJECT *r) -{ - ndr_print_struct(ndr, name, "DELETEOBJECT"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "DELETEOBJECT"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "DELETEOBJECT"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_ENUMACCTWITHRIGHT(struct ndr_print *ndr, const char *name, int flags, struct ENUMACCTWITHRIGHT *r) -{ - ndr_print_struct(ndr, name, "ENUMACCTWITHRIGHT"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "ENUMACCTWITHRIGHT"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "ENUMACCTWITHRIGHT"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_RightAttribute(struct ndr_print *ndr, const char *name, struct lsa_RightAttribute *r) -{ - ndr_print_struct(ndr, name, "lsa_RightAttribute"); - ndr->depth++; - ndr_print_ptr(ndr, "name", r->name); - ndr->depth++; - if (r->name) { - ndr_print_unistr(ndr, "name", r->name); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, struct lsa_RightSet *r) -{ - ndr_print_struct(ndr, name, "lsa_RightSet"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "names", r->names); - ndr->depth++; - if (r->names) { - ndr_print_array(ndr, "names", r->names, sizeof(r->names[0]), r->count, (ndr_print_fn_t)ndr_print_lsa_Name); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_lsa_EnumAccountRights(struct ndr_print *ndr, const char *name, int flags, struct lsa_EnumAccountRights *r) -{ - ndr_print_struct(ndr, name, "lsa_EnumAccountRights"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_EnumAccountRights"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "sid", r->in.sid); - ndr->depth++; - ndr_print_dom_sid2(ndr, "sid", r->in.sid); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_EnumAccountRights"); - ndr->depth++; - ndr_print_ptr(ndr, "rights", r->out.rights); - ndr->depth++; - ndr_print_lsa_RightSet(ndr, "rights", r->out.rights); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_ADDACCTRIGHTS(struct ndr_print *ndr, const char *name, int flags, struct ADDACCTRIGHTS *r) -{ - ndr_print_struct(ndr, name, "ADDACCTRIGHTS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "ADDACCTRIGHTS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "ADDACCTRIGHTS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_REMOVEACCTRIGHTS(struct ndr_print *ndr, const char *name, int flags, struct REMOVEACCTRIGHTS *r) -{ - ndr_print_struct(ndr, name, "REMOVEACCTRIGHTS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "REMOVEACCTRIGHTS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "REMOVEACCTRIGHTS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_QUERYTRUSTDOMINFO(struct ndr_print *ndr, const char *name, int flags, struct QUERYTRUSTDOMINFO *r) -{ - ndr_print_struct(ndr, name, "QUERYTRUSTDOMINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "QUERYTRUSTDOMINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "QUERYTRUSTDOMINFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_SETTRUSTDOMINFO(struct ndr_print *ndr, const char *name, int flags, struct SETTRUSTDOMINFO *r) -{ - ndr_print_struct(ndr, name, "SETTRUSTDOMINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "SETTRUSTDOMINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "SETTRUSTDOMINFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_DELETETRUSTDOM(struct ndr_print *ndr, const char *name, int flags, struct DELETETRUSTDOM *r) -{ - ndr_print_struct(ndr, name, "DELETETRUSTDOM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "DELETETRUSTDOM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "DELETETRUSTDOM"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_STOREPRIVDATA(struct ndr_print *ndr, const char *name, int flags, struct STOREPRIVDATA *r) -{ - ndr_print_struct(ndr, name, "STOREPRIVDATA"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "STOREPRIVDATA"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "STOREPRIVDATA"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_RETRPRIVDATA(struct ndr_print *ndr, const char *name, int flags, struct RETRPRIVDATA *r) -{ - ndr_print_struct(ndr, name, "RETRPRIVDATA"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "RETRPRIVDATA"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "RETRPRIVDATA"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_lsa_OpenPolicy2(struct ndr_print *ndr, const char *name, int flags, struct lsa_OpenPolicy2 *r) -{ - ndr_print_struct(ndr, name, "lsa_OpenPolicy2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_OpenPolicy2"); - ndr->depth++; - ndr_print_ptr(ndr, "system_name", r->in.system_name); - ndr->depth++; - if (r->in.system_name) { - ndr_print_unistr(ndr, "system_name", r->in.system_name); - } - ndr->depth--; - ndr_print_ptr(ndr, "attr", r->in.attr); - ndr->depth++; - ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr); - ndr->depth--; - ndr_print_uint32(ndr, "desired_access", r->in.desired_access); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_OpenPolicy2"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->out.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->out.handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_UNK_GET_CONNUSER(struct ndr_print *ndr, const char *name, int flags, struct UNK_GET_CONNUSER *r) -{ - ndr_print_struct(ndr, name, "UNK_GET_CONNUSER"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "UNK_GET_CONNUSER"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "UNK_GET_CONNUSER"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_QUERYINFO2(struct ndr_print *ndr, const char *name, int flags, struct QUERYINFO2 *r) -{ - ndr_print_struct(ndr, name, "QUERYINFO2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "QUERYINFO2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "QUERYINFO2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - diff --git a/source4/librpc/ndr/ndr_lsa.h b/source4/librpc/ndr/ndr_lsa.h deleted file mode 100644 index 72d1cdb9ad..0000000000 --- a/source4/librpc/ndr/ndr_lsa.h +++ /dev/null @@ -1,783 +0,0 @@ -/* header auto-generated by pidl */ - -#define DCERPC_LSARPC_UUID "12345778-1234-abcd-ef00-0123456789ab" -#define DCERPC_LSARPC_VERSION 0.0 -#define DCERPC_LSARPC_NAME "lsarpc" - -#define DCERPC_LSA_CLOSE 0 -#define DCERPC_LSA_DELETE 1 -#define DCERPC_LSA_ENUMPRIVS 2 -#define DCERPC_LSA_QUERYSECOBJ 3 -#define DCERPC_LSA_SETSECOBJ 4 -#define DCERPC_LSA_CHANGEPASSWORD 5 -#define DCERPC_LSA_OPENPOLICY 6 -#define DCERPC_LSA_QUERYINFOPOLICY 7 -#define DCERPC_LSA_SETINFOPOLICY 8 -#define DCERPC_LSA_CLEARAUDITLOG 9 -#define DCERPC_LSA_CREATEACCOUNT 10 -#define DCERPC_LSA_ENUMACCOUNTS 11 -#define DCERPC_LSA_CREATETRUSTDOM 12 -#define DCERPC_LSA_ENUMTRUSTDOM 13 -#define DCERPC_LSA_LOOKUPNAMES 14 -#define DCERPC_LSA_LOOKUPSIDS 15 -#define DCERPC_CREATESECRET 16 -#define DCERPC_LSA_OPENACCOUNT 17 -#define DCERPC_LSA_ENUMPRIVSACCOUNT 18 -#define DCERPC_ADDPRIVS 19 -#define DCERPC_REMOVEPRIVS 20 -#define DCERPC_GETQUOTAS 21 -#define DCERPC_SETQUOTAS 22 -#define DCERPC_GETSYSTEMACCOUNT 23 -#define DCERPC_SETSYSTEMACCOUNT 24 -#define DCERPC_OPENTRUSTDOM 25 -#define DCERPC_QUERYTRUSTDOM 26 -#define DCERPC_SETINFOTRUSTDOM 27 -#define DCERPC_OPENSECRET 28 -#define DCERPC_SETSECRET 29 -#define DCERPC_QUERYSECRET 30 -#define DCERPC_LOOKUPPRIVVALUE 31 -#define DCERPC_LSA_LOOKUPPRIVNAME 32 -#define DCERPC_PRIV_GET_DISPNAME 33 -#define DCERPC_DELETEOBJECT 34 -#define DCERPC_ENUMACCTWITHRIGHT 35 -#define DCERPC_LSA_ENUMACCOUNTRIGHTS 36 -#define DCERPC_ADDACCTRIGHTS 37 -#define DCERPC_REMOVEACCTRIGHTS 38 -#define DCERPC_QUERYTRUSTDOMINFO 39 -#define DCERPC_SETTRUSTDOMINFO 40 -#define DCERPC_DELETETRUSTDOM 41 -#define DCERPC_STOREPRIVDATA 42 -#define DCERPC_RETRPRIVDATA 43 -#define DCERPC_LSA_OPENPOLICY2 44 -#define DCERPC_UNK_GET_CONNUSER 45 -#define DCERPC_QUERYINFO2 46 - - -struct lsa_Close { - struct { - struct policy_handle *handle; - } in; - - struct { - struct policy_handle *handle; - NTSTATUS result; - } out; - -}; - -struct lsa_Delete { - struct { - struct policy_handle *handle; - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct lsa_Name { - uint16 name_len; - uint16 name_size; - const char *name; -}; - -struct lsa_PrivEntry { - struct lsa_Name name; - uint32 luid_low; - uint32 luid_high; -}; - -struct lsa_PrivArray { - uint32 count; - struct lsa_PrivEntry *privs; -}; - -struct lsa_EnumPrivs { - struct { - struct policy_handle *handle; - uint32 *resume_handle; - uint32 max_count; - } in; - - struct { - uint32 *resume_handle; - struct lsa_PrivArray *privs; - NTSTATUS result; - } out; - -}; - -struct sec_desc_buf { - uint32 size; - struct security_descriptor *sd; -}; - -struct lsa_QuerySecObj { - struct { - struct policy_handle *handle; - uint32 sec_info; - } in; - - struct { - struct sec_desc_buf *sd; - NTSTATUS result; - } out; - -}; - -struct lsa_SetSecObj { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct lsa_ChangePassword { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct lsa_QosInfo { - uint32 len; - uint16 impersonation_level; - uint8 context_mode; - uint8 effective_only; -}; - -struct lsa_ObjectAttribute { - uint32 len; - uint8 *root_dir; - const char *object_name; - uint32 attributes; - struct security_descriptor *sec_desc; - struct lsa_QosInfo *sec_qos; -}; - -struct lsa_OpenPolicy { - struct { - uint16 *system_name; - struct lsa_ObjectAttribute *attr; - uint32 desired_access; - } in; - - struct { - struct policy_handle *handle; - NTSTATUS result; - } out; - -}; - -struct lsa_AuditLogInfo { - uint32 percent_full; - uint32 log_size; - NTTIME retention_time; - uint8 shutdown_in_progress; - NTTIME time_to_shutdown; - uint32 next_audit_record; - uint32 unknown; -}; - -struct lsa_AuditEventsInfo { - uint32 auditing_mode; - uint32 *settings; - uint32 count; -}; - -struct lsa_DomainInfo { - struct lsa_Name name; - struct dom_sid2 *sid; -}; - -struct lsa_PDAccountInfo { - struct lsa_Name name; -}; - -struct lsa_ServerRole { - uint16 unknown; - uint16 role; -}; - -struct lsa_ReplicaSourceInfo { - struct lsa_Name source; - struct lsa_Name account; -}; - -struct lsa_DefaultQuotaInfo { - uint32 paged_pool; - uint32 non_paged_pool; - uint32 min_wss; - uint32 max_wss; - uint32 pagefile; - HYPER_T unknown; -}; - -struct lsa_ModificationInfo { - HYPER_T modified_id; - NTTIME db_create_time; -}; - -struct lsa_AuditFullSetInfo { - uint8 shutdown_on_full; -}; - -struct lsa_AuditFullQueryInfo { - uint16 unknown; - uint8 shutdown_on_full; - uint8 log_is_full; -}; - -struct lsa_DnsDomainInfo { - struct lsa_Name name; - struct lsa_Name dns_domain; - struct lsa_Name dns_forest; - struct GUID domain_guid; - struct dom_sid2 *sid; -}; - -union lsa_PolicyInformation { -/* [case(1)] */ struct lsa_AuditLogInfo audit_log; -/* [case(2)] */ struct lsa_AuditEventsInfo audit_events; -/* [case(3)] */ struct lsa_DomainInfo domain; -/* [case(4)] */ struct lsa_PDAccountInfo pd; -/* [case(5)] */ struct lsa_DomainInfo account_domain; -/* [case(6)] */ struct lsa_ServerRole role; -/* [case(7)] */ struct lsa_ReplicaSourceInfo replica; -/* [case(8)] */ struct lsa_DefaultQuotaInfo quota; -/* [case(9)] */ struct lsa_ModificationInfo db; -/* [case(10)] */ struct lsa_AuditFullSetInfo auditfullset; -/* [case(11)] */ struct lsa_AuditFullQueryInfo auditfullquery; -/* [case(12)] */ struct lsa_DnsDomainInfo dns; -}; - -struct lsa_QueryInfoPolicy { - struct { - struct policy_handle *handle; - uint16 level; - } in; - - struct { - union lsa_PolicyInformation *info; - NTSTATUS result; - } out; - -}; - -struct lsa_SetInfoPolicy { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct lsa_ClearAuditLog { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct lsa_CreateAccount { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct lsa_SidPtr { - struct dom_sid2 *sid; -}; - -struct lsa_SidArray { - uint32 num_sids; - struct lsa_SidPtr *sids; -}; - -struct lsa_EnumAccounts { - struct { - struct policy_handle *handle; - uint32 *resume_handle; - uint32 num_entries; - } in; - - struct { - uint32 *resume_handle; - struct lsa_SidArray *sids; - NTSTATUS result; - } out; - -}; - -struct lsa_CreateTrustDom { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct lsa_DomainInformation { - struct lsa_Name name; - struct dom_sid2 *sid; -}; - -struct lsa_DomainList { - uint32 count; - struct lsa_DomainInformation *domains; -}; - -struct lsa_EnumTrustDom { - struct { - struct policy_handle *handle; - uint32 *resume_handle; - uint32 num_entries; - } in; - - struct { - uint32 *resume_handle; - struct lsa_DomainList *domains; - NTSTATUS result; - } out; - -}; - -struct lsa_TranslatedSid { - uint16 sid_type; - uint32 rid; - uint32 sid_index; -}; - -struct lsa_TransSidArray { - uint32 count; - struct lsa_TranslatedSid *sids; -}; - -struct lsa_TrustInformation { - struct lsa_Name name; - struct dom_sid2 *sid; -}; - -struct lsa_RefDomainList { - uint32 count; - struct lsa_TrustInformation *domains; - uint32 max_count; -}; - -struct lsa_LookupNames { - struct { - struct policy_handle *handle; - uint32 num_names; - struct lsa_Name *names; - struct lsa_TransSidArray *sids; - uint16 level; - uint32 *count; - } in; - - struct { - struct lsa_RefDomainList *domains; - struct lsa_TransSidArray *sids; - uint32 *count; - NTSTATUS result; - } out; - -}; - -struct lsa_TranslatedName { - uint16 sid_type; - struct lsa_Name name; - uint32 sid_index; -}; - -struct lsa_TransNameArray { - uint32 count; - struct lsa_TranslatedName *names; -}; - -struct lsa_LookupSids { - struct { - struct policy_handle *handle; - struct lsa_SidArray *sids; - struct lsa_TransNameArray *names; - uint16 level; - uint32 *count; - } in; - - struct { - struct lsa_RefDomainList *domains; - struct lsa_TransNameArray *names; - uint32 *count; - NTSTATUS result; - } out; - -}; - -struct CREATESECRET { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct lsa_OpenAccount { - struct { - struct policy_handle *handle; - struct dom_sid2 *sid; - uint32 desired_access; - } in; - - struct { - struct policy_handle *acct_handle; - NTSTATUS result; - } out; - -}; - -struct lsa_LUID { - uint32 low; - uint32 high; -}; - -struct lsa_LUIDAttribute { - struct lsa_LUID luid; - uint32 attribute; -}; - -struct lsa_PrivilegeSet { - uint32 count; - uint32 unknown; - struct lsa_LUIDAttribute *set; -}; - -struct lsa_EnumPrivsAccount { - struct { - struct policy_handle *handle; - } in; - - struct { - struct lsa_PrivilegeSet *privs; - NTSTATUS result; - } out; - -}; - -struct ADDPRIVS { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct REMOVEPRIVS { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct GETQUOTAS { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct SETQUOTAS { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct GETSYSTEMACCOUNT { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct SETSYSTEMACCOUNT { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct OPENTRUSTDOM { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct QUERYTRUSTDOM { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct SETINFOTRUSTDOM { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct OPENSECRET { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct SETSECRET { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct QUERYSECRET { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct LOOKUPPRIVVALUE { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct lsa_LookupPrivName { - struct { - struct policy_handle *handle; - struct lsa_LUID *luid; - } in; - - struct { - struct lsa_Name *name; - NTSTATUS result; - } out; - -}; - -struct PRIV_GET_DISPNAME { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct DELETEOBJECT { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct ENUMACCTWITHRIGHT { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct lsa_RightAttribute { - const char *name; -}; - -struct lsa_RightSet { - uint32 count; - struct lsa_Name *names; -}; - -struct lsa_EnumAccountRights { - struct { - struct policy_handle *handle; - struct dom_sid2 *sid; - } in; - - struct { - struct lsa_RightSet *rights; - NTSTATUS result; - } out; - -}; - -struct ADDACCTRIGHTS { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct REMOVEACCTRIGHTS { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct QUERYTRUSTDOMINFO { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct SETTRUSTDOMINFO { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct DELETETRUSTDOM { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct STOREPRIVDATA { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct RETRPRIVDATA { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct lsa_OpenPolicy2 { - struct { - const char *system_name; - struct lsa_ObjectAttribute *attr; - uint32 desired_access; - } in; - - struct { - struct policy_handle *handle; - NTSTATUS result; - } out; - -}; - -struct UNK_GET_CONNUSER { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct QUERYINFO2 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - diff --git a/source4/librpc/ndr/ndr_misc.c b/source4/librpc/ndr/ndr_misc.c deleted file mode 100644 index 575f0d3a4d..0000000000 --- a/source4/librpc/ndr/ndr_misc.c +++ /dev/null @@ -1,225 +0,0 @@ -/* parser auto-generated by pidl */ - -#include "includes.h" - -NTSTATUS ndr_push_dom_sid(struct ndr_push *ndr, int ndr_flags, struct dom_sid *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint8(ndr, r->sid_rev_num)); - NDR_CHECK(ndr_push_uint8(ndr, r->num_auths)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->id_auth, 6)); - NDR_CHECK(ndr_push_array_uint32(ndr, NDR_SCALARS, r->sub_auths, r->num_auths)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_BUFFERS, r->id_auth, 6)); - NDR_CHECK(ndr_push_array_uint32(ndr, NDR_BUFFERS, r->sub_auths, r->num_auths)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_security_ace(struct ndr_push *ndr, int ndr_flags, struct security_ace *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint8(ndr, r->type)); - NDR_CHECK(ndr_push_uint8(ndr, r->flags)); - NDR_CHECK(ndr_push_uint32(ndr, r->access_mask)); - NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->trustee)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_dom_sid(ndr, NDR_BUFFERS, &r->trustee)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_security_acl(struct ndr_push *ndr, int ndr_flags, struct security_acl *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint16(ndr, r->revision)); - NDR_CHECK(ndr_push_uint32(ndr, r->num_aces)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS, r->aces, sizeof(r->aces[0]), r->num_aces, (ndr_push_flags_fn_t)ndr_push_security_ace)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_array(ndr, NDR_BUFFERS, r->aces, sizeof(r->aces[0]), r->num_aces, (ndr_push_flags_fn_t)ndr_push_security_ace)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_security_descriptor(struct ndr_push *ndr, int ndr_flags, struct security_descriptor *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint8(ndr, r->revision)); - NDR_CHECK(ndr_push_uint16(ndr, r->type)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->owner_sid, (ndr_push_const_fn_t) ndr_push_dom_sid)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->group_sid, (ndr_push_const_fn_t) ndr_push_dom_sid)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->sacl, (ndr_push_const_fn_t) ndr_push_security_acl)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->dacl, (ndr_push_const_fn_t) ndr_push_security_acl)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->owner_sid) { - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, r->owner_sid, (ndr_push_const_fn_t) ndr_push_dom_sid)); - } - if (r->group_sid) { - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, r->group_sid, (ndr_push_const_fn_t) ndr_push_dom_sid)); - } - if (r->sacl) { - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, r->sacl, (ndr_push_const_fn_t) ndr_push_security_acl)); - } - if (r->dacl) { - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, r->dacl, (ndr_push_const_fn_t) ndr_push_security_acl)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_dom_sid(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->sid_rev_num)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->num_auths)); - { - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->id_auth, 6)); - } - NDR_ALLOC_N_SIZE(ndr, r->sub_auths, r->num_auths, sizeof(r->sub_auths[0])); - { - NDR_CHECK(ndr_pull_array_uint32(ndr, NDR_SCALARS, r->sub_auths, r->num_auths)); - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - { - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_BUFFERS, r->id_auth, 6)); - } - { - NDR_CHECK(ndr_pull_array_uint32(ndr, NDR_BUFFERS, r->sub_auths, r->num_auths)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_security_ace(struct ndr_pull *ndr, int ndr_flags, struct security_ace *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->type)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->flags)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->access_mask)); - NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->trustee)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_BUFFERS, &r->trustee)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_flags, struct security_acl *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->revision)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_aces)); - NDR_ALLOC_N_SIZE(ndr, r->aces, r->num_aces, sizeof(r->aces[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS, (void **)r->aces, sizeof(r->aces[0]), r->num_aces, (ndr_pull_flags_fn_t)ndr_pull_security_ace)); - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - { - NDR_CHECK(ndr_pull_array(ndr, NDR_BUFFERS, (void **)r->aces, sizeof(r->aces[0]), r->num_aces, (ndr_pull_flags_fn_t)ndr_pull_security_ace)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_security_descriptor(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->revision)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->type)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->owner_sid, sizeof(*r->owner_sid), (ndr_pull_flags_fn_t)ndr_pull_dom_sid)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->group_sid, sizeof(*r->group_sid), (ndr_pull_flags_fn_t)ndr_pull_dom_sid)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->sacl, sizeof(*r->sacl), (ndr_pull_flags_fn_t)ndr_pull_security_acl)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->dacl, sizeof(*r->dacl), (ndr_pull_flags_fn_t)ndr_pull_security_acl)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -void ndr_print_security_ace(struct ndr_print *ndr, const char *name, struct security_ace *r) -{ - ndr_print_struct(ndr, name, "security_ace"); - ndr->depth++; - ndr_print_uint8(ndr, "type", r->type); - ndr_print_uint8(ndr, "flags", r->flags); - ndr_print_uint32(ndr, "access_mask", r->access_mask); - ndr_print_dom_sid(ndr, "trustee", &r->trustee); - ndr->depth--; -} - -void ndr_print_security_acl(struct ndr_print *ndr, const char *name, struct security_acl *r) -{ - ndr_print_struct(ndr, name, "security_acl"); - ndr->depth++; - ndr_print_uint16(ndr, "revision", r->revision); - ndr_print_uint32(ndr, "num_aces", r->num_aces); - ndr_print_ptr(ndr, "aces", r->aces); - ndr->depth++; - ndr_print_array(ndr, "aces", r->aces, sizeof(r->aces[0]), r->num_aces, (ndr_print_fn_t)ndr_print_security_ace); - ndr->depth--; - ndr->depth--; -} - -void ndr_print_security_descriptor(struct ndr_print *ndr, const char *name, struct security_descriptor *r) -{ - ndr_print_struct(ndr, name, "security_descriptor"); - ndr->depth++; - ndr_print_uint8(ndr, "revision", r->revision); - ndr_print_uint16(ndr, "type", r->type); - ndr_print_ptr(ndr, "owner_sid", r->owner_sid); - ndr->depth++; - if (r->owner_sid) { - ndr_print_dom_sid(ndr, "owner_sid", r->owner_sid); - } - ndr->depth--; - ndr_print_ptr(ndr, "group_sid", r->group_sid); - ndr->depth++; - if (r->group_sid) { - ndr_print_dom_sid(ndr, "group_sid", r->group_sid); - } - ndr->depth--; - ndr_print_ptr(ndr, "sacl", r->sacl); - ndr->depth++; - if (r->sacl) { - ndr_print_security_acl(ndr, "sacl", r->sacl); - } - ndr->depth--; - ndr_print_ptr(ndr, "dacl", r->dacl); - ndr->depth++; - if (r->dacl) { - ndr_print_security_acl(ndr, "dacl", r->dacl); - } - ndr->depth--; - ndr->depth--; -} - diff --git a/source4/librpc/ndr/ndr_misc.h b/source4/librpc/ndr/ndr_misc.h deleted file mode 100644 index 86c898eff2..0000000000 --- a/source4/librpc/ndr/ndr_misc.h +++ /dev/null @@ -1,33 +0,0 @@ -/* header auto-generated by pidl */ - - - -struct dom_sid { - uint8 sid_rev_num; - uint8 num_auths; - uint8 id_auth[6]; - uint32 *sub_auths; -}; - -struct security_ace { - uint8 type; - uint8 flags; - uint32 access_mask; - struct dom_sid trustee; -}; - -struct security_acl { - uint16 revision; - uint32 num_aces; - struct security_ace *aces; -}; - -struct security_descriptor { - uint8 revision; - uint16 type; - struct dom_sid *owner_sid; - struct dom_sid *group_sid; - struct security_acl *sacl; - struct security_acl *dacl; -}; - diff --git a/source4/librpc/ndr/ndr_samr.c b/source4/librpc/ndr/ndr_samr.c deleted file mode 100644 index 7d8bebeab4..0000000000 --- a/source4/librpc/ndr/ndr_samr.c +++ /dev/null @@ -1,5257 +0,0 @@ -/* parser auto-generated by pidl */ - -#include "includes.h" - -NTSTATUS ndr_push_samr_Connect(struct ndr_push *ndr, struct samr_Connect *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.system_name)); - if (r->in.system_name) { - NDR_CHECK(ndr_push_uint16(ndr, *r->in.system_name)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_Close(struct ndr_push *ndr, struct samr_Close *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_SetSecurity(struct ndr_push *ndr, struct samr_SetSecurity *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_QuerySecurity(struct ndr_push *ndr, struct samr_QuerySecurity *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.sec_info)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_Shutdown(struct ndr_push *ndr, struct samr_Shutdown *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_Name(struct ndr_push *ndr, int ndr_flags, struct samr_Name *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint16(ndr, 2*strlen_m(r->name))); - NDR_CHECK(ndr_push_uint16(ndr, 2*strlen_m(r->name))); - NDR_CHECK(ndr_push_ptr(ndr, r->name)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_push_unistr_noterm(ndr, r->name)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_LookupDomain(struct ndr_push *ndr, struct samr_LookupDomain *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_EnumDomains(struct ndr_push *ndr, struct samr_EnumDomains *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.buf_size)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_OpenDomain(struct ndr_push *ndr, struct samr_OpenDomain *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); - NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_QueryDomainInfo(struct ndr_push *ndr, struct samr_QueryDomainInfo *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_SET_DOMAIN_INFO(struct ndr_push *ndr, struct samr_SET_DOMAIN_INFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_CREATE_DOM_GROUP(struct ndr_push *ndr, struct samr_CREATE_DOM_GROUP *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_EnumDomainGroups(struct ndr_push *ndr, struct samr_EnumDomainGroups *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.max_size)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_CreateUser(struct ndr_push *ndr, struct samr_CreateUser *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.username)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_EnumDomainUsers(struct ndr_push *ndr, struct samr_EnumDomainUsers *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.acct_flags)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.max_size)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_CREATE_DOM_ALIAS(struct ndr_push *ndr, struct samr_CREATE_DOM_ALIAS *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_EnumDomainAliases(struct ndr_push *ndr, struct samr_EnumDomainAliases *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.max_size)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_Sids(struct ndr_push *ndr, int ndr_flags, struct samr_Sids *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->sids)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->sids) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->sids, sizeof(r->sids[0]), r->count, (ndr_push_flags_fn_t)ndr_push_dom_sid2)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_GetAliasMembership(struct ndr_push *ndr, struct samr_GetAliasMembership *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.sids)); - if (r->in.sids) { - NDR_CHECK(ndr_push_samr_Sids(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_LookupNames(struct ndr_push *ndr, struct samr_LookupNames *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.num_names)); - if (r->in.names) { - NDR_CHECK(ndr_push_uint32(ndr, 1000)); - NDR_CHECK(ndr_push_uint32(ndr, 0)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.num_names)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names, sizeof(r->in.names[0]), r->in.num_names, (ndr_push_flags_fn_t)ndr_push_samr_Name)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_LookupRids(struct ndr_push *ndr, struct samr_LookupRids *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.num_rids)); - if (r->in.rids) { - NDR_CHECK(ndr_push_uint32(ndr, 1000)); - NDR_CHECK(ndr_push_uint32(ndr, 0)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.num_rids)); - NDR_CHECK(ndr_push_array_uint32(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rids, r->in.num_rids)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_OpenGroup(struct ndr_push *ndr, struct samr_OpenGroup *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.rid)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_QueryGroupInfo(struct ndr_push *ndr, struct samr_QueryGroupInfo *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_SET_GROUPINFO(struct ndr_push *ndr, struct samr_SET_GROUPINFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_ADD_GROUPMEM(struct ndr_push *ndr, struct samr_ADD_GROUPMEM *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_DELETE_DOM_GROUP(struct ndr_push *ndr, struct samr_DELETE_DOM_GROUP *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_DEL_GROUPMEM(struct ndr_push *ndr, struct samr_DEL_GROUPMEM *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_QUERY_GROUPMEM(struct ndr_push *ndr, struct samr_QUERY_GROUPMEM *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_SET_MEMBER_ATTRIBUTES_OF_GROUP(struct ndr_push *ndr, struct samr_SET_MEMBER_ATTRIBUTES_OF_GROUP *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_OpenAlias(struct ndr_push *ndr, struct samr_OpenAlias *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.rid)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_QueryAliasInfo(struct ndr_push *ndr, struct samr_QueryAliasInfo *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_SET_ALIASINFO(struct ndr_push *ndr, struct samr_SET_ALIASINFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_DELETE_DOM_ALIAS(struct ndr_push *ndr, struct samr_DELETE_DOM_ALIAS *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_ADD_ALIASMEM(struct ndr_push *ndr, struct samr_ADD_ALIASMEM *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_DEL_ALIASMEM(struct ndr_push *ndr, struct samr_DEL_ALIASMEM *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_GET_MEMBERS_IN_ALIAS(struct ndr_push *ndr, struct samr_GET_MEMBERS_IN_ALIAS *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_OpenUser(struct ndr_push *ndr, struct samr_OpenUser *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.rid)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_DeleteUser(struct ndr_push *ndr, struct samr_DeleteUser *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo1(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo1 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - NDR_CHECK(ndr_push_uint32(ndr, r->primary_gid)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->description)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->comment)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->description)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->comment)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo2(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo2 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->comment)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->unknown)); - NDR_CHECK(ndr_push_uint16(ndr, r->country_code)); - NDR_CHECK(ndr_push_uint16(ndr, r->code_page)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->comment)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->unknown)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo3(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo3 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - NDR_CHECK(ndr_push_uint32(ndr, r->Rid)); - NDR_CHECK(ndr_push_uint32(ndr, r->primary_gid)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_directory)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->profile)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->workstations)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_logon)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_logoff)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_pwd_change)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->allow_pwd_change)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->force_pwd_change)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week)); - NDR_CHECK(ndr_push_ptr(ndr, r->logon_hours)); - NDR_CHECK(ndr_push_uint16(ndr, r->bad_pwd_count)); - NDR_CHECK(ndr_push_uint16(ndr, r->num_logons)); - NDR_CHECK(ndr_push_uint32(ndr, r->acct_flags)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_directory)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->profile)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); - if (r->logon_hours) { - NDR_CHECK(ndr_push_uint32(ndr, 1260)); - NDR_CHECK(ndr_push_uint32(ndr, 0)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week/8)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, r->units_per_week/8)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo4(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo4 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week)); - NDR_CHECK(ndr_push_ptr(ndr, r->logon_hours)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->logon_hours) { - NDR_CHECK(ndr_push_uint32(ndr, 1260)); - NDR_CHECK(ndr_push_uint32(ndr, 0)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week/8)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, r->units_per_week/8)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo5(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo5 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - NDR_CHECK(ndr_push_uint32(ndr, r->rid)); - NDR_CHECK(ndr_push_uint32(ndr, r->primary_gid)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_directory)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->profile)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->description)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->workstations)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_logon)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_logoff)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week)); - NDR_CHECK(ndr_push_ptr(ndr, r->logon_hours)); - NDR_CHECK(ndr_push_uint16(ndr, r->bad_pwd_count)); - NDR_CHECK(ndr_push_uint16(ndr, r->num_logons)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_pwd_change)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->acct_expiry)); - NDR_CHECK(ndr_push_uint32(ndr, r->acct_flags)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_directory)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->profile)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->description)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); - if (r->logon_hours) { - NDR_CHECK(ndr_push_uint32(ndr, 1260)); - NDR_CHECK(ndr_push_uint32(ndr, 0)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week/8)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, r->units_per_week/8)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo6(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo6 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo7(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo7 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->username)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->username)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo8(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo8 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo9(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo9 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->primary_gid)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo10(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo10 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_dir)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_dir)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo11(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo11 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo12(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo12 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->profile)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->profile)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo13(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo13 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->description)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->description)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo14(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo14 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->workstations)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo16(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo16 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->acct_flags)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo17(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo17 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->acct_expiry)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo20(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo20 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->callback)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->callback)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo21(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo21 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_logon)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_logoff)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_pwd_change)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->acct_expiry)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->allow_pwd_change)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->force_pwd_change)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_dir)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->profile)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->description)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->workstations)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->comment)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->callback)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->unknown1)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->unknown2)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->unknown3)); - NDR_CHECK(ndr_push_uint32(ndr, r->buf_count)); - NDR_CHECK(ndr_push_ptr(ndr, r->buffer)); - NDR_CHECK(ndr_push_uint32(ndr, r->rid)); - NDR_CHECK(ndr_push_uint32(ndr, r->primary_gid)); - NDR_CHECK(ndr_push_uint32(ndr, r->acct_flags)); - NDR_CHECK(ndr_push_uint32(ndr, r->fields_present)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week)); - NDR_CHECK(ndr_push_ptr(ndr, r->logon_hours)); - NDR_CHECK(ndr_push_uint16(ndr, r->bad_pwd_count)); - NDR_CHECK(ndr_push_uint16(ndr, r->num_logons)); - NDR_CHECK(ndr_push_uint16(ndr, r->country_code)); - NDR_CHECK(ndr_push_uint16(ndr, r->code_page)); - NDR_CHECK(ndr_push_uint8(ndr, r->nt_pwd_set)); - NDR_CHECK(ndr_push_uint8(ndr, r->lm_pwd_set)); - NDR_CHECK(ndr_push_uint8(ndr, r->expired_flag)); - NDR_CHECK(ndr_push_uint8(ndr, r->unknown4)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_dir)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->profile)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->description)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->comment)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->callback)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->unknown1)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->unknown2)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->unknown3)); - if (r->buffer) { - NDR_CHECK(ndr_push_uint32(ndr, r->buf_count)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->buffer, r->buf_count)); - } - if (r->logon_hours) { - NDR_CHECK(ndr_push_uint32(ndr, 1260)); - NDR_CHECK(ndr_push_uint32(ndr, 0)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week/8)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, r->units_per_week/8)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo(struct ndr_push *ndr, int ndr_flags, uint16 level, union samr_UserInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - switch (level) { - case 1: - NDR_CHECK(ndr_push_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1)); - break; - - case 2: - NDR_CHECK(ndr_push_samr_UserInfo2(ndr, NDR_SCALARS, &r->info2)); - break; - - case 3: - NDR_CHECK(ndr_push_samr_UserInfo3(ndr, NDR_SCALARS, &r->info3)); - break; - - case 4: - NDR_CHECK(ndr_push_samr_UserInfo4(ndr, NDR_SCALARS, &r->info4)); - break; - - case 5: - NDR_CHECK(ndr_push_samr_UserInfo5(ndr, NDR_SCALARS, &r->info5)); - break; - - case 6: - NDR_CHECK(ndr_push_samr_UserInfo6(ndr, NDR_SCALARS, &r->info6)); - break; - - case 7: - NDR_CHECK(ndr_push_samr_UserInfo7(ndr, NDR_SCALARS, &r->info7)); - break; - - case 8: - NDR_CHECK(ndr_push_samr_UserInfo8(ndr, NDR_SCALARS, &r->info8)); - break; - - case 9: - NDR_CHECK(ndr_push_samr_UserInfo9(ndr, NDR_SCALARS, &r->info9)); - break; - - case 10: - NDR_CHECK(ndr_push_samr_UserInfo10(ndr, NDR_SCALARS, &r->info10)); - break; - - case 11: - NDR_CHECK(ndr_push_samr_UserInfo11(ndr, NDR_SCALARS, &r->info11)); - break; - - case 12: - NDR_CHECK(ndr_push_samr_UserInfo12(ndr, NDR_SCALARS, &r->info12)); - break; - - case 13: - NDR_CHECK(ndr_push_samr_UserInfo13(ndr, NDR_SCALARS, &r->info13)); - break; - - case 14: - NDR_CHECK(ndr_push_samr_UserInfo14(ndr, NDR_SCALARS, &r->info14)); - break; - - case 16: - NDR_CHECK(ndr_push_samr_UserInfo16(ndr, NDR_SCALARS, &r->info16)); - break; - - case 17: - NDR_CHECK(ndr_push_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17)); - break; - - case 20: - NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20)); - break; - - case 21: - NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info21)); - break; - - default: - return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 1: - NDR_CHECK(ndr_push_samr_UserInfo1(ndr, NDR_BUFFERS, &r->info1)); - break; - - case 2: - NDR_CHECK(ndr_push_samr_UserInfo2(ndr, NDR_BUFFERS, &r->info2)); - break; - - case 3: - NDR_CHECK(ndr_push_samr_UserInfo3(ndr, NDR_BUFFERS, &r->info3)); - break; - - case 4: - NDR_CHECK(ndr_push_samr_UserInfo4(ndr, NDR_BUFFERS, &r->info4)); - break; - - case 5: - NDR_CHECK(ndr_push_samr_UserInfo5(ndr, NDR_BUFFERS, &r->info5)); - break; - - case 6: - NDR_CHECK(ndr_push_samr_UserInfo6(ndr, NDR_BUFFERS, &r->info6)); - break; - - case 7: - NDR_CHECK(ndr_push_samr_UserInfo7(ndr, NDR_BUFFERS, &r->info7)); - break; - - case 8: - NDR_CHECK(ndr_push_samr_UserInfo8(ndr, NDR_BUFFERS, &r->info8)); - break; - - case 9: - NDR_CHECK(ndr_push_samr_UserInfo9(ndr, NDR_BUFFERS, &r->info9)); - break; - - case 10: - NDR_CHECK(ndr_push_samr_UserInfo10(ndr, NDR_BUFFERS, &r->info10)); - break; - - case 11: - NDR_CHECK(ndr_push_samr_UserInfo11(ndr, NDR_BUFFERS, &r->info11)); - break; - - case 12: - NDR_CHECK(ndr_push_samr_UserInfo12(ndr, NDR_BUFFERS, &r->info12)); - break; - - case 13: - NDR_CHECK(ndr_push_samr_UserInfo13(ndr, NDR_BUFFERS, &r->info13)); - break; - - case 14: - NDR_CHECK(ndr_push_samr_UserInfo14(ndr, NDR_BUFFERS, &r->info14)); - break; - - case 16: - NDR_CHECK(ndr_push_samr_UserInfo16(ndr, NDR_BUFFERS, &r->info16)); - break; - - case 17: - NDR_CHECK(ndr_push_samr_UserInfo17(ndr, NDR_BUFFERS, &r->info17)); - break; - - case 20: - NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20)); - break; - - case 21: - NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info21)); - break; - - default: - return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_QueryUserInfo(struct ndr_push *ndr, struct samr_QueryUserInfo *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_SetUserInfo(struct ndr_push *ndr, struct samr_SetUserInfo *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); - NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); - NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, r->in.info)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_CHANGE_PASSWORD_USER(struct ndr_push *ndr, struct samr_CHANGE_PASSWORD_USER *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_GET_GROUPS_FOR_USER(struct ndr_push *ndr, struct samr_GET_GROUPS_FOR_USER *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_QUERY_DISPINFO(struct ndr_push *ndr, struct samr_QUERY_DISPINFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_GET_DISPLAY_ENUMERATION_INDEX(struct ndr_push *ndr, struct samr_GET_DISPLAY_ENUMERATION_INDEX *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_TEST_PRIVATE_FUNCTIONS_DOMAIN(struct ndr_push *ndr, struct samr_TEST_PRIVATE_FUNCTIONS_DOMAIN *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_TEST_PRIVATE_FUNCTIONS_USER(struct ndr_push *ndr, struct samr_TEST_PRIVATE_FUNCTIONS_USER *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_GET_USRDOM_PWINFO(struct ndr_push *ndr, struct samr_GET_USRDOM_PWINFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN(struct ndr_push *ndr, struct samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_QUERY_INFORMATION_DOMAIN2(struct ndr_push *ndr, struct samr_QUERY_INFORMATION_DOMAIN2 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_QUERY_INFORMATION_USER2(struct ndr_push *ndr, struct samr_QUERY_INFORMATION_USER2 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_QUERY_DISPINFO2(struct ndr_push *ndr, struct samr_QUERY_DISPINFO2 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_GET_DISPLAY_ENUMERATION_INDEX2(struct ndr_push *ndr, struct samr_GET_DISPLAY_ENUMERATION_INDEX2 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_CREATE_USER2_IN_DOMAIN(struct ndr_push *ndr, struct samr_CREATE_USER2_IN_DOMAIN *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_QUERY_DISPINFO3(struct ndr_push *ndr, struct samr_QUERY_DISPINFO3 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS(struct ndr_push *ndr, struct samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS(struct ndr_push *ndr, struct samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_OEM_CHANGE_PASSWORD_USER2(struct ndr_push *ndr, struct samr_OEM_CHANGE_PASSWORD_USER2 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UNICODE_CHANGE_PASSWORD_USER2(struct ndr_push *ndr, struct samr_UNICODE_CHANGE_PASSWORD_USER2 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_GET_DOM_PWINFO(struct ndr_push *ndr, struct samr_GET_DOM_PWINFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_CONNECT2(struct ndr_push *ndr, struct samr_CONNECT2 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_SET_USERINFO2(struct ndr_push *ndr, struct samr_SET_USERINFO2 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_SET_BOOT_KEY_INFORMATION(struct ndr_push *ndr, struct samr_SET_BOOT_KEY_INFORMATION *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_GET_BOOT_KEY_INFORMATION(struct ndr_push *ndr, struct samr_GET_BOOT_KEY_INFORMATION *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_CONNECT3(struct ndr_push *ndr, struct samr_CONNECT3 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_Connect4(struct ndr_push *ndr, struct samr_Connect4 *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.system_name)); - if (r->in.system_name) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.system_name)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.unknown)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UNICODE_CHANGE_PASSWORD_USER3(struct ndr_push *ndr, struct samr_UNICODE_CHANGE_PASSWORD_USER3 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_CONNECT5(struct ndr_push *ndr, struct samr_CONNECT5 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_RID_TO_SID(struct ndr_push *ndr, struct samr_RID_TO_SID *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_SET_DSRM_PASSWORD(struct ndr_push *ndr, struct samr_SET_DSRM_PASSWORD *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_VALIDATE_PASSWORD(struct ndr_push *ndr, struct samr_VALIDATE_PASSWORD *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_Connect(struct ndr_pull *ndr, struct samr_Connect *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_Close(struct ndr_pull *ndr, struct samr_Close *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SetSecurity(struct ndr_pull *ndr, struct samr_SetSecurity *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SdBuf(struct ndr_pull *ndr, int ndr_flags, struct samr_SdBuf *r) -{ - uint32 _ptr_sd; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->sd_size)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sd)); - if (_ptr_sd) { - NDR_ALLOC(ndr, r->sd); - } else { - r->sd = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->sd) { - NDR_CHECK(ndr_pull_subcontext_flags_fn(ndr, r->sd, (ndr_pull_flags_fn_t) ndr_pull_security_descriptor)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, struct samr_QuerySecurity *r) -{ - uint32 _ptr_sdbuf; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sdbuf)); - if (_ptr_sdbuf) { - NDR_ALLOC(ndr, r->out.sdbuf); - } else { - r->out.sdbuf = NULL; - } - if (r->out.sdbuf) { - NDR_CHECK(ndr_pull_samr_SdBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sdbuf)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_Shutdown(struct ndr_pull *ndr, struct samr_Shutdown *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_Name(struct ndr_pull *ndr, int ndr_flags, struct samr_Name *r) -{ - uint32 _ptr_name; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->name_len)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->name_size)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); - if (_ptr_name) { - NDR_ALLOC(ndr, r->name); - } else { - r->name = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_pull_unistr_noterm(ndr, &r->name)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_LookupDomain(struct ndr_pull *ndr, struct samr_LookupDomain *r) -{ - uint32 _ptr_sid; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sid)); - if (_ptr_sid) { - NDR_ALLOC(ndr, r->out.sid); - } else { - r->out.sid = NULL; - } - if (r->out.sid) { - NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SamEntry(struct ndr_pull *ndr, int ndr_flags, struct samr_SamEntry *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->idx)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->name)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SamArray(struct ndr_pull *ndr, int ndr_flags, struct samr_SamArray *r) -{ - uint32 _ptr_entries; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_entries)); - if (_ptr_entries) { - NDR_ALLOC(ndr, r->entries); - } else { - r->entries = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->entries) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->entries, r->count, sizeof(r->entries[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->entries, sizeof(r->entries[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_samr_SamEntry)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_EnumDomains(struct ndr_pull *ndr, struct samr_EnumDomains *r) -{ - uint32 _ptr_sam; - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sam)); - if (_ptr_sam) { - NDR_ALLOC(ndr, r->out.sam); - } else { - r->out.sam = NULL; - } - if (r->out.sam) { - NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); - } - NDR_CHECK(ndr_pull_uint32(ndr, r->out.num_entries)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_OpenDomain(struct ndr_pull *ndr, struct samr_OpenDomain *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.domain_handle)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo1 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->min_length_password)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->password_history)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->flag)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->expire)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->min_passwordage)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo2 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 8)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->force_logoff_time)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown1)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->domain)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->primary)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->sequence_num)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown2)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->role)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown3)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_users)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_groups)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_aliases)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown1)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->domain)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->primary)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo3 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 8)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->force_logoff_time)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo4 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo5 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->domain)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->domain)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo6 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->primary)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->primary)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo7 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->role)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo8 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 8)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->sequence_num)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_xxx_time)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo9 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo11 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 8)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->force_logoff_time)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown1)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->domain)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->primary)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->sequence_num)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown2)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->role)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown3)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_users)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_groups)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_aliases)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->lockout_duration)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->lockout_window)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->lockout_threshold)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown1)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->domain)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->primary)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo12 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 8)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->lockout_duration)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->lockout_window)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->lockout_threshold)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo13 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 8)); - NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->sequence_num)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_xxx_time)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown1)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown2)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_flags, uint16 level, union samr_DomainInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 1: { - NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, &r->info1)); - break; } - - case 2: { - NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_SCALARS, &r->info2)); - break; } - - case 3: { - NDR_CHECK(ndr_pull_samr_DomInfo3(ndr, NDR_SCALARS, &r->info3)); - break; } - - case 4: { - NDR_CHECK(ndr_pull_samr_DomInfo4(ndr, NDR_SCALARS, &r->info4)); - break; } - - case 5: { - NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_SCALARS, &r->info5)); - break; } - - case 6: { - NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_SCALARS, &r->info6)); - break; } - - case 7: { - NDR_CHECK(ndr_pull_samr_DomInfo7(ndr, NDR_SCALARS, &r->info7)); - break; } - - case 8: { - NDR_CHECK(ndr_pull_samr_DomInfo8(ndr, NDR_SCALARS, &r->info8)); - break; } - - case 9: { - NDR_CHECK(ndr_pull_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9)); - break; } - - case 11: { - NDR_CHECK(ndr_pull_samr_DomInfo11(ndr, NDR_SCALARS, &r->info11)); - break; } - - case 12: { - NDR_CHECK(ndr_pull_samr_DomInfo12(ndr, NDR_SCALARS, &r->info12)); - break; } - - case 13: { - NDR_CHECK(ndr_pull_samr_DomInfo13(ndr, NDR_SCALARS, &r->info13)); - break; } - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 1: - NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_BUFFERS, &r->info1)); - break; - - case 2: - NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_BUFFERS, &r->info2)); - break; - - case 3: - NDR_CHECK(ndr_pull_samr_DomInfo3(ndr, NDR_BUFFERS, &r->info3)); - break; - - case 4: - NDR_CHECK(ndr_pull_samr_DomInfo4(ndr, NDR_BUFFERS, &r->info4)); - break; - - case 5: - NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_BUFFERS, &r->info5)); - break; - - case 6: - NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_BUFFERS, &r->info6)); - break; - - case 7: - NDR_CHECK(ndr_pull_samr_DomInfo7(ndr, NDR_BUFFERS, &r->info7)); - break; - - case 8: - NDR_CHECK(ndr_pull_samr_DomInfo8(ndr, NDR_BUFFERS, &r->info8)); - break; - - case 9: - NDR_CHECK(ndr_pull_samr_DomInfo9(ndr, NDR_BUFFERS, &r->info9)); - break; - - case 11: - NDR_CHECK(ndr_pull_samr_DomInfo11(ndr, NDR_BUFFERS, &r->info11)); - break; - - case 12: - NDR_CHECK(ndr_pull_samr_DomInfo12(ndr, NDR_BUFFERS, &r->info12)); - break; - - case 13: - NDR_CHECK(ndr_pull_samr_DomInfo13(ndr, NDR_BUFFERS, &r->info13)); - break; - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_QueryDomainInfo(struct ndr_pull *ndr, struct samr_QueryDomainInfo *r) -{ - uint32 _ptr_info; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info)); - if (_ptr_info) { - NDR_ALLOC(ndr, r->out.info); - } else { - r->out.info = NULL; - } - if (r->out.info) { - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint16 _level; - NDR_CHECK(ndr_pull_uint16(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); - } - NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, r->out.info)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SET_DOMAIN_INFO(struct ndr_pull *ndr, struct samr_SET_DOMAIN_INFO *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_CREATE_DOM_GROUP(struct ndr_pull *ndr, struct samr_CREATE_DOM_GROUP *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_EnumDomainGroups(struct ndr_pull *ndr, struct samr_EnumDomainGroups *r) -{ - uint32 _ptr_sam; - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sam)); - if (_ptr_sam) { - NDR_ALLOC(ndr, r->out.sam); - } else { - r->out.sam = NULL; - } - if (r->out.sam) { - NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.num_entries)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_CreateUser(struct ndr_pull *ndr, struct samr_CreateUser *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.acct_handle)); - NDR_CHECK(ndr_pull_uint32(ndr, r->out.rid)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, struct samr_EnumDomainUsers *r) -{ - uint32 _ptr_sam; - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sam)); - if (_ptr_sam) { - NDR_ALLOC(ndr, r->out.sam); - } else { - r->out.sam = NULL; - } - if (r->out.sam) { - NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.num_entries)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_CREATE_DOM_ALIAS(struct ndr_pull *ndr, struct samr_CREATE_DOM_ALIAS *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_EnumDomainAliases(struct ndr_pull *ndr, struct samr_EnumDomainAliases *r) -{ - uint32 _ptr_sam; - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sam)); - if (_ptr_sam) { - NDR_ALLOC(ndr, r->out.sam); - } else { - r->out.sam = NULL; - } - if (r->out.sam) { - NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.num_entries)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_Ids(struct ndr_pull *ndr, int ndr_flags, struct samr_Ids *r) -{ - uint32 _ptr_ids; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ids)); - if (_ptr_ids) { - NDR_ALLOC(ndr, r->ids); - } else { - r->ids = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->ids) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->ids, r->count, sizeof(r->ids[0])); - { - NDR_CHECK(ndr_pull_array_uint32(ndr, NDR_SCALARS|NDR_BUFFERS, r->ids, r->count)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GetAliasMembership(struct ndr_pull *ndr, struct samr_GetAliasMembership *r) -{ - uint32 _ptr_rids; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_rids)); - if (_ptr_rids) { - NDR_ALLOC(ndr, r->out.rids); - } else { - r->out.rids = NULL; - } - if (r->out.rids) { - NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_LookupNames(struct ndr_pull *ndr, struct samr_LookupNames *r) -{ - NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.rids)); - NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.types)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_Names(struct ndr_pull *ndr, int ndr_flags, struct samr_Names *r) -{ - uint32 _ptr_names; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_names)); - if (_ptr_names) { - NDR_ALLOC(ndr, r->names); - } else { - r->names = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->names) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->names, r->count, sizeof(r->names[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->names, sizeof(r->names[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_samr_Name)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_LookupRids(struct ndr_pull *ndr, struct samr_LookupRids *r) -{ - NDR_CHECK(ndr_pull_samr_Names(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.names)); - NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.types)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_OpenGroup(struct ndr_pull *ndr, struct samr_OpenGroup *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.acct_handle)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GroupInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoAll *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->name)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_members)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->name)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GroupInfoName(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoName *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->Name)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->Name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GroupInfoX(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoX *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GroupInfoDesciption(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoDesciption *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GroupInfo(struct ndr_pull *ndr, int ndr_flags, uint16 level, union samr_GroupInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 1: { - NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all)); - break; } - - case 2: { - NDR_CHECK(ndr_pull_samr_GroupInfoName(ndr, NDR_SCALARS, &r->name)); - break; } - - case 3: { - NDR_CHECK(ndr_pull_samr_GroupInfoX(ndr, NDR_SCALARS, &r->unknown)); - break; } - - case 4: { - NDR_CHECK(ndr_pull_samr_GroupInfoDesciption(ndr, NDR_SCALARS, &r->description)); - break; } - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 1: - NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all)); - break; - - case 2: - NDR_CHECK(ndr_pull_samr_GroupInfoName(ndr, NDR_BUFFERS, &r->name)); - break; - - case 3: - NDR_CHECK(ndr_pull_samr_GroupInfoX(ndr, NDR_BUFFERS, &r->unknown)); - break; - - case 4: - NDR_CHECK(ndr_pull_samr_GroupInfoDesciption(ndr, NDR_BUFFERS, &r->description)); - break; - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_QueryGroupInfo(struct ndr_pull *ndr, struct samr_QueryGroupInfo *r) -{ - uint32 _ptr_info; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info)); - if (_ptr_info) { - NDR_ALLOC(ndr, r->out.info); - } else { - r->out.info = NULL; - } - if (r->out.info) { - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint16 _level; - NDR_CHECK(ndr_pull_uint16(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); - } - NDR_CHECK(ndr_pull_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, r->out.info)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SET_GROUPINFO(struct ndr_pull *ndr, struct samr_SET_GROUPINFO *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_ADD_GROUPMEM(struct ndr_pull *ndr, struct samr_ADD_GROUPMEM *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DELETE_DOM_GROUP(struct ndr_pull *ndr, struct samr_DELETE_DOM_GROUP *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DEL_GROUPMEM(struct ndr_pull *ndr, struct samr_DEL_GROUPMEM *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_QUERY_GROUPMEM(struct ndr_pull *ndr, struct samr_QUERY_GROUPMEM *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SET_MEMBER_ATTRIBUTES_OF_GROUP(struct ndr_pull *ndr, struct samr_SET_MEMBER_ATTRIBUTES_OF_GROUP *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_OpenAlias(struct ndr_pull *ndr, struct samr_OpenAlias *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.acct_handle)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_AliasInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_AliasInfoAll *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->name)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_members)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->name)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_AliasInfoName(struct ndr_pull *ndr, int ndr_flags, struct samr_AliasInfoName *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->name)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_AliasInfoDescription(struct ndr_pull *ndr, int ndr_flags, struct samr_AliasInfoDescription *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_AliasInfo(struct ndr_pull *ndr, int ndr_flags, uint16 level, union samr_AliasInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 1: { - NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr, NDR_SCALARS, &r->all)); - break; } - - case 2: { - NDR_CHECK(ndr_pull_samr_AliasInfoName(ndr, NDR_SCALARS, &r->name)); - break; } - - case 3: { - NDR_CHECK(ndr_pull_samr_AliasInfoDescription(ndr, NDR_SCALARS, &r->description)); - break; } - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 1: - NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr, NDR_BUFFERS, &r->all)); - break; - - case 2: - NDR_CHECK(ndr_pull_samr_AliasInfoName(ndr, NDR_BUFFERS, &r->name)); - break; - - case 3: - NDR_CHECK(ndr_pull_samr_AliasInfoDescription(ndr, NDR_BUFFERS, &r->description)); - break; - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_QueryAliasInfo(struct ndr_pull *ndr, struct samr_QueryAliasInfo *r) -{ - uint32 _ptr_info; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info)); - if (_ptr_info) { - NDR_ALLOC(ndr, r->out.info); - } else { - r->out.info = NULL; - } - if (r->out.info) { - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint16 _level; - NDR_CHECK(ndr_pull_uint16(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); - } - NDR_CHECK(ndr_pull_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, r->out.info)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SET_ALIASINFO(struct ndr_pull *ndr, struct samr_SET_ALIASINFO *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DELETE_DOM_ALIAS(struct ndr_pull *ndr, struct samr_DELETE_DOM_ALIAS *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_ADD_ALIASMEM(struct ndr_pull *ndr, struct samr_ADD_ALIASMEM *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DEL_ALIASMEM(struct ndr_pull *ndr, struct samr_DEL_ALIASMEM *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GET_MEMBERS_IN_ALIAS(struct ndr_pull *ndr, struct samr_GET_MEMBERS_IN_ALIAS *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_OpenUser(struct ndr_pull *ndr, struct samr_OpenUser *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.acct_handle)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DeleteUser(struct ndr_pull *ndr, struct samr_DeleteUser *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo1 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->primary_gid)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->comment)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->comment)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo2 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->comment)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->country_code)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->code_page)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->comment)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo3 *r) -{ - uint32 _ptr_logon_hours; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->Rid)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->primary_gid)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_directory)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->profile)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->workstations)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_logon)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_logoff)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_pwd_change)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->allow_pwd_change)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->force_pwd_change)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->units_per_week)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_logon_hours)); - if (_ptr_logon_hours) { - NDR_ALLOC(ndr, r->logon_hours); - } else { - r->logon_hours = NULL; - } - NDR_CHECK(ndr_pull_uint16(ndr, &r->bad_pwd_count)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->num_logons)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->acct_flags)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_directory)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->profile)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); - if (r->logon_hours) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (1260 > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, 1260); - } - } - NDR_ALLOC_N_SIZE(ndr, r->logon_hours, 1260, sizeof(r->logon_hours[0])); - { - uint32 _offset, _length; - NDR_CHECK(ndr_pull_uint32(ndr, &_offset)); - NDR_CHECK(ndr_pull_uint32(ndr, &_length)); - if (_offset != 0) return ndr_pull_error(ndr, NDR_ERR_OFFSET, "Bad array offset 0x%08x", _offset); - if (_length > 1260 || _length != r->units_per_week/8) return ndr_pull_error(ndr, NDR_ERR_LENGTH, "Bad array length 0x%08x > size 0x%08x", _offset, 1260); - - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, _length)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo4 *r) -{ - uint32 _ptr_logon_hours; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->units_per_week)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_logon_hours)); - if (_ptr_logon_hours) { - NDR_ALLOC(ndr, r->logon_hours); - } else { - r->logon_hours = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->logon_hours) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (1260 > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, 1260); - } - } - NDR_ALLOC_N_SIZE(ndr, r->logon_hours, 1260, sizeof(r->logon_hours[0])); - { - uint32 _offset, _length; - NDR_CHECK(ndr_pull_uint32(ndr, &_offset)); - NDR_CHECK(ndr_pull_uint32(ndr, &_length)); - if (_offset != 0) return ndr_pull_error(ndr, NDR_ERR_OFFSET, "Bad array offset 0x%08x", _offset); - if (_length > 1260 || _length != r->units_per_week/8) return ndr_pull_error(ndr, NDR_ERR_LENGTH, "Bad array length 0x%08x > size 0x%08x", _offset, 1260); - - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, _length)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo5 *r) -{ - uint32 _ptr_logon_hours; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->rid)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->primary_gid)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_directory)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->profile)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->workstations)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_logon)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_logoff)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->units_per_week)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_logon_hours)); - if (_ptr_logon_hours) { - NDR_ALLOC(ndr, r->logon_hours); - } else { - r->logon_hours = NULL; - } - NDR_CHECK(ndr_pull_uint16(ndr, &r->bad_pwd_count)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->num_logons)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_pwd_change)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->acct_expiry)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->acct_flags)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_directory)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->profile)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); - if (r->logon_hours) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (1260 > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, 1260); - } - } - NDR_ALLOC_N_SIZE(ndr, r->logon_hours, 1260, sizeof(r->logon_hours[0])); - { - uint32 _offset, _length; - NDR_CHECK(ndr_pull_uint32(ndr, &_offset)); - NDR_CHECK(ndr_pull_uint32(ndr, &_length)); - if (_offset != 0) return ndr_pull_error(ndr, NDR_ERR_OFFSET, "Bad array offset 0x%08x", _offset); - if (_length > 1260 || _length != r->units_per_week/8) return ndr_pull_error(ndr, NDR_ERR_LENGTH, "Bad array length 0x%08x > size 0x%08x", _offset, 1260); - - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, _length)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo6 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo7 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->username)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo8 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo9 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->primary_gid)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo10(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo10 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_dir)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_dir)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo11 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo12 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->profile)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->profile)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo13 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo14(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo14 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->workstations)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo16(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo16 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->acct_flags)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo17(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo17 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->acct_expiry)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo20(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo20 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->callback)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->callback)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo21(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo21 *r) -{ - uint32 _ptr_buffer; - uint32 _ptr_logon_hours; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_logon)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_logoff)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_pwd_change)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->acct_expiry)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->allow_pwd_change)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->force_pwd_change)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_dir)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->profile)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->workstations)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->comment)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->callback)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown1)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown2)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown3)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->buf_count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_buffer)); - if (_ptr_buffer) { - NDR_ALLOC(ndr, r->buffer); - } else { - r->buffer = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->rid)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->primary_gid)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->acct_flags)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->fields_present)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->units_per_week)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_logon_hours)); - if (_ptr_logon_hours) { - NDR_ALLOC(ndr, r->logon_hours); - } else { - r->logon_hours = NULL; - } - NDR_CHECK(ndr_pull_uint16(ndr, &r->bad_pwd_count)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->num_logons)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->country_code)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->code_page)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->nt_pwd_set)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->lm_pwd_set)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->expired_flag)); - NDR_CHECK(ndr_pull_uint8(ndr, &r->unknown4)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_dir)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->profile)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->comment)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->callback)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown1)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown2)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown3)); - if (r->buffer) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->buf_count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->buf_count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->buffer, r->buf_count, sizeof(r->buffer[0])); - { - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->buffer, r->buf_count)); - } - } - if (r->logon_hours) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (1260 > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, 1260); - } - } - NDR_ALLOC_N_SIZE(ndr, r->logon_hours, 1260, sizeof(r->logon_hours[0])); - { - uint32 _offset, _length; - NDR_CHECK(ndr_pull_uint32(ndr, &_offset)); - NDR_CHECK(ndr_pull_uint32(ndr, &_length)); - if (_offset != 0) return ndr_pull_error(ndr, NDR_ERR_OFFSET, "Bad array offset 0x%08x", _offset); - if (_length > 1260 || _length != r->units_per_week/8) return ndr_pull_error(ndr, NDR_ERR_LENGTH, "Bad array length 0x%08x > size 0x%08x", _offset, 1260); - - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, _length)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo(struct ndr_pull *ndr, int ndr_flags, uint16 level, union samr_UserInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 1: { - NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1)); - break; } - - case 2: { - NDR_CHECK(ndr_pull_samr_UserInfo2(ndr, NDR_SCALARS, &r->info2)); - break; } - - case 3: { - NDR_CHECK(ndr_pull_samr_UserInfo3(ndr, NDR_SCALARS, &r->info3)); - break; } - - case 4: { - NDR_CHECK(ndr_pull_samr_UserInfo4(ndr, NDR_SCALARS, &r->info4)); - break; } - - case 5: { - NDR_CHECK(ndr_pull_samr_UserInfo5(ndr, NDR_SCALARS, &r->info5)); - break; } - - case 6: { - NDR_CHECK(ndr_pull_samr_UserInfo6(ndr, NDR_SCALARS, &r->info6)); - break; } - - case 7: { - NDR_CHECK(ndr_pull_samr_UserInfo7(ndr, NDR_SCALARS, &r->info7)); - break; } - - case 8: { - NDR_CHECK(ndr_pull_samr_UserInfo8(ndr, NDR_SCALARS, &r->info8)); - break; } - - case 9: { - NDR_CHECK(ndr_pull_samr_UserInfo9(ndr, NDR_SCALARS, &r->info9)); - break; } - - case 10: { - NDR_CHECK(ndr_pull_samr_UserInfo10(ndr, NDR_SCALARS, &r->info10)); - break; } - - case 11: { - NDR_CHECK(ndr_pull_samr_UserInfo11(ndr, NDR_SCALARS, &r->info11)); - break; } - - case 12: { - NDR_CHECK(ndr_pull_samr_UserInfo12(ndr, NDR_SCALARS, &r->info12)); - break; } - - case 13: { - NDR_CHECK(ndr_pull_samr_UserInfo13(ndr, NDR_SCALARS, &r->info13)); - break; } - - case 14: { - NDR_CHECK(ndr_pull_samr_UserInfo14(ndr, NDR_SCALARS, &r->info14)); - break; } - - case 16: { - NDR_CHECK(ndr_pull_samr_UserInfo16(ndr, NDR_SCALARS, &r->info16)); - break; } - - case 17: { - NDR_CHECK(ndr_pull_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17)); - break; } - - case 20: { - NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20)); - break; } - - case 21: { - NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info21)); - break; } - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 1: - NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_BUFFERS, &r->info1)); - break; - - case 2: - NDR_CHECK(ndr_pull_samr_UserInfo2(ndr, NDR_BUFFERS, &r->info2)); - break; - - case 3: - NDR_CHECK(ndr_pull_samr_UserInfo3(ndr, NDR_BUFFERS, &r->info3)); - break; - - case 4: - NDR_CHECK(ndr_pull_samr_UserInfo4(ndr, NDR_BUFFERS, &r->info4)); - break; - - case 5: - NDR_CHECK(ndr_pull_samr_UserInfo5(ndr, NDR_BUFFERS, &r->info5)); - break; - - case 6: - NDR_CHECK(ndr_pull_samr_UserInfo6(ndr, NDR_BUFFERS, &r->info6)); - break; - - case 7: - NDR_CHECK(ndr_pull_samr_UserInfo7(ndr, NDR_BUFFERS, &r->info7)); - break; - - case 8: - NDR_CHECK(ndr_pull_samr_UserInfo8(ndr, NDR_BUFFERS, &r->info8)); - break; - - case 9: - NDR_CHECK(ndr_pull_samr_UserInfo9(ndr, NDR_BUFFERS, &r->info9)); - break; - - case 10: - NDR_CHECK(ndr_pull_samr_UserInfo10(ndr, NDR_BUFFERS, &r->info10)); - break; - - case 11: - NDR_CHECK(ndr_pull_samr_UserInfo11(ndr, NDR_BUFFERS, &r->info11)); - break; - - case 12: - NDR_CHECK(ndr_pull_samr_UserInfo12(ndr, NDR_BUFFERS, &r->info12)); - break; - - case 13: - NDR_CHECK(ndr_pull_samr_UserInfo13(ndr, NDR_BUFFERS, &r->info13)); - break; - - case 14: - NDR_CHECK(ndr_pull_samr_UserInfo14(ndr, NDR_BUFFERS, &r->info14)); - break; - - case 16: - NDR_CHECK(ndr_pull_samr_UserInfo16(ndr, NDR_BUFFERS, &r->info16)); - break; - - case 17: - NDR_CHECK(ndr_pull_samr_UserInfo17(ndr, NDR_BUFFERS, &r->info17)); - break; - - case 20: - NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20)); - break; - - case 21: - NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info21)); - break; - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, struct samr_QueryUserInfo *r) -{ - uint32 _ptr_info; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info)); - if (_ptr_info) { - NDR_ALLOC(ndr, r->out.info); - } else { - r->out.info = NULL; - } - if (r->out.info) { - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint16 _level; - NDR_CHECK(ndr_pull_uint16(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); - } - NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, r->out.info)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SetUserInfo(struct ndr_pull *ndr, struct samr_SetUserInfo *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_CHANGE_PASSWORD_USER(struct ndr_pull *ndr, struct samr_CHANGE_PASSWORD_USER *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GET_GROUPS_FOR_USER(struct ndr_pull *ndr, struct samr_GET_GROUPS_FOR_USER *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_QUERY_DISPINFO(struct ndr_pull *ndr, struct samr_QUERY_DISPINFO *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GET_DISPLAY_ENUMERATION_INDEX(struct ndr_pull *ndr, struct samr_GET_DISPLAY_ENUMERATION_INDEX *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_TEST_PRIVATE_FUNCTIONS_DOMAIN(struct ndr_pull *ndr, struct samr_TEST_PRIVATE_FUNCTIONS_DOMAIN *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_TEST_PRIVATE_FUNCTIONS_USER(struct ndr_pull *ndr, struct samr_TEST_PRIVATE_FUNCTIONS_USER *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GET_USRDOM_PWINFO(struct ndr_pull *ndr, struct samr_GET_USRDOM_PWINFO *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN(struct ndr_pull *ndr, struct samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_QUERY_INFORMATION_DOMAIN2(struct ndr_pull *ndr, struct samr_QUERY_INFORMATION_DOMAIN2 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_QUERY_INFORMATION_USER2(struct ndr_pull *ndr, struct samr_QUERY_INFORMATION_USER2 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_QUERY_DISPINFO2(struct ndr_pull *ndr, struct samr_QUERY_DISPINFO2 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GET_DISPLAY_ENUMERATION_INDEX2(struct ndr_pull *ndr, struct samr_GET_DISPLAY_ENUMERATION_INDEX2 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_CREATE_USER2_IN_DOMAIN(struct ndr_pull *ndr, struct samr_CREATE_USER2_IN_DOMAIN *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_QUERY_DISPINFO3(struct ndr_pull *ndr, struct samr_QUERY_DISPINFO3 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS(struct ndr_pull *ndr, struct samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS(struct ndr_pull *ndr, struct samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_OEM_CHANGE_PASSWORD_USER2(struct ndr_pull *ndr, struct samr_OEM_CHANGE_PASSWORD_USER2 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UNICODE_CHANGE_PASSWORD_USER2(struct ndr_pull *ndr, struct samr_UNICODE_CHANGE_PASSWORD_USER2 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GET_DOM_PWINFO(struct ndr_pull *ndr, struct samr_GET_DOM_PWINFO *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_CONNECT2(struct ndr_pull *ndr, struct samr_CONNECT2 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SET_USERINFO2(struct ndr_pull *ndr, struct samr_SET_USERINFO2 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SET_BOOT_KEY_INFORMATION(struct ndr_pull *ndr, struct samr_SET_BOOT_KEY_INFORMATION *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GET_BOOT_KEY_INFORMATION(struct ndr_pull *ndr, struct samr_GET_BOOT_KEY_INFORMATION *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_CONNECT3(struct ndr_pull *ndr, struct samr_CONNECT3 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_Connect4(struct ndr_pull *ndr, struct samr_Connect4 *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UNICODE_CHANGE_PASSWORD_USER3(struct ndr_pull *ndr, struct samr_UNICODE_CHANGE_PASSWORD_USER3 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_CONNECT5(struct ndr_pull *ndr, struct samr_CONNECT5 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_RID_TO_SID(struct ndr_pull *ndr, struct samr_RID_TO_SID *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SET_DSRM_PASSWORD(struct ndr_pull *ndr, struct samr_SET_DSRM_PASSWORD *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_VALIDATE_PASSWORD(struct ndr_pull *ndr, struct samr_VALIDATE_PASSWORD *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -void ndr_print_samr_Connect(struct ndr_print *ndr, const char *name, int flags, struct samr_Connect *r) -{ - ndr_print_struct(ndr, name, "samr_Connect"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_Connect"); - ndr->depth++; - ndr_print_ptr(ndr, "system_name", r->in.system_name); - ndr->depth++; - if (r->in.system_name) { - ndr_print_uint16(ndr, "system_name", *r->in.system_name); - } - ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_Connect"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->out.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->out.handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_Close(struct ndr_print *ndr, const char *name, int flags, struct samr_Close *r) -{ - ndr_print_struct(ndr, name, "samr_Close"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_Close"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_Close"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->out.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->out.handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SetSecurity(struct ndr_print *ndr, const char *name, int flags, struct samr_SetSecurity *r) -{ - ndr_print_struct(ndr, name, "samr_SetSecurity"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SetSecurity"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SetSecurity"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SdBuf(struct ndr_print *ndr, const char *name, struct samr_SdBuf *r) -{ - ndr_print_struct(ndr, name, "samr_SdBuf"); - ndr->depth++; - ndr_print_uint32(ndr, "sd_size", r->sd_size); - ndr_print_ptr(ndr, "sd", r->sd); - ndr->depth++; - if (r->sd) { - ndr_print_security_descriptor(ndr, "sd", r->sd); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_samr_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, struct samr_QuerySecurity *r) -{ - ndr_print_struct(ndr, name, "samr_QuerySecurity"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QuerySecurity"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "sec_info", r->in.sec_info); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QuerySecurity"); - ndr->depth++; - ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf); - ndr->depth++; - if (r->out.sdbuf) { - ndr_print_samr_SdBuf(ndr, "sdbuf", r->out.sdbuf); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_Shutdown(struct ndr_print *ndr, const char *name, int flags, struct samr_Shutdown *r) -{ - ndr_print_struct(ndr, name, "samr_Shutdown"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_Shutdown"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_Shutdown"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_Name(struct ndr_print *ndr, const char *name, struct samr_Name *r) -{ - ndr_print_struct(ndr, name, "samr_Name"); - ndr->depth++; - ndr_print_uint16(ndr, "name_len", r->name_len); - ndr_print_uint16(ndr, "name_size", r->name_size); - ndr_print_ptr(ndr, "name", r->name); - ndr->depth++; - if (r->name) { - ndr_print_unistr_noterm(ndr, "name", r->name); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_samr_LookupDomain(struct ndr_print *ndr, const char *name, int flags, struct samr_LookupDomain *r) -{ - ndr_print_struct(ndr, name, "samr_LookupDomain"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_LookupDomain"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "domain", r->in.domain); - ndr->depth++; - ndr_print_samr_Name(ndr, "domain", r->in.domain); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_LookupDomain"); - ndr->depth++; - ndr_print_ptr(ndr, "sid", r->out.sid); - ndr->depth++; - if (r->out.sid) { - ndr_print_dom_sid2(ndr, "sid", r->out.sid); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SamEntry(struct ndr_print *ndr, const char *name, struct samr_SamEntry *r) -{ - ndr_print_struct(ndr, name, "samr_SamEntry"); - ndr->depth++; - ndr_print_uint32(ndr, "idx", r->idx); - ndr_print_samr_Name(ndr, "name", &r->name); - ndr->depth--; -} - -void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, struct samr_SamArray *r) -{ - ndr_print_struct(ndr, name, "samr_SamArray"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "entries", r->entries); - ndr->depth++; - if (r->entries) { - ndr_print_array(ndr, "entries", r->entries, sizeof(r->entries[0]), r->count, (ndr_print_fn_t)ndr_print_samr_SamEntry); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_samr_EnumDomains(struct ndr_print *ndr, const char *name, int flags, struct samr_EnumDomains *r) -{ - ndr_print_struct(ndr, name, "samr_EnumDomains"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_EnumDomains"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - ndr->depth--; - ndr_print_uint32(ndr, "buf_size", r->in.buf_size); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_EnumDomains"); - ndr->depth++; - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - ndr->depth--; - ndr_print_ptr(ndr, "sam", r->out.sam); - ndr->depth++; - if (r->out.sam) { - ndr_print_samr_SamArray(ndr, "sam", r->out.sam); - } - ndr->depth--; - ndr_print_ptr(ndr, "num_entries", r->out.num_entries); - ndr->depth++; - ndr_print_uint32(ndr, "num_entries", *r->out.num_entries); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_OpenDomain(struct ndr_print *ndr, const char *name, int flags, struct samr_OpenDomain *r) -{ - ndr_print_struct(ndr, name, "samr_OpenDomain"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_OpenDomain"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr_print_ptr(ndr, "sid", r->in.sid); - ndr->depth++; - ndr_print_dom_sid2(ndr, "sid", r->in.sid); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_OpenDomain"); - ndr->depth++; - ndr_print_ptr(ndr, "domain_handle", r->out.domain_handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "domain_handle", r->out.domain_handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, struct samr_DomInfo1 *r) -{ - ndr_print_struct(ndr, name, "samr_DomInfo1"); - ndr->depth++; - ndr_print_uint16(ndr, "min_length_password", r->min_length_password); - ndr_print_uint16(ndr, "password_history", r->password_history); - ndr_print_uint32(ndr, "flag", r->flag); - ndr_print_NTTIME(ndr, "expire", r->expire); - ndr_print_NTTIME(ndr, "min_passwordage", r->min_passwordage); - ndr->depth--; -} - -void ndr_print_samr_DomInfo2(struct ndr_print *ndr, const char *name, struct samr_DomInfo2 *r) -{ - ndr_print_struct(ndr, name, "samr_DomInfo2"); - ndr->depth++; - ndr_print_HYPER_T(ndr, "force_logoff_time", r->force_logoff_time); - ndr_print_samr_Name(ndr, "unknown1", &r->unknown1); - ndr_print_samr_Name(ndr, "domain", &r->domain); - ndr_print_samr_Name(ndr, "primary", &r->primary); - ndr_print_HYPER_T(ndr, "sequence_num", r->sequence_num); - ndr_print_uint32(ndr, "unknown2", r->unknown2); - ndr_print_uint32(ndr, "role", r->role); - ndr_print_uint32(ndr, "unknown3", r->unknown3); - ndr_print_uint32(ndr, "num_users", r->num_users); - ndr_print_uint32(ndr, "num_groups", r->num_groups); - ndr_print_uint32(ndr, "num_aliases", r->num_aliases); - ndr->depth--; -} - -void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, struct samr_DomInfo3 *r) -{ - ndr_print_struct(ndr, name, "samr_DomInfo3"); - ndr->depth++; - ndr_print_HYPER_T(ndr, "force_logoff_time", r->force_logoff_time); - ndr->depth--; -} - -void ndr_print_samr_DomInfo4(struct ndr_print *ndr, const char *name, struct samr_DomInfo4 *r) -{ - ndr_print_struct(ndr, name, "samr_DomInfo4"); - ndr->depth++; - ndr_print_samr_Name(ndr, "unknown", &r->unknown); - ndr->depth--; -} - -void ndr_print_samr_DomInfo5(struct ndr_print *ndr, const char *name, struct samr_DomInfo5 *r) -{ - ndr_print_struct(ndr, name, "samr_DomInfo5"); - ndr->depth++; - ndr_print_samr_Name(ndr, "domain", &r->domain); - ndr->depth--; -} - -void ndr_print_samr_DomInfo6(struct ndr_print *ndr, const char *name, struct samr_DomInfo6 *r) -{ - ndr_print_struct(ndr, name, "samr_DomInfo6"); - ndr->depth++; - ndr_print_samr_Name(ndr, "primary", &r->primary); - ndr->depth--; -} - -void ndr_print_samr_DomInfo7(struct ndr_print *ndr, const char *name, struct samr_DomInfo7 *r) -{ - ndr_print_struct(ndr, name, "samr_DomInfo7"); - ndr->depth++; - ndr_print_uint32(ndr, "role", r->role); - ndr->depth--; -} - -void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, struct samr_DomInfo8 *r) -{ - ndr_print_struct(ndr, name, "samr_DomInfo8"); - ndr->depth++; - ndr_print_HYPER_T(ndr, "sequence_num", r->sequence_num); - ndr_print_NTTIME(ndr, "last_xxx_time", r->last_xxx_time); - ndr->depth--; -} - -void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, struct samr_DomInfo9 *r) -{ - ndr_print_struct(ndr, name, "samr_DomInfo9"); - ndr->depth++; - ndr_print_uint32(ndr, "unknown", r->unknown); - ndr->depth--; -} - -void ndr_print_samr_DomInfo11(struct ndr_print *ndr, const char *name, struct samr_DomInfo11 *r) -{ - ndr_print_struct(ndr, name, "samr_DomInfo11"); - ndr->depth++; - ndr_print_HYPER_T(ndr, "force_logoff_time", r->force_logoff_time); - ndr_print_samr_Name(ndr, "unknown1", &r->unknown1); - ndr_print_samr_Name(ndr, "domain", &r->domain); - ndr_print_samr_Name(ndr, "primary", &r->primary); - ndr_print_HYPER_T(ndr, "sequence_num", r->sequence_num); - ndr_print_uint32(ndr, "unknown2", r->unknown2); - ndr_print_uint32(ndr, "role", r->role); - ndr_print_uint32(ndr, "unknown3", r->unknown3); - ndr_print_uint32(ndr, "num_users", r->num_users); - ndr_print_uint32(ndr, "num_groups", r->num_groups); - ndr_print_uint32(ndr, "num_aliases", r->num_aliases); - ndr_print_HYPER_T(ndr, "lockout_duration", r->lockout_duration); - ndr_print_HYPER_T(ndr, "lockout_window", r->lockout_window); - ndr_print_uint16(ndr, "lockout_threshold", r->lockout_threshold); - ndr->depth--; -} - -void ndr_print_samr_DomInfo12(struct ndr_print *ndr, const char *name, struct samr_DomInfo12 *r) -{ - ndr_print_struct(ndr, name, "samr_DomInfo12"); - ndr->depth++; - ndr_print_HYPER_T(ndr, "lockout_duration", r->lockout_duration); - ndr_print_HYPER_T(ndr, "lockout_window", r->lockout_window); - ndr_print_uint16(ndr, "lockout_threshold", r->lockout_threshold); - ndr->depth--; -} - -void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, struct samr_DomInfo13 *r) -{ - ndr_print_struct(ndr, name, "samr_DomInfo13"); - ndr->depth++; - ndr_print_HYPER_T(ndr, "sequence_num", r->sequence_num); - ndr_print_NTTIME(ndr, "last_xxx_time", r->last_xxx_time); - ndr_print_uint32(ndr, "unknown1", r->unknown1); - ndr_print_uint32(ndr, "unknown2", r->unknown2); - ndr->depth--; -} - -void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, uint16 level, union samr_DomainInfo *r) -{ - ndr_print_union(ndr, name, level, "samr_DomainInfo"); - switch (level) { - case 1: - ndr_print_samr_DomInfo1(ndr, "info1", &r->info1); - break; - - case 2: - ndr_print_samr_DomInfo2(ndr, "info2", &r->info2); - break; - - case 3: - ndr_print_samr_DomInfo3(ndr, "info3", &r->info3); - break; - - case 4: - ndr_print_samr_DomInfo4(ndr, "info4", &r->info4); - break; - - case 5: - ndr_print_samr_DomInfo5(ndr, "info5", &r->info5); - break; - - case 6: - ndr_print_samr_DomInfo6(ndr, "info6", &r->info6); - break; - - case 7: - ndr_print_samr_DomInfo7(ndr, "info7", &r->info7); - break; - - case 8: - ndr_print_samr_DomInfo8(ndr, "info8", &r->info8); - break; - - case 9: - ndr_print_samr_DomInfo9(ndr, "info9", &r->info9); - break; - - case 11: - ndr_print_samr_DomInfo11(ndr, "info11", &r->info11); - break; - - case 12: - ndr_print_samr_DomInfo12(ndr, "info12", &r->info12); - break; - - case 13: - ndr_print_samr_DomInfo13(ndr, "info13", &r->info13); - break; - - default: - ndr_print_bad_level(ndr, name, level); - } -} - -void ndr_print_samr_QueryDomainInfo(struct ndr_print *ndr, const char *name, int flags, struct samr_QueryDomainInfo *r) -{ - ndr_print_struct(ndr, name, "samr_QueryDomainInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QueryDomainInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QueryDomainInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "info", r->out.info); - ndr->depth++; - if (r->out.info) { - ndr_print_samr_DomainInfo(ndr, "info", r->in.level, r->out.info); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SET_DOMAIN_INFO(struct ndr_print *ndr, const char *name, int flags, struct samr_SET_DOMAIN_INFO *r) -{ - ndr_print_struct(ndr, name, "samr_SET_DOMAIN_INFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SET_DOMAIN_INFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SET_DOMAIN_INFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CREATE_DOM_GROUP(struct ndr_print *ndr, const char *name, int flags, struct samr_CREATE_DOM_GROUP *r) -{ - ndr_print_struct(ndr, name, "samr_CREATE_DOM_GROUP"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CREATE_DOM_GROUP"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CREATE_DOM_GROUP"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_EnumDomainGroups(struct ndr_print *ndr, const char *name, int flags, struct samr_EnumDomainGroups *r) -{ - ndr_print_struct(ndr, name, "samr_EnumDomainGroups"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_EnumDomainGroups"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - ndr->depth--; - ndr_print_uint32(ndr, "max_size", r->in.max_size); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_EnumDomainGroups"); - ndr->depth++; - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - ndr->depth--; - ndr_print_ptr(ndr, "sam", r->out.sam); - ndr->depth++; - if (r->out.sam) { - ndr_print_samr_SamArray(ndr, "sam", r->out.sam); - } - ndr->depth--; - ndr_print_uint32(ndr, "num_entries", r->out.num_entries); - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CreateUser(struct ndr_print *ndr, const char *name, int flags, struct samr_CreateUser *r) -{ - ndr_print_struct(ndr, name, "samr_CreateUser"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CreateUser"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "username", r->in.username); - ndr->depth++; - ndr_print_samr_Name(ndr, "username", r->in.username); - ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CreateUser"); - ndr->depth++; - ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); - ndr->depth--; - ndr_print_ptr(ndr, "rid", r->out.rid); - ndr->depth++; - ndr_print_uint32(ndr, "rid", *r->out.rid); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_EnumDomainUsers(struct ndr_print *ndr, const char *name, int flags, struct samr_EnumDomainUsers *r) -{ - ndr_print_struct(ndr, name, "samr_EnumDomainUsers"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_EnumDomainUsers"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - ndr->depth--; - ndr_print_uint32(ndr, "acct_flags", r->in.acct_flags); - ndr_print_uint32(ndr, "max_size", r->in.max_size); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_EnumDomainUsers"); - ndr->depth++; - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - ndr->depth--; - ndr_print_ptr(ndr, "sam", r->out.sam); - ndr->depth++; - if (r->out.sam) { - ndr_print_samr_SamArray(ndr, "sam", r->out.sam); - } - ndr->depth--; - ndr_print_uint32(ndr, "num_entries", r->out.num_entries); - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CREATE_DOM_ALIAS(struct ndr_print *ndr, const char *name, int flags, struct samr_CREATE_DOM_ALIAS *r) -{ - ndr_print_struct(ndr, name, "samr_CREATE_DOM_ALIAS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CREATE_DOM_ALIAS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CREATE_DOM_ALIAS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_EnumDomainAliases(struct ndr_print *ndr, const char *name, int flags, struct samr_EnumDomainAliases *r) -{ - ndr_print_struct(ndr, name, "samr_EnumDomainAliases"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_EnumDomainAliases"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - ndr->depth--; - ndr_print_uint32(ndr, "max_size", r->in.max_size); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_EnumDomainAliases"); - ndr->depth++; - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - ndr->depth--; - ndr_print_ptr(ndr, "sam", r->out.sam); - ndr->depth++; - if (r->out.sam) { - ndr_print_samr_SamArray(ndr, "sam", r->out.sam); - } - ndr->depth--; - ndr_print_uint32(ndr, "num_entries", r->out.num_entries); - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_Sids(struct ndr_print *ndr, const char *name, struct samr_Sids *r) -{ - ndr_print_struct(ndr, name, "samr_Sids"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "sids", r->sids); - ndr->depth++; - if (r->sids) { - ndr_print_array(ndr, "sids", r->sids, sizeof(r->sids[0]), r->count, (ndr_print_fn_t)ndr_print_dom_sid2); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, struct samr_Ids *r) -{ - ndr_print_struct(ndr, name, "samr_Ids"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "ids", r->ids); - ndr->depth++; - if (r->ids) { - ndr_print_array_uint32(ndr, "ids", r->ids, r->count); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_samr_GetAliasMembership(struct ndr_print *ndr, const char *name, int flags, struct samr_GetAliasMembership *r) -{ - ndr_print_struct(ndr, name, "samr_GetAliasMembership"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GetAliasMembership"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "sids", r->in.sids); - ndr->depth++; - if (r->in.sids) { - ndr_print_samr_Sids(ndr, "sids", r->in.sids); - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GetAliasMembership"); - ndr->depth++; - ndr_print_ptr(ndr, "rids", r->out.rids); - ndr->depth++; - if (r->out.rids) { - ndr_print_samr_Ids(ndr, "rids", r->out.rids); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_LookupNames(struct ndr_print *ndr, const char *name, int flags, struct samr_LookupNames *r) -{ - ndr_print_struct(ndr, name, "samr_LookupNames"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_LookupNames"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "num_names", r->in.num_names); - ndr_print_ptr(ndr, "names", r->in.names); - ndr->depth++; - ndr_print_array(ndr, "names", r->in.names, sizeof(r->in.names[0]), r->in.num_names, (ndr_print_fn_t)ndr_print_samr_Name); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_LookupNames"); - ndr->depth++; - ndr_print_samr_Ids(ndr, "rids", &r->out.rids); - ndr_print_samr_Ids(ndr, "types", &r->out.types); - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_Names(struct ndr_print *ndr, const char *name, struct samr_Names *r) -{ - ndr_print_struct(ndr, name, "samr_Names"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "names", r->names); - ndr->depth++; - if (r->names) { - ndr_print_array(ndr, "names", r->names, sizeof(r->names[0]), r->count, (ndr_print_fn_t)ndr_print_samr_Name); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_samr_LookupRids(struct ndr_print *ndr, const char *name, int flags, struct samr_LookupRids *r) -{ - ndr_print_struct(ndr, name, "samr_LookupRids"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_LookupRids"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "num_rids", r->in.num_rids); - ndr_print_ptr(ndr, "rids", r->in.rids); - ndr->depth++; - ndr_print_array_uint32(ndr, "rids", r->in.rids, r->in.num_rids); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_LookupRids"); - ndr->depth++; - ndr_print_samr_Names(ndr, "names", &r->out.names); - ndr_print_samr_Ids(ndr, "types", &r->out.types); - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_OpenGroup(struct ndr_print *ndr, const char *name, int flags, struct samr_OpenGroup *r) -{ - ndr_print_struct(ndr, name, "samr_OpenGroup"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_OpenGroup"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr_print_uint32(ndr, "rid", r->in.rid); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_OpenGroup"); - ndr->depth++; - ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GroupInfoAll(struct ndr_print *ndr, const char *name, struct samr_GroupInfoAll *r) -{ - ndr_print_struct(ndr, name, "samr_GroupInfoAll"); - ndr->depth++; - ndr_print_samr_Name(ndr, "name", &r->name); - ndr_print_uint32(ndr, "unknown", r->unknown); - ndr_print_uint32(ndr, "num_members", r->num_members); - ndr_print_samr_Name(ndr, "description", &r->description); - ndr->depth--; -} - -void ndr_print_samr_GroupInfoName(struct ndr_print *ndr, const char *name, struct samr_GroupInfoName *r) -{ - ndr_print_struct(ndr, name, "samr_GroupInfoName"); - ndr->depth++; - ndr_print_samr_Name(ndr, "Name", &r->Name); - ndr->depth--; -} - -void ndr_print_samr_GroupInfoX(struct ndr_print *ndr, const char *name, struct samr_GroupInfoX *r) -{ - ndr_print_struct(ndr, name, "samr_GroupInfoX"); - ndr->depth++; - ndr_print_uint32(ndr, "unknown", r->unknown); - ndr->depth--; -} - -void ndr_print_samr_GroupInfoDesciption(struct ndr_print *ndr, const char *name, struct samr_GroupInfoDesciption *r) -{ - ndr_print_struct(ndr, name, "samr_GroupInfoDesciption"); - ndr->depth++; - ndr_print_samr_Name(ndr, "description", &r->description); - ndr->depth--; -} - -void ndr_print_samr_GroupInfo(struct ndr_print *ndr, const char *name, uint16 level, union samr_GroupInfo *r) -{ - ndr_print_union(ndr, name, level, "samr_GroupInfo"); - switch (level) { - case 1: - ndr_print_samr_GroupInfoAll(ndr, "all", &r->all); - break; - - case 2: - ndr_print_samr_GroupInfoName(ndr, "name", &r->name); - break; - - case 3: - ndr_print_samr_GroupInfoX(ndr, "unknown", &r->unknown); - break; - - case 4: - ndr_print_samr_GroupInfoDesciption(ndr, "description", &r->description); - break; - - default: - ndr_print_bad_level(ndr, name, level); - } -} - -void ndr_print_samr_QueryGroupInfo(struct ndr_print *ndr, const char *name, int flags, struct samr_QueryGroupInfo *r) -{ - ndr_print_struct(ndr, name, "samr_QueryGroupInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QueryGroupInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QueryGroupInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "info", r->out.info); - ndr->depth++; - if (r->out.info) { - ndr_print_samr_GroupInfo(ndr, "info", r->in.level, r->out.info); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SET_GROUPINFO(struct ndr_print *ndr, const char *name, int flags, struct samr_SET_GROUPINFO *r) -{ - ndr_print_struct(ndr, name, "samr_SET_GROUPINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SET_GROUPINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SET_GROUPINFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_ADD_GROUPMEM(struct ndr_print *ndr, const char *name, int flags, struct samr_ADD_GROUPMEM *r) -{ - ndr_print_struct(ndr, name, "samr_ADD_GROUPMEM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_ADD_GROUPMEM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_ADD_GROUPMEM"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_DELETE_DOM_GROUP(struct ndr_print *ndr, const char *name, int flags, struct samr_DELETE_DOM_GROUP *r) -{ - ndr_print_struct(ndr, name, "samr_DELETE_DOM_GROUP"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_DELETE_DOM_GROUP"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_DELETE_DOM_GROUP"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_DEL_GROUPMEM(struct ndr_print *ndr, const char *name, int flags, struct samr_DEL_GROUPMEM *r) -{ - ndr_print_struct(ndr, name, "samr_DEL_GROUPMEM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_DEL_GROUPMEM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_DEL_GROUPMEM"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_QUERY_GROUPMEM(struct ndr_print *ndr, const char *name, int flags, struct samr_QUERY_GROUPMEM *r) -{ - ndr_print_struct(ndr, name, "samr_QUERY_GROUPMEM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QUERY_GROUPMEM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QUERY_GROUPMEM"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SET_MEMBER_ATTRIBUTES_OF_GROUP(struct ndr_print *ndr, const char *name, int flags, struct samr_SET_MEMBER_ATTRIBUTES_OF_GROUP *r) -{ - ndr_print_struct(ndr, name, "samr_SET_MEMBER_ATTRIBUTES_OF_GROUP"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SET_MEMBER_ATTRIBUTES_OF_GROUP"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SET_MEMBER_ATTRIBUTES_OF_GROUP"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_OpenAlias(struct ndr_print *ndr, const char *name, int flags, struct samr_OpenAlias *r) -{ - ndr_print_struct(ndr, name, "samr_OpenAlias"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_OpenAlias"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr_print_uint32(ndr, "rid", r->in.rid); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_OpenAlias"); - ndr->depth++; - ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_AliasInfoAll(struct ndr_print *ndr, const char *name, struct samr_AliasInfoAll *r) -{ - ndr_print_struct(ndr, name, "samr_AliasInfoAll"); - ndr->depth++; - ndr_print_samr_Name(ndr, "name", &r->name); - ndr_print_uint32(ndr, "num_members", r->num_members); - ndr_print_samr_Name(ndr, "description", &r->description); - ndr->depth--; -} - -void ndr_print_samr_AliasInfoName(struct ndr_print *ndr, const char *name, struct samr_AliasInfoName *r) -{ - ndr_print_struct(ndr, name, "samr_AliasInfoName"); - ndr->depth++; - ndr_print_samr_Name(ndr, "name", &r->name); - ndr->depth--; -} - -void ndr_print_samr_AliasInfoDescription(struct ndr_print *ndr, const char *name, struct samr_AliasInfoDescription *r) -{ - ndr_print_struct(ndr, name, "samr_AliasInfoDescription"); - ndr->depth++; - ndr_print_samr_Name(ndr, "description", &r->description); - ndr->depth--; -} - -void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name, uint16 level, union samr_AliasInfo *r) -{ - ndr_print_union(ndr, name, level, "samr_AliasInfo"); - switch (level) { - case 1: - ndr_print_samr_AliasInfoAll(ndr, "all", &r->all); - break; - - case 2: - ndr_print_samr_AliasInfoName(ndr, "name", &r->name); - break; - - case 3: - ndr_print_samr_AliasInfoDescription(ndr, "description", &r->description); - break; - - default: - ndr_print_bad_level(ndr, name, level); - } -} - -void ndr_print_samr_QueryAliasInfo(struct ndr_print *ndr, const char *name, int flags, struct samr_QueryAliasInfo *r) -{ - ndr_print_struct(ndr, name, "samr_QueryAliasInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QueryAliasInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QueryAliasInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "info", r->out.info); - ndr->depth++; - if (r->out.info) { - ndr_print_samr_AliasInfo(ndr, "info", r->in.level, r->out.info); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SET_ALIASINFO(struct ndr_print *ndr, const char *name, int flags, struct samr_SET_ALIASINFO *r) -{ - ndr_print_struct(ndr, name, "samr_SET_ALIASINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SET_ALIASINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SET_ALIASINFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_DELETE_DOM_ALIAS(struct ndr_print *ndr, const char *name, int flags, struct samr_DELETE_DOM_ALIAS *r) -{ - ndr_print_struct(ndr, name, "samr_DELETE_DOM_ALIAS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_DELETE_DOM_ALIAS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_DELETE_DOM_ALIAS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_ADD_ALIASMEM(struct ndr_print *ndr, const char *name, int flags, struct samr_ADD_ALIASMEM *r) -{ - ndr_print_struct(ndr, name, "samr_ADD_ALIASMEM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_ADD_ALIASMEM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_ADD_ALIASMEM"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_DEL_ALIASMEM(struct ndr_print *ndr, const char *name, int flags, struct samr_DEL_ALIASMEM *r) -{ - ndr_print_struct(ndr, name, "samr_DEL_ALIASMEM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_DEL_ALIASMEM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_DEL_ALIASMEM"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GET_MEMBERS_IN_ALIAS(struct ndr_print *ndr, const char *name, int flags, struct samr_GET_MEMBERS_IN_ALIAS *r) -{ - ndr_print_struct(ndr, name, "samr_GET_MEMBERS_IN_ALIAS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GET_MEMBERS_IN_ALIAS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GET_MEMBERS_IN_ALIAS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_OpenUser(struct ndr_print *ndr, const char *name, int flags, struct samr_OpenUser *r) -{ - ndr_print_struct(ndr, name, "samr_OpenUser"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_OpenUser"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr_print_uint32(ndr, "rid", r->in.rid); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_OpenUser"); - ndr->depth++; - ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_DeleteUser(struct ndr_print *ndr, const char *name, int flags, struct samr_DeleteUser *r) -{ - ndr_print_struct(ndr, name, "samr_DeleteUser"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_DeleteUser"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_DeleteUser"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->out.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->out.handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_UserInfo1(struct ndr_print *ndr, const char *name, struct samr_UserInfo1 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo1"); - ndr->depth++; - ndr_print_samr_Name(ndr, "username", &r->username); - ndr_print_samr_Name(ndr, "full_name", &r->full_name); - ndr_print_uint32(ndr, "primary_gid", r->primary_gid); - ndr_print_samr_Name(ndr, "description", &r->description); - ndr_print_samr_Name(ndr, "comment", &r->comment); - ndr->depth--; -} - -void ndr_print_samr_UserInfo2(struct ndr_print *ndr, const char *name, struct samr_UserInfo2 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo2"); - ndr->depth++; - ndr_print_samr_Name(ndr, "comment", &r->comment); - ndr_print_samr_Name(ndr, "unknown", &r->unknown); - ndr_print_uint16(ndr, "country_code", r->country_code); - ndr_print_uint16(ndr, "code_page", r->code_page); - ndr->depth--; -} - -void ndr_print_samr_UserInfo3(struct ndr_print *ndr, const char *name, struct samr_UserInfo3 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo3"); - ndr->depth++; - ndr_print_samr_Name(ndr, "username", &r->username); - ndr_print_samr_Name(ndr, "full_name", &r->full_name); - ndr_print_uint32(ndr, "Rid", r->Rid); - ndr_print_uint32(ndr, "primary_gid", r->primary_gid); - ndr_print_samr_Name(ndr, "home_directory", &r->home_directory); - ndr_print_samr_Name(ndr, "home_drive", &r->home_drive); - ndr_print_samr_Name(ndr, "logon_script", &r->logon_script); - ndr_print_samr_Name(ndr, "profile", &r->profile); - ndr_print_samr_Name(ndr, "workstations", &r->workstations); - ndr_print_NTTIME(ndr, "last_logon", r->last_logon); - ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff); - ndr_print_NTTIME(ndr, "last_pwd_change", r->last_pwd_change); - ndr_print_NTTIME(ndr, "allow_pwd_change", r->allow_pwd_change); - ndr_print_NTTIME(ndr, "force_pwd_change", r->force_pwd_change); - ndr_print_uint32(ndr, "units_per_week", r->units_per_week); - ndr_print_ptr(ndr, "logon_hours", r->logon_hours); - ndr->depth++; - if (r->logon_hours) { - ndr_print_array_uint8(ndr, "logon_hours", r->logon_hours, r->units_per_week/8); - } - ndr->depth--; - ndr_print_uint16(ndr, "bad_pwd_count", r->bad_pwd_count); - ndr_print_uint16(ndr, "num_logons", r->num_logons); - ndr_print_uint32(ndr, "acct_flags", r->acct_flags); - ndr->depth--; -} - -void ndr_print_samr_UserInfo4(struct ndr_print *ndr, const char *name, struct samr_UserInfo4 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo4"); - ndr->depth++; - ndr_print_uint32(ndr, "units_per_week", r->units_per_week); - ndr_print_ptr(ndr, "logon_hours", r->logon_hours); - ndr->depth++; - if (r->logon_hours) { - ndr_print_array_uint8(ndr, "logon_hours", r->logon_hours, r->units_per_week/8); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_samr_UserInfo5(struct ndr_print *ndr, const char *name, struct samr_UserInfo5 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo5"); - ndr->depth++; - ndr_print_samr_Name(ndr, "username", &r->username); - ndr_print_samr_Name(ndr, "full_name", &r->full_name); - ndr_print_uint32(ndr, "rid", r->rid); - ndr_print_uint32(ndr, "primary_gid", r->primary_gid); - ndr_print_samr_Name(ndr, "home_directory", &r->home_directory); - ndr_print_samr_Name(ndr, "home_drive", &r->home_drive); - ndr_print_samr_Name(ndr, "logon_script", &r->logon_script); - ndr_print_samr_Name(ndr, "profile", &r->profile); - ndr_print_samr_Name(ndr, "description", &r->description); - ndr_print_samr_Name(ndr, "workstations", &r->workstations); - ndr_print_NTTIME(ndr, "last_logon", r->last_logon); - ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff); - ndr_print_uint32(ndr, "units_per_week", r->units_per_week); - ndr_print_ptr(ndr, "logon_hours", r->logon_hours); - ndr->depth++; - if (r->logon_hours) { - ndr_print_array_uint8(ndr, "logon_hours", r->logon_hours, r->units_per_week/8); - } - ndr->depth--; - ndr_print_uint16(ndr, "bad_pwd_count", r->bad_pwd_count); - ndr_print_uint16(ndr, "num_logons", r->num_logons); - ndr_print_NTTIME(ndr, "last_pwd_change", r->last_pwd_change); - ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry); - ndr_print_uint32(ndr, "acct_flags", r->acct_flags); - ndr->depth--; -} - -void ndr_print_samr_UserInfo6(struct ndr_print *ndr, const char *name, struct samr_UserInfo6 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo6"); - ndr->depth++; - ndr_print_samr_Name(ndr, "username", &r->username); - ndr_print_samr_Name(ndr, "full_name", &r->full_name); - ndr->depth--; -} - -void ndr_print_samr_UserInfo7(struct ndr_print *ndr, const char *name, struct samr_UserInfo7 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo7"); - ndr->depth++; - ndr_print_samr_Name(ndr, "username", &r->username); - ndr->depth--; -} - -void ndr_print_samr_UserInfo8(struct ndr_print *ndr, const char *name, struct samr_UserInfo8 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo8"); - ndr->depth++; - ndr_print_samr_Name(ndr, "full_name", &r->full_name); - ndr->depth--; -} - -void ndr_print_samr_UserInfo9(struct ndr_print *ndr, const char *name, struct samr_UserInfo9 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo9"); - ndr->depth++; - ndr_print_uint32(ndr, "primary_gid", r->primary_gid); - ndr->depth--; -} - -void ndr_print_samr_UserInfo10(struct ndr_print *ndr, const char *name, struct samr_UserInfo10 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo10"); - ndr->depth++; - ndr_print_samr_Name(ndr, "home_dir", &r->home_dir); - ndr_print_samr_Name(ndr, "home_drive", &r->home_drive); - ndr->depth--; -} - -void ndr_print_samr_UserInfo11(struct ndr_print *ndr, const char *name, struct samr_UserInfo11 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo11"); - ndr->depth++; - ndr_print_samr_Name(ndr, "logon_script", &r->logon_script); - ndr->depth--; -} - -void ndr_print_samr_UserInfo12(struct ndr_print *ndr, const char *name, struct samr_UserInfo12 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo12"); - ndr->depth++; - ndr_print_samr_Name(ndr, "profile", &r->profile); - ndr->depth--; -} - -void ndr_print_samr_UserInfo13(struct ndr_print *ndr, const char *name, struct samr_UserInfo13 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo13"); - ndr->depth++; - ndr_print_samr_Name(ndr, "description", &r->description); - ndr->depth--; -} - -void ndr_print_samr_UserInfo14(struct ndr_print *ndr, const char *name, struct samr_UserInfo14 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo14"); - ndr->depth++; - ndr_print_samr_Name(ndr, "workstations", &r->workstations); - ndr->depth--; -} - -void ndr_print_samr_UserInfo16(struct ndr_print *ndr, const char *name, struct samr_UserInfo16 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo16"); - ndr->depth++; - ndr_print_uint32(ndr, "acct_flags", r->acct_flags); - ndr->depth--; -} - -void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, struct samr_UserInfo17 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo17"); - ndr->depth++; - ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry); - ndr->depth--; -} - -void ndr_print_samr_UserInfo20(struct ndr_print *ndr, const char *name, struct samr_UserInfo20 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo20"); - ndr->depth++; - ndr_print_samr_Name(ndr, "callback", &r->callback); - ndr->depth--; -} - -void ndr_print_samr_UserInfo21(struct ndr_print *ndr, const char *name, struct samr_UserInfo21 *r) -{ - ndr_print_struct(ndr, name, "samr_UserInfo21"); - ndr->depth++; - ndr_print_NTTIME(ndr, "last_logon", r->last_logon); - ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff); - ndr_print_NTTIME(ndr, "last_pwd_change", r->last_pwd_change); - ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry); - ndr_print_NTTIME(ndr, "allow_pwd_change", r->allow_pwd_change); - ndr_print_NTTIME(ndr, "force_pwd_change", r->force_pwd_change); - ndr_print_samr_Name(ndr, "username", &r->username); - ndr_print_samr_Name(ndr, "full_name", &r->full_name); - ndr_print_samr_Name(ndr, "home_dir", &r->home_dir); - ndr_print_samr_Name(ndr, "home_drive", &r->home_drive); - ndr_print_samr_Name(ndr, "logon_script", &r->logon_script); - ndr_print_samr_Name(ndr, "profile", &r->profile); - ndr_print_samr_Name(ndr, "description", &r->description); - ndr_print_samr_Name(ndr, "workstations", &r->workstations); - ndr_print_samr_Name(ndr, "comment", &r->comment); - ndr_print_samr_Name(ndr, "callback", &r->callback); - ndr_print_samr_Name(ndr, "unknown1", &r->unknown1); - ndr_print_samr_Name(ndr, "unknown2", &r->unknown2); - ndr_print_samr_Name(ndr, "unknown3", &r->unknown3); - ndr_print_uint32(ndr, "buf_count", r->buf_count); - ndr_print_ptr(ndr, "buffer", r->buffer); - ndr->depth++; - if (r->buffer) { - ndr_print_array_uint8(ndr, "buffer", r->buffer, r->buf_count); - } - ndr->depth--; - ndr_print_uint32(ndr, "rid", r->rid); - ndr_print_uint32(ndr, "primary_gid", r->primary_gid); - ndr_print_uint32(ndr, "acct_flags", r->acct_flags); - ndr_print_uint32(ndr, "fields_present", r->fields_present); - ndr_print_uint32(ndr, "units_per_week", r->units_per_week); - ndr_print_ptr(ndr, "logon_hours", r->logon_hours); - ndr->depth++; - if (r->logon_hours) { - ndr_print_array_uint8(ndr, "logon_hours", r->logon_hours, r->units_per_week/8); - } - ndr->depth--; - ndr_print_uint16(ndr, "bad_pwd_count", r->bad_pwd_count); - ndr_print_uint16(ndr, "num_logons", r->num_logons); - ndr_print_uint16(ndr, "country_code", r->country_code); - ndr_print_uint16(ndr, "code_page", r->code_page); - ndr_print_uint8(ndr, "nt_pwd_set", r->nt_pwd_set); - ndr_print_uint8(ndr, "lm_pwd_set", r->lm_pwd_set); - ndr_print_uint8(ndr, "expired_flag", r->expired_flag); - ndr_print_uint8(ndr, "unknown4", r->unknown4); - ndr->depth--; -} - -void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, uint16 level, union samr_UserInfo *r) -{ - ndr_print_union(ndr, name, level, "samr_UserInfo"); - switch (level) { - case 1: - ndr_print_samr_UserInfo1(ndr, "info1", &r->info1); - break; - - case 2: - ndr_print_samr_UserInfo2(ndr, "info2", &r->info2); - break; - - case 3: - ndr_print_samr_UserInfo3(ndr, "info3", &r->info3); - break; - - case 4: - ndr_print_samr_UserInfo4(ndr, "info4", &r->info4); - break; - - case 5: - ndr_print_samr_UserInfo5(ndr, "info5", &r->info5); - break; - - case 6: - ndr_print_samr_UserInfo6(ndr, "info6", &r->info6); - break; - - case 7: - ndr_print_samr_UserInfo7(ndr, "info7", &r->info7); - break; - - case 8: - ndr_print_samr_UserInfo8(ndr, "info8", &r->info8); - break; - - case 9: - ndr_print_samr_UserInfo9(ndr, "info9", &r->info9); - break; - - case 10: - ndr_print_samr_UserInfo10(ndr, "info10", &r->info10); - break; - - case 11: - ndr_print_samr_UserInfo11(ndr, "info11", &r->info11); - break; - - case 12: - ndr_print_samr_UserInfo12(ndr, "info12", &r->info12); - break; - - case 13: - ndr_print_samr_UserInfo13(ndr, "info13", &r->info13); - break; - - case 14: - ndr_print_samr_UserInfo14(ndr, "info14", &r->info14); - break; - - case 16: - ndr_print_samr_UserInfo16(ndr, "info16", &r->info16); - break; - - case 17: - ndr_print_samr_UserInfo17(ndr, "info17", &r->info17); - break; - - case 20: - ndr_print_samr_UserInfo20(ndr, "info20", &r->info20); - break; - - case 21: - ndr_print_samr_UserInfo21(ndr, "info21", &r->info21); - break; - - default: - ndr_print_bad_level(ndr, name, level); - } -} - -void ndr_print_samr_QueryUserInfo(struct ndr_print *ndr, const char *name, int flags, struct samr_QueryUserInfo *r) -{ - ndr_print_struct(ndr, name, "samr_QueryUserInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QueryUserInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QueryUserInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "info", r->out.info); - ndr->depth++; - if (r->out.info) { - ndr_print_samr_UserInfo(ndr, "info", r->in.level, r->out.info); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SetUserInfo(struct ndr_print *ndr, const char *name, int flags, struct samr_SetUserInfo *r) -{ - ndr_print_struct(ndr, name, "samr_SetUserInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SetUserInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); - ndr_print_ptr(ndr, "info", r->in.info); - ndr->depth++; - ndr_print_samr_UserInfo(ndr, "info", r->in.level, r->in.info); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SetUserInfo"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CHANGE_PASSWORD_USER(struct ndr_print *ndr, const char *name, int flags, struct samr_CHANGE_PASSWORD_USER *r) -{ - ndr_print_struct(ndr, name, "samr_CHANGE_PASSWORD_USER"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CHANGE_PASSWORD_USER"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CHANGE_PASSWORD_USER"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GET_GROUPS_FOR_USER(struct ndr_print *ndr, const char *name, int flags, struct samr_GET_GROUPS_FOR_USER *r) -{ - ndr_print_struct(ndr, name, "samr_GET_GROUPS_FOR_USER"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GET_GROUPS_FOR_USER"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GET_GROUPS_FOR_USER"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_QUERY_DISPINFO(struct ndr_print *ndr, const char *name, int flags, struct samr_QUERY_DISPINFO *r) -{ - ndr_print_struct(ndr, name, "samr_QUERY_DISPINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QUERY_DISPINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QUERY_DISPINFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GET_DISPLAY_ENUMERATION_INDEX(struct ndr_print *ndr, const char *name, int flags, struct samr_GET_DISPLAY_ENUMERATION_INDEX *r) -{ - ndr_print_struct(ndr, name, "samr_GET_DISPLAY_ENUMERATION_INDEX"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GET_DISPLAY_ENUMERATION_INDEX"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GET_DISPLAY_ENUMERATION_INDEX"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_TEST_PRIVATE_FUNCTIONS_DOMAIN(struct ndr_print *ndr, const char *name, int flags, struct samr_TEST_PRIVATE_FUNCTIONS_DOMAIN *r) -{ - ndr_print_struct(ndr, name, "samr_TEST_PRIVATE_FUNCTIONS_DOMAIN"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_TEST_PRIVATE_FUNCTIONS_DOMAIN"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_TEST_PRIVATE_FUNCTIONS_DOMAIN"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_TEST_PRIVATE_FUNCTIONS_USER(struct ndr_print *ndr, const char *name, int flags, struct samr_TEST_PRIVATE_FUNCTIONS_USER *r) -{ - ndr_print_struct(ndr, name, "samr_TEST_PRIVATE_FUNCTIONS_USER"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_TEST_PRIVATE_FUNCTIONS_USER"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_TEST_PRIVATE_FUNCTIONS_USER"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GET_USRDOM_PWINFO(struct ndr_print *ndr, const char *name, int flags, struct samr_GET_USRDOM_PWINFO *r) -{ - ndr_print_struct(ndr, name, "samr_GET_USRDOM_PWINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GET_USRDOM_PWINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GET_USRDOM_PWINFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN(struct ndr_print *ndr, const char *name, int flags, struct samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN *r) -{ - ndr_print_struct(ndr, name, "samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_QUERY_INFORMATION_DOMAIN2(struct ndr_print *ndr, const char *name, int flags, struct samr_QUERY_INFORMATION_DOMAIN2 *r) -{ - ndr_print_struct(ndr, name, "samr_QUERY_INFORMATION_DOMAIN2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QUERY_INFORMATION_DOMAIN2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QUERY_INFORMATION_DOMAIN2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_QUERY_INFORMATION_USER2(struct ndr_print *ndr, const char *name, int flags, struct samr_QUERY_INFORMATION_USER2 *r) -{ - ndr_print_struct(ndr, name, "samr_QUERY_INFORMATION_USER2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QUERY_INFORMATION_USER2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QUERY_INFORMATION_USER2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_QUERY_DISPINFO2(struct ndr_print *ndr, const char *name, int flags, struct samr_QUERY_DISPINFO2 *r) -{ - ndr_print_struct(ndr, name, "samr_QUERY_DISPINFO2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QUERY_DISPINFO2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QUERY_DISPINFO2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GET_DISPLAY_ENUMERATION_INDEX2(struct ndr_print *ndr, const char *name, int flags, struct samr_GET_DISPLAY_ENUMERATION_INDEX2 *r) -{ - ndr_print_struct(ndr, name, "samr_GET_DISPLAY_ENUMERATION_INDEX2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GET_DISPLAY_ENUMERATION_INDEX2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GET_DISPLAY_ENUMERATION_INDEX2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CREATE_USER2_IN_DOMAIN(struct ndr_print *ndr, const char *name, int flags, struct samr_CREATE_USER2_IN_DOMAIN *r) -{ - ndr_print_struct(ndr, name, "samr_CREATE_USER2_IN_DOMAIN"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CREATE_USER2_IN_DOMAIN"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CREATE_USER2_IN_DOMAIN"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_QUERY_DISPINFO3(struct ndr_print *ndr, const char *name, int flags, struct samr_QUERY_DISPINFO3 *r) -{ - ndr_print_struct(ndr, name, "samr_QUERY_DISPINFO3"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QUERY_DISPINFO3"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QUERY_DISPINFO3"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS(struct ndr_print *ndr, const char *name, int flags, struct samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS *r) -{ - ndr_print_struct(ndr, name, "samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS(struct ndr_print *ndr, const char *name, int flags, struct samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS *r) -{ - ndr_print_struct(ndr, name, "samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_OEM_CHANGE_PASSWORD_USER2(struct ndr_print *ndr, const char *name, int flags, struct samr_OEM_CHANGE_PASSWORD_USER2 *r) -{ - ndr_print_struct(ndr, name, "samr_OEM_CHANGE_PASSWORD_USER2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_OEM_CHANGE_PASSWORD_USER2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_OEM_CHANGE_PASSWORD_USER2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_UNICODE_CHANGE_PASSWORD_USER2(struct ndr_print *ndr, const char *name, int flags, struct samr_UNICODE_CHANGE_PASSWORD_USER2 *r) -{ - ndr_print_struct(ndr, name, "samr_UNICODE_CHANGE_PASSWORD_USER2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_UNICODE_CHANGE_PASSWORD_USER2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_UNICODE_CHANGE_PASSWORD_USER2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GET_DOM_PWINFO(struct ndr_print *ndr, const char *name, int flags, struct samr_GET_DOM_PWINFO *r) -{ - ndr_print_struct(ndr, name, "samr_GET_DOM_PWINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GET_DOM_PWINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GET_DOM_PWINFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CONNECT2(struct ndr_print *ndr, const char *name, int flags, struct samr_CONNECT2 *r) -{ - ndr_print_struct(ndr, name, "samr_CONNECT2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CONNECT2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CONNECT2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SET_USERINFO2(struct ndr_print *ndr, const char *name, int flags, struct samr_SET_USERINFO2 *r) -{ - ndr_print_struct(ndr, name, "samr_SET_USERINFO2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SET_USERINFO2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SET_USERINFO2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SET_BOOT_KEY_INFORMATION(struct ndr_print *ndr, const char *name, int flags, struct samr_SET_BOOT_KEY_INFORMATION *r) -{ - ndr_print_struct(ndr, name, "samr_SET_BOOT_KEY_INFORMATION"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SET_BOOT_KEY_INFORMATION"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SET_BOOT_KEY_INFORMATION"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GET_BOOT_KEY_INFORMATION(struct ndr_print *ndr, const char *name, int flags, struct samr_GET_BOOT_KEY_INFORMATION *r) -{ - ndr_print_struct(ndr, name, "samr_GET_BOOT_KEY_INFORMATION"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GET_BOOT_KEY_INFORMATION"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GET_BOOT_KEY_INFORMATION"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CONNECT3(struct ndr_print *ndr, const char *name, int flags, struct samr_CONNECT3 *r) -{ - ndr_print_struct(ndr, name, "samr_CONNECT3"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CONNECT3"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CONNECT3"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_Connect4(struct ndr_print *ndr, const char *name, int flags, struct samr_Connect4 *r) -{ - ndr_print_struct(ndr, name, "samr_Connect4"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_Connect4"); - ndr->depth++; - ndr_print_ptr(ndr, "system_name", r->in.system_name); - ndr->depth++; - if (r->in.system_name) { - ndr_print_unistr(ndr, "system_name", r->in.system_name); - } - ndr->depth--; - ndr_print_uint32(ndr, "unknown", r->in.unknown); - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_Connect4"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->out.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->out.handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_UNICODE_CHANGE_PASSWORD_USER3(struct ndr_print *ndr, const char *name, int flags, struct samr_UNICODE_CHANGE_PASSWORD_USER3 *r) -{ - ndr_print_struct(ndr, name, "samr_UNICODE_CHANGE_PASSWORD_USER3"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_UNICODE_CHANGE_PASSWORD_USER3"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_UNICODE_CHANGE_PASSWORD_USER3"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CONNECT5(struct ndr_print *ndr, const char *name, int flags, struct samr_CONNECT5 *r) -{ - ndr_print_struct(ndr, name, "samr_CONNECT5"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CONNECT5"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CONNECT5"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_RID_TO_SID(struct ndr_print *ndr, const char *name, int flags, struct samr_RID_TO_SID *r) -{ - ndr_print_struct(ndr, name, "samr_RID_TO_SID"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_RID_TO_SID"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_RID_TO_SID"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SET_DSRM_PASSWORD(struct ndr_print *ndr, const char *name, int flags, struct samr_SET_DSRM_PASSWORD *r) -{ - ndr_print_struct(ndr, name, "samr_SET_DSRM_PASSWORD"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SET_DSRM_PASSWORD"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SET_DSRM_PASSWORD"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_VALIDATE_PASSWORD(struct ndr_print *ndr, const char *name, int flags, struct samr_VALIDATE_PASSWORD *r) -{ - ndr_print_struct(ndr, name, "samr_VALIDATE_PASSWORD"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_VALIDATE_PASSWORD"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_VALIDATE_PASSWORD"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - diff --git a/source4/librpc/ndr/ndr_samr.h b/source4/librpc/ndr/ndr_samr.h deleted file mode 100644 index 75e7b10401..0000000000 --- a/source4/librpc/ndr/ndr_samr.h +++ /dev/null @@ -1,1198 +0,0 @@ -/* header auto-generated by pidl */ - -#define DCERPC_SAMR_UUID "12345778-1234-abcd-ef00-0123456789ac" -#define DCERPC_SAMR_VERSION 1.0 -#define DCERPC_SAMR_NAME "samr" - -#define DCERPC_SAMR_CONNECT 0 -#define DCERPC_SAMR_CLOSE 1 -#define DCERPC_SAMR_SETSECURITY 2 -#define DCERPC_SAMR_QUERYSECURITY 3 -#define DCERPC_SAMR_SHUTDOWN 4 -#define DCERPC_SAMR_LOOKUPDOMAIN 5 -#define DCERPC_SAMR_ENUMDOMAINS 6 -#define DCERPC_SAMR_OPENDOMAIN 7 -#define DCERPC_SAMR_QUERYDOMAININFO 8 -#define DCERPC_SAMR_SET_DOMAIN_INFO 9 -#define DCERPC_SAMR_CREATE_DOM_GROUP 10 -#define DCERPC_SAMR_ENUMDOMAINGROUPS 11 -#define DCERPC_SAMR_CREATEUSER 12 -#define DCERPC_SAMR_ENUMDOMAINUSERS 13 -#define DCERPC_SAMR_CREATE_DOM_ALIAS 14 -#define DCERPC_SAMR_ENUMDOMAINALIASES 15 -#define DCERPC_SAMR_GETALIASMEMBERSHIP 16 -#define DCERPC_SAMR_LOOKUPNAMES 17 -#define DCERPC_SAMR_LOOKUPRIDS 18 -#define DCERPC_SAMR_OPENGROUP 19 -#define DCERPC_SAMR_QUERYGROUPINFO 20 -#define DCERPC_SAMR_SET_GROUPINFO 21 -#define DCERPC_SAMR_ADD_GROUPMEM 22 -#define DCERPC_SAMR_DELETE_DOM_GROUP 23 -#define DCERPC_SAMR_DEL_GROUPMEM 24 -#define DCERPC_SAMR_QUERY_GROUPMEM 25 -#define DCERPC_SAMR_SET_MEMBER_ATTRIBUTES_OF_GROUP 26 -#define DCERPC_SAMR_OPENALIAS 27 -#define DCERPC_SAMR_QUERYALIASINFO 28 -#define DCERPC_SAMR_SET_ALIASINFO 29 -#define DCERPC_SAMR_DELETE_DOM_ALIAS 30 -#define DCERPC_SAMR_ADD_ALIASMEM 31 -#define DCERPC_SAMR_DEL_ALIASMEM 32 -#define DCERPC_SAMR_GET_MEMBERS_IN_ALIAS 33 -#define DCERPC_SAMR_OPENUSER 34 -#define DCERPC_SAMR_DELETEUSER 35 -#define DCERPC_SAMR_QUERYUSERINFO 36 -#define DCERPC_SAMR_SETUSERINFO 37 -#define DCERPC_SAMR_CHANGE_PASSWORD_USER 38 -#define DCERPC_SAMR_GET_GROUPS_FOR_USER 39 -#define DCERPC_SAMR_QUERY_DISPINFO 40 -#define DCERPC_SAMR_GET_DISPLAY_ENUMERATION_INDEX 41 -#define DCERPC_SAMR_TEST_PRIVATE_FUNCTIONS_DOMAIN 42 -#define DCERPC_SAMR_TEST_PRIVATE_FUNCTIONS_USER 43 -#define DCERPC_SAMR_GET_USRDOM_PWINFO 44 -#define DCERPC_SAMR_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN 45 -#define DCERPC_SAMR_QUERY_INFORMATION_DOMAIN2 46 -#define DCERPC_SAMR_QUERY_INFORMATION_USER2 47 -#define DCERPC_SAMR_QUERY_DISPINFO2 48 -#define DCERPC_SAMR_GET_DISPLAY_ENUMERATION_INDEX2 49 -#define DCERPC_SAMR_CREATE_USER2_IN_DOMAIN 50 -#define DCERPC_SAMR_QUERY_DISPINFO3 51 -#define DCERPC_SAMR_ADD_MULTIPLE_MEMBERS_TO_ALIAS 52 -#define DCERPC_SAMR_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS 53 -#define DCERPC_SAMR_OEM_CHANGE_PASSWORD_USER2 54 -#define DCERPC_SAMR_UNICODE_CHANGE_PASSWORD_USER2 55 -#define DCERPC_SAMR_GET_DOM_PWINFO 56 -#define DCERPC_SAMR_CONNECT2 57 -#define DCERPC_SAMR_SET_USERINFO2 58 -#define DCERPC_SAMR_SET_BOOT_KEY_INFORMATION 59 -#define DCERPC_SAMR_GET_BOOT_KEY_INFORMATION 60 -#define DCERPC_SAMR_CONNECT3 61 -#define DCERPC_SAMR_CONNECT4 62 -#define DCERPC_SAMR_UNICODE_CHANGE_PASSWORD_USER3 63 -#define DCERPC_SAMR_CONNECT5 64 -#define DCERPC_SAMR_RID_TO_SID 65 -#define DCERPC_SAMR_SET_DSRM_PASSWORD 66 -#define DCERPC_SAMR_VALIDATE_PASSWORD 67 - - -struct samr_Connect { - struct { - uint16 *system_name; - uint32 access_mask; - } in; - - struct { - struct policy_handle *handle; - NTSTATUS result; - } out; - -}; - -struct samr_Close { - struct { - struct policy_handle *handle; - } in; - - struct { - struct policy_handle *handle; - NTSTATUS result; - } out; - -}; - -struct samr_SetSecurity { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_SdBuf { - uint32 sd_size; - struct security_descriptor *sd; -}; - -struct samr_QuerySecurity { - struct { - struct policy_handle *handle; - uint32 sec_info; - } in; - - struct { - struct samr_SdBuf *sdbuf; - NTSTATUS result; - } out; - -}; - -struct samr_Shutdown { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_Name { - uint16 name_len; - uint16 name_size; - const char *name; -}; - -struct samr_LookupDomain { - struct { - struct policy_handle *handle; - struct samr_Name *domain; - } in; - - struct { - struct dom_sid2 *sid; - NTSTATUS result; - } out; - -}; - -struct samr_SamEntry { - uint32 idx; - struct samr_Name name; -}; - -struct samr_SamArray { - uint32 count; - struct samr_SamEntry *entries; -}; - -struct samr_EnumDomains { - struct { - struct policy_handle *handle; - uint32 *resume_handle; - uint32 buf_size; - } in; - - struct { - uint32 *resume_handle; - struct samr_SamArray *sam; - uint32 *num_entries; - NTSTATUS result; - } out; - -}; - -struct samr_OpenDomain { - struct { - struct policy_handle *handle; - uint32 access_mask; - struct dom_sid2 *sid; - } in; - - struct { - struct policy_handle *domain_handle; - NTSTATUS result; - } out; - -}; - -struct samr_DomInfo1 { - uint16 min_length_password; - uint16 password_history; - uint32 flag; - NTTIME expire; - NTTIME min_passwordage; -}; - -struct samr_DomInfo2 { - HYPER_T force_logoff_time; - struct samr_Name unknown1; - struct samr_Name domain; - struct samr_Name primary; - HYPER_T sequence_num; - uint32 unknown2; - uint32 role; - uint32 unknown3; - uint32 num_users; - uint32 num_groups; - uint32 num_aliases; -}; - -struct samr_DomInfo3 { - HYPER_T force_logoff_time; -}; - -struct samr_DomInfo4 { - struct samr_Name unknown; -}; - -struct samr_DomInfo5 { - struct samr_Name domain; -}; - -struct samr_DomInfo6 { - struct samr_Name primary; -}; - -struct samr_DomInfo7 { - uint32 role; -}; - -struct samr_DomInfo8 { - HYPER_T sequence_num; - NTTIME last_xxx_time; -}; - -struct samr_DomInfo9 { - uint32 unknown; -}; - -struct samr_DomInfo11 { - HYPER_T force_logoff_time; - struct samr_Name unknown1; - struct samr_Name domain; - struct samr_Name primary; - HYPER_T sequence_num; - uint32 unknown2; - uint32 role; - uint32 unknown3; - uint32 num_users; - uint32 num_groups; - uint32 num_aliases; - HYPER_T lockout_duration; - HYPER_T lockout_window; - uint16 lockout_threshold; -}; - -struct samr_DomInfo12 { - HYPER_T lockout_duration; - HYPER_T lockout_window; - uint16 lockout_threshold; -}; - -struct samr_DomInfo13 { - HYPER_T sequence_num; - NTTIME last_xxx_time; - uint32 unknown1; - uint32 unknown2; -}; - -union samr_DomainInfo { -/* [case(1)] */ struct samr_DomInfo1 info1; -/* [case(2)] */ struct samr_DomInfo2 info2; -/* [case(3)] */ struct samr_DomInfo3 info3; -/* [case(4)] */ struct samr_DomInfo4 info4; -/* [case(5)] */ struct samr_DomInfo5 info5; -/* [case(6)] */ struct samr_DomInfo6 info6; -/* [case(7)] */ struct samr_DomInfo7 info7; -/* [case(8)] */ struct samr_DomInfo8 info8; -/* [case(9)] */ struct samr_DomInfo9 info9; -/* [case(11)] */ struct samr_DomInfo11 info11; -/* [case(12)] */ struct samr_DomInfo12 info12; -/* [case(13)] */ struct samr_DomInfo13 info13; -}; - -struct samr_QueryDomainInfo { - struct { - struct policy_handle *handle; - uint16 level; - } in; - - struct { - union samr_DomainInfo *info; - NTSTATUS result; - } out; - -}; - -struct samr_SET_DOMAIN_INFO { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_CREATE_DOM_GROUP { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_EnumDomainGroups { - struct { - struct policy_handle *handle; - uint32 *resume_handle; - uint32 max_size; - } in; - - struct { - uint32 *resume_handle; - struct samr_SamArray *sam; - uint32 num_entries; - NTSTATUS result; - } out; - -}; - -struct samr_CreateUser { - struct { - struct policy_handle *handle; - struct samr_Name *username; - uint32 access_mask; - } in; - - struct { - struct policy_handle *acct_handle; - uint32 *rid; - NTSTATUS result; - } out; - -}; - -struct samr_EnumDomainUsers { - struct { - struct policy_handle *handle; - uint32 *resume_handle; - uint32 acct_flags; - uint32 max_size; - } in; - - struct { - uint32 *resume_handle; - struct samr_SamArray *sam; - uint32 num_entries; - NTSTATUS result; - } out; - -}; - -struct samr_CREATE_DOM_ALIAS { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_EnumDomainAliases { - struct { - struct policy_handle *handle; - uint32 *resume_handle; - uint32 max_size; - } in; - - struct { - uint32 *resume_handle; - struct samr_SamArray *sam; - uint32 num_entries; - NTSTATUS result; - } out; - -}; - -struct samr_Sids { - uint32 count; - struct dom_sid2 *sids; -}; - -struct samr_Ids { - uint32 count; - uint32 *ids; -}; - -struct samr_GetAliasMembership { - struct { - struct policy_handle *handle; - struct samr_Sids *sids; - } in; - - struct { - struct samr_Ids *rids; - NTSTATUS result; - } out; - -}; - -struct samr_LookupNames { - struct { - struct policy_handle *handle; - uint32 num_names; - struct samr_Name *names; - } in; - - struct { - struct samr_Ids rids; - struct samr_Ids types; - NTSTATUS result; - } out; - -}; - -struct samr_Names { - uint32 count; - struct samr_Name *names; -}; - -struct samr_LookupRids { - struct { - struct policy_handle *handle; - uint32 num_rids; - uint32 *rids; - } in; - - struct { - struct samr_Names names; - struct samr_Ids types; - NTSTATUS result; - } out; - -}; - -struct samr_OpenGroup { - struct { - struct policy_handle *handle; - uint32 access_mask; - uint32 rid; - } in; - - struct { - struct policy_handle *acct_handle; - NTSTATUS result; - } out; - -}; - -struct samr_GroupInfoAll { - struct samr_Name name; - uint32 unknown; - uint32 num_members; - struct samr_Name description; -}; - -struct samr_GroupInfoName { - struct samr_Name Name; -}; - -struct samr_GroupInfoX { - uint32 unknown; -}; - -struct samr_GroupInfoDesciption { - struct samr_Name description; -}; - -union samr_GroupInfo { -/* [case(1)] */ struct samr_GroupInfoAll all; -/* [case(2)] */ struct samr_GroupInfoName name; -/* [case(3)] */ struct samr_GroupInfoX unknown; -/* [case(4)] */ struct samr_GroupInfoDesciption description; -}; - -struct samr_QueryGroupInfo { - struct { - struct policy_handle *handle; - uint16 level; - } in; - - struct { - union samr_GroupInfo *info; - NTSTATUS result; - } out; - -}; - -struct samr_SET_GROUPINFO { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_ADD_GROUPMEM { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_DELETE_DOM_GROUP { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_DEL_GROUPMEM { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_QUERY_GROUPMEM { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_SET_MEMBER_ATTRIBUTES_OF_GROUP { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_OpenAlias { - struct { - struct policy_handle *handle; - uint32 access_mask; - uint32 rid; - } in; - - struct { - struct policy_handle *acct_handle; - NTSTATUS result; - } out; - -}; - -struct samr_AliasInfoAll { - struct samr_Name name; - uint32 num_members; - struct samr_Name description; -}; - -struct samr_AliasInfoName { - struct samr_Name name; -}; - -struct samr_AliasInfoDescription { - struct samr_Name description; -}; - -union samr_AliasInfo { -/* [case(1)] */ struct samr_AliasInfoAll all; -/* [case(2)] */ struct samr_AliasInfoName name; -/* [case(3)] */ struct samr_AliasInfoDescription description; -}; - -struct samr_QueryAliasInfo { - struct { - struct policy_handle *handle; - uint16 level; - } in; - - struct { - union samr_AliasInfo *info; - NTSTATUS result; - } out; - -}; - -struct samr_SET_ALIASINFO { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_DELETE_DOM_ALIAS { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_ADD_ALIASMEM { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_DEL_ALIASMEM { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_GET_MEMBERS_IN_ALIAS { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_OpenUser { - struct { - struct policy_handle *handle; - uint32 access_mask; - uint32 rid; - } in; - - struct { - struct policy_handle *acct_handle; - NTSTATUS result; - } out; - -}; - -struct samr_DeleteUser { - struct { - struct policy_handle *handle; - } in; - - struct { - struct policy_handle *handle; - NTSTATUS result; - } out; - -}; - -struct samr_UserInfo1 { - struct samr_Name username; - struct samr_Name full_name; - uint32 primary_gid; - struct samr_Name description; - struct samr_Name comment; -}; - -struct samr_UserInfo2 { - struct samr_Name comment; - struct samr_Name unknown; - uint16 country_code; - uint16 code_page; -}; - -struct samr_UserInfo3 { - struct samr_Name username; - struct samr_Name full_name; - uint32 Rid; - uint32 primary_gid; - struct samr_Name home_directory; - struct samr_Name home_drive; - struct samr_Name logon_script; - struct samr_Name profile; - struct samr_Name workstations; - NTTIME last_logon; - NTTIME last_logoff; - NTTIME last_pwd_change; - NTTIME allow_pwd_change; - NTTIME force_pwd_change; - uint32 units_per_week; - uint8 *logon_hours; - uint16 bad_pwd_count; - uint16 num_logons; - uint32 acct_flags; -}; - -struct samr_UserInfo4 { - uint32 units_per_week; - uint8 *logon_hours; -}; - -struct samr_UserInfo5 { - struct samr_Name username; - struct samr_Name full_name; - uint32 rid; - uint32 primary_gid; - struct samr_Name home_directory; - struct samr_Name home_drive; - struct samr_Name logon_script; - struct samr_Name profile; - struct samr_Name description; - struct samr_Name workstations; - NTTIME last_logon; - NTTIME last_logoff; - uint32 units_per_week; - uint8 *logon_hours; - uint16 bad_pwd_count; - uint16 num_logons; - NTTIME last_pwd_change; - NTTIME acct_expiry; - uint32 acct_flags; -}; - -struct samr_UserInfo6 { - struct samr_Name username; - struct samr_Name full_name; -}; - -struct samr_UserInfo7 { - struct samr_Name username; -}; - -struct samr_UserInfo8 { - struct samr_Name full_name; -}; - -struct samr_UserInfo9 { - uint32 primary_gid; -}; - -struct samr_UserInfo10 { - struct samr_Name home_dir; - struct samr_Name home_drive; -}; - -struct samr_UserInfo11 { - struct samr_Name logon_script; -}; - -struct samr_UserInfo12 { - struct samr_Name profile; -}; - -struct samr_UserInfo13 { - struct samr_Name description; -}; - -struct samr_UserInfo14 { - struct samr_Name workstations; -}; - -struct samr_UserInfo16 { - uint32 acct_flags; -}; - -struct samr_UserInfo17 { - NTTIME acct_expiry; -}; - -struct samr_UserInfo20 { - struct samr_Name callback; -}; - -struct samr_UserInfo21 { - NTTIME last_logon; - NTTIME last_logoff; - NTTIME last_pwd_change; - NTTIME acct_expiry; - NTTIME allow_pwd_change; - NTTIME force_pwd_change; - struct samr_Name username; - struct samr_Name full_name; - struct samr_Name home_dir; - struct samr_Name home_drive; - struct samr_Name logon_script; - struct samr_Name profile; - struct samr_Name description; - struct samr_Name workstations; - struct samr_Name comment; - struct samr_Name callback; - struct samr_Name unknown1; - struct samr_Name unknown2; - struct samr_Name unknown3; - uint32 buf_count; - uint8 *buffer; - uint32 rid; - uint32 primary_gid; - uint32 acct_flags; - uint32 fields_present; - uint32 units_per_week; - uint8 *logon_hours; - uint16 bad_pwd_count; - uint16 num_logons; - uint16 country_code; - uint16 code_page; - uint8 nt_pwd_set; - uint8 lm_pwd_set; - uint8 expired_flag; - uint8 unknown4; -}; - -union samr_UserInfo { -/* [case(1)] */ struct samr_UserInfo1 info1; -/* [case(2)] */ struct samr_UserInfo2 info2; -/* [case(3)] */ struct samr_UserInfo3 info3; -/* [case(4)] */ struct samr_UserInfo4 info4; -/* [case(5)] */ struct samr_UserInfo5 info5; -/* [case(6)] */ struct samr_UserInfo6 info6; -/* [case(7)] */ struct samr_UserInfo7 info7; -/* [case(8)] */ struct samr_UserInfo8 info8; -/* [case(9)] */ struct samr_UserInfo9 info9; -/* [case(10)] */ struct samr_UserInfo10 info10; -/* [case(11)] */ struct samr_UserInfo11 info11; -/* [case(12)] */ struct samr_UserInfo12 info12; -/* [case(13)] */ struct samr_UserInfo13 info13; -/* [case(14)] */ struct samr_UserInfo14 info14; -/* [case(16)] */ struct samr_UserInfo16 info16; -/* [case(17)] */ struct samr_UserInfo17 info17; -/* [case(20)] */ struct samr_UserInfo20 info20; -/* [case(21)] */ struct samr_UserInfo21 info21; -}; - -struct samr_QueryUserInfo { - struct { - struct policy_handle *handle; - uint16 level; - } in; - - struct { - union samr_UserInfo *info; - NTSTATUS result; - } out; - -}; - -struct samr_SetUserInfo { - struct { - struct policy_handle *handle; - uint16 level; - union samr_UserInfo *info; - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_CHANGE_PASSWORD_USER { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_GET_GROUPS_FOR_USER { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_QUERY_DISPINFO { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_GET_DISPLAY_ENUMERATION_INDEX { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_TEST_PRIVATE_FUNCTIONS_DOMAIN { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_TEST_PRIVATE_FUNCTIONS_USER { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_GET_USRDOM_PWINFO { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_QUERY_INFORMATION_DOMAIN2 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_QUERY_INFORMATION_USER2 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_QUERY_DISPINFO2 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_GET_DISPLAY_ENUMERATION_INDEX2 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_CREATE_USER2_IN_DOMAIN { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_QUERY_DISPINFO3 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_OEM_CHANGE_PASSWORD_USER2 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_UNICODE_CHANGE_PASSWORD_USER2 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_GET_DOM_PWINFO { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_CONNECT2 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_SET_USERINFO2 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_SET_BOOT_KEY_INFORMATION { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_GET_BOOT_KEY_INFORMATION { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_CONNECT3 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_Connect4 { - struct { - const char *system_name; - uint32 unknown; - uint32 access_mask; - } in; - - struct { - struct policy_handle *handle; - NTSTATUS result; - } out; - -}; - -struct samr_UNICODE_CHANGE_PASSWORD_USER3 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_CONNECT5 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_RID_TO_SID { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_SET_DSRM_PASSWORD { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct samr_VALIDATE_PASSWORD { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - diff --git a/source4/librpc/ndr/ndr_spoolss.c b/source4/librpc/ndr/ndr_spoolss.c deleted file mode 100644 index 14ec78e8a1..0000000000 --- a/source4/librpc/ndr/ndr_spoolss.c +++ /dev/null @@ -1,4095 +0,0 @@ -/* parser auto-generated by pidl */ - -#include "includes.h" - -NTSTATUS ndr_push_spoolss_DeviceMode(struct ndr_push *ndr, int ndr_flags, struct spoolss_DeviceMode *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_nstring(ndr, NDR_SCALARS, &r->devicename)); - NDR_CHECK(ndr_push_uint16(ndr, r->specversion)); - NDR_CHECK(ndr_push_uint16(ndr, r->driverversion)); - NDR_CHECK(ndr_push_uint16(ndr, r->size)); - NDR_CHECK(ndr_push_uint16(ndr, r->driverextra)); - NDR_CHECK(ndr_push_uint32(ndr, r->fields)); - NDR_CHECK(ndr_push_uint16(ndr, r->orientation)); - NDR_CHECK(ndr_push_uint16(ndr, r->papersize)); - NDR_CHECK(ndr_push_uint16(ndr, r->paperlength)); - NDR_CHECK(ndr_push_uint16(ndr, r->paperwidth)); - NDR_CHECK(ndr_push_uint16(ndr, r->scale)); - NDR_CHECK(ndr_push_uint16(ndr, r->copies)); - NDR_CHECK(ndr_push_uint16(ndr, r->defaultsource)); - NDR_CHECK(ndr_push_uint16(ndr, r->printquality)); - NDR_CHECK(ndr_push_uint16(ndr, r->color)); - NDR_CHECK(ndr_push_uint16(ndr, r->duplex)); - NDR_CHECK(ndr_push_uint16(ndr, r->yresolution)); - NDR_CHECK(ndr_push_uint16(ndr, r->ttoption)); - NDR_CHECK(ndr_push_uint16(ndr, r->collate)); - NDR_CHECK(ndr_push_nstring(ndr, NDR_SCALARS, &r->formname)); - NDR_CHECK(ndr_push_uint16(ndr, r->logpixels)); - NDR_CHECK(ndr_push_uint32(ndr, r->bitsperpel)); - NDR_CHECK(ndr_push_uint32(ndr, r->pelswidth)); - NDR_CHECK(ndr_push_uint32(ndr, r->pelsheight)); - NDR_CHECK(ndr_push_uint32(ndr, r->displayflags)); - NDR_CHECK(ndr_push_uint32(ndr, r->displayfrequency)); - NDR_CHECK(ndr_push_uint32(ndr, r->icmmethod)); - NDR_CHECK(ndr_push_uint32(ndr, r->icmintent)); - NDR_CHECK(ndr_push_uint32(ndr, r->mediatype)); - NDR_CHECK(ndr_push_uint32(ndr, r->dithertype)); - NDR_CHECK(ndr_push_uint32(ndr, r->reserved1)); - NDR_CHECK(ndr_push_uint32(ndr, r->reserved2)); - NDR_CHECK(ndr_push_uint32(ndr, r->panningwidth)); - NDR_CHECK(ndr_push_uint32(ndr, r->panningheight)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->private, r->driverextra)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_nstring(ndr, NDR_BUFFERS, &r->devicename)); - NDR_CHECK(ndr_push_nstring(ndr, NDR_BUFFERS, &r->formname)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_BUFFERS, r->private, r->driverextra)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_PrinterInfo1(struct ndr_push *ndr, int ndr_flags, struct spoolss_PrinterInfo1 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->flags)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->name, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->description, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->comment, (ndr_push_const_fn_t) ndr_push_nstring)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->name, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->description, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->comment, (ndr_push_const_fn_t) ndr_push_nstring)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_PrinterInfo2(struct ndr_push *ndr, int ndr_flags, struct spoolss_PrinterInfo2 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->servername, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->printername, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->sharename, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->portname, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->drivername, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->comment, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->location, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->devmode, (ndr_push_const_fn_t) ndr_push_spoolss_DeviceMode)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->sepfile, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->printprocessor, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->datatype, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->parameters, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->secdesc, (ndr_push_const_fn_t) ndr_push_security_descriptor)); - NDR_CHECK(ndr_push_uint32(ndr, r->attributes)); - NDR_CHECK(ndr_push_uint32(ndr, r->priority)); - NDR_CHECK(ndr_push_uint32(ndr, r->defaultpriority)); - NDR_CHECK(ndr_push_uint32(ndr, r->starttime)); - NDR_CHECK(ndr_push_uint32(ndr, r->untiltime)); - NDR_CHECK(ndr_push_uint32(ndr, r->status)); - NDR_CHECK(ndr_push_uint32(ndr, r->cjobs)); - NDR_CHECK(ndr_push_uint32(ndr, r->averageppm)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->servername, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->printername, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->sharename, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->portname, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->drivername, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->comment, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->location, (ndr_push_const_fn_t) ndr_push_nstring)); - if (r->devmode) { - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, r->devmode, (ndr_push_const_fn_t) ndr_push_spoolss_DeviceMode)); - } - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->sepfile, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->printprocessor, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->datatype, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->parameters, (ndr_push_const_fn_t) ndr_push_nstring)); - if (r->secdesc) { - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, r->secdesc, (ndr_push_const_fn_t) ndr_push_security_descriptor)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_PrinterInfo3(struct ndr_push *ndr, int ndr_flags, struct spoolss_PrinterInfo3 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->flags)); - NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_SCALARS, &r->secdesc)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_BUFFERS, &r->secdesc)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_PrinterInfo4(struct ndr_push *ndr, int ndr_flags, struct spoolss_PrinterInfo4 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->printername, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->servername, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_uint32(ndr, r->attributes)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->printername, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->servername, (ndr_push_const_fn_t) ndr_push_nstring)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_PrinterInfo5(struct ndr_push *ndr, int ndr_flags, struct spoolss_PrinterInfo5 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->printername, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->portname, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_uint32(ndr, r->attributes)); - NDR_CHECK(ndr_push_uint32(ndr, r->device_not_selected_timeout)); - NDR_CHECK(ndr_push_uint32(ndr, r->transmission_retry_timeout)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->printername, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->portname, (ndr_push_const_fn_t) ndr_push_nstring)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_PrinterInfo6(struct ndr_push *ndr, int ndr_flags, struct spoolss_PrinterInfo6 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->unknown)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_PrinterInfo7(struct ndr_push *ndr, int ndr_flags, struct spoolss_PrinterInfo7 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->guid, (ndr_push_const_fn_t) ndr_push_nstring)); - NDR_CHECK(ndr_push_uint32(ndr, r->action)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->guid, (ndr_push_const_fn_t) ndr_push_nstring)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_PrinterInfo(struct ndr_push *ndr, int ndr_flags, uint16 level, union spoolss_PrinterInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - switch (level) { - case 1: - NDR_CHECK(ndr_push_spoolss_PrinterInfo1(ndr, NDR_SCALARS, &r->info1)); - break; - - case 2: - NDR_CHECK(ndr_push_spoolss_PrinterInfo2(ndr, NDR_SCALARS, &r->info2)); - break; - - case 3: - NDR_CHECK(ndr_push_spoolss_PrinterInfo3(ndr, NDR_SCALARS, &r->info3)); - break; - - case 4: - NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr, NDR_SCALARS, &r->info4)); - break; - - case 5: - NDR_CHECK(ndr_push_spoolss_PrinterInfo5(ndr, NDR_SCALARS, &r->info5)); - break; - - case 6: - NDR_CHECK(ndr_push_spoolss_PrinterInfo6(ndr, NDR_SCALARS, &r->info6)); - break; - - case 7: - NDR_CHECK(ndr_push_spoolss_PrinterInfo7(ndr, NDR_SCALARS, &r->info7)); - break; - - default: - return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 1: - NDR_CHECK(ndr_push_spoolss_PrinterInfo1(ndr, NDR_BUFFERS, &r->info1)); - break; - - case 2: - NDR_CHECK(ndr_push_spoolss_PrinterInfo2(ndr, NDR_BUFFERS, &r->info2)); - break; - - case 3: - NDR_CHECK(ndr_push_spoolss_PrinterInfo3(ndr, NDR_BUFFERS, &r->info3)); - break; - - case 4: - NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr, NDR_BUFFERS, &r->info4)); - break; - - case 5: - NDR_CHECK(ndr_push_spoolss_PrinterInfo5(ndr, NDR_BUFFERS, &r->info5)); - break; - - case 6: - NDR_CHECK(ndr_push_spoolss_PrinterInfo6(ndr, NDR_BUFFERS, &r->info6)); - break; - - case 7: - NDR_CHECK(ndr_push_spoolss_PrinterInfo7(ndr, NDR_BUFFERS, &r->info7)); - break; - - default: - return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_EnumPrinters(struct ndr_push *ndr, struct spoolss_EnumPrinters *r) -{ - NDR_CHECK(ndr_push_uint32(ndr, r->in.flags)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.server)); - if (r->in.server) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.server)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.buffer)); - if (r->in.buffer) { - NDR_CHECK(ndr_push_DATA_BLOB(ndr, *r->in.buffer)); - } - NDR_CHECK(ndr_push_uint32(ndr, *r->in.buf_size)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_OpenPrinter(struct ndr_push *ndr, struct spoolss_OpenPrinter *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.server)); - if (r->in.server) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.server)); - } - NDR_CHECK(ndr_push_ptr(ndr, r->in.printer)); - if (r->in.printer) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.printer)); - } - NDR_CHECK(ndr_push_ptr(ndr, r->in.buffer)); - if (r->in.buffer) { - NDR_CHECK(ndr_push_DATA_BLOB(ndr, *r->in.buffer)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_02(struct ndr_push *ndr, struct spoolss_02 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_03(struct ndr_push *ndr, struct spoolss_03 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_EnumJobs(struct ndr_push *ndr, struct spoolss_EnumJobs *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.firstjob)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.numjobs)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.buffer)); - if (r->in.buffer) { - NDR_CHECK(ndr_push_DATA_BLOB(ndr, *r->in.buffer)); - } - NDR_CHECK(ndr_push_uint32(ndr, *r->in.buf_size)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_05(struct ndr_push *ndr, struct spoolss_05 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_06(struct ndr_push *ndr, struct spoolss_06 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_07(struct ndr_push *ndr, struct spoolss_07 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_GetPrinter(struct ndr_push *ndr, struct spoolss_GetPrinter *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.buffer)); - if (r->in.buffer) { - NDR_CHECK(ndr_push_DATA_BLOB(ndr, *r->in.buffer)); - } - NDR_CHECK(ndr_push_uint32(ndr, *r->in.buf_size)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_09(struct ndr_push *ndr, struct spoolss_09 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_0a(struct ndr_push *ndr, struct spoolss_0a *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_0b(struct ndr_push *ndr, struct spoolss_0b *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_0c(struct ndr_push *ndr, struct spoolss_0c *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_0d(struct ndr_push *ndr, struct spoolss_0d *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_0e(struct ndr_push *ndr, struct spoolss_0e *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_0f(struct ndr_push *ndr, struct spoolss_0f *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_10(struct ndr_push *ndr, struct spoolss_10 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_11(struct ndr_push *ndr, struct spoolss_11 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_StartPagePrinter(struct ndr_push *ndr, struct spoolss_StartPagePrinter *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_13(struct ndr_push *ndr, struct spoolss_13 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_EndPagePrinter(struct ndr_push *ndr, struct spoolss_EndPagePrinter *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_15(struct ndr_push *ndr, struct spoolss_15 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_16(struct ndr_push *ndr, struct spoolss_16 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_EndDocPrinter(struct ndr_push *ndr, struct spoolss_EndDocPrinter *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_18(struct ndr_push *ndr, struct spoolss_18 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_19(struct ndr_push *ndr, struct spoolss_19 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_1a(struct ndr_push *ndr, struct spoolss_1a *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_1b(struct ndr_push *ndr, struct spoolss_1b *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_1c(struct ndr_push *ndr, struct spoolss_1c *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_ClosePrinter(struct ndr_push *ndr, struct spoolss_ClosePrinter *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_1e(struct ndr_push *ndr, struct spoolss_1e *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_1f(struct ndr_push *ndr, struct spoolss_1f *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_20(struct ndr_push *ndr, struct spoolss_20 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_21(struct ndr_push *ndr, struct spoolss_21 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_22(struct ndr_push *ndr, struct spoolss_22 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_23(struct ndr_push *ndr, struct spoolss_23 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_24(struct ndr_push *ndr, struct spoolss_24 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_25(struct ndr_push *ndr, struct spoolss_25 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_26(struct ndr_push *ndr, struct spoolss_26 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_27(struct ndr_push *ndr, struct spoolss_27 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_28(struct ndr_push *ndr, struct spoolss_28 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_29(struct ndr_push *ndr, struct spoolss_29 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_2a(struct ndr_push *ndr, struct spoolss_2a *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_2b(struct ndr_push *ndr, struct spoolss_2b *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_2c(struct ndr_push *ndr, struct spoolss_2c *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_2d(struct ndr_push *ndr, struct spoolss_2d *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_2e(struct ndr_push *ndr, struct spoolss_2e *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_2f(struct ndr_push *ndr, struct spoolss_2f *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_30(struct ndr_push *ndr, struct spoolss_30 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_31(struct ndr_push *ndr, struct spoolss_31 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_32(struct ndr_push *ndr, struct spoolss_32 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_33(struct ndr_push *ndr, struct spoolss_33 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_34(struct ndr_push *ndr, struct spoolss_34 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_35(struct ndr_push *ndr, struct spoolss_35 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_36(struct ndr_push *ndr, struct spoolss_36 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_37(struct ndr_push *ndr, struct spoolss_37 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_38(struct ndr_push *ndr, struct spoolss_38 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_39(struct ndr_push *ndr, struct spoolss_39 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_3a(struct ndr_push *ndr, struct spoolss_3a *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_3b(struct ndr_push *ndr, struct spoolss_3b *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_3c(struct ndr_push *ndr, struct spoolss_3c *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_3d(struct ndr_push *ndr, struct spoolss_3d *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_3e(struct ndr_push *ndr, struct spoolss_3e *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_3f(struct ndr_push *ndr, struct spoolss_3f *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_40(struct ndr_push *ndr, struct spoolss_40 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_41(struct ndr_push *ndr, struct spoolss_41 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_42(struct ndr_push *ndr, struct spoolss_42 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_43(struct ndr_push *ndr, struct spoolss_43 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_44(struct ndr_push *ndr, struct spoolss_44 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_Devmode(struct ndr_push *ndr, int ndr_flags, struct spoolss_Devmode *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->foo)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_DevmodeContainer(struct ndr_push *ndr, int ndr_flags, struct spoolss_DevmodeContainer *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->size)); - NDR_CHECK(ndr_push_ptr(ndr, r->devmode)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->devmode) { - NDR_CHECK(ndr_push_spoolss_Devmode(ndr, NDR_SCALARS|NDR_BUFFERS, r->devmode)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_UserLevel1(struct ndr_push *ndr, int ndr_flags, struct spoolss_UserLevel1 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->size)); - NDR_CHECK(ndr_push_ptr(ndr, r->client)); - NDR_CHECK(ndr_push_ptr(ndr, r->user)); - NDR_CHECK(ndr_push_uint32(ndr, r->build)); - NDR_CHECK(ndr_push_uint32(ndr, r->major)); - NDR_CHECK(ndr_push_uint32(ndr, r->minor)); - NDR_CHECK(ndr_push_uint32(ndr, r->processor)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->client) { - NDR_CHECK(ndr_push_unistr(ndr, r->client)); - } - if (r->user) { - NDR_CHECK(ndr_push_unistr(ndr, r->user)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_UserLevel(struct ndr_push *ndr, int ndr_flags, uint16 level, union spoolss_UserLevel *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - switch (level) { - case 1: - NDR_CHECK(ndr_push_ptr(ndr, r->level1)); - break; - - default: - return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 1: - if (r->level1) { - NDR_CHECK(ndr_push_spoolss_UserLevel1(ndr, NDR_SCALARS|NDR_BUFFERS, r->level1)); - } - break; - - default: - return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_OpenPrinterEx(struct ndr_push *ndr, struct spoolss_OpenPrinterEx *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.printername)); - if (r->in.printername) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.printername)); - } - NDR_CHECK(ndr_push_ptr(ndr, r->in.datatype)); - if (r->in.datatype) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.datatype)); - } - NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.devmode_ctr)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.access_required)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_spoolss_UserLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->in.userlevel)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_46(struct ndr_push *ndr, struct spoolss_46 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_47(struct ndr_push *ndr, struct spoolss_47 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_EnumPrinterData(struct ndr_push *ndr, struct spoolss_EnumPrinterData *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.enum_index)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.value_offered)); - NDR_CHECK(ndr_push_uint32(ndr, *r->in.data_size)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_49(struct ndr_push *ndr, struct spoolss_49 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_4a(struct ndr_push *ndr, struct spoolss_4a *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_4b(struct ndr_push *ndr, struct spoolss_4b *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_4c(struct ndr_push *ndr, struct spoolss_4c *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_4d(struct ndr_push *ndr, struct spoolss_4d *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_4e(struct ndr_push *ndr, struct spoolss_4e *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_4f(struct ndr_push *ndr, struct spoolss_4f *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_50(struct ndr_push *ndr, struct spoolss_50 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_51(struct ndr_push *ndr, struct spoolss_51 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_52(struct ndr_push *ndr, struct spoolss_52 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_53(struct ndr_push *ndr, struct spoolss_53 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_54(struct ndr_push *ndr, struct spoolss_54 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_55(struct ndr_push *ndr, struct spoolss_55 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_56(struct ndr_push *ndr, struct spoolss_56 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_57(struct ndr_push *ndr, struct spoolss_57 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_58(struct ndr_push *ndr, struct spoolss_58 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_59(struct ndr_push *ndr, struct spoolss_59 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_5a(struct ndr_push *ndr, struct spoolss_5a *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_5b(struct ndr_push *ndr, struct spoolss_5b *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_5c(struct ndr_push *ndr, struct spoolss_5c *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_5d(struct ndr_push *ndr, struct spoolss_5d *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_5e(struct ndr_push *ndr, struct spoolss_5e *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_spoolss_5f(struct ndr_push *ndr, struct spoolss_5f *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_DeviceMode(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DeviceMode *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_nstring(ndr, NDR_SCALARS, &r->devicename)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->specversion)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->driverversion)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->size)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->driverextra)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->fields)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->orientation)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->papersize)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->paperlength)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->paperwidth)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->scale)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->copies)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->defaultsource)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->printquality)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->color)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->duplex)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->yresolution)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->ttoption)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->collate)); - NDR_CHECK(ndr_pull_nstring(ndr, NDR_SCALARS, &r->formname)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->logpixels)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->bitsperpel)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->pelswidth)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->pelsheight)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->displayflags)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->displayfrequency)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->icmmethod)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->icmintent)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->mediatype)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->dithertype)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->reserved1)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->reserved2)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->panningwidth)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->panningheight)); - NDR_ALLOC_N_SIZE(ndr, r->private, r->driverextra, sizeof(r->private[0])); - { - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->private, r->driverextra)); - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_nstring(ndr, NDR_BUFFERS, &r->devicename)); - NDR_CHECK(ndr_pull_nstring(ndr, NDR_BUFFERS, &r->formname)); - { - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_BUFFERS, r->private, r->driverextra)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_PrinterInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo1 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->flags)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->name, sizeof(*r->name), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->description, sizeof(*r->description), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->comment, sizeof(*r->comment), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_PrinterInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo2 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->servername, sizeof(*r->servername), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->printername, sizeof(*r->printername), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->sharename, sizeof(*r->sharename), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->portname, sizeof(*r->portname), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->drivername, sizeof(*r->drivername), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->comment, sizeof(*r->comment), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->location, sizeof(*r->location), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->devmode, sizeof(*r->devmode), (ndr_pull_flags_fn_t)ndr_pull_spoolss_DeviceMode)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->sepfile, sizeof(*r->sepfile), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->printprocessor, sizeof(*r->printprocessor), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->datatype, sizeof(*r->datatype), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->parameters, sizeof(*r->parameters), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->secdesc, sizeof(*r->secdesc), (ndr_pull_flags_fn_t)ndr_pull_security_descriptor)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->attributes)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->priority)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->defaultpriority)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->starttime)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->untiltime)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->status)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->cjobs)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->averageppm)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_PrinterInfo3(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo3 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->flags)); - NDR_CHECK(ndr_pull_security_descriptor(ndr, NDR_SCALARS, &r->secdesc)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_security_descriptor(ndr, NDR_BUFFERS, &r->secdesc)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_PrinterInfo4(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo4 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->printername, sizeof(*r->printername), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->servername, sizeof(*r->servername), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->attributes)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_PrinterInfo5(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo5 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->printername, sizeof(*r->printername), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->portname, sizeof(*r->portname), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->attributes)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->device_not_selected_timeout)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->transmission_retry_timeout)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_PrinterInfo6(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo6 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_PrinterInfo7(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo7 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->guid, sizeof(*r->guid), (ndr_pull_flags_fn_t)ndr_pull_nstring)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->action)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_PrinterInfo(struct ndr_pull *ndr, int ndr_flags, uint16 level, union spoolss_PrinterInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 1: { - NDR_CHECK(ndr_pull_spoolss_PrinterInfo1(ndr, NDR_SCALARS, &r->info1)); - break; } - - case 2: { - NDR_CHECK(ndr_pull_spoolss_PrinterInfo2(ndr, NDR_SCALARS, &r->info2)); - break; } - - case 3: { - NDR_CHECK(ndr_pull_spoolss_PrinterInfo3(ndr, NDR_SCALARS, &r->info3)); - break; } - - case 4: { - NDR_CHECK(ndr_pull_spoolss_PrinterInfo4(ndr, NDR_SCALARS, &r->info4)); - break; } - - case 5: { - NDR_CHECK(ndr_pull_spoolss_PrinterInfo5(ndr, NDR_SCALARS, &r->info5)); - break; } - - case 6: { - NDR_CHECK(ndr_pull_spoolss_PrinterInfo6(ndr, NDR_SCALARS, &r->info6)); - break; } - - case 7: { - NDR_CHECK(ndr_pull_spoolss_PrinterInfo7(ndr, NDR_SCALARS, &r->info7)); - break; } - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 1: - NDR_CHECK(ndr_pull_spoolss_PrinterInfo1(ndr, NDR_BUFFERS, &r->info1)); - break; - - case 2: - NDR_CHECK(ndr_pull_spoolss_PrinterInfo2(ndr, NDR_BUFFERS, &r->info2)); - break; - - case 3: - NDR_CHECK(ndr_pull_spoolss_PrinterInfo3(ndr, NDR_BUFFERS, &r->info3)); - break; - - case 4: - NDR_CHECK(ndr_pull_spoolss_PrinterInfo4(ndr, NDR_BUFFERS, &r->info4)); - break; - - case 5: - NDR_CHECK(ndr_pull_spoolss_PrinterInfo5(ndr, NDR_BUFFERS, &r->info5)); - break; - - case 6: - NDR_CHECK(ndr_pull_spoolss_PrinterInfo6(ndr, NDR_BUFFERS, &r->info6)); - break; - - case 7: - NDR_CHECK(ndr_pull_spoolss_PrinterInfo7(ndr, NDR_BUFFERS, &r->info7)); - break; - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_EnumPrinters(struct ndr_pull *ndr, struct spoolss_EnumPrinters *r) -{ - uint32 _ptr_buffer; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_buffer)); - if (_ptr_buffer) { - NDR_ALLOC(ndr, r->out.buffer); - } else { - r->out.buffer = NULL; - } - if (r->out.buffer) { - NDR_CHECK(ndr_pull_DATA_BLOB(ndr, r->out.buffer)); - } - NDR_CHECK(ndr_pull_uint32(ndr, r->out.buf_size)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.count)); - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_OpenPrinter(struct ndr_pull *ndr, struct spoolss_OpenPrinter *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_02(struct ndr_pull *ndr, struct spoolss_02 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_03(struct ndr_pull *ndr, struct spoolss_03 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_EnumJobs(struct ndr_pull *ndr, struct spoolss_EnumJobs *r) -{ - uint32 _ptr_buffer; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_buffer)); - if (_ptr_buffer) { - NDR_ALLOC(ndr, r->out.buffer); - } else { - r->out.buffer = NULL; - } - if (r->out.buffer) { - NDR_CHECK(ndr_pull_DATA_BLOB(ndr, r->out.buffer)); - } - NDR_CHECK(ndr_pull_uint32(ndr, r->out.buf_size)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.numjobs)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_05(struct ndr_pull *ndr, struct spoolss_05 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_06(struct ndr_pull *ndr, struct spoolss_06 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_07(struct ndr_pull *ndr, struct spoolss_07 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_GetPrinter(struct ndr_pull *ndr, struct spoolss_GetPrinter *r) -{ - uint32 _ptr_info; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info)); - if (_ptr_info) { - NDR_ALLOC(ndr, r->out.info); - } else { - r->out.info = NULL; - } - if (r->out.info) { - NDR_CHECK(ndr_pull_subcontext_union_fn(ndr, r->in.level, r->out.info, (ndr_pull_union_fn_t) ndr_pull_spoolss_PrinterInfo)); - } - NDR_CHECK(ndr_pull_uint32(ndr, r->out.buf_size)); - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_09(struct ndr_pull *ndr, struct spoolss_09 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_0a(struct ndr_pull *ndr, struct spoolss_0a *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_0b(struct ndr_pull *ndr, struct spoolss_0b *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_0c(struct ndr_pull *ndr, struct spoolss_0c *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_0d(struct ndr_pull *ndr, struct spoolss_0d *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_0e(struct ndr_pull *ndr, struct spoolss_0e *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_0f(struct ndr_pull *ndr, struct spoolss_0f *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_10(struct ndr_pull *ndr, struct spoolss_10 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_11(struct ndr_pull *ndr, struct spoolss_11 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_StartPagePrinter(struct ndr_pull *ndr, struct spoolss_StartPagePrinter *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_13(struct ndr_pull *ndr, struct spoolss_13 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_EndPagePrinter(struct ndr_pull *ndr, struct spoolss_EndPagePrinter *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_15(struct ndr_pull *ndr, struct spoolss_15 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_16(struct ndr_pull *ndr, struct spoolss_16 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_EndDocPrinter(struct ndr_pull *ndr, struct spoolss_EndDocPrinter *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_18(struct ndr_pull *ndr, struct spoolss_18 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_19(struct ndr_pull *ndr, struct spoolss_19 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_1a(struct ndr_pull *ndr, struct spoolss_1a *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_1b(struct ndr_pull *ndr, struct spoolss_1b *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_1c(struct ndr_pull *ndr, struct spoolss_1c *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_ClosePrinter(struct ndr_pull *ndr, struct spoolss_ClosePrinter *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_1e(struct ndr_pull *ndr, struct spoolss_1e *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_1f(struct ndr_pull *ndr, struct spoolss_1f *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_20(struct ndr_pull *ndr, struct spoolss_20 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_21(struct ndr_pull *ndr, struct spoolss_21 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_22(struct ndr_pull *ndr, struct spoolss_22 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_23(struct ndr_pull *ndr, struct spoolss_23 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_24(struct ndr_pull *ndr, struct spoolss_24 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_25(struct ndr_pull *ndr, struct spoolss_25 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_26(struct ndr_pull *ndr, struct spoolss_26 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_27(struct ndr_pull *ndr, struct spoolss_27 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_28(struct ndr_pull *ndr, struct spoolss_28 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_29(struct ndr_pull *ndr, struct spoolss_29 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_2a(struct ndr_pull *ndr, struct spoolss_2a *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_2b(struct ndr_pull *ndr, struct spoolss_2b *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_2c(struct ndr_pull *ndr, struct spoolss_2c *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_2d(struct ndr_pull *ndr, struct spoolss_2d *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_2e(struct ndr_pull *ndr, struct spoolss_2e *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_2f(struct ndr_pull *ndr, struct spoolss_2f *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_30(struct ndr_pull *ndr, struct spoolss_30 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_31(struct ndr_pull *ndr, struct spoolss_31 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_32(struct ndr_pull *ndr, struct spoolss_32 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_33(struct ndr_pull *ndr, struct spoolss_33 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_34(struct ndr_pull *ndr, struct spoolss_34 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_35(struct ndr_pull *ndr, struct spoolss_35 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_36(struct ndr_pull *ndr, struct spoolss_36 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_37(struct ndr_pull *ndr, struct spoolss_37 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_38(struct ndr_pull *ndr, struct spoolss_38 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_39(struct ndr_pull *ndr, struct spoolss_39 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_3a(struct ndr_pull *ndr, struct spoolss_3a *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_3b(struct ndr_pull *ndr, struct spoolss_3b *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_3c(struct ndr_pull *ndr, struct spoolss_3c *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_3d(struct ndr_pull *ndr, struct spoolss_3d *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_3e(struct ndr_pull *ndr, struct spoolss_3e *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_3f(struct ndr_pull *ndr, struct spoolss_3f *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_40(struct ndr_pull *ndr, struct spoolss_40 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_41(struct ndr_pull *ndr, struct spoolss_41 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_42(struct ndr_pull *ndr, struct spoolss_42 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_43(struct ndr_pull *ndr, struct spoolss_43 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_44(struct ndr_pull *ndr, struct spoolss_44 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_OpenPrinterEx(struct ndr_pull *ndr, struct spoolss_OpenPrinterEx *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_46(struct ndr_pull *ndr, struct spoolss_46 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_47(struct ndr_pull *ndr, struct spoolss_47 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_EnumPrinterData(struct ndr_pull *ndr, struct spoolss_EnumPrinterData *r) -{ - NDR_CHECK(ndr_pull_lstring(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.value)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.value_needed)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.printerdata_type)); - NDR_CHECK(ndr_pull_DATA_BLOB(ndr, &r->out.data)); - NDR_CHECK(ndr_pull_uint32(ndr, r->out.data_size)); - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_49(struct ndr_pull *ndr, struct spoolss_49 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_4a(struct ndr_pull *ndr, struct spoolss_4a *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_4b(struct ndr_pull *ndr, struct spoolss_4b *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_4c(struct ndr_pull *ndr, struct spoolss_4c *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_4d(struct ndr_pull *ndr, struct spoolss_4d *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_4e(struct ndr_pull *ndr, struct spoolss_4e *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_4f(struct ndr_pull *ndr, struct spoolss_4f *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_50(struct ndr_pull *ndr, struct spoolss_50 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_51(struct ndr_pull *ndr, struct spoolss_51 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_52(struct ndr_pull *ndr, struct spoolss_52 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_53(struct ndr_pull *ndr, struct spoolss_53 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_54(struct ndr_pull *ndr, struct spoolss_54 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_55(struct ndr_pull *ndr, struct spoolss_55 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_56(struct ndr_pull *ndr, struct spoolss_56 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_57(struct ndr_pull *ndr, struct spoolss_57 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_58(struct ndr_pull *ndr, struct spoolss_58 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_59(struct ndr_pull *ndr, struct spoolss_59 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_5a(struct ndr_pull *ndr, struct spoolss_5a *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_5b(struct ndr_pull *ndr, struct spoolss_5b *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_5c(struct ndr_pull *ndr, struct spoolss_5c *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_5d(struct ndr_pull *ndr, struct spoolss_5d *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_5e(struct ndr_pull *ndr, struct spoolss_5e *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_spoolss_5f(struct ndr_pull *ndr, struct spoolss_5f *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -void ndr_print_spoolss_DeviceMode(struct ndr_print *ndr, const char *name, struct spoolss_DeviceMode *r) -{ - ndr_print_struct(ndr, name, "spoolss_DeviceMode"); - ndr->depth++; - ndr_print_nstring(ndr, "devicename", &r->devicename); - ndr_print_uint16(ndr, "specversion", r->specversion); - ndr_print_uint16(ndr, "driverversion", r->driverversion); - ndr_print_uint16(ndr, "size", r->size); - ndr_print_uint16(ndr, "driverextra", r->driverextra); - ndr_print_uint32(ndr, "fields", r->fields); - ndr_print_uint16(ndr, "orientation", r->orientation); - ndr_print_uint16(ndr, "papersize", r->papersize); - ndr_print_uint16(ndr, "paperlength", r->paperlength); - ndr_print_uint16(ndr, "paperwidth", r->paperwidth); - ndr_print_uint16(ndr, "scale", r->scale); - ndr_print_uint16(ndr, "copies", r->copies); - ndr_print_uint16(ndr, "defaultsource", r->defaultsource); - ndr_print_uint16(ndr, "printquality", r->printquality); - ndr_print_uint16(ndr, "color", r->color); - ndr_print_uint16(ndr, "duplex", r->duplex); - ndr_print_uint16(ndr, "yresolution", r->yresolution); - ndr_print_uint16(ndr, "ttoption", r->ttoption); - ndr_print_uint16(ndr, "collate", r->collate); - ndr_print_nstring(ndr, "formname", &r->formname); - ndr_print_uint16(ndr, "logpixels", r->logpixels); - ndr_print_uint32(ndr, "bitsperpel", r->bitsperpel); - ndr_print_uint32(ndr, "pelswidth", r->pelswidth); - ndr_print_uint32(ndr, "pelsheight", r->pelsheight); - ndr_print_uint32(ndr, "displayflags", r->displayflags); - ndr_print_uint32(ndr, "displayfrequency", r->displayfrequency); - ndr_print_uint32(ndr, "icmmethod", r->icmmethod); - ndr_print_uint32(ndr, "icmintent", r->icmintent); - ndr_print_uint32(ndr, "mediatype", r->mediatype); - ndr_print_uint32(ndr, "dithertype", r->dithertype); - ndr_print_uint32(ndr, "reserved1", r->reserved1); - ndr_print_uint32(ndr, "reserved2", r->reserved2); - ndr_print_uint32(ndr, "panningwidth", r->panningwidth); - ndr_print_uint32(ndr, "panningheight", r->panningheight); - ndr_print_ptr(ndr, "private", r->private); - ndr->depth++; - ndr_print_array_uint8(ndr, "private", r->private, r->driverextra); - ndr->depth--; - ndr->depth--; -} - -void ndr_print_spoolss_PrinterInfo1(struct ndr_print *ndr, const char *name, struct spoolss_PrinterInfo1 *r) -{ - ndr_print_struct(ndr, name, "spoolss_PrinterInfo1"); - ndr->depth++; - ndr_print_uint32(ndr, "flags", r->flags); - ndr_print_nstring(ndr, "name", &r->name); - ndr_print_nstring(ndr, "description", &r->description); - ndr_print_nstring(ndr, "comment", &r->comment); - ndr->depth--; -} - -void ndr_print_spoolss_PrinterInfo2(struct ndr_print *ndr, const char *name, struct spoolss_PrinterInfo2 *r) -{ - ndr_print_struct(ndr, name, "spoolss_PrinterInfo2"); - ndr->depth++; - ndr_print_nstring(ndr, "servername", &r->servername); - ndr_print_nstring(ndr, "printername", &r->printername); - ndr_print_nstring(ndr, "sharename", &r->sharename); - ndr_print_nstring(ndr, "portname", &r->portname); - ndr_print_nstring(ndr, "drivername", &r->drivername); - ndr_print_nstring(ndr, "comment", &r->comment); - ndr_print_nstring(ndr, "location", &r->location); - ndr_print_ptr(ndr, "devmode", r->devmode); - ndr->depth++; - if (r->devmode) { - ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode); - } - ndr->depth--; - ndr_print_nstring(ndr, "sepfile", &r->sepfile); - ndr_print_nstring(ndr, "printprocessor", &r->printprocessor); - ndr_print_nstring(ndr, "datatype", &r->datatype); - ndr_print_nstring(ndr, "parameters", &r->parameters); - ndr_print_ptr(ndr, "secdesc", r->secdesc); - ndr->depth++; - if (r->secdesc) { - ndr_print_security_descriptor(ndr, "secdesc", r->secdesc); - } - ndr->depth--; - ndr_print_uint32(ndr, "attributes", r->attributes); - ndr_print_uint32(ndr, "priority", r->priority); - ndr_print_uint32(ndr, "defaultpriority", r->defaultpriority); - ndr_print_uint32(ndr, "starttime", r->starttime); - ndr_print_uint32(ndr, "untiltime", r->untiltime); - ndr_print_uint32(ndr, "status", r->status); - ndr_print_uint32(ndr, "cjobs", r->cjobs); - ndr_print_uint32(ndr, "averageppm", r->averageppm); - ndr->depth--; -} - -void ndr_print_spoolss_PrinterInfo3(struct ndr_print *ndr, const char *name, struct spoolss_PrinterInfo3 *r) -{ - ndr_print_struct(ndr, name, "spoolss_PrinterInfo3"); - ndr->depth++; - ndr_print_uint32(ndr, "flags", r->flags); - ndr_print_security_descriptor(ndr, "secdesc", &r->secdesc); - ndr->depth--; -} - -void ndr_print_spoolss_PrinterInfo4(struct ndr_print *ndr, const char *name, struct spoolss_PrinterInfo4 *r) -{ - ndr_print_struct(ndr, name, "spoolss_PrinterInfo4"); - ndr->depth++; - ndr_print_nstring(ndr, "printername", &r->printername); - ndr_print_nstring(ndr, "servername", &r->servername); - ndr_print_uint32(ndr, "attributes", r->attributes); - ndr->depth--; -} - -void ndr_print_spoolss_PrinterInfo5(struct ndr_print *ndr, const char *name, struct spoolss_PrinterInfo5 *r) -{ - ndr_print_struct(ndr, name, "spoolss_PrinterInfo5"); - ndr->depth++; - ndr_print_nstring(ndr, "printername", &r->printername); - ndr_print_nstring(ndr, "portname", &r->portname); - ndr_print_uint32(ndr, "attributes", r->attributes); - ndr_print_uint32(ndr, "device_not_selected_timeout", r->device_not_selected_timeout); - ndr_print_uint32(ndr, "transmission_retry_timeout", r->transmission_retry_timeout); - ndr->depth--; -} - -void ndr_print_spoolss_PrinterInfo6(struct ndr_print *ndr, const char *name, struct spoolss_PrinterInfo6 *r) -{ - ndr_print_struct(ndr, name, "spoolss_PrinterInfo6"); - ndr->depth++; - ndr_print_uint32(ndr, "unknown", r->unknown); - ndr->depth--; -} - -void ndr_print_spoolss_PrinterInfo7(struct ndr_print *ndr, const char *name, struct spoolss_PrinterInfo7 *r) -{ - ndr_print_struct(ndr, name, "spoolss_PrinterInfo7"); - ndr->depth++; - ndr_print_nstring(ndr, "guid", &r->guid); - ndr_print_uint32(ndr, "action", r->action); - ndr->depth--; -} - -void ndr_print_spoolss_PrinterInfo(struct ndr_print *ndr, const char *name, uint16 level, union spoolss_PrinterInfo *r) -{ - ndr_print_union(ndr, name, level, "spoolss_PrinterInfo"); - switch (level) { - case 1: - ndr_print_spoolss_PrinterInfo1(ndr, "info1", &r->info1); - break; - - case 2: - ndr_print_spoolss_PrinterInfo2(ndr, "info2", &r->info2); - break; - - case 3: - ndr_print_spoolss_PrinterInfo3(ndr, "info3", &r->info3); - break; - - case 4: - ndr_print_spoolss_PrinterInfo4(ndr, "info4", &r->info4); - break; - - case 5: - ndr_print_spoolss_PrinterInfo5(ndr, "info5", &r->info5); - break; - - case 6: - ndr_print_spoolss_PrinterInfo6(ndr, "info6", &r->info6); - break; - - case 7: - ndr_print_spoolss_PrinterInfo7(ndr, "info7", &r->info7); - break; - - default: - ndr_print_bad_level(ndr, name, level); - } -} - -void ndr_print_spoolss_EnumPrinters(struct ndr_print *ndr, const char *name, int flags, struct spoolss_EnumPrinters *r) -{ - ndr_print_struct(ndr, name, "spoolss_EnumPrinters"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_EnumPrinters"); - ndr->depth++; - ndr_print_uint32(ndr, "flags", r->in.flags); - ndr_print_ptr(ndr, "server", r->in.server); - ndr->depth++; - if (r->in.server) { - ndr_print_unistr(ndr, "server", r->in.server); - } - ndr->depth--; - ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_ptr(ndr, "buffer", r->in.buffer); - ndr->depth++; - if (r->in.buffer) { - ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer); - } - ndr->depth--; - ndr_print_ptr(ndr, "buf_size", r->in.buf_size); - ndr->depth++; - ndr_print_uint32(ndr, "buf_size", *r->in.buf_size); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_EnumPrinters"); - ndr->depth++; - ndr_print_ptr(ndr, "buffer", r->out.buffer); - ndr->depth++; - if (r->out.buffer) { - ndr_print_DATA_BLOB(ndr, "buffer", *r->out.buffer); - } - ndr->depth--; - ndr_print_ptr(ndr, "buf_size", r->out.buf_size); - ndr->depth++; - ndr_print_uint32(ndr, "buf_size", *r->out.buf_size); - ndr->depth--; - ndr_print_uint32(ndr, "count", r->out.count); - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_OpenPrinter(struct ndr_print *ndr, const char *name, int flags, struct spoolss_OpenPrinter *r) -{ - ndr_print_struct(ndr, name, "spoolss_OpenPrinter"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_OpenPrinter"); - ndr->depth++; - ndr_print_ptr(ndr, "server", r->in.server); - ndr->depth++; - if (r->in.server) { - ndr_print_unistr(ndr, "server", r->in.server); - } - ndr->depth--; - ndr_print_ptr(ndr, "printer", r->in.printer); - ndr->depth++; - if (r->in.printer) { - ndr_print_unistr(ndr, "printer", r->in.printer); - } - ndr->depth--; - ndr_print_ptr(ndr, "buffer", r->in.buffer); - ndr->depth++; - if (r->in.buffer) { - ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer); - } - ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_OpenPrinter"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->out.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->out.handle); - ndr->depth--; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_02(struct ndr_print *ndr, const char *name, int flags, struct spoolss_02 *r) -{ - ndr_print_struct(ndr, name, "spoolss_02"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_02"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_02"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_03(struct ndr_print *ndr, const char *name, int flags, struct spoolss_03 *r) -{ - ndr_print_struct(ndr, name, "spoolss_03"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_03"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_03"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_EnumJobs(struct ndr_print *ndr, const char *name, int flags, struct spoolss_EnumJobs *r) -{ - ndr_print_struct(ndr, name, "spoolss_EnumJobs"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_EnumJobs"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "firstjob", r->in.firstjob); - ndr_print_uint32(ndr, "numjobs", r->in.numjobs); - ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_ptr(ndr, "buffer", r->in.buffer); - ndr->depth++; - if (r->in.buffer) { - ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer); - } - ndr->depth--; - ndr_print_ptr(ndr, "buf_size", r->in.buf_size); - ndr->depth++; - ndr_print_uint32(ndr, "buf_size", *r->in.buf_size); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_EnumJobs"); - ndr->depth++; - ndr_print_ptr(ndr, "buffer", r->out.buffer); - ndr->depth++; - if (r->out.buffer) { - ndr_print_DATA_BLOB(ndr, "buffer", *r->out.buffer); - } - ndr->depth--; - ndr_print_ptr(ndr, "buf_size", r->out.buf_size); - ndr->depth++; - ndr_print_uint32(ndr, "buf_size", *r->out.buf_size); - ndr->depth--; - ndr_print_uint32(ndr, "numjobs", r->out.numjobs); - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_05(struct ndr_print *ndr, const char *name, int flags, struct spoolss_05 *r) -{ - ndr_print_struct(ndr, name, "spoolss_05"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_05"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_05"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_06(struct ndr_print *ndr, const char *name, int flags, struct spoolss_06 *r) -{ - ndr_print_struct(ndr, name, "spoolss_06"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_06"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_06"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_07(struct ndr_print *ndr, const char *name, int flags, struct spoolss_07 *r) -{ - ndr_print_struct(ndr, name, "spoolss_07"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_07"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_07"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_GetPrinter(struct ndr_print *ndr, const char *name, int flags, struct spoolss_GetPrinter *r) -{ - ndr_print_struct(ndr, name, "spoolss_GetPrinter"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_GetPrinter"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_ptr(ndr, "buffer", r->in.buffer); - ndr->depth++; - if (r->in.buffer) { - ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer); - } - ndr->depth--; - ndr_print_ptr(ndr, "buf_size", r->in.buf_size); - ndr->depth++; - ndr_print_uint32(ndr, "buf_size", *r->in.buf_size); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_GetPrinter"); - ndr->depth++; - ndr_print_ptr(ndr, "info", r->out.info); - ndr->depth++; - if (r->out.info) { - ndr_print_spoolss_PrinterInfo(ndr, "info", r->in.level, r->out.info); - } - ndr->depth--; - ndr_print_ptr(ndr, "buf_size", r->out.buf_size); - ndr->depth++; - ndr_print_uint32(ndr, "buf_size", *r->out.buf_size); - ndr->depth--; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_09(struct ndr_print *ndr, const char *name, int flags, struct spoolss_09 *r) -{ - ndr_print_struct(ndr, name, "spoolss_09"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_09"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_09"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_0a(struct ndr_print *ndr, const char *name, int flags, struct spoolss_0a *r) -{ - ndr_print_struct(ndr, name, "spoolss_0a"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_0a"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_0a"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_0b(struct ndr_print *ndr, const char *name, int flags, struct spoolss_0b *r) -{ - ndr_print_struct(ndr, name, "spoolss_0b"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_0b"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_0b"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_0c(struct ndr_print *ndr, const char *name, int flags, struct spoolss_0c *r) -{ - ndr_print_struct(ndr, name, "spoolss_0c"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_0c"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_0c"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_0d(struct ndr_print *ndr, const char *name, int flags, struct spoolss_0d *r) -{ - ndr_print_struct(ndr, name, "spoolss_0d"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_0d"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_0d"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_0e(struct ndr_print *ndr, const char *name, int flags, struct spoolss_0e *r) -{ - ndr_print_struct(ndr, name, "spoolss_0e"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_0e"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_0e"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_0f(struct ndr_print *ndr, const char *name, int flags, struct spoolss_0f *r) -{ - ndr_print_struct(ndr, name, "spoolss_0f"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_0f"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_0f"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_10(struct ndr_print *ndr, const char *name, int flags, struct spoolss_10 *r) -{ - ndr_print_struct(ndr, name, "spoolss_10"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_10"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_10"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_11(struct ndr_print *ndr, const char *name, int flags, struct spoolss_11 *r) -{ - ndr_print_struct(ndr, name, "spoolss_11"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_11"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_11"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_StartPagePrinter(struct ndr_print *ndr, const char *name, int flags, struct spoolss_StartPagePrinter *r) -{ - ndr_print_struct(ndr, name, "spoolss_StartPagePrinter"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_StartPagePrinter"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_StartPagePrinter"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_13(struct ndr_print *ndr, const char *name, int flags, struct spoolss_13 *r) -{ - ndr_print_struct(ndr, name, "spoolss_13"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_13"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_13"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_EndPagePrinter(struct ndr_print *ndr, const char *name, int flags, struct spoolss_EndPagePrinter *r) -{ - ndr_print_struct(ndr, name, "spoolss_EndPagePrinter"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_EndPagePrinter"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_EndPagePrinter"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_15(struct ndr_print *ndr, const char *name, int flags, struct spoolss_15 *r) -{ - ndr_print_struct(ndr, name, "spoolss_15"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_15"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_15"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_16(struct ndr_print *ndr, const char *name, int flags, struct spoolss_16 *r) -{ - ndr_print_struct(ndr, name, "spoolss_16"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_16"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_16"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_EndDocPrinter(struct ndr_print *ndr, const char *name, int flags, struct spoolss_EndDocPrinter *r) -{ - ndr_print_struct(ndr, name, "spoolss_EndDocPrinter"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_EndDocPrinter"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_EndDocPrinter"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_18(struct ndr_print *ndr, const char *name, int flags, struct spoolss_18 *r) -{ - ndr_print_struct(ndr, name, "spoolss_18"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_18"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_18"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_19(struct ndr_print *ndr, const char *name, int flags, struct spoolss_19 *r) -{ - ndr_print_struct(ndr, name, "spoolss_19"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_19"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_19"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_1a(struct ndr_print *ndr, const char *name, int flags, struct spoolss_1a *r) -{ - ndr_print_struct(ndr, name, "spoolss_1a"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_1a"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_1a"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_1b(struct ndr_print *ndr, const char *name, int flags, struct spoolss_1b *r) -{ - ndr_print_struct(ndr, name, "spoolss_1b"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_1b"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_1b"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_1c(struct ndr_print *ndr, const char *name, int flags, struct spoolss_1c *r) -{ - ndr_print_struct(ndr, name, "spoolss_1c"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_1c"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_1c"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_ClosePrinter(struct ndr_print *ndr, const char *name, int flags, struct spoolss_ClosePrinter *r) -{ - ndr_print_struct(ndr, name, "spoolss_ClosePrinter"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_ClosePrinter"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_ClosePrinter"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->out.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->out.handle); - ndr->depth--; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_1e(struct ndr_print *ndr, const char *name, int flags, struct spoolss_1e *r) -{ - ndr_print_struct(ndr, name, "spoolss_1e"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_1e"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_1e"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_1f(struct ndr_print *ndr, const char *name, int flags, struct spoolss_1f *r) -{ - ndr_print_struct(ndr, name, "spoolss_1f"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_1f"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_1f"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_20(struct ndr_print *ndr, const char *name, int flags, struct spoolss_20 *r) -{ - ndr_print_struct(ndr, name, "spoolss_20"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_20"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_20"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_21(struct ndr_print *ndr, const char *name, int flags, struct spoolss_21 *r) -{ - ndr_print_struct(ndr, name, "spoolss_21"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_21"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_21"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_22(struct ndr_print *ndr, const char *name, int flags, struct spoolss_22 *r) -{ - ndr_print_struct(ndr, name, "spoolss_22"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_22"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_22"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_23(struct ndr_print *ndr, const char *name, int flags, struct spoolss_23 *r) -{ - ndr_print_struct(ndr, name, "spoolss_23"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_23"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_23"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_24(struct ndr_print *ndr, const char *name, int flags, struct spoolss_24 *r) -{ - ndr_print_struct(ndr, name, "spoolss_24"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_24"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_24"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_25(struct ndr_print *ndr, const char *name, int flags, struct spoolss_25 *r) -{ - ndr_print_struct(ndr, name, "spoolss_25"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_25"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_25"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_26(struct ndr_print *ndr, const char *name, int flags, struct spoolss_26 *r) -{ - ndr_print_struct(ndr, name, "spoolss_26"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_26"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_26"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_27(struct ndr_print *ndr, const char *name, int flags, struct spoolss_27 *r) -{ - ndr_print_struct(ndr, name, "spoolss_27"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_27"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_27"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_28(struct ndr_print *ndr, const char *name, int flags, struct spoolss_28 *r) -{ - ndr_print_struct(ndr, name, "spoolss_28"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_28"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_28"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_29(struct ndr_print *ndr, const char *name, int flags, struct spoolss_29 *r) -{ - ndr_print_struct(ndr, name, "spoolss_29"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_29"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_29"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_2a(struct ndr_print *ndr, const char *name, int flags, struct spoolss_2a *r) -{ - ndr_print_struct(ndr, name, "spoolss_2a"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_2a"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_2a"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_2b(struct ndr_print *ndr, const char *name, int flags, struct spoolss_2b *r) -{ - ndr_print_struct(ndr, name, "spoolss_2b"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_2b"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_2b"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_2c(struct ndr_print *ndr, const char *name, int flags, struct spoolss_2c *r) -{ - ndr_print_struct(ndr, name, "spoolss_2c"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_2c"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_2c"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_2d(struct ndr_print *ndr, const char *name, int flags, struct spoolss_2d *r) -{ - ndr_print_struct(ndr, name, "spoolss_2d"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_2d"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_2d"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_2e(struct ndr_print *ndr, const char *name, int flags, struct spoolss_2e *r) -{ - ndr_print_struct(ndr, name, "spoolss_2e"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_2e"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_2e"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_2f(struct ndr_print *ndr, const char *name, int flags, struct spoolss_2f *r) -{ - ndr_print_struct(ndr, name, "spoolss_2f"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_2f"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_2f"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_30(struct ndr_print *ndr, const char *name, int flags, struct spoolss_30 *r) -{ - ndr_print_struct(ndr, name, "spoolss_30"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_30"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_30"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_31(struct ndr_print *ndr, const char *name, int flags, struct spoolss_31 *r) -{ - ndr_print_struct(ndr, name, "spoolss_31"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_31"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_31"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_32(struct ndr_print *ndr, const char *name, int flags, struct spoolss_32 *r) -{ - ndr_print_struct(ndr, name, "spoolss_32"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_32"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_32"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_33(struct ndr_print *ndr, const char *name, int flags, struct spoolss_33 *r) -{ - ndr_print_struct(ndr, name, "spoolss_33"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_33"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_33"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_34(struct ndr_print *ndr, const char *name, int flags, struct spoolss_34 *r) -{ - ndr_print_struct(ndr, name, "spoolss_34"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_34"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_34"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_35(struct ndr_print *ndr, const char *name, int flags, struct spoolss_35 *r) -{ - ndr_print_struct(ndr, name, "spoolss_35"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_35"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_35"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_36(struct ndr_print *ndr, const char *name, int flags, struct spoolss_36 *r) -{ - ndr_print_struct(ndr, name, "spoolss_36"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_36"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_36"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_37(struct ndr_print *ndr, const char *name, int flags, struct spoolss_37 *r) -{ - ndr_print_struct(ndr, name, "spoolss_37"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_37"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_37"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_38(struct ndr_print *ndr, const char *name, int flags, struct spoolss_38 *r) -{ - ndr_print_struct(ndr, name, "spoolss_38"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_38"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_38"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_39(struct ndr_print *ndr, const char *name, int flags, struct spoolss_39 *r) -{ - ndr_print_struct(ndr, name, "spoolss_39"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_39"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_39"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_3a(struct ndr_print *ndr, const char *name, int flags, struct spoolss_3a *r) -{ - ndr_print_struct(ndr, name, "spoolss_3a"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_3a"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_3a"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_3b(struct ndr_print *ndr, const char *name, int flags, struct spoolss_3b *r) -{ - ndr_print_struct(ndr, name, "spoolss_3b"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_3b"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_3b"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_3c(struct ndr_print *ndr, const char *name, int flags, struct spoolss_3c *r) -{ - ndr_print_struct(ndr, name, "spoolss_3c"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_3c"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_3c"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_3d(struct ndr_print *ndr, const char *name, int flags, struct spoolss_3d *r) -{ - ndr_print_struct(ndr, name, "spoolss_3d"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_3d"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_3d"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_3e(struct ndr_print *ndr, const char *name, int flags, struct spoolss_3e *r) -{ - ndr_print_struct(ndr, name, "spoolss_3e"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_3e"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_3e"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_3f(struct ndr_print *ndr, const char *name, int flags, struct spoolss_3f *r) -{ - ndr_print_struct(ndr, name, "spoolss_3f"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_3f"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_3f"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_40(struct ndr_print *ndr, const char *name, int flags, struct spoolss_40 *r) -{ - ndr_print_struct(ndr, name, "spoolss_40"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_40"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_40"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_41(struct ndr_print *ndr, const char *name, int flags, struct spoolss_41 *r) -{ - ndr_print_struct(ndr, name, "spoolss_41"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_41"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_41"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_42(struct ndr_print *ndr, const char *name, int flags, struct spoolss_42 *r) -{ - ndr_print_struct(ndr, name, "spoolss_42"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_42"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_42"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_43(struct ndr_print *ndr, const char *name, int flags, struct spoolss_43 *r) -{ - ndr_print_struct(ndr, name, "spoolss_43"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_43"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_43"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_44(struct ndr_print *ndr, const char *name, int flags, struct spoolss_44 *r) -{ - ndr_print_struct(ndr, name, "spoolss_44"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_44"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_44"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_Devmode(struct ndr_print *ndr, const char *name, struct spoolss_Devmode *r) -{ - ndr_print_struct(ndr, name, "spoolss_Devmode"); - ndr->depth++; - ndr_print_uint32(ndr, "foo", r->foo); - ndr->depth--; -} - -void ndr_print_spoolss_DevmodeContainer(struct ndr_print *ndr, const char *name, struct spoolss_DevmodeContainer *r) -{ - ndr_print_struct(ndr, name, "spoolss_DevmodeContainer"); - ndr->depth++; - ndr_print_uint32(ndr, "size", r->size); - ndr_print_ptr(ndr, "devmode", r->devmode); - ndr->depth++; - if (r->devmode) { - ndr_print_spoolss_Devmode(ndr, "devmode", r->devmode); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_spoolss_UserLevel1(struct ndr_print *ndr, const char *name, struct spoolss_UserLevel1 *r) -{ - ndr_print_struct(ndr, name, "spoolss_UserLevel1"); - ndr->depth++; - ndr_print_uint32(ndr, "size", r->size); - ndr_print_ptr(ndr, "client", r->client); - ndr->depth++; - if (r->client) { - ndr_print_unistr(ndr, "client", r->client); - } - ndr->depth--; - ndr_print_ptr(ndr, "user", r->user); - ndr->depth++; - if (r->user) { - ndr_print_unistr(ndr, "user", r->user); - } - ndr->depth--; - ndr_print_uint32(ndr, "build", r->build); - ndr_print_uint32(ndr, "major", r->major); - ndr_print_uint32(ndr, "minor", r->minor); - ndr_print_uint32(ndr, "processor", r->processor); - ndr->depth--; -} - -void ndr_print_spoolss_UserLevel(struct ndr_print *ndr, const char *name, uint16 level, union spoolss_UserLevel *r) -{ - ndr_print_union(ndr, name, level, "spoolss_UserLevel"); - switch (level) { - case 1: - ndr_print_ptr(ndr, "level1", r->level1); - ndr->depth++; - if (r->level1) { - ndr_print_spoolss_UserLevel1(ndr, "level1", r->level1); - } - ndr->depth--; - break; - - default: - ndr_print_bad_level(ndr, name, level); - } -} - -void ndr_print_spoolss_OpenPrinterEx(struct ndr_print *ndr, const char *name, int flags, struct spoolss_OpenPrinterEx *r) -{ - ndr_print_struct(ndr, name, "spoolss_OpenPrinterEx"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_OpenPrinterEx"); - ndr->depth++; - ndr_print_ptr(ndr, "printername", r->in.printername); - ndr->depth++; - if (r->in.printername) { - ndr_print_unistr(ndr, "printername", r->in.printername); - } - ndr->depth--; - ndr_print_ptr(ndr, "datatype", r->in.datatype); - ndr->depth++; - if (r->in.datatype) { - ndr_print_unistr(ndr, "datatype", r->in.datatype); - } - ndr->depth--; - ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", &r->in.devmode_ctr); - ndr_print_uint32(ndr, "access_required", r->in.access_required); - ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_spoolss_UserLevel(ndr, "userlevel", r->in.level, &r->in.userlevel); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_OpenPrinterEx"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->out.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->out.handle); - ndr->depth--; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_46(struct ndr_print *ndr, const char *name, int flags, struct spoolss_46 *r) -{ - ndr_print_struct(ndr, name, "spoolss_46"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_46"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_46"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_47(struct ndr_print *ndr, const char *name, int flags, struct spoolss_47 *r) -{ - ndr_print_struct(ndr, name, "spoolss_47"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_47"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_47"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_EnumPrinterData(struct ndr_print *ndr, const char *name, int flags, struct spoolss_EnumPrinterData *r) -{ - ndr_print_struct(ndr, name, "spoolss_EnumPrinterData"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_EnumPrinterData"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "enum_index", r->in.enum_index); - ndr_print_uint32(ndr, "value_offered", r->in.value_offered); - ndr_print_ptr(ndr, "data_size", r->in.data_size); - ndr->depth++; - ndr_print_uint32(ndr, "data_size", *r->in.data_size); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_EnumPrinterData"); - ndr->depth++; - ndr_print_lstring(ndr, "value", &r->out.value); - ndr_print_uint32(ndr, "value_needed", r->out.value_needed); - ndr_print_uint32(ndr, "printerdata_type", r->out.printerdata_type); - ndr_print_DATA_BLOB(ndr, "data", r->out.data); - ndr_print_ptr(ndr, "data_size", r->out.data_size); - ndr->depth++; - ndr_print_uint32(ndr, "data_size", *r->out.data_size); - ndr->depth--; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_49(struct ndr_print *ndr, const char *name, int flags, struct spoolss_49 *r) -{ - ndr_print_struct(ndr, name, "spoolss_49"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_49"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_49"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_4a(struct ndr_print *ndr, const char *name, int flags, struct spoolss_4a *r) -{ - ndr_print_struct(ndr, name, "spoolss_4a"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_4a"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_4a"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_4b(struct ndr_print *ndr, const char *name, int flags, struct spoolss_4b *r) -{ - ndr_print_struct(ndr, name, "spoolss_4b"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_4b"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_4b"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_4c(struct ndr_print *ndr, const char *name, int flags, struct spoolss_4c *r) -{ - ndr_print_struct(ndr, name, "spoolss_4c"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_4c"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_4c"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_4d(struct ndr_print *ndr, const char *name, int flags, struct spoolss_4d *r) -{ - ndr_print_struct(ndr, name, "spoolss_4d"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_4d"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_4d"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_4e(struct ndr_print *ndr, const char *name, int flags, struct spoolss_4e *r) -{ - ndr_print_struct(ndr, name, "spoolss_4e"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_4e"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_4e"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_4f(struct ndr_print *ndr, const char *name, int flags, struct spoolss_4f *r) -{ - ndr_print_struct(ndr, name, "spoolss_4f"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_4f"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_4f"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_50(struct ndr_print *ndr, const char *name, int flags, struct spoolss_50 *r) -{ - ndr_print_struct(ndr, name, "spoolss_50"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_50"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_50"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_51(struct ndr_print *ndr, const char *name, int flags, struct spoolss_51 *r) -{ - ndr_print_struct(ndr, name, "spoolss_51"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_51"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_51"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_52(struct ndr_print *ndr, const char *name, int flags, struct spoolss_52 *r) -{ - ndr_print_struct(ndr, name, "spoolss_52"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_52"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_52"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_53(struct ndr_print *ndr, const char *name, int flags, struct spoolss_53 *r) -{ - ndr_print_struct(ndr, name, "spoolss_53"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_53"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_53"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_54(struct ndr_print *ndr, const char *name, int flags, struct spoolss_54 *r) -{ - ndr_print_struct(ndr, name, "spoolss_54"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_54"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_54"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_55(struct ndr_print *ndr, const char *name, int flags, struct spoolss_55 *r) -{ - ndr_print_struct(ndr, name, "spoolss_55"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_55"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_55"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_56(struct ndr_print *ndr, const char *name, int flags, struct spoolss_56 *r) -{ - ndr_print_struct(ndr, name, "spoolss_56"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_56"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_56"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_57(struct ndr_print *ndr, const char *name, int flags, struct spoolss_57 *r) -{ - ndr_print_struct(ndr, name, "spoolss_57"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_57"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_57"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_58(struct ndr_print *ndr, const char *name, int flags, struct spoolss_58 *r) -{ - ndr_print_struct(ndr, name, "spoolss_58"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_58"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_58"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_59(struct ndr_print *ndr, const char *name, int flags, struct spoolss_59 *r) -{ - ndr_print_struct(ndr, name, "spoolss_59"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_59"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_59"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_5a(struct ndr_print *ndr, const char *name, int flags, struct spoolss_5a *r) -{ - ndr_print_struct(ndr, name, "spoolss_5a"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_5a"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_5a"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_5b(struct ndr_print *ndr, const char *name, int flags, struct spoolss_5b *r) -{ - ndr_print_struct(ndr, name, "spoolss_5b"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_5b"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_5b"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_5c(struct ndr_print *ndr, const char *name, int flags, struct spoolss_5c *r) -{ - ndr_print_struct(ndr, name, "spoolss_5c"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_5c"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_5c"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_5d(struct ndr_print *ndr, const char *name, int flags, struct spoolss_5d *r) -{ - ndr_print_struct(ndr, name, "spoolss_5d"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_5d"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_5d"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_5e(struct ndr_print *ndr, const char *name, int flags, struct spoolss_5e *r) -{ - ndr_print_struct(ndr, name, "spoolss_5e"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_5e"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_5e"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_spoolss_5f(struct ndr_print *ndr, const char *name, int flags, struct spoolss_5f *r) -{ - ndr_print_struct(ndr, name, "spoolss_5f"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "spoolss_5f"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "spoolss_5f"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - diff --git a/source4/librpc/ndr/ndr_spoolss.h b/source4/librpc/ndr/ndr_spoolss.h deleted file mode 100644 index e80c72ca51..0000000000 --- a/source4/librpc/ndr/ndr_spoolss.h +++ /dev/null @@ -1,1242 +0,0 @@ -/* header auto-generated by pidl */ - -#define DCERPC_SPOOLSS_UUID "12345678-1234-abcd-ef00-0123456789ab" -#define DCERPC_SPOOLSS_VERSION 1.0 -#define DCERPC_SPOOLSS_NAME "spoolss" - -#define DCERPC_SPOOLSS_ENUMPRINTERS 0 -#define DCERPC_SPOOLSS_OPENPRINTER 1 -#define DCERPC_SPOOLSS_02 2 -#define DCERPC_SPOOLSS_03 3 -#define DCERPC_SPOOLSS_ENUMJOBS 4 -#define DCERPC_SPOOLSS_05 5 -#define DCERPC_SPOOLSS_06 6 -#define DCERPC_SPOOLSS_07 7 -#define DCERPC_SPOOLSS_GETPRINTER 8 -#define DCERPC_SPOOLSS_09 9 -#define DCERPC_SPOOLSS_0A 10 -#define DCERPC_SPOOLSS_0B 11 -#define DCERPC_SPOOLSS_0C 12 -#define DCERPC_SPOOLSS_0D 13 -#define DCERPC_SPOOLSS_0E 14 -#define DCERPC_SPOOLSS_0F 15 -#define DCERPC_SPOOLSS_10 16 -#define DCERPC_SPOOLSS_11 17 -#define DCERPC_SPOOLSS_STARTPAGEPRINTER 18 -#define DCERPC_SPOOLSS_13 19 -#define DCERPC_SPOOLSS_ENDPAGEPRINTER 20 -#define DCERPC_SPOOLSS_15 21 -#define DCERPC_SPOOLSS_16 22 -#define DCERPC_SPOOLSS_ENDDOCPRINTER 23 -#define DCERPC_SPOOLSS_18 24 -#define DCERPC_SPOOLSS_19 25 -#define DCERPC_SPOOLSS_1A 26 -#define DCERPC_SPOOLSS_1B 27 -#define DCERPC_SPOOLSS_1C 28 -#define DCERPC_SPOOLSS_CLOSEPRINTER 29 -#define DCERPC_SPOOLSS_1E 30 -#define DCERPC_SPOOLSS_1F 31 -#define DCERPC_SPOOLSS_20 32 -#define DCERPC_SPOOLSS_21 33 -#define DCERPC_SPOOLSS_22 34 -#define DCERPC_SPOOLSS_23 35 -#define DCERPC_SPOOLSS_24 36 -#define DCERPC_SPOOLSS_25 37 -#define DCERPC_SPOOLSS_26 38 -#define DCERPC_SPOOLSS_27 39 -#define DCERPC_SPOOLSS_28 40 -#define DCERPC_SPOOLSS_29 41 -#define DCERPC_SPOOLSS_2A 42 -#define DCERPC_SPOOLSS_2B 43 -#define DCERPC_SPOOLSS_2C 44 -#define DCERPC_SPOOLSS_2D 45 -#define DCERPC_SPOOLSS_2E 46 -#define DCERPC_SPOOLSS_2F 47 -#define DCERPC_SPOOLSS_30 48 -#define DCERPC_SPOOLSS_31 49 -#define DCERPC_SPOOLSS_32 50 -#define DCERPC_SPOOLSS_33 51 -#define DCERPC_SPOOLSS_34 52 -#define DCERPC_SPOOLSS_35 53 -#define DCERPC_SPOOLSS_36 54 -#define DCERPC_SPOOLSS_37 55 -#define DCERPC_SPOOLSS_38 56 -#define DCERPC_SPOOLSS_39 57 -#define DCERPC_SPOOLSS_3A 58 -#define DCERPC_SPOOLSS_3B 59 -#define DCERPC_SPOOLSS_3C 60 -#define DCERPC_SPOOLSS_3D 61 -#define DCERPC_SPOOLSS_3E 62 -#define DCERPC_SPOOLSS_3F 63 -#define DCERPC_SPOOLSS_40 64 -#define DCERPC_SPOOLSS_41 65 -#define DCERPC_SPOOLSS_42 66 -#define DCERPC_SPOOLSS_43 67 -#define DCERPC_SPOOLSS_44 68 -#define DCERPC_SPOOLSS_OPENPRINTEREX 69 -#define DCERPC_SPOOLSS_46 70 -#define DCERPC_SPOOLSS_47 71 -#define DCERPC_SPOOLSS_ENUMPRINTERDATA 72 -#define DCERPC_SPOOLSS_49 73 -#define DCERPC_SPOOLSS_4A 74 -#define DCERPC_SPOOLSS_4B 75 -#define DCERPC_SPOOLSS_4C 76 -#define DCERPC_SPOOLSS_4D 77 -#define DCERPC_SPOOLSS_4E 78 -#define DCERPC_SPOOLSS_4F 79 -#define DCERPC_SPOOLSS_50 80 -#define DCERPC_SPOOLSS_51 81 -#define DCERPC_SPOOLSS_52 82 -#define DCERPC_SPOOLSS_53 83 -#define DCERPC_SPOOLSS_54 84 -#define DCERPC_SPOOLSS_55 85 -#define DCERPC_SPOOLSS_56 86 -#define DCERPC_SPOOLSS_57 87 -#define DCERPC_SPOOLSS_58 88 -#define DCERPC_SPOOLSS_59 89 -#define DCERPC_SPOOLSS_5A 90 -#define DCERPC_SPOOLSS_5B 91 -#define DCERPC_SPOOLSS_5C 92 -#define DCERPC_SPOOLSS_5D 93 -#define DCERPC_SPOOLSS_5E 94 -#define DCERPC_SPOOLSS_5F 95 - - -struct spoolss_DeviceMode { - const char * devicename; - uint16 specversion; - uint16 driverversion; - uint16 size; - uint16 driverextra; - uint32 fields; - uint16 orientation; - uint16 papersize; - uint16 paperlength; - uint16 paperwidth; - uint16 scale; - uint16 copies; - uint16 defaultsource; - uint16 printquality; - uint16 color; - uint16 duplex; - uint16 yresolution; - uint16 ttoption; - uint16 collate; - const char * formname; - uint16 logpixels; - uint32 bitsperpel; - uint32 pelswidth; - uint32 pelsheight; - uint32 displayflags; - uint32 displayfrequency; - uint32 icmmethod; - uint32 icmintent; - uint32 mediatype; - uint32 dithertype; - uint32 reserved1; - uint32 reserved2; - uint32 panningwidth; - uint32 panningheight; - uint8 *private; -}; - -struct spoolss_PrinterInfo1 { - uint32 flags; - const char * name; - const char * description; - const char * comment; -}; - -struct spoolss_PrinterInfo2 { - const char * servername; - const char * printername; - const char * sharename; - const char * portname; - const char * drivername; - const char * comment; - const char * location; - struct spoolss_DeviceMode *devmode; - const char * sepfile; - const char * printprocessor; - const char * datatype; - const char * parameters; - struct security_descriptor *secdesc; - uint32 attributes; - uint32 priority; - uint32 defaultpriority; - uint32 starttime; - uint32 untiltime; - uint32 status; - uint32 cjobs; - uint32 averageppm; -}; - -struct spoolss_PrinterInfo3 { - uint32 flags; - struct security_descriptor secdesc; -}; - -struct spoolss_PrinterInfo4 { - const char * printername; - const char * servername; - uint32 attributes; -}; - -struct spoolss_PrinterInfo5 { - const char * printername; - const char * portname; - uint32 attributes; - uint32 device_not_selected_timeout; - uint32 transmission_retry_timeout; -}; - -struct spoolss_PrinterInfo6 { - uint32 unknown; -}; - -struct spoolss_PrinterInfo7 { - const char * guid; - uint32 action; -}; - -union spoolss_PrinterInfo { -/* [case(1)] */ struct spoolss_PrinterInfo1 info1; -/* [case(2)] */ struct spoolss_PrinterInfo2 info2; -/* [case(3)] */ struct spoolss_PrinterInfo3 info3; -/* [case(4)] */ struct spoolss_PrinterInfo4 info4; -/* [case(5)] */ struct spoolss_PrinterInfo5 info5; -/* [case(6)] */ struct spoolss_PrinterInfo6 info6; -/* [case(7)] */ struct spoolss_PrinterInfo7 info7; -}; - -struct spoolss_EnumPrinters { - struct { - uint32 flags; - const char *server; - uint32 level; - DATA_BLOB *buffer; - uint32 *buf_size; - } in; - - struct { - DATA_BLOB *buffer; - uint32 *buf_size; - uint32 count; - WERROR result; - } out; - -}; - -struct spoolss_OpenPrinter { - struct { - const char *server; - const char *printer; - DATA_BLOB *buffer; - uint32 access_mask; - } in; - - struct { - struct policy_handle *handle; - WERROR result; - } out; - -}; - -struct spoolss_02 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_03 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_EnumJobs { - struct { - struct policy_handle *handle; - uint32 firstjob; - uint32 numjobs; - uint32 level; - DATA_BLOB *buffer; - uint32 *buf_size; - } in; - - struct { - DATA_BLOB *buffer; - uint32 *buf_size; - uint32 numjobs; - NTSTATUS result; - } out; - -}; - -struct spoolss_05 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_06 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_07 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_GetPrinter { - struct { - struct policy_handle *handle; - uint32 level; - DATA_BLOB *buffer; - uint32 *buf_size; - } in; - - struct { - union spoolss_PrinterInfo *info; - uint32 *buf_size; - WERROR result; - } out; - -}; - -struct spoolss_09 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_0a { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_0b { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_0c { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_0d { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_0e { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_0f { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_10 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_11 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_StartPagePrinter { - struct { - struct policy_handle *handle; - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_13 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_EndPagePrinter { - struct { - struct policy_handle *handle; - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_15 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_16 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_EndDocPrinter { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_18 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_19 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_1a { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_1b { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_1c { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_ClosePrinter { - struct { - struct policy_handle *handle; - } in; - - struct { - struct policy_handle *handle; - WERROR result; - } out; - -}; - -struct spoolss_1e { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_1f { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_20 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_21 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_22 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_23 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_24 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_25 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_26 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_27 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_28 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_29 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_2a { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_2b { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_2c { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_2d { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_2e { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_2f { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_30 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_31 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_32 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_33 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_34 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_35 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_36 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_37 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_38 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_39 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_3a { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_3b { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_3c { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_3d { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_3e { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_3f { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_40 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_41 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_42 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_43 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_44 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_Devmode { - uint32 foo; -}; - -struct spoolss_DevmodeContainer { - uint32 size; - struct spoolss_Devmode *devmode; -}; - -struct spoolss_UserLevel1 { - uint32 size; - const char *client; - const char *user; - uint32 build; - uint32 major; - uint32 minor; - uint32 processor; -}; - -union spoolss_UserLevel { -/* [case(1)] */ struct spoolss_UserLevel1 *level1; -}; - -struct spoolss_OpenPrinterEx { - struct { - const char *printername; - const char *datatype; - struct spoolss_DevmodeContainer devmode_ctr; - uint32 access_required; - uint32 level; - union spoolss_UserLevel userlevel; - } in; - - struct { - struct policy_handle *handle; - WERROR result; - } out; - -}; - -struct spoolss_46 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_47 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_EnumPrinterData { - struct { - struct policy_handle *handle; - uint32 enum_index; - uint32 value_offered; - uint32 *data_size; - } in; - - struct { - const char * value; - uint32 value_needed; - uint32 printerdata_type; - DATA_BLOB data; - uint32 *data_size; - WERROR result; - } out; - -}; - -struct spoolss_49 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_4a { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_4b { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_4c { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_4d { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_4e { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_4f { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_50 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_51 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_52 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_53 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_54 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_55 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_56 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_57 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_58 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_59 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_5a { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_5b { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_5c { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_5d { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_5e { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct spoolss_5f { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - diff --git a/source4/librpc/ndr/ndr_srvsvc.c b/source4/librpc/ndr/ndr_srvsvc.c deleted file mode 100644 index 877ffea51d..0000000000 --- a/source4/librpc/ndr/ndr_srvsvc.c +++ /dev/null @@ -1,5349 +0,0 @@ -/* parser auto-generated by pidl */ - -#include "includes.h" - -NTSTATUS ndr_push_srvsvc_00(struct ndr_push *ndr, struct srvsvc_00 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_01(struct ndr_push *ndr, struct srvsvc_01 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_02(struct ndr_push *ndr, struct srvsvc_02 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_03(struct ndr_push *ndr, struct srvsvc_03 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_04(struct ndr_push *ndr, struct srvsvc_04 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_05(struct ndr_push *ndr, struct srvsvc_05 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_06(struct ndr_push *ndr, struct srvsvc_06 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_07(struct ndr_push *ndr, struct srvsvc_07 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetConn0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetConn0 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->conn_id)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetConnCtr0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetConnCtr0 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetConn0)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetConn1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetConn1 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->conn_id)); - NDR_CHECK(ndr_push_uint32(ndr, r->conn_type)); - NDR_CHECK(ndr_push_uint32(ndr, r->num_open)); - NDR_CHECK(ndr_push_uint32(ndr, r->num_users)); - NDR_CHECK(ndr_push_uint32(ndr, r->conn_time)); - NDR_CHECK(ndr_push_ptr(ndr, r->user)); - NDR_CHECK(ndr_push_ptr(ndr, r->client)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->user) { - NDR_CHECK(ndr_push_unistr(ndr, r->user)); - } - if (r->client) { - NDR_CHECK(ndr_push_unistr(ndr, r->client)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetConnCtr1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetConnCtr1 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetConn1)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetConnCtr(struct ndr_push *ndr, int ndr_flags, uint16 level, union srvsvc_NetConnCtr *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - switch (level) { - case 0: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr0)); - break; - - case 1: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr1)); - break; - - default: - break; - - } - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 0: - if (r->ctr0) { - NDR_CHECK(ndr_push_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0)); - } - break; - - case 1: - if (r->ctr1) { - NDR_CHECK(ndr_push_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); - } - break; - - default: - break; - - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetConnEnum(struct ndr_push *ndr, struct srvsvc_NetConnEnum *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.server_unc)); - if (r->in.server_unc) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.server_unc)); - } - NDR_CHECK(ndr_push_ptr(ndr, r->in.path)); - if (r->in.path) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.path)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->in.ctr)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_len)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); - if (r->in.resume_handle) { - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetFile2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetFile2 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->fid)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetFileCtr2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetFileCtr2 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetFile2)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetFile3(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetFile3 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->fid)); - NDR_CHECK(ndr_push_uint32(ndr, r->permissions)); - NDR_CHECK(ndr_push_uint32(ndr, r->num_locks)); - NDR_CHECK(ndr_push_ptr(ndr, r->path)); - NDR_CHECK(ndr_push_ptr(ndr, r->user)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->path) { - NDR_CHECK(ndr_push_unistr(ndr, r->path)); - } - if (r->user) { - NDR_CHECK(ndr_push_unistr(ndr, r->user)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetFileCtr3(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetFileCtr3 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetFile3)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetFileCtr(struct ndr_push *ndr, int ndr_flags, uint16 level, union srvsvc_NetFileCtr *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - switch (level) { - case 2: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr2)); - break; - - case 3: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr3)); - break; - - default: - break; - - } - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 2: - if (r->ctr2) { - NDR_CHECK(ndr_push_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2)); - } - break; - - case 3: - if (r->ctr3) { - NDR_CHECK(ndr_push_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3)); - } - break; - - default: - break; - - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, struct srvsvc_NetFileEnum *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.server_unc)); - if (r->in.server_unc) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.server_unc)); - } - NDR_CHECK(ndr_push_ptr(ndr, r->in.path)); - if (r->in.path) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.path)); - } - NDR_CHECK(ndr_push_ptr(ndr, r->in.user)); - if (r->in.user) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.user)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->in.ctr)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_len)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); - if (r->in.resume_handle) { - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_0a(struct ndr_push *ndr, struct srvsvc_0a *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NET_FILE_CLOSE(struct ndr_push *ndr, struct srvsvc_NET_FILE_CLOSE *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetSess0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSess0 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->client)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->client) { - NDR_CHECK(ndr_push_unistr(ndr, r->client)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetSessCtr0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSessCtr0 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSess0)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetSess1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSess1 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->client)); - NDR_CHECK(ndr_push_ptr(ndr, r->user)); - NDR_CHECK(ndr_push_uint32(ndr, r->num_open)); - NDR_CHECK(ndr_push_uint32(ndr, r->time)); - NDR_CHECK(ndr_push_uint32(ndr, r->idle_time)); - NDR_CHECK(ndr_push_uint32(ndr, r->user_flags)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->client) { - NDR_CHECK(ndr_push_unistr(ndr, r->client)); - } - if (r->user) { - NDR_CHECK(ndr_push_unistr(ndr, r->user)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetSessCtr1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSessCtr1 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSess1)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetSess2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSess2 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->client)); - NDR_CHECK(ndr_push_ptr(ndr, r->user)); - NDR_CHECK(ndr_push_uint32(ndr, r->num_open)); - NDR_CHECK(ndr_push_uint32(ndr, r->time)); - NDR_CHECK(ndr_push_uint32(ndr, r->idle_time)); - NDR_CHECK(ndr_push_uint32(ndr, r->user_flags)); - NDR_CHECK(ndr_push_ptr(ndr, r->client_type)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->client) { - NDR_CHECK(ndr_push_unistr(ndr, r->client)); - } - if (r->user) { - NDR_CHECK(ndr_push_unistr(ndr, r->user)); - } - if (r->client_type) { - NDR_CHECK(ndr_push_unistr(ndr, r->client_type)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetSessCtr2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSessCtr2 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSess2)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetSess10(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSess10 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->client)); - NDR_CHECK(ndr_push_ptr(ndr, r->user)); - NDR_CHECK(ndr_push_uint32(ndr, r->time)); - NDR_CHECK(ndr_push_uint32(ndr, r->idle_time)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->client) { - NDR_CHECK(ndr_push_unistr(ndr, r->client)); - } - if (r->user) { - NDR_CHECK(ndr_push_unistr(ndr, r->user)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetSessCtr10(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSessCtr10 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSess10)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetSess502(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSess502 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->client)); - NDR_CHECK(ndr_push_ptr(ndr, r->user)); - NDR_CHECK(ndr_push_uint32(ndr, r->num_open)); - NDR_CHECK(ndr_push_uint32(ndr, r->time)); - NDR_CHECK(ndr_push_uint32(ndr, r->idle_time)); - NDR_CHECK(ndr_push_uint32(ndr, r->user_flags)); - NDR_CHECK(ndr_push_ptr(ndr, r->client_type)); - NDR_CHECK(ndr_push_ptr(ndr, r->transport)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->client) { - NDR_CHECK(ndr_push_unistr(ndr, r->client)); - } - if (r->user) { - NDR_CHECK(ndr_push_unistr(ndr, r->user)); - } - if (r->client_type) { - NDR_CHECK(ndr_push_unistr(ndr, r->client_type)); - } - if (r->transport) { - NDR_CHECK(ndr_push_unistr(ndr, r->transport)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetSessCtr502(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSessCtr502 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSess502)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetSessCtr(struct ndr_push *ndr, int ndr_flags, uint16 level, union srvsvc_NetSessCtr *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - switch (level) { - case 0: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr0)); - break; - - case 1: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr1)); - break; - - case 2: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr2)); - break; - - case 10: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr10)); - break; - - case 502: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr502)); - break; - - default: - break; - - } - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 0: - if (r->ctr0) { - NDR_CHECK(ndr_push_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0)); - } - break; - - case 1: - if (r->ctr1) { - NDR_CHECK(ndr_push_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); - } - break; - - case 2: - if (r->ctr2) { - NDR_CHECK(ndr_push_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2)); - } - break; - - case 10: - if (r->ctr10) { - NDR_CHECK(ndr_push_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10)); - } - break; - - case 502: - if (r->ctr502) { - NDR_CHECK(ndr_push_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502)); - } - break; - - default: - break; - - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetSessEnum(struct ndr_push *ndr, struct srvsvc_NetSessEnum *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.server_unc)); - if (r->in.server_unc) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.server_unc)); - } - NDR_CHECK(ndr_push_ptr(ndr, r->in.client)); - if (r->in.client) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.client)); - } - NDR_CHECK(ndr_push_ptr(ndr, r->in.user)); - if (r->in.user) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.user)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->in.ctr)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_len)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); - if (r->in.resume_handle) { - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_0d(struct ndr_push *ndr, struct srvsvc_0d *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NET_SHARE_ADD(struct ndr_push *ndr, struct srvsvc_NET_SHARE_ADD *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetShare0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShare0 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->name)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_push_unistr(ndr, r->name)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetShareCtr0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShareCtr0 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShare0)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetShare1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShare1 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->name)); - NDR_CHECK(ndr_push_uint32(ndr, r->type)); - NDR_CHECK(ndr_push_ptr(ndr, r->comment)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_push_unistr(ndr, r->name)); - } - if (r->comment) { - NDR_CHECK(ndr_push_unistr(ndr, r->comment)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetShareCtr1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShareCtr1 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShare1)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetShare2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShare2 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->name)); - NDR_CHECK(ndr_push_uint32(ndr, r->type)); - NDR_CHECK(ndr_push_ptr(ndr, r->comment)); - NDR_CHECK(ndr_push_uint32(ndr, r->permissions)); - NDR_CHECK(ndr_push_uint32(ndr, r->max_users)); - NDR_CHECK(ndr_push_uint32(ndr, r->current_users)); - NDR_CHECK(ndr_push_ptr(ndr, r->path)); - NDR_CHECK(ndr_push_ptr(ndr, r->password)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_push_unistr(ndr, r->name)); - } - if (r->comment) { - NDR_CHECK(ndr_push_unistr(ndr, r->comment)); - } - if (r->path) { - NDR_CHECK(ndr_push_unistr(ndr, r->path)); - } - if (r->password) { - NDR_CHECK(ndr_push_uint32(ndr, *r->password)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetShareCtr2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShareCtr2 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShare2)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetShare501(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShare501 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->name)); - NDR_CHECK(ndr_push_uint32(ndr, r->type)); - NDR_CHECK(ndr_push_ptr(ndr, r->comment)); - NDR_CHECK(ndr_push_uint32(ndr, r->csc_policy)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_push_unistr(ndr, r->name)); - } - if (r->comment) { - NDR_CHECK(ndr_push_unistr(ndr, r->comment)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetShareCtr501(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShareCtr501 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShare501)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetShare502(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShare502 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_ptr(ndr, r->name)); - NDR_CHECK(ndr_push_uint32(ndr, r->type)); - NDR_CHECK(ndr_push_ptr(ndr, r->comment)); - NDR_CHECK(ndr_push_uint32(ndr, r->permissions)); - NDR_CHECK(ndr_push_uint32(ndr, r->max_users)); - NDR_CHECK(ndr_push_uint32(ndr, r->current_users)); - NDR_CHECK(ndr_push_ptr(ndr, r->path)); - NDR_CHECK(ndr_push_ptr(ndr, r->password)); - NDR_CHECK(ndr_push_uint32(ndr, r->unknown)); - NDR_CHECK(ndr_push_ptr(ndr, r->sd)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_push_unistr(ndr, r->name)); - } - if (r->comment) { - NDR_CHECK(ndr_push_unistr(ndr, r->comment)); - } - if (r->path) { - NDR_CHECK(ndr_push_unistr(ndr, r->path)); - } - if (r->password) { - NDR_CHECK(ndr_push_uint32(ndr, *r->password)); - } - if (r->sd) { - NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->sd)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetShareCtr502(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShareCtr502 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShare502)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetShareUnion(struct ndr_push *ndr, int ndr_flags, uint16 level, union srvsvc_NetShareUnion *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - switch (level) { - case 0: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr0)); - break; - - case 1: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr1)); - break; - - case 2: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr2)); - break; - - case 501: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr501)); - break; - - case 502: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr502)); - break; - - default: - break; - - } - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 0: - if (r->ctr0) { - NDR_CHECK(ndr_push_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0)); - } - break; - - case 1: - if (r->ctr1) { - NDR_CHECK(ndr_push_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); - } - break; - - case 2: - if (r->ctr2) { - NDR_CHECK(ndr_push_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2)); - } - break; - - case 501: - if (r->ctr501) { - NDR_CHECK(ndr_push_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501)); - } - break; - - case 502: - if (r->ctr502) { - NDR_CHECK(ndr_push_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502)); - } - break; - - default: - break; - - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, struct srvsvc_NetShareEnumAll *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.server_unc)); - if (r->in.server_unc) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.server_unc)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_srvsvc_NetShareUnion(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->in.ctr)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.max_buffer)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); - if (r->in.resume_handle) { - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NET_SHARE_GET_INFO(struct ndr_push *ndr, struct srvsvc_NET_SHARE_GET_INFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NET_SHARE_SET_INFO(struct ndr_push *ndr, struct srvsvc_NET_SHARE_SET_INFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NET_SHARE_DEL(struct ndr_push *ndr, struct srvsvc_NET_SHARE_DEL *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NET_SHARE_DEL_STICKY(struct ndr_push *ndr, struct srvsvc_NET_SHARE_DEL_STICKY *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_14(struct ndr_push *ndr, struct srvsvc_14 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NET_SRV_GET_INFO(struct ndr_push *ndr, struct srvsvc_NET_SRV_GET_INFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NET_SRV_SET_INFO(struct ndr_push *ndr, struct srvsvc_NET_SRV_SET_INFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetDiskEnum(struct ndr_push *ndr, struct srvsvc_NetDiskEnum *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.server_unc)); - if (r->in.server_unc) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.server_unc)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.unknown1)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.unknown2)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_len)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); - if (r->in.resume_handle) { - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_18(struct ndr_push *ndr, struct srvsvc_18 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_19(struct ndr_push *ndr, struct srvsvc_19 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_TransportAddress(struct ndr_push *ndr, int ndr_flags, struct srvsvc_TransportAddress *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->addr)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->addr) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr, r->count)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetTransport0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetTransport0 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->vcs)); - NDR_CHECK(ndr_push_ptr(ndr, r->name)); - NDR_CHECK(ndr_push_ptr(ndr, r->addr)); - NDR_CHECK(ndr_push_uint32(ndr, r->addr_len)); - NDR_CHECK(ndr_push_ptr(ndr, r->net_addr)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_push_unistr(ndr, r->name)); - } - if (r->addr) { - NDR_CHECK(ndr_push_srvsvc_TransportAddress(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr)); - } - if (r->net_addr) { - NDR_CHECK(ndr_push_unistr(ndr, r->net_addr)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetTransportCtr0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetTransportCtr0 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetTransport0)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetTransport1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetTransport1 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->vcs)); - NDR_CHECK(ndr_push_ptr(ndr, r->name)); - NDR_CHECK(ndr_push_ptr(ndr, r->addr)); - NDR_CHECK(ndr_push_uint32(ndr, r->addr_len)); - NDR_CHECK(ndr_push_ptr(ndr, r->net_addr)); - NDR_CHECK(ndr_push_ptr(ndr, r->domain)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_push_unistr(ndr, r->name)); - } - if (r->addr) { - NDR_CHECK(ndr_push_srvsvc_TransportAddress(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr)); - } - if (r->net_addr) { - NDR_CHECK(ndr_push_unistr(ndr, r->net_addr)); - } - if (r->domain) { - NDR_CHECK(ndr_push_unistr(ndr, r->domain)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetTransportCtr1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetTransportCtr1 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetTransport1)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetTransport2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetTransport2 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->dummy)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetTransportCtr2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetTransportCtr2 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetTransport2)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetTransportCtr(struct ndr_push *ndr, int ndr_flags, uint16 level, union srvsvc_NetTransportCtr *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - switch (level) { - case 0: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr0)); - break; - - case 1: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr1)); - break; - - case 2: - NDR_CHECK(ndr_push_ptr(ndr, r->ctr2)); - break; - - default: - return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 0: - if (r->ctr0) { - NDR_CHECK(ndr_push_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0)); - } - break; - - case 1: - if (r->ctr1) { - NDR_CHECK(ndr_push_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); - } - break; - - case 2: - if (r->ctr2) { - NDR_CHECK(ndr_push_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2)); - } - break; - - default: - return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetTransportEnum(struct ndr_push *ndr, struct srvsvc_NetTransportEnum *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.server_unc)); - if (r->in.server_unc) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.server_unc)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->in.ctr)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_len)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); - if (r->in.resume_handle) { - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_1b(struct ndr_push *ndr, struct srvsvc_1b *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NET_REMOTE_TOD(struct ndr_push *ndr, struct srvsvc_NET_REMOTE_TOD *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_1d(struct ndr_push *ndr, struct srvsvc_1d *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_1e(struct ndr_push *ndr, struct srvsvc_1e *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_1f(struct ndr_push *ndr, struct srvsvc_1f *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_20(struct ndr_push *ndr, struct srvsvc_20 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NET_NAME_VALIDATE(struct ndr_push *ndr, struct srvsvc_NET_NAME_VALIDATE *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_22(struct ndr_push *ndr, struct srvsvc_22 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_23(struct ndr_push *ndr, struct srvsvc_23 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, struct srvsvc_NetShareEnum *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.server_unc)); - if (r->in.server_unc) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.server_unc)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_srvsvc_NetShareUnion(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->in.ctr)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_len)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); - if (r->in.resume_handle) { - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_25(struct ndr_push *ndr, struct srvsvc_25 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_26(struct ndr_push *ndr, struct srvsvc_26 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NET_FILE_QUERY_SECDESC(struct ndr_push *ndr, struct srvsvc_NET_FILE_QUERY_SECDESC *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_srvsvc_NET_FILE_SET_SECDESC(struct ndr_push *ndr, struct srvsvc_NET_FILE_SET_SECDESC *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_00(struct ndr_pull *ndr, struct srvsvc_00 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_01(struct ndr_pull *ndr, struct srvsvc_01 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_02(struct ndr_pull *ndr, struct srvsvc_02 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_03(struct ndr_pull *ndr, struct srvsvc_03 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_04(struct ndr_pull *ndr, struct srvsvc_04 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_05(struct ndr_pull *ndr, struct srvsvc_05 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_06(struct ndr_pull *ndr, struct srvsvc_06 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_07(struct ndr_pull *ndr, struct srvsvc_07 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetConn0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConn0 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->conn_id)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetConnCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr0 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetConn0)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetConn1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConn1 *r) -{ - uint32 _ptr_user; - uint32 _ptr_client; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->conn_id)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->conn_type)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_open)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_users)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->conn_time)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_user)); - if (_ptr_user) { - NDR_ALLOC(ndr, r->user); - } else { - r->user = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client)); - if (_ptr_client) { - NDR_ALLOC(ndr, r->client); - } else { - r->client = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->user) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->user)); - } - if (r->client) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->client)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetConnCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr1 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetConn1)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetConnCtr(struct ndr_pull *ndr, int ndr_flags, uint16 level, union srvsvc_NetConnCtr *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 0: { - uint32 _ptr_ctr0; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr0)); - if (_ptr_ctr0) { - NDR_ALLOC(ndr, r->ctr0); - } else { - r->ctr0 = NULL; - } - break; } - - case 1: { - uint32 _ptr_ctr1; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr1)); - if (_ptr_ctr1) { - NDR_ALLOC(ndr, r->ctr1); - } else { - r->ctr1 = NULL; - } - break; } - - default: { - break; } - - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 0: - if (r->ctr0) { - NDR_CHECK(ndr_pull_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0)); - } - break; - - case 1: - if (r->ctr1) { - NDR_CHECK(ndr_pull_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); - } - break; - - default: - break; - - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetConnEnum(struct ndr_pull *ndr, struct srvsvc_NetConnEnum *r) -{ - uint32 _ptr_resume_handle; - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.level)); - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint32 _level; - NDR_CHECK(ndr_pull_uint32(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in ctr"); - } - NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->out.ctr)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.total)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); - if (_ptr_resume_handle) { - NDR_ALLOC(ndr, r->out.resume_handle); - } else { - r->out.resume_handle = NULL; - } - if (r->out.resume_handle) { - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - } - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetFile2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFile2 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->fid)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetFileCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr2 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetFile2)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetFile3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFile3 *r) -{ - uint32 _ptr_path; - uint32 _ptr_user; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->fid)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->permissions)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_locks)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_path)); - if (_ptr_path) { - NDR_ALLOC(ndr, r->path); - } else { - r->path = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_user)); - if (_ptr_user) { - NDR_ALLOC(ndr, r->user); - } else { - r->user = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->path) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->path)); - } - if (r->user) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->user)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetFileCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr3 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetFile3)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetFileCtr(struct ndr_pull *ndr, int ndr_flags, uint16 level, union srvsvc_NetFileCtr *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 2: { - uint32 _ptr_ctr2; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr2)); - if (_ptr_ctr2) { - NDR_ALLOC(ndr, r->ctr2); - } else { - r->ctr2 = NULL; - } - break; } - - case 3: { - uint32 _ptr_ctr3; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr3)); - if (_ptr_ctr3) { - NDR_ALLOC(ndr, r->ctr3); - } else { - r->ctr3 = NULL; - } - break; } - - default: { - break; } - - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 2: - if (r->ctr2) { - NDR_CHECK(ndr_pull_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2)); - } - break; - - case 3: - if (r->ctr3) { - NDR_CHECK(ndr_pull_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3)); - } - break; - - default: - break; - - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, struct srvsvc_NetFileEnum *r) -{ - uint32 _ptr_resume_handle; - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.level)); - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint32 _level; - NDR_CHECK(ndr_pull_uint32(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in ctr"); - } - NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->out.ctr)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.total)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); - if (_ptr_resume_handle) { - NDR_ALLOC(ndr, r->out.resume_handle); - } else { - r->out.resume_handle = NULL; - } - if (r->out.resume_handle) { - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - } - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_0a(struct ndr_pull *ndr, struct srvsvc_0a *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NET_FILE_CLOSE(struct ndr_pull *ndr, struct srvsvc_NET_FILE_CLOSE *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetSess0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSess0 *r) -{ - uint32 _ptr_client; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client)); - if (_ptr_client) { - NDR_ALLOC(ndr, r->client); - } else { - r->client = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->client) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->client)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetSessCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr0 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSess0)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetSess1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSess1 *r) -{ - uint32 _ptr_client; - uint32 _ptr_user; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client)); - if (_ptr_client) { - NDR_ALLOC(ndr, r->client); - } else { - r->client = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_user)); - if (_ptr_user) { - NDR_ALLOC(ndr, r->user); - } else { - r->user = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_open)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->time)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->idle_time)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->user_flags)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->client) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->client)); - } - if (r->user) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->user)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetSessCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr1 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSess1)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetSess2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSess2 *r) -{ - uint32 _ptr_client; - uint32 _ptr_user; - uint32 _ptr_client_type; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client)); - if (_ptr_client) { - NDR_ALLOC(ndr, r->client); - } else { - r->client = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_user)); - if (_ptr_user) { - NDR_ALLOC(ndr, r->user); - } else { - r->user = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_open)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->time)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->idle_time)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->user_flags)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client_type)); - if (_ptr_client_type) { - NDR_ALLOC(ndr, r->client_type); - } else { - r->client_type = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->client) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->client)); - } - if (r->user) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->user)); - } - if (r->client_type) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->client_type)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetSessCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr2 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSess2)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetSess10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSess10 *r) -{ - uint32 _ptr_client; - uint32 _ptr_user; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client)); - if (_ptr_client) { - NDR_ALLOC(ndr, r->client); - } else { - r->client = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_user)); - if (_ptr_user) { - NDR_ALLOC(ndr, r->user); - } else { - r->user = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->time)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->idle_time)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->client) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->client)); - } - if (r->user) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->user)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetSessCtr10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr10 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSess10)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetSess502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSess502 *r) -{ - uint32 _ptr_client; - uint32 _ptr_user; - uint32 _ptr_client_type; - uint32 _ptr_transport; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client)); - if (_ptr_client) { - NDR_ALLOC(ndr, r->client); - } else { - r->client = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_user)); - if (_ptr_user) { - NDR_ALLOC(ndr, r->user); - } else { - r->user = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_open)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->time)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->idle_time)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->user_flags)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client_type)); - if (_ptr_client_type) { - NDR_ALLOC(ndr, r->client_type); - } else { - r->client_type = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_transport)); - if (_ptr_transport) { - NDR_ALLOC(ndr, r->transport); - } else { - r->transport = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->client) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->client)); - } - if (r->user) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->user)); - } - if (r->client_type) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->client_type)); - } - if (r->transport) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->transport)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetSessCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr502 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSess502)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetSessCtr(struct ndr_pull *ndr, int ndr_flags, uint16 level, union srvsvc_NetSessCtr *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 0: { - uint32 _ptr_ctr0; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr0)); - if (_ptr_ctr0) { - NDR_ALLOC(ndr, r->ctr0); - } else { - r->ctr0 = NULL; - } - break; } - - case 1: { - uint32 _ptr_ctr1; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr1)); - if (_ptr_ctr1) { - NDR_ALLOC(ndr, r->ctr1); - } else { - r->ctr1 = NULL; - } - break; } - - case 2: { - uint32 _ptr_ctr2; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr2)); - if (_ptr_ctr2) { - NDR_ALLOC(ndr, r->ctr2); - } else { - r->ctr2 = NULL; - } - break; } - - case 10: { - uint32 _ptr_ctr10; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr10)); - if (_ptr_ctr10) { - NDR_ALLOC(ndr, r->ctr10); - } else { - r->ctr10 = NULL; - } - break; } - - case 502: { - uint32 _ptr_ctr502; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr502)); - if (_ptr_ctr502) { - NDR_ALLOC(ndr, r->ctr502); - } else { - r->ctr502 = NULL; - } - break; } - - default: { - break; } - - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 0: - if (r->ctr0) { - NDR_CHECK(ndr_pull_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0)); - } - break; - - case 1: - if (r->ctr1) { - NDR_CHECK(ndr_pull_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); - } - break; - - case 2: - if (r->ctr2) { - NDR_CHECK(ndr_pull_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2)); - } - break; - - case 10: - if (r->ctr10) { - NDR_CHECK(ndr_pull_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10)); - } - break; - - case 502: - if (r->ctr502) { - NDR_CHECK(ndr_pull_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502)); - } - break; - - default: - break; - - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetSessEnum(struct ndr_pull *ndr, struct srvsvc_NetSessEnum *r) -{ - uint32 _ptr_resume_handle; - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.level)); - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint32 _level; - NDR_CHECK(ndr_pull_uint32(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in ctr"); - } - NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->out.ctr)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.total)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); - if (_ptr_resume_handle) { - NDR_ALLOC(ndr, r->out.resume_handle); - } else { - r->out.resume_handle = NULL; - } - if (r->out.resume_handle) { - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - } - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_0d(struct ndr_pull *ndr, struct srvsvc_0d *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NET_SHARE_ADD(struct ndr_pull *ndr, struct srvsvc_NET_SHARE_ADD *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetShare0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShare0 *r) -{ - uint32 _ptr_name; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); - if (_ptr_name) { - NDR_ALLOC(ndr, r->name); - } else { - r->name = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetShareCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr0 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShare0)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetShare1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShare1 *r) -{ - uint32 _ptr_name; - uint32 _ptr_comment; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); - if (_ptr_name) { - NDR_ALLOC(ndr, r->name); - } else { - r->name = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->type)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_comment)); - if (_ptr_comment) { - NDR_ALLOC(ndr, r->comment); - } else { - r->comment = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); - } - if (r->comment) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->comment)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetShareCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShare1)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetShare2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShare2 *r) -{ - uint32 _ptr_name; - uint32 _ptr_comment; - uint32 _ptr_path; - uint32 _ptr_password; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); - if (_ptr_name) { - NDR_ALLOC(ndr, r->name); - } else { - r->name = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->type)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_comment)); - if (_ptr_comment) { - NDR_ALLOC(ndr, r->comment); - } else { - r->comment = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->permissions)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->max_users)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->current_users)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_path)); - if (_ptr_path) { - NDR_ALLOC(ndr, r->path); - } else { - r->path = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_password)); - if (_ptr_password) { - NDR_ALLOC(ndr, r->password); - } else { - r->password = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); - } - if (r->comment) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->comment)); - } - if (r->path) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->path)); - } - if (r->password) { - NDR_CHECK(ndr_pull_uint32(ndr, r->password)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetShareCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr2 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShare2)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetShare501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShare501 *r) -{ - uint32 _ptr_name; - uint32 _ptr_comment; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); - if (_ptr_name) { - NDR_ALLOC(ndr, r->name); - } else { - r->name = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->type)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_comment)); - if (_ptr_comment) { - NDR_ALLOC(ndr, r->comment); - } else { - r->comment = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->csc_policy)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); - } - if (r->comment) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->comment)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetShareCtr501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr501 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShare501)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetShare502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShare502 *r) -{ - uint32 _ptr_name; - uint32 _ptr_comment; - uint32 _ptr_path; - uint32 _ptr_password; - uint32 _ptr_sd; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); - if (_ptr_name) { - NDR_ALLOC(ndr, r->name); - } else { - r->name = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->type)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_comment)); - if (_ptr_comment) { - NDR_ALLOC(ndr, r->comment); - } else { - r->comment = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->permissions)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->max_users)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->current_users)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_path)); - if (_ptr_path) { - NDR_ALLOC(ndr, r->path); - } else { - r->path = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_password)); - if (_ptr_password) { - NDR_ALLOC(ndr, r->password); - } else { - r->password = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sd)); - if (_ptr_sd) { - NDR_ALLOC(ndr, r->sd); - } else { - r->sd = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); - } - if (r->comment) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->comment)); - } - if (r->path) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->path)); - } - if (r->password) { - NDR_CHECK(ndr_pull_uint32(ndr, r->password)); - } - if (r->sd) { - NDR_CHECK(ndr_pull_subcontext_flags_fn(ndr, r->sd, (ndr_pull_flags_fn_t) ndr_pull_security_descriptor)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetShareCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr502 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShare502)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetShareUnion(struct ndr_pull *ndr, int ndr_flags, uint16 level, union srvsvc_NetShareUnion *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 0: { - uint32 _ptr_ctr0; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr0)); - if (_ptr_ctr0) { - NDR_ALLOC(ndr, r->ctr0); - } else { - r->ctr0 = NULL; - } - break; } - - case 1: { - uint32 _ptr_ctr1; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr1)); - if (_ptr_ctr1) { - NDR_ALLOC(ndr, r->ctr1); - } else { - r->ctr1 = NULL; - } - break; } - - case 2: { - uint32 _ptr_ctr2; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr2)); - if (_ptr_ctr2) { - NDR_ALLOC(ndr, r->ctr2); - } else { - r->ctr2 = NULL; - } - break; } - - case 501: { - uint32 _ptr_ctr501; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr501)); - if (_ptr_ctr501) { - NDR_ALLOC(ndr, r->ctr501); - } else { - r->ctr501 = NULL; - } - break; } - - case 502: { - uint32 _ptr_ctr502; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr502)); - if (_ptr_ctr502) { - NDR_ALLOC(ndr, r->ctr502); - } else { - r->ctr502 = NULL; - } - break; } - - default: { - break; } - - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 0: - if (r->ctr0) { - NDR_CHECK(ndr_pull_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0)); - } - break; - - case 1: - if (r->ctr1) { - NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); - } - break; - - case 2: - if (r->ctr2) { - NDR_CHECK(ndr_pull_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2)); - } - break; - - case 501: - if (r->ctr501) { - NDR_CHECK(ndr_pull_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501)); - } - break; - - case 502: - if (r->ctr502) { - NDR_CHECK(ndr_pull_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502)); - } - break; - - default: - break; - - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, struct srvsvc_NetShareEnumAll *r) -{ - uint32 _ptr_resume_handle; - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.level)); - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint32 _level; - NDR_CHECK(ndr_pull_uint32(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in ctr"); - } - NDR_CHECK(ndr_pull_srvsvc_NetShareUnion(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->out.ctr)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.totalentries)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); - if (_ptr_resume_handle) { - NDR_ALLOC(ndr, r->out.resume_handle); - } else { - r->out.resume_handle = NULL; - } - if (r->out.resume_handle) { - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - } - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NET_SHARE_GET_INFO(struct ndr_pull *ndr, struct srvsvc_NET_SHARE_GET_INFO *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NET_SHARE_SET_INFO(struct ndr_pull *ndr, struct srvsvc_NET_SHARE_SET_INFO *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NET_SHARE_DEL(struct ndr_pull *ndr, struct srvsvc_NET_SHARE_DEL *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NET_SHARE_DEL_STICKY(struct ndr_pull *ndr, struct srvsvc_NET_SHARE_DEL_STICKY *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_14(struct ndr_pull *ndr, struct srvsvc_14 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NET_SRV_GET_INFO(struct ndr_pull *ndr, struct srvsvc_NET_SRV_GET_INFO *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NET_SRV_SET_INFO(struct ndr_pull *ndr, struct srvsvc_NET_SRV_SET_INFO *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetDisk0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDisk0 *r) -{ - uint32 _ptr_disk; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->size)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_disk)); - if (_ptr_disk) { - NDR_ALLOC(ndr, r->disk); - } else { - r->disk = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->disk) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->size > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->size); - } - } - NDR_ALLOC_N_SIZE(ndr, r->disk, r->size, sizeof(r->disk[0])); - { - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->disk, r->size)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetDiskCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskCtr0 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown1)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown2)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetDisk0)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetDiskCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskCtr *r) -{ - uint32 _ptr_ctr0; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num1)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr0)); - if (_ptr_ctr0) { - NDR_ALLOC(ndr, r->ctr0); - } else { - r->ctr0 = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->ctr0) { - NDR_CHECK(ndr_pull_srvsvc_NetDiskCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetDiskEnum(struct ndr_pull *ndr, struct srvsvc_NetDiskEnum *r) -{ - uint32 _ptr_resume_handle; - NDR_CHECK(ndr_pull_srvsvc_NetDiskCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.ctr)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.total)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); - if (_ptr_resume_handle) { - NDR_ALLOC(ndr, r->out.resume_handle); - } else { - r->out.resume_handle = NULL; - } - if (r->out.resume_handle) { - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - } - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_18(struct ndr_pull *ndr, struct srvsvc_18 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_19(struct ndr_pull *ndr, struct srvsvc_19 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_TransportAddress(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_TransportAddress *r) -{ - uint32 _ptr_addr; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_addr)); - if (_ptr_addr) { - NDR_ALLOC(ndr, r->addr); - } else { - r->addr = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->addr) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->addr, r->count, sizeof(r->addr[0])); - { - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr, r->count)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetTransport0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransport0 *r) -{ - uint32 _ptr_name; - uint32 _ptr_addr; - uint32 _ptr_net_addr; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->vcs)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); - if (_ptr_name) { - NDR_ALLOC(ndr, r->name); - } else { - r->name = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_addr)); - if (_ptr_addr) { - NDR_ALLOC(ndr, r->addr); - } else { - r->addr = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->addr_len)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_net_addr)); - if (_ptr_net_addr) { - NDR_ALLOC(ndr, r->net_addr); - } else { - r->net_addr = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); - } - if (r->addr) { - NDR_CHECK(ndr_pull_srvsvc_TransportAddress(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr)); - } - if (r->net_addr) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->net_addr)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetTransportCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr0 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetTransport0)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetTransport1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransport1 *r) -{ - uint32 _ptr_name; - uint32 _ptr_addr; - uint32 _ptr_net_addr; - uint32 _ptr_domain; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->vcs)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); - if (_ptr_name) { - NDR_ALLOC(ndr, r->name); - } else { - r->name = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_addr)); - if (_ptr_addr) { - NDR_ALLOC(ndr, r->addr); - } else { - r->addr = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->addr_len)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_net_addr)); - if (_ptr_net_addr) { - NDR_ALLOC(ndr, r->net_addr); - } else { - r->net_addr = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_domain)); - if (_ptr_domain) { - NDR_ALLOC(ndr, r->domain); - } else { - r->domain = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); - } - if (r->addr) { - NDR_CHECK(ndr_pull_srvsvc_TransportAddress(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr)); - } - if (r->net_addr) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->net_addr)); - } - if (r->domain) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->domain)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetTransportCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr1 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetTransport1)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetTransport2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransport2 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->dummy)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetTransportCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr2 *r) -{ - uint32 _ptr_array; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->array) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetTransport2)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetTransportCtr(struct ndr_pull *ndr, int ndr_flags, uint16 level, union srvsvc_NetTransportCtr *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 0: { - uint32 _ptr_ctr0; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr0)); - if (_ptr_ctr0) { - NDR_ALLOC(ndr, r->ctr0); - } else { - r->ctr0 = NULL; - } - break; } - - case 1: { - uint32 _ptr_ctr1; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr1)); - if (_ptr_ctr1) { - NDR_ALLOC(ndr, r->ctr1); - } else { - r->ctr1 = NULL; - } - break; } - - case 2: { - uint32 _ptr_ctr2; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr2)); - if (_ptr_ctr2) { - NDR_ALLOC(ndr, r->ctr2); - } else { - r->ctr2 = NULL; - } - break; } - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 0: - if (r->ctr0) { - NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0)); - } - break; - - case 1: - if (r->ctr1) { - NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); - } - break; - - case 2: - if (r->ctr2) { - NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2)); - } - break; - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetTransportEnum(struct ndr_pull *ndr, struct srvsvc_NetTransportEnum *r) -{ - uint32 _ptr_resume_handle; - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.level)); - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint32 _level; - NDR_CHECK(ndr_pull_uint32(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in ctr"); - } - NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->out.ctr)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.total)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); - if (_ptr_resume_handle) { - NDR_ALLOC(ndr, r->out.resume_handle); - } else { - r->out.resume_handle = NULL; - } - if (r->out.resume_handle) { - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - } - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_1b(struct ndr_pull *ndr, struct srvsvc_1b *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NET_REMOTE_TOD(struct ndr_pull *ndr, struct srvsvc_NET_REMOTE_TOD *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_1d(struct ndr_pull *ndr, struct srvsvc_1d *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_1e(struct ndr_pull *ndr, struct srvsvc_1e *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_1f(struct ndr_pull *ndr, struct srvsvc_1f *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_20(struct ndr_pull *ndr, struct srvsvc_20 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NET_NAME_VALIDATE(struct ndr_pull *ndr, struct srvsvc_NET_NAME_VALIDATE *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_22(struct ndr_pull *ndr, struct srvsvc_22 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_23(struct ndr_pull *ndr, struct srvsvc_23 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, struct srvsvc_NetShareEnum *r) -{ - uint32 _ptr_resume_handle; - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.level)); - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint32 _level; - NDR_CHECK(ndr_pull_uint32(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in ctr"); - } - NDR_CHECK(ndr_pull_srvsvc_NetShareUnion(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->out.ctr)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.totalentries)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); - if (_ptr_resume_handle) { - NDR_ALLOC(ndr, r->out.resume_handle); - } else { - r->out.resume_handle = NULL; - } - if (r->out.resume_handle) { - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - } - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_25(struct ndr_pull *ndr, struct srvsvc_25 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_26(struct ndr_pull *ndr, struct srvsvc_26 *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NET_FILE_QUERY_SECDESC(struct ndr_pull *ndr, struct srvsvc_NET_FILE_QUERY_SECDESC *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_srvsvc_NET_FILE_SET_SECDESC(struct ndr_pull *ndr, struct srvsvc_NET_FILE_SET_SECDESC *r) -{ - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -void ndr_print_srvsvc_00(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_00 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_00"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_00"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_00"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_01(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_01 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_01"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_01"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_01"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_02(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_02 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_02"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_02"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_02"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_03(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_03 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_03"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_03"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_03"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_04(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_04 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_04"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_04"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_04"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_05(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_05 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_05"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_05"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_05"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_06(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_06 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_06"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_06"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_06"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_07(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_07 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_07"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_07"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_07"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NetConn0(struct ndr_print *ndr, const char *name, struct srvsvc_NetConn0 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetConn0"); - ndr->depth++; - ndr_print_uint32(ndr, "conn_id", r->conn_id); - ndr->depth--; -} - -void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *name, struct srvsvc_NetConnCtr0 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetConnCtr0"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetConn0); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetConn1(struct ndr_print *ndr, const char *name, struct srvsvc_NetConn1 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetConn1"); - ndr->depth++; - ndr_print_uint32(ndr, "conn_id", r->conn_id); - ndr_print_uint32(ndr, "conn_type", r->conn_type); - ndr_print_uint32(ndr, "num_open", r->num_open); - ndr_print_uint32(ndr, "num_users", r->num_users); - ndr_print_uint32(ndr, "conn_time", r->conn_time); - ndr_print_ptr(ndr, "user", r->user); - ndr->depth++; - if (r->user) { - ndr_print_unistr(ndr, "user", r->user); - } - ndr->depth--; - ndr_print_ptr(ndr, "client", r->client); - ndr->depth++; - if (r->client) { - ndr_print_unistr(ndr, "client", r->client); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *name, struct srvsvc_NetConnCtr1 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetConnCtr1"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetConn1); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetConnCtr(struct ndr_print *ndr, const char *name, uint16 level, union srvsvc_NetConnCtr *r) -{ - ndr_print_union(ndr, name, level, "srvsvc_NetConnCtr"); - switch (level) { - case 0: - ndr_print_ptr(ndr, "ctr0", r->ctr0); - ndr->depth++; - if (r->ctr0) { - ndr_print_srvsvc_NetConnCtr0(ndr, "ctr0", r->ctr0); - } - ndr->depth--; - break; - - case 1: - ndr_print_ptr(ndr, "ctr1", r->ctr1); - ndr->depth++; - if (r->ctr1) { - ndr_print_srvsvc_NetConnCtr1(ndr, "ctr1", r->ctr1); - } - ndr->depth--; - break; - - default: - break; - - } -} - -void ndr_print_srvsvc_NetConnEnum(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NetConnEnum *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetConnEnum"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NetConnEnum"); - ndr->depth++; - ndr_print_ptr(ndr, "server_unc", r->in.server_unc); - ndr->depth++; - if (r->in.server_unc) { - ndr_print_unistr(ndr, "server_unc", r->in.server_unc); - } - ndr->depth--; - ndr_print_ptr(ndr, "path", r->in.path); - ndr->depth++; - if (r->in.path) { - ndr_print_unistr(ndr, "path", r->in.path); - } - ndr->depth--; - ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_srvsvc_NetConnCtr(ndr, "ctr", r->in.level, &r->in.ctr); - ndr_print_uint32(ndr, "preferred_len", r->in.preferred_len); - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - if (r->in.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NetConnEnum"); - ndr->depth++; - ndr_print_uint32(ndr, "level", r->out.level); - ndr_print_srvsvc_NetConnCtr(ndr, "ctr", r->in.level, &r->out.ctr); - ndr_print_uint32(ndr, "total", r->out.total); - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - if (r->out.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - } - ndr->depth--; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NetFile2(struct ndr_print *ndr, const char *name, struct srvsvc_NetFile2 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetFile2"); - ndr->depth++; - ndr_print_uint32(ndr, "fid", r->fid); - ndr->depth--; -} - -void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *name, struct srvsvc_NetFileCtr2 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetFileCtr2"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetFile2); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetFile3(struct ndr_print *ndr, const char *name, struct srvsvc_NetFile3 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetFile3"); - ndr->depth++; - ndr_print_uint32(ndr, "fid", r->fid); - ndr_print_uint32(ndr, "permissions", r->permissions); - ndr_print_uint32(ndr, "num_locks", r->num_locks); - ndr_print_ptr(ndr, "path", r->path); - ndr->depth++; - if (r->path) { - ndr_print_unistr(ndr, "path", r->path); - } - ndr->depth--; - ndr_print_ptr(ndr, "user", r->user); - ndr->depth++; - if (r->user) { - ndr_print_unistr(ndr, "user", r->user); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *name, struct srvsvc_NetFileCtr3 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetFileCtr3"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetFile3); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *name, uint16 level, union srvsvc_NetFileCtr *r) -{ - ndr_print_union(ndr, name, level, "srvsvc_NetFileCtr"); - switch (level) { - case 2: - ndr_print_ptr(ndr, "ctr2", r->ctr2); - ndr->depth++; - if (r->ctr2) { - ndr_print_srvsvc_NetFileCtr2(ndr, "ctr2", r->ctr2); - } - ndr->depth--; - break; - - case 3: - ndr_print_ptr(ndr, "ctr3", r->ctr3); - ndr->depth++; - if (r->ctr3) { - ndr_print_srvsvc_NetFileCtr3(ndr, "ctr3", r->ctr3); - } - ndr->depth--; - break; - - default: - break; - - } -} - -void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NetFileEnum *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetFileEnum"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NetFileEnum"); - ndr->depth++; - ndr_print_ptr(ndr, "server_unc", r->in.server_unc); - ndr->depth++; - if (r->in.server_unc) { - ndr_print_unistr(ndr, "server_unc", r->in.server_unc); - } - ndr->depth--; - ndr_print_ptr(ndr, "path", r->in.path); - ndr->depth++; - if (r->in.path) { - ndr_print_unistr(ndr, "path", r->in.path); - } - ndr->depth--; - ndr_print_ptr(ndr, "user", r->in.user); - ndr->depth++; - if (r->in.user) { - ndr_print_unistr(ndr, "user", r->in.user); - } - ndr->depth--; - ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_srvsvc_NetFileCtr(ndr, "ctr", r->in.level, &r->in.ctr); - ndr_print_uint32(ndr, "preferred_len", r->in.preferred_len); - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - if (r->in.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NetFileEnum"); - ndr->depth++; - ndr_print_uint32(ndr, "level", r->out.level); - ndr_print_srvsvc_NetFileCtr(ndr, "ctr", r->in.level, &r->out.ctr); - ndr_print_uint32(ndr, "total", r->out.total); - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - if (r->out.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - } - ndr->depth--; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_0a(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_0a *r) -{ - ndr_print_struct(ndr, name, "srvsvc_0a"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_0a"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_0a"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NET_FILE_CLOSE(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_FILE_CLOSE *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NET_FILE_CLOSE"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NET_FILE_CLOSE"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NET_FILE_CLOSE"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NetSess0(struct ndr_print *ndr, const char *name, struct srvsvc_NetSess0 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetSess0"); - ndr->depth++; - ndr_print_ptr(ndr, "client", r->client); - ndr->depth++; - if (r->client) { - ndr_print_unistr(ndr, "client", r->client); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *name, struct srvsvc_NetSessCtr0 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetSessCtr0"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetSess0); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetSess1(struct ndr_print *ndr, const char *name, struct srvsvc_NetSess1 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetSess1"); - ndr->depth++; - ndr_print_ptr(ndr, "client", r->client); - ndr->depth++; - if (r->client) { - ndr_print_unistr(ndr, "client", r->client); - } - ndr->depth--; - ndr_print_ptr(ndr, "user", r->user); - ndr->depth++; - if (r->user) { - ndr_print_unistr(ndr, "user", r->user); - } - ndr->depth--; - ndr_print_uint32(ndr, "num_open", r->num_open); - ndr_print_uint32(ndr, "time", r->time); - ndr_print_uint32(ndr, "idle_time", r->idle_time); - ndr_print_uint32(ndr, "user_flags", r->user_flags); - ndr->depth--; -} - -void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *name, struct srvsvc_NetSessCtr1 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetSessCtr1"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetSess1); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetSess2(struct ndr_print *ndr, const char *name, struct srvsvc_NetSess2 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetSess2"); - ndr->depth++; - ndr_print_ptr(ndr, "client", r->client); - ndr->depth++; - if (r->client) { - ndr_print_unistr(ndr, "client", r->client); - } - ndr->depth--; - ndr_print_ptr(ndr, "user", r->user); - ndr->depth++; - if (r->user) { - ndr_print_unistr(ndr, "user", r->user); - } - ndr->depth--; - ndr_print_uint32(ndr, "num_open", r->num_open); - ndr_print_uint32(ndr, "time", r->time); - ndr_print_uint32(ndr, "idle_time", r->idle_time); - ndr_print_uint32(ndr, "user_flags", r->user_flags); - ndr_print_ptr(ndr, "client_type", r->client_type); - ndr->depth++; - if (r->client_type) { - ndr_print_unistr(ndr, "client_type", r->client_type); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *name, struct srvsvc_NetSessCtr2 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetSessCtr2"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetSess2); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetSess10(struct ndr_print *ndr, const char *name, struct srvsvc_NetSess10 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetSess10"); - ndr->depth++; - ndr_print_ptr(ndr, "client", r->client); - ndr->depth++; - if (r->client) { - ndr_print_unistr(ndr, "client", r->client); - } - ndr->depth--; - ndr_print_ptr(ndr, "user", r->user); - ndr->depth++; - if (r->user) { - ndr_print_unistr(ndr, "user", r->user); - } - ndr->depth--; - ndr_print_uint32(ndr, "time", r->time); - ndr_print_uint32(ndr, "idle_time", r->idle_time); - ndr->depth--; -} - -void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *name, struct srvsvc_NetSessCtr10 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetSessCtr10"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetSess10); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetSess502(struct ndr_print *ndr, const char *name, struct srvsvc_NetSess502 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetSess502"); - ndr->depth++; - ndr_print_ptr(ndr, "client", r->client); - ndr->depth++; - if (r->client) { - ndr_print_unistr(ndr, "client", r->client); - } - ndr->depth--; - ndr_print_ptr(ndr, "user", r->user); - ndr->depth++; - if (r->user) { - ndr_print_unistr(ndr, "user", r->user); - } - ndr->depth--; - ndr_print_uint32(ndr, "num_open", r->num_open); - ndr_print_uint32(ndr, "time", r->time); - ndr_print_uint32(ndr, "idle_time", r->idle_time); - ndr_print_uint32(ndr, "user_flags", r->user_flags); - ndr_print_ptr(ndr, "client_type", r->client_type); - ndr->depth++; - if (r->client_type) { - ndr_print_unistr(ndr, "client_type", r->client_type); - } - ndr->depth--; - ndr_print_ptr(ndr, "transport", r->transport); - ndr->depth++; - if (r->transport) { - ndr_print_unistr(ndr, "transport", r->transport); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *name, struct srvsvc_NetSessCtr502 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetSessCtr502"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetSess502); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetSessCtr(struct ndr_print *ndr, const char *name, uint16 level, union srvsvc_NetSessCtr *r) -{ - ndr_print_union(ndr, name, level, "srvsvc_NetSessCtr"); - switch (level) { - case 0: - ndr_print_ptr(ndr, "ctr0", r->ctr0); - ndr->depth++; - if (r->ctr0) { - ndr_print_srvsvc_NetSessCtr0(ndr, "ctr0", r->ctr0); - } - ndr->depth--; - break; - - case 1: - ndr_print_ptr(ndr, "ctr1", r->ctr1); - ndr->depth++; - if (r->ctr1) { - ndr_print_srvsvc_NetSessCtr1(ndr, "ctr1", r->ctr1); - } - ndr->depth--; - break; - - case 2: - ndr_print_ptr(ndr, "ctr2", r->ctr2); - ndr->depth++; - if (r->ctr2) { - ndr_print_srvsvc_NetSessCtr2(ndr, "ctr2", r->ctr2); - } - ndr->depth--; - break; - - case 10: - ndr_print_ptr(ndr, "ctr10", r->ctr10); - ndr->depth++; - if (r->ctr10) { - ndr_print_srvsvc_NetSessCtr10(ndr, "ctr10", r->ctr10); - } - ndr->depth--; - break; - - case 502: - ndr_print_ptr(ndr, "ctr502", r->ctr502); - ndr->depth++; - if (r->ctr502) { - ndr_print_srvsvc_NetSessCtr502(ndr, "ctr502", r->ctr502); - } - ndr->depth--; - break; - - default: - break; - - } -} - -void ndr_print_srvsvc_NetSessEnum(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NetSessEnum *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetSessEnum"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NetSessEnum"); - ndr->depth++; - ndr_print_ptr(ndr, "server_unc", r->in.server_unc); - ndr->depth++; - if (r->in.server_unc) { - ndr_print_unistr(ndr, "server_unc", r->in.server_unc); - } - ndr->depth--; - ndr_print_ptr(ndr, "client", r->in.client); - ndr->depth++; - if (r->in.client) { - ndr_print_unistr(ndr, "client", r->in.client); - } - ndr->depth--; - ndr_print_ptr(ndr, "user", r->in.user); - ndr->depth++; - if (r->in.user) { - ndr_print_unistr(ndr, "user", r->in.user); - } - ndr->depth--; - ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_srvsvc_NetSessCtr(ndr, "ctr", r->in.level, &r->in.ctr); - ndr_print_uint32(ndr, "preferred_len", r->in.preferred_len); - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - if (r->in.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NetSessEnum"); - ndr->depth++; - ndr_print_uint32(ndr, "level", r->out.level); - ndr_print_srvsvc_NetSessCtr(ndr, "ctr", r->in.level, &r->out.ctr); - ndr_print_uint32(ndr, "total", r->out.total); - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - if (r->out.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - } - ndr->depth--; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_0d(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_0d *r) -{ - ndr_print_struct(ndr, name, "srvsvc_0d"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_0d"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_0d"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NET_SHARE_ADD(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_SHARE_ADD *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NET_SHARE_ADD"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NET_SHARE_ADD"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NET_SHARE_ADD"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NetShare0(struct ndr_print *ndr, const char *name, struct srvsvc_NetShare0 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetShare0"); - ndr->depth++; - ndr_print_ptr(ndr, "name", r->name); - ndr->depth++; - if (r->name) { - ndr_print_unistr(ndr, "name", r->name); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *name, struct srvsvc_NetShareCtr0 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetShareCtr0"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetShare0); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetShare1(struct ndr_print *ndr, const char *name, struct srvsvc_NetShare1 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetShare1"); - ndr->depth++; - ndr_print_ptr(ndr, "name", r->name); - ndr->depth++; - if (r->name) { - ndr_print_unistr(ndr, "name", r->name); - } - ndr->depth--; - ndr_print_uint32(ndr, "type", r->type); - ndr_print_ptr(ndr, "comment", r->comment); - ndr->depth++; - if (r->comment) { - ndr_print_unistr(ndr, "comment", r->comment); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *name, struct srvsvc_NetShareCtr1 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetShare1); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetShare2(struct ndr_print *ndr, const char *name, struct srvsvc_NetShare2 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetShare2"); - ndr->depth++; - ndr_print_ptr(ndr, "name", r->name); - ndr->depth++; - if (r->name) { - ndr_print_unistr(ndr, "name", r->name); - } - ndr->depth--; - ndr_print_uint32(ndr, "type", r->type); - ndr_print_ptr(ndr, "comment", r->comment); - ndr->depth++; - if (r->comment) { - ndr_print_unistr(ndr, "comment", r->comment); - } - ndr->depth--; - ndr_print_uint32(ndr, "permissions", r->permissions); - ndr_print_uint32(ndr, "max_users", r->max_users); - ndr_print_uint32(ndr, "current_users", r->current_users); - ndr_print_ptr(ndr, "path", r->path); - ndr->depth++; - if (r->path) { - ndr_print_unistr(ndr, "path", r->path); - } - ndr->depth--; - ndr_print_ptr(ndr, "password", r->password); - ndr->depth++; - if (r->password) { - ndr_print_uint32(ndr, "password", *r->password); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *name, struct srvsvc_NetShareCtr2 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetShareCtr2"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetShare2); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetShare501(struct ndr_print *ndr, const char *name, struct srvsvc_NetShare501 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetShare501"); - ndr->depth++; - ndr_print_ptr(ndr, "name", r->name); - ndr->depth++; - if (r->name) { - ndr_print_unistr(ndr, "name", r->name); - } - ndr->depth--; - ndr_print_uint32(ndr, "type", r->type); - ndr_print_ptr(ndr, "comment", r->comment); - ndr->depth++; - if (r->comment) { - ndr_print_unistr(ndr, "comment", r->comment); - } - ndr->depth--; - ndr_print_uint32(ndr, "csc_policy", r->csc_policy); - ndr->depth--; -} - -void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char *name, struct srvsvc_NetShareCtr501 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetShareCtr501"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetShare501); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetShare502(struct ndr_print *ndr, const char *name, struct srvsvc_NetShare502 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetShare502"); - ndr->depth++; - ndr_print_ptr(ndr, "name", r->name); - ndr->depth++; - if (r->name) { - ndr_print_unistr(ndr, "name", r->name); - } - ndr->depth--; - ndr_print_uint32(ndr, "type", r->type); - ndr_print_ptr(ndr, "comment", r->comment); - ndr->depth++; - if (r->comment) { - ndr_print_unistr(ndr, "comment", r->comment); - } - ndr->depth--; - ndr_print_uint32(ndr, "permissions", r->permissions); - ndr_print_uint32(ndr, "max_users", r->max_users); - ndr_print_uint32(ndr, "current_users", r->current_users); - ndr_print_ptr(ndr, "path", r->path); - ndr->depth++; - if (r->path) { - ndr_print_unistr(ndr, "path", r->path); - } - ndr->depth--; - ndr_print_ptr(ndr, "password", r->password); - ndr->depth++; - if (r->password) { - ndr_print_uint32(ndr, "password", *r->password); - } - ndr->depth--; - ndr_print_uint32(ndr, "unknown", r->unknown); - ndr_print_ptr(ndr, "sd", r->sd); - ndr->depth++; - if (r->sd) { - ndr_print_security_descriptor(ndr, "sd", r->sd); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char *name, struct srvsvc_NetShareCtr502 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetShareCtr502"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetShare502); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetShare1004(struct ndr_print *ndr, const char *name, struct srvsvc_NetShare1004 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetShare1004"); - ndr->depth++; - ndr_print_ptr(ndr, "comment", r->comment); - ndr->depth++; - if (r->comment) { - ndr_print_unistr(ndr, "comment", r->comment); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetShareUnion(struct ndr_print *ndr, const char *name, uint16 level, union srvsvc_NetShareUnion *r) -{ - ndr_print_union(ndr, name, level, "srvsvc_NetShareUnion"); - switch (level) { - case 0: - ndr_print_ptr(ndr, "ctr0", r->ctr0); - ndr->depth++; - if (r->ctr0) { - ndr_print_srvsvc_NetShareCtr0(ndr, "ctr0", r->ctr0); - } - ndr->depth--; - break; - - case 1: - ndr_print_ptr(ndr, "ctr1", r->ctr1); - ndr->depth++; - if (r->ctr1) { - ndr_print_srvsvc_NetShareCtr1(ndr, "ctr1", r->ctr1); - } - ndr->depth--; - break; - - case 2: - ndr_print_ptr(ndr, "ctr2", r->ctr2); - ndr->depth++; - if (r->ctr2) { - ndr_print_srvsvc_NetShareCtr2(ndr, "ctr2", r->ctr2); - } - ndr->depth--; - break; - - case 501: - ndr_print_ptr(ndr, "ctr501", r->ctr501); - ndr->depth++; - if (r->ctr501) { - ndr_print_srvsvc_NetShareCtr501(ndr, "ctr501", r->ctr501); - } - ndr->depth--; - break; - - case 502: - ndr_print_ptr(ndr, "ctr502", r->ctr502); - ndr->depth++; - if (r->ctr502) { - ndr_print_srvsvc_NetShareCtr502(ndr, "ctr502", r->ctr502); - } - ndr->depth--; - break; - - default: - break; - - } -} - -void ndr_print_srvsvc_NetShareEnumAll(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NetShareEnumAll *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetShareEnumAll"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NetShareEnumAll"); - ndr->depth++; - ndr_print_ptr(ndr, "server_unc", r->in.server_unc); - ndr->depth++; - if (r->in.server_unc) { - ndr_print_unistr(ndr, "server_unc", r->in.server_unc); - } - ndr->depth--; - ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_srvsvc_NetShareUnion(ndr, "ctr", r->in.level, &r->in.ctr); - ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer); - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - if (r->in.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NetShareEnumAll"); - ndr->depth++; - ndr_print_uint32(ndr, "level", r->out.level); - ndr_print_srvsvc_NetShareUnion(ndr, "ctr", r->in.level, &r->out.ctr); - ndr_print_uint32(ndr, "totalentries", r->out.totalentries); - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - if (r->out.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - } - ndr->depth--; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NET_SHARE_GET_INFO(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_SHARE_GET_INFO *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NET_SHARE_GET_INFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NET_SHARE_GET_INFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NET_SHARE_GET_INFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NET_SHARE_SET_INFO(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_SHARE_SET_INFO *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NET_SHARE_SET_INFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NET_SHARE_SET_INFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NET_SHARE_SET_INFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NET_SHARE_DEL(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_SHARE_DEL *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NET_SHARE_DEL"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NET_SHARE_DEL"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NET_SHARE_DEL"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NET_SHARE_DEL_STICKY(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_SHARE_DEL_STICKY *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NET_SHARE_DEL_STICKY"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NET_SHARE_DEL_STICKY"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NET_SHARE_DEL_STICKY"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_14(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_14 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_14"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_14"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_14"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NET_SRV_GET_INFO(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_SRV_GET_INFO *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NET_SRV_GET_INFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NET_SRV_GET_INFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NET_SRV_GET_INFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NET_SRV_SET_INFO(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_SRV_SET_INFO *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NET_SRV_SET_INFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NET_SRV_SET_INFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NET_SRV_SET_INFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NetDisk0(struct ndr_print *ndr, const char *name, struct srvsvc_NetDisk0 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetDisk0"); - ndr->depth++; - ndr_print_uint32(ndr, "unknown", r->unknown); - ndr_print_uint32(ndr, "size", r->size); - ndr_print_ptr(ndr, "disk", r->disk); - ndr->depth++; - if (r->disk) { - ndr_print_array_uint8(ndr, "disk", r->disk, r->size); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetDiskCtr0(struct ndr_print *ndr, const char *name, struct srvsvc_NetDiskCtr0 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetDiskCtr0"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_uint32(ndr, "unknown1", r->unknown1); - ndr_print_uint32(ndr, "unknown2", r->unknown2); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetDisk0); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetDisk1(struct ndr_print *ndr, const char *name, struct srvsvc_NetDisk1 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetDisk1"); - ndr->depth++; - ndr_print_uint32(ndr, "dummy", r->dummy); - ndr->depth--; -} - -void ndr_print_srvsvc_NetDiskCtr1(struct ndr_print *ndr, const char *name, struct srvsvc_NetDiskCtr1 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetDiskCtr1"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetDisk1); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetDisk2(struct ndr_print *ndr, const char *name, struct srvsvc_NetDisk2 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetDisk2"); - ndr->depth++; - ndr_print_uint32(ndr, "dummy", r->dummy); - ndr->depth--; -} - -void ndr_print_srvsvc_NetDiskCtr2(struct ndr_print *ndr, const char *name, struct srvsvc_NetDiskCtr2 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetDiskCtr2"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetDisk2); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetDisk3(struct ndr_print *ndr, const char *name, struct srvsvc_NetDisk3 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetDisk3"); - ndr->depth++; - ndr_print_uint32(ndr, "dummy", r->dummy); - ndr->depth--; -} - -void ndr_print_srvsvc_NetDiskCtr3(struct ndr_print *ndr, const char *name, struct srvsvc_NetDiskCtr3 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetDiskCtr3"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetDisk3); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetDiskSubCtr(struct ndr_print *ndr, const char *name, uint16 level, union srvsvc_NetDiskSubCtr *r) -{ - ndr_print_union(ndr, name, level, "srvsvc_NetDiskSubCtr"); - switch (level) { - case 0: - ndr_print_srvsvc_NetDiskCtr0(ndr, "ctr0", &r->ctr0); - break; - - case 1: - ndr_print_srvsvc_NetDiskCtr1(ndr, "ctr1", &r->ctr1); - break; - - case 2: - ndr_print_srvsvc_NetDiskCtr2(ndr, "ctr2", &r->ctr2); - break; - - case 3: - ndr_print_srvsvc_NetDiskCtr3(ndr, "ctr3", &r->ctr3); - break; - - default: - break; - - } -} - -void ndr_print_srvsvc_NetDiskCtr(struct ndr_print *ndr, const char *name, struct srvsvc_NetDiskCtr *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetDiskCtr"); - ndr->depth++; - ndr_print_uint32(ndr, "num1", r->num1); - ndr_print_ptr(ndr, "ctr0", r->ctr0); - ndr->depth++; - if (r->ctr0) { - ndr_print_srvsvc_NetDiskCtr0(ndr, "ctr0", r->ctr0); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetDiskEnum(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NetDiskEnum *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetDiskEnum"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NetDiskEnum"); - ndr->depth++; - ndr_print_ptr(ndr, "server_unc", r->in.server_unc); - ndr->depth++; - if (r->in.server_unc) { - ndr_print_unistr(ndr, "server_unc", r->in.server_unc); - } - ndr->depth--; - ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_uint32(ndr, "unknown1", r->in.unknown1); - ndr_print_uint32(ndr, "unknown2", r->in.unknown2); - ndr_print_uint32(ndr, "preferred_len", r->in.preferred_len); - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - if (r->in.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NetDiskEnum"); - ndr->depth++; - ndr_print_srvsvc_NetDiskCtr(ndr, "ctr", &r->out.ctr); - ndr_print_uint32(ndr, "total", r->out.total); - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - if (r->out.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - } - ndr->depth--; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_18(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_18 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_18"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_18"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_18"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_19(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_19 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_19"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_19"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_19"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_TransportAddress(struct ndr_print *ndr, const char *name, struct srvsvc_TransportAddress *r) -{ - ndr_print_struct(ndr, name, "srvsvc_TransportAddress"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "addr", r->addr); - ndr->depth++; - if (r->addr) { - ndr_print_array_uint8(ndr, "addr", r->addr, r->count); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetTransport0(struct ndr_print *ndr, const char *name, struct srvsvc_NetTransport0 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetTransport0"); - ndr->depth++; - ndr_print_uint32(ndr, "vcs", r->vcs); - ndr_print_ptr(ndr, "name", r->name); - ndr->depth++; - if (r->name) { - ndr_print_unistr(ndr, "name", r->name); - } - ndr->depth--; - ndr_print_ptr(ndr, "addr", r->addr); - ndr->depth++; - if (r->addr) { - ndr_print_srvsvc_TransportAddress(ndr, "addr", r->addr); - } - ndr->depth--; - ndr_print_uint32(ndr, "addr_len", r->addr_len); - ndr_print_ptr(ndr, "net_addr", r->net_addr); - ndr->depth++; - if (r->net_addr) { - ndr_print_unistr(ndr, "net_addr", r->net_addr); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const char *name, struct srvsvc_NetTransportCtr0 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr0"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetTransport0); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetTransport1(struct ndr_print *ndr, const char *name, struct srvsvc_NetTransport1 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetTransport1"); - ndr->depth++; - ndr_print_uint32(ndr, "vcs", r->vcs); - ndr_print_ptr(ndr, "name", r->name); - ndr->depth++; - if (r->name) { - ndr_print_unistr(ndr, "name", r->name); - } - ndr->depth--; - ndr_print_ptr(ndr, "addr", r->addr); - ndr->depth++; - if (r->addr) { - ndr_print_srvsvc_TransportAddress(ndr, "addr", r->addr); - } - ndr->depth--; - ndr_print_uint32(ndr, "addr_len", r->addr_len); - ndr_print_ptr(ndr, "net_addr", r->net_addr); - ndr->depth++; - if (r->net_addr) { - ndr_print_unistr(ndr, "net_addr", r->net_addr); - } - ndr->depth--; - ndr_print_ptr(ndr, "domain", r->domain); - ndr->depth++; - if (r->domain) { - ndr_print_unistr(ndr, "domain", r->domain); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const char *name, struct srvsvc_NetTransportCtr1 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr1"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetTransport1); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetTransport2(struct ndr_print *ndr, const char *name, struct srvsvc_NetTransport2 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetTransport2"); - ndr->depth++; - ndr_print_uint32(ndr, "dummy", r->dummy); - ndr->depth--; -} - -void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const char *name, struct srvsvc_NetTransportCtr2 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr2"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetTransport2); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_srvsvc_NetTransportCtr(struct ndr_print *ndr, const char *name, uint16 level, union srvsvc_NetTransportCtr *r) -{ - ndr_print_union(ndr, name, level, "srvsvc_NetTransportCtr"); - switch (level) { - case 0: - ndr_print_ptr(ndr, "ctr0", r->ctr0); - ndr->depth++; - if (r->ctr0) { - ndr_print_srvsvc_NetTransportCtr0(ndr, "ctr0", r->ctr0); - } - ndr->depth--; - break; - - case 1: - ndr_print_ptr(ndr, "ctr1", r->ctr1); - ndr->depth++; - if (r->ctr1) { - ndr_print_srvsvc_NetTransportCtr1(ndr, "ctr1", r->ctr1); - } - ndr->depth--; - break; - - case 2: - ndr_print_ptr(ndr, "ctr2", r->ctr2); - ndr->depth++; - if (r->ctr2) { - ndr_print_srvsvc_NetTransportCtr2(ndr, "ctr2", r->ctr2); - } - ndr->depth--; - break; - - default: - ndr_print_bad_level(ndr, name, level); - } -} - -void ndr_print_srvsvc_NetTransportEnum(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NetTransportEnum *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetTransportEnum"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NetTransportEnum"); - ndr->depth++; - ndr_print_ptr(ndr, "server_unc", r->in.server_unc); - ndr->depth++; - if (r->in.server_unc) { - ndr_print_unistr(ndr, "server_unc", r->in.server_unc); - } - ndr->depth--; - ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_srvsvc_NetTransportCtr(ndr, "ctr", r->in.level, &r->in.ctr); - ndr_print_uint32(ndr, "preferred_len", r->in.preferred_len); - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - if (r->in.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NetTransportEnum"); - ndr->depth++; - ndr_print_uint32(ndr, "level", r->out.level); - ndr_print_srvsvc_NetTransportCtr(ndr, "ctr", r->in.level, &r->out.ctr); - ndr_print_uint32(ndr, "total", r->out.total); - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - if (r->out.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - } - ndr->depth--; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_1b(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_1b *r) -{ - ndr_print_struct(ndr, name, "srvsvc_1b"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_1b"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_1b"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NET_REMOTE_TOD(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_REMOTE_TOD *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NET_REMOTE_TOD"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NET_REMOTE_TOD"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NET_REMOTE_TOD"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_1d(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_1d *r) -{ - ndr_print_struct(ndr, name, "srvsvc_1d"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_1d"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_1d"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_1e(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_1e *r) -{ - ndr_print_struct(ndr, name, "srvsvc_1e"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_1e"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_1e"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_1f(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_1f *r) -{ - ndr_print_struct(ndr, name, "srvsvc_1f"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_1f"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_1f"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_20(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_20 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_20"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_20"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_20"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NET_NAME_VALIDATE(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_NAME_VALIDATE *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NET_NAME_VALIDATE"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NET_NAME_VALIDATE"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NET_NAME_VALIDATE"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_22(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_22 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_22"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_22"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_22"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_23(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_23 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_23"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_23"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_23"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NetShareEnum *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NetShareEnum"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NetShareEnum"); - ndr->depth++; - ndr_print_ptr(ndr, "server_unc", r->in.server_unc); - ndr->depth++; - if (r->in.server_unc) { - ndr_print_unistr(ndr, "server_unc", r->in.server_unc); - } - ndr->depth--; - ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_srvsvc_NetShareUnion(ndr, "ctr", r->in.level, &r->in.ctr); - ndr_print_uint32(ndr, "preferred_len", r->in.preferred_len); - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - if (r->in.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NetShareEnum"); - ndr->depth++; - ndr_print_uint32(ndr, "level", r->out.level); - ndr_print_srvsvc_NetShareUnion(ndr, "ctr", r->in.level, &r->out.ctr); - ndr_print_uint32(ndr, "totalentries", r->out.totalentries); - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - if (r->out.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - } - ndr->depth--; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_25(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_25 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_25"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_25"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_25"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_26(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_26 *r) -{ - ndr_print_struct(ndr, name, "srvsvc_26"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_26"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_26"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NET_FILE_QUERY_SECDESC(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_FILE_QUERY_SECDESC *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NET_FILE_QUERY_SECDESC"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NET_FILE_QUERY_SECDESC"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NET_FILE_QUERY_SECDESC"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_srvsvc_NET_FILE_SET_SECDESC(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_FILE_SET_SECDESC *r) -{ - ndr_print_struct(ndr, name, "srvsvc_NET_FILE_SET_SECDESC"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "srvsvc_NET_FILE_SET_SECDESC"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "srvsvc_NET_FILE_SET_SECDESC"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - diff --git a/source4/librpc/ndr/ndr_srvsvc.h b/source4/librpc/ndr/ndr_srvsvc.h deleted file mode 100644 index b2a35edd16..0000000000 --- a/source4/librpc/ndr/ndr_srvsvc.h +++ /dev/null @@ -1,834 +0,0 @@ -/* header auto-generated by pidl */ - -#define DCERPC_SRVSVC_UUID "4b324fc8-1670-01d3-1278-5a47bf6ee188" -#define DCERPC_SRVSVC_VERSION 3.0 -#define DCERPC_SRVSVC_NAME "srvsvc" - -#define DCERPC_SRVSVC_00 0 -#define DCERPC_SRVSVC_01 1 -#define DCERPC_SRVSVC_02 2 -#define DCERPC_SRVSVC_03 3 -#define DCERPC_SRVSVC_04 4 -#define DCERPC_SRVSVC_05 5 -#define DCERPC_SRVSVC_06 6 -#define DCERPC_SRVSVC_07 7 -#define DCERPC_SRVSVC_NETCONNENUM 8 -#define DCERPC_SRVSVC_NETFILEENUM 9 -#define DCERPC_SRVSVC_0A 10 -#define DCERPC_SRVSVC_NET_FILE_CLOSE 11 -#define DCERPC_SRVSVC_NETSESSENUM 12 -#define DCERPC_SRVSVC_0D 13 -#define DCERPC_SRVSVC_NET_SHARE_ADD 14 -#define DCERPC_SRVSVC_NETSHAREENUMALL 15 -#define DCERPC_SRVSVC_NET_SHARE_GET_INFO 16 -#define DCERPC_SRVSVC_NET_SHARE_SET_INFO 17 -#define DCERPC_SRVSVC_NET_SHARE_DEL 18 -#define DCERPC_SRVSVC_NET_SHARE_DEL_STICKY 19 -#define DCERPC_SRVSVC_14 20 -#define DCERPC_SRVSVC_NET_SRV_GET_INFO 21 -#define DCERPC_SRVSVC_NET_SRV_SET_INFO 22 -#define DCERPC_SRVSVC_NETDISKENUM 23 -#define DCERPC_SRVSVC_18 24 -#define DCERPC_SRVSVC_19 25 -#define DCERPC_SRVSVC_NETTRANSPORTENUM 26 -#define DCERPC_SRVSVC_1B 27 -#define DCERPC_SRVSVC_NET_REMOTE_TOD 28 -#define DCERPC_SRVSVC_1D 29 -#define DCERPC_SRVSVC_1E 30 -#define DCERPC_SRVSVC_1F 31 -#define DCERPC_SRVSVC_20 32 -#define DCERPC_SRVSVC_NET_NAME_VALIDATE 33 -#define DCERPC_SRVSVC_22 34 -#define DCERPC_SRVSVC_23 35 -#define DCERPC_SRVSVC_NETSHAREENUM 36 -#define DCERPC_SRVSVC_25 37 -#define DCERPC_SRVSVC_26 38 -#define DCERPC_SRVSVC_NET_FILE_QUERY_SECDESC 39 -#define DCERPC_SRVSVC_NET_FILE_SET_SECDESC 40 - - -struct srvsvc_00 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_01 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_02 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_03 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_04 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_05 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_06 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_07 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NetConn0 { - uint32 conn_id; -}; - -struct srvsvc_NetConnCtr0 { - uint32 count; - struct srvsvc_NetConn0 *array; -}; - -struct srvsvc_NetConn1 { - uint32 conn_id; - uint32 conn_type; - uint32 num_open; - uint32 num_users; - uint32 conn_time; - const char *user; - const char *client; -}; - -struct srvsvc_NetConnCtr1 { - uint32 count; - struct srvsvc_NetConn1 *array; -}; - -union srvsvc_NetConnCtr { -/* [case(0)] */ struct srvsvc_NetConnCtr0 *ctr0; -/* [case(1)] */ struct srvsvc_NetConnCtr1 *ctr1; -/* [case(default)] */ }; - -struct srvsvc_NetConnEnum { - struct { - const char *server_unc; - const char *path; - uint32 level; - union srvsvc_NetConnCtr ctr; - uint32 preferred_len; - uint32 *resume_handle; - } in; - - struct { - uint32 level; - union srvsvc_NetConnCtr ctr; - uint32 total; - uint32 *resume_handle; - WERROR result; - } out; - -}; - -struct srvsvc_NetFile2 { - uint32 fid; -}; - -struct srvsvc_NetFileCtr2 { - uint32 count; - struct srvsvc_NetFile2 *array; -}; - -struct srvsvc_NetFile3 { - uint32 fid; - uint32 permissions; - uint32 num_locks; - const char *path; - const char *user; -}; - -struct srvsvc_NetFileCtr3 { - uint32 count; - struct srvsvc_NetFile3 *array; -}; - -union srvsvc_NetFileCtr { -/* [case(2)] */ struct srvsvc_NetFileCtr2 *ctr2; -/* [case(3)] */ struct srvsvc_NetFileCtr3 *ctr3; -/* [case(default)] */ }; - -struct srvsvc_NetFileEnum { - struct { - const char *server_unc; - const char *path; - const char *user; - uint32 level; - union srvsvc_NetFileCtr ctr; - uint32 preferred_len; - uint32 *resume_handle; - } in; - - struct { - uint32 level; - union srvsvc_NetFileCtr ctr; - uint32 total; - uint32 *resume_handle; - WERROR result; - } out; - -}; - -struct srvsvc_0a { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NET_FILE_CLOSE { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NetSess0 { - const char *client; -}; - -struct srvsvc_NetSessCtr0 { - uint32 count; - struct srvsvc_NetSess0 *array; -}; - -struct srvsvc_NetSess1 { - const char *client; - const char *user; - uint32 num_open; - uint32 time; - uint32 idle_time; - uint32 user_flags; -}; - -struct srvsvc_NetSessCtr1 { - uint32 count; - struct srvsvc_NetSess1 *array; -}; - -struct srvsvc_NetSess2 { - const char *client; - const char *user; - uint32 num_open; - uint32 time; - uint32 idle_time; - uint32 user_flags; - const char *client_type; -}; - -struct srvsvc_NetSessCtr2 { - uint32 count; - struct srvsvc_NetSess2 *array; -}; - -struct srvsvc_NetSess10 { - const char *client; - const char *user; - uint32 time; - uint32 idle_time; -}; - -struct srvsvc_NetSessCtr10 { - uint32 count; - struct srvsvc_NetSess10 *array; -}; - -struct srvsvc_NetSess502 { - const char *client; - const char *user; - uint32 num_open; - uint32 time; - uint32 idle_time; - uint32 user_flags; - const char *client_type; - const char *transport; -}; - -struct srvsvc_NetSessCtr502 { - uint32 count; - struct srvsvc_NetSess502 *array; -}; - -union srvsvc_NetSessCtr { -/* [case(0)] */ struct srvsvc_NetSessCtr0 *ctr0; -/* [case(1)] */ struct srvsvc_NetSessCtr1 *ctr1; -/* [case(2)] */ struct srvsvc_NetSessCtr2 *ctr2; -/* [case(10)] */ struct srvsvc_NetSessCtr10 *ctr10; -/* [case(502)] */ struct srvsvc_NetSessCtr502 *ctr502; -/* [case(default)] */ }; - -struct srvsvc_NetSessEnum { - struct { - const char *server_unc; - const char *client; - const char *user; - uint32 level; - union srvsvc_NetSessCtr ctr; - uint32 preferred_len; - uint32 *resume_handle; - } in; - - struct { - uint32 level; - union srvsvc_NetSessCtr ctr; - uint32 total; - uint32 *resume_handle; - WERROR result; - } out; - -}; - -struct srvsvc_0d { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NET_SHARE_ADD { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NetShare0 { - const char *name; -}; - -struct srvsvc_NetShareCtr0 { - uint32 count; - struct srvsvc_NetShare0 *array; -}; - -struct srvsvc_NetShare1 { - const char *name; - uint32 type; - const char *comment; -}; - -struct srvsvc_NetShareCtr1 { - uint32 count; - struct srvsvc_NetShare1 *array; -}; - -struct srvsvc_NetShare2 { - const char *name; - uint32 type; - const char *comment; - uint32 permissions; - uint32 max_users; - uint32 current_users; - const char *path; - uint32 *password; -}; - -struct srvsvc_NetShareCtr2 { - uint32 count; - struct srvsvc_NetShare2 *array; -}; - -struct srvsvc_NetShare501 { - const char *name; - uint32 type; - const char *comment; - uint32 csc_policy; -}; - -struct srvsvc_NetShareCtr501 { - uint32 count; - struct srvsvc_NetShare501 *array; -}; - -struct srvsvc_NetShare502 { - const char *name; - uint32 type; - const char *comment; - uint32 permissions; - uint32 max_users; - uint32 current_users; - const char *path; - uint32 *password; - uint32 unknown; - struct security_descriptor *sd; -}; - -struct srvsvc_NetShareCtr502 { - uint32 count; - struct srvsvc_NetShare502 *array; -}; - -struct srvsvc_NetShare1004 { - const char *comment; -}; - -union srvsvc_NetShareUnion { -/* [case(0)] */ struct srvsvc_NetShareCtr0 *ctr0; -/* [case(1)] */ struct srvsvc_NetShareCtr1 *ctr1; -/* [case(2)] */ struct srvsvc_NetShareCtr2 *ctr2; -/* [case(501)] */ struct srvsvc_NetShareCtr501 *ctr501; -/* [case(502)] */ struct srvsvc_NetShareCtr502 *ctr502; -/* [case(default)] */ }; - -struct srvsvc_NetShareEnumAll { - struct { - const char *server_unc; - uint32 level; - union srvsvc_NetShareUnion ctr; - uint32 max_buffer; - uint32 *resume_handle; - } in; - - struct { - uint32 level; - union srvsvc_NetShareUnion ctr; - uint32 totalentries; - uint32 *resume_handle; - WERROR result; - } out; - -}; - -struct srvsvc_NET_SHARE_GET_INFO { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NET_SHARE_SET_INFO { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NET_SHARE_DEL { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NET_SHARE_DEL_STICKY { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_14 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NET_SRV_GET_INFO { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NET_SRV_SET_INFO { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NetDisk0 { - uint32 unknown; - uint32 size; - uint8 *disk; -}; - -struct srvsvc_NetDiskCtr0 { - uint32 count; - uint32 unknown1; - uint32 unknown2; - struct srvsvc_NetDisk0 *array; -}; - -struct srvsvc_NetDisk1 { - uint32 dummy; -}; - -struct srvsvc_NetDiskCtr1 { - uint32 count; - struct srvsvc_NetDisk1 *array; -}; - -struct srvsvc_NetDisk2 { - uint32 dummy; -}; - -struct srvsvc_NetDiskCtr2 { - uint32 count; - struct srvsvc_NetDisk2 *array; -}; - -struct srvsvc_NetDisk3 { - uint32 dummy; -}; - -struct srvsvc_NetDiskCtr3 { - uint32 count; - struct srvsvc_NetDisk3 *array; -}; - -union srvsvc_NetDiskSubCtr { -/* [case(0)] */ struct srvsvc_NetDiskCtr0 ctr0; -/* [case(1)] */ struct srvsvc_NetDiskCtr1 ctr1; -/* [case(2)] */ struct srvsvc_NetDiskCtr2 ctr2; -/* [case(3)] */ struct srvsvc_NetDiskCtr3 ctr3; -/* [case(default)] */ }; - -struct srvsvc_NetDiskCtr { - uint32 num1; - struct srvsvc_NetDiskCtr0 *ctr0; -}; - -struct srvsvc_NetDiskEnum { - struct { - const char *server_unc; - uint32 level; - uint32 unknown1; - uint32 unknown2; - uint32 preferred_len; - uint32 *resume_handle; - } in; - - struct { - struct srvsvc_NetDiskCtr ctr; - uint32 total; - uint32 *resume_handle; - WERROR result; - } out; - -}; - -struct srvsvc_18 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_19 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_TransportAddress { - uint32 count; - uint8 *addr; -}; - -struct srvsvc_NetTransport0 { - uint32 vcs; - const char *name; - struct srvsvc_TransportAddress *addr; - uint32 addr_len; - const char *net_addr; -}; - -struct srvsvc_NetTransportCtr0 { - uint32 count; - struct srvsvc_NetTransport0 *array; -}; - -struct srvsvc_NetTransport1 { - uint32 vcs; - const char *name; - struct srvsvc_TransportAddress *addr; - uint32 addr_len; - const char *net_addr; - const char *domain; -}; - -struct srvsvc_NetTransportCtr1 { - uint32 count; - struct srvsvc_NetTransport1 *array; -}; - -struct srvsvc_NetTransport2 { - uint32 dummy; -}; - -struct srvsvc_NetTransportCtr2 { - uint32 count; - struct srvsvc_NetTransport2 *array; -}; - -union srvsvc_NetTransportCtr { -/* [case(0)] */ struct srvsvc_NetTransportCtr0 *ctr0; -/* [case(1)] */ struct srvsvc_NetTransportCtr1 *ctr1; -/* [case(2)] */ struct srvsvc_NetTransportCtr2 *ctr2; -}; - -struct srvsvc_NetTransportEnum { - struct { - const char *server_unc; - uint32 level; - union srvsvc_NetTransportCtr ctr; - uint32 preferred_len; - uint32 *resume_handle; - } in; - - struct { - uint32 level; - union srvsvc_NetTransportCtr ctr; - uint32 total; - uint32 *resume_handle; - WERROR result; - } out; - -}; - -struct srvsvc_1b { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NET_REMOTE_TOD { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_1d { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_1e { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_1f { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_20 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NET_NAME_VALIDATE { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_22 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_23 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NetShareEnum { - struct { - const char *server_unc; - uint32 level; - union srvsvc_NetShareUnion ctr; - uint32 preferred_len; - uint32 *resume_handle; - } in; - - struct { - uint32 level; - union srvsvc_NetShareUnion ctr; - uint32 totalentries; - uint32 *resume_handle; - WERROR result; - } out; - -}; - -struct srvsvc_25 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_26 { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NET_FILE_QUERY_SECDESC { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - -struct srvsvc_NET_FILE_SET_SECDESC { - struct { - } in; - - struct { - NTSTATUS result; - } out; - -}; - diff --git a/source4/librpc/ndr/ndr_wkssvc.c b/source4/librpc/ndr/ndr_wkssvc.c deleted file mode 100644 index d5f2fa4fda..0000000000 --- a/source4/librpc/ndr/ndr_wkssvc.c +++ /dev/null @@ -1,1692 +0,0 @@ -/* parser auto-generated by pidl */ - -#include "includes.h" - -NTSTATUS ndr_push_wkssvc_QueryInfo(struct ndr_push *ndr, struct wkssvc_QueryInfo *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.server_name)); - if (r->in.server_name) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.server_name)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_wkssvc_SetInfo(struct ndr_push *ndr, struct wkssvc_SetInfo *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRWKSTAUSERENUM(struct ndr_push *ndr, struct WKSSVC_NETRWKSTAUSERENUM *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRWKSTAUSERGETINFO(struct ndr_push *ndr, struct WKSSVC_NETRWKSTAUSERGETINFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRWKSTAUSERSETINFO(struct ndr_push *ndr, struct WKSSVC_NETRWKSTAUSERSETINFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_wkssvc_TransportInfo0(struct ndr_push *ndr, int ndr_flags, struct wkssvc_TransportInfo0 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->quality_of_service)); - NDR_CHECK(ndr_push_uint32(ndr, r->vc_count)); - NDR_CHECK(ndr_push_ptr(ndr, r->name)); - NDR_CHECK(ndr_push_ptr(ndr, r->address)); - NDR_CHECK(ndr_push_uint32(ndr, r->wan_link)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_push_unistr(ndr, r->name)); - } - if (r->address) { - NDR_CHECK(ndr_push_unistr(ndr, r->address)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_wkssvc_TransportInfoArray(struct ndr_push *ndr, int ndr_flags, struct wkssvc_TransportInfoArray *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->transports)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->transports) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->transports, sizeof(r->transports[0]), r->count, (ndr_push_flags_fn_t)ndr_push_wkssvc_TransportInfo0)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_wkssvc_TransportInfo(struct ndr_push *ndr, int ndr_flags, uint16 level, union wkssvc_TransportInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - switch (level) { - case 0: - NDR_CHECK(ndr_push_ptr(ndr, r->array)); - break; - - default: - break; - - } - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 0: - if (r->array) { - NDR_CHECK(ndr_push_wkssvc_TransportInfoArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->array)); - } - break; - - default: - break; - - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_wkssvc_TransportEnum(struct ndr_push *ndr, struct wkssvc_TransportEnum *r) -{ - NDR_CHECK(ndr_push_ptr(ndr, r->in.server_name)); - if (r->in.server_name) { - NDR_CHECK(ndr_push_unistr(ndr, r->in.server_name)); - } - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); - NDR_CHECK(ndr_push_wkssvc_TransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->in.info)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.max_buffer)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); - if (r->in.resume_handle) { - NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRWKSTATRANSPORTADD(struct ndr_push *ndr, struct WKSSVC_NETRWKSTATRANSPORTADD *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRWKSTATRANSPORTDEL(struct ndr_push *ndr, struct WKSSVC_NETRWKSTATRANSPORTDEL *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRUSEADD(struct ndr_push *ndr, struct WKSSVC_NETRUSEADD *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRUSEGETINFO(struct ndr_push *ndr, struct WKSSVC_NETRUSEGETINFO *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRUSEDEL(struct ndr_push *ndr, struct WKSSVC_NETRUSEDEL *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRUSEENUM(struct ndr_push *ndr, struct WKSSVC_NETRUSEENUM *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRMESSAGEBUFFERSEND(struct ndr_push *ndr, struct WKSSVC_NETRMESSAGEBUFFERSEND *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct ndr_push *ndr, struct WKSSVC_NETRWORKSTATIONSTATISTICSGET *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRLOGONDOMAINNAMEADD(struct ndr_push *ndr, struct WKSSVC_NETRLOGONDOMAINNAMEADD *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRLOGONDOMAINNAMEDEL(struct ndr_push *ndr, struct WKSSVC_NETRLOGONDOMAINNAMEDEL *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRJOINDOMAIN(struct ndr_push *ndr, struct WKSSVC_NETRJOINDOMAIN *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRUNJOINDOMAIN(struct ndr_push *ndr, struct WKSSVC_NETRUNJOINDOMAIN *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct ndr_push *ndr, struct WKSSVC_NETRRENAMEMACHINEINDOMAIN *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRVALIDATENAME(struct ndr_push *ndr, struct WKSSVC_NETRVALIDATENAME *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRGETJOININFORMATION(struct ndr_push *ndr, struct WKSSVC_NETRGETJOININFORMATION *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRGETJOINABLEOUS(struct ndr_push *ndr, struct WKSSVC_NETRGETJOINABLEOUS *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRJOINDOMAIN2(struct ndr_push *ndr, struct WKSSVC_NETRJOINDOMAIN2 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRUNJOINDOMAIN2(struct ndr_push *ndr, struct WKSSVC_NETRUNJOINDOMAIN2 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRRENAMEMACHINEINDOMAIN2(struct ndr_push *ndr, struct WKSSVC_NETRRENAMEMACHINEINDOMAIN2 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRVALIDATENAME2(struct ndr_push *ndr, struct WKSSVC_NETRVALIDATENAME2 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRGETJOINABLEOUS2(struct ndr_push *ndr, struct WKSSVC_NETRGETJOINABLEOUS2 *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRADDALTERNATECOMPUTERNAME(struct ndr_push *ndr, struct WKSSVC_NETRADDALTERNATECOMPUTERNAME *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME(struct ndr_push *ndr, struct WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct ndr_push *ndr, struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_WKSSVC_NETRENUMERATECOMPUTERNAMES(struct ndr_push *ndr, struct WKSSVC_NETRENUMERATECOMPUTERNAMES *r) -{ - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_wkssvc_Info100(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_Info100 *r) -{ - uint32 _ptr_server; - uint32 _ptr_domain; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->platform_id)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_server)); - if (_ptr_server) { - NDR_ALLOC(ndr, r->server); - } else { - r->server = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_domain)); - if (_ptr_domain) { - NDR_ALLOC(ndr, r->domain); - } else { - r->domain = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->ver_major)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->ver_minor)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->server) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->server)); - } - if (r->domain) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->domain)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_wkssvc_Info101(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_Info101 *r) -{ - uint32 _ptr_server; - uint32 _ptr_domain; - uint32 _ptr_lan_root; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->platform_id)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_server)); - if (_ptr_server) { - NDR_ALLOC(ndr, r->server); - } else { - r->server = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_domain)); - if (_ptr_domain) { - NDR_ALLOC(ndr, r->domain); - } else { - r->domain = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->ver_major)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->ver_minor)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_lan_root)); - if (_ptr_lan_root) { - NDR_ALLOC(ndr, r->lan_root); - } else { - r->lan_root = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->server) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->server)); - } - if (r->domain) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->domain)); - } - if (r->lan_root) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->lan_root)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_wkssvc_Info102(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_Info102 *r) -{ - uint32 _ptr_server; - uint32 _ptr_domain; - uint32 _ptr_lan_root; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->platform_id)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_server)); - if (_ptr_server) { - NDR_ALLOC(ndr, r->server); - } else { - r->server = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_domain)); - if (_ptr_domain) { - NDR_ALLOC(ndr, r->domain); - } else { - r->domain = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->ver_major)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->ver_minor)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_lan_root)); - if (_ptr_lan_root) { - NDR_ALLOC(ndr, r->lan_root); - } else { - r->lan_root = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->logged_on_users)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->server) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->server)); - } - if (r->domain) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->domain)); - } - if (r->lan_root) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->lan_root)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_wkssvc_Info502(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_Info502 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->char_wait)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->collection_time)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->maximum_collection_count)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->keep_connection)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->max_commands)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->session_timeout)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->size_char_buf)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->max_threads)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->lock_quota)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->lock_increment)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->lock_maximum)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->pipe_increment)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->pipe_maximum)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->cache_file_timeout)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->dormant_file_limit)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->read_ahead_throughput)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_mailslot_buffers)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->num_srv_announce_buffers)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->max_illegal_dgram_events)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->dgram_event_reset_freq)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->log_election_packets)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->use_opportunistic_locking)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->use_unlock_behind)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->use_close_behind)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->buf_named_pipes)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->use_lock_read_unlock)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->utilize_nt_caching)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->use_raw_read)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->use_raw_write)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->use_write_raw_data)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->use_encryption)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->buf_files_deny_write)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->buf_read_only_files)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->force_core_create_mode)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->use_512_byte_max_transfer)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_wkssvc_Info(struct ndr_pull *ndr, int ndr_flags, uint16 level, union wkssvc_Info *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 100: { - uint32 _ptr_info100; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info100)); - if (_ptr_info100) { - NDR_ALLOC(ndr, r->info100); - } else { - r->info100 = NULL; - } - break; } - - case 101: { - uint32 _ptr_info101; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info101)); - if (_ptr_info101) { - NDR_ALLOC(ndr, r->info101); - } else { - r->info101 = NULL; - } - break; } - - case 102: { - uint32 _ptr_info102; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info102)); - if (_ptr_info102) { - NDR_ALLOC(ndr, r->info102); - } else { - r->info102 = NULL; - } - break; } - - case 502: { - uint32 _ptr_info502; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info502)); - if (_ptr_info502) { - NDR_ALLOC(ndr, r->info502); - } else { - r->info502 = NULL; - } - break; } - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 100: - if (r->info100) { - NDR_CHECK(ndr_pull_wkssvc_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100)); - } - break; - - case 101: - if (r->info101) { - NDR_CHECK(ndr_pull_wkssvc_Info101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101)); - } - break; - - case 102: - if (r->info102) { - NDR_CHECK(ndr_pull_wkssvc_Info102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102)); - } - break; - - case 502: - if (r->info502) { - NDR_CHECK(ndr_pull_wkssvc_Info502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502)); - } - break; - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_wkssvc_QueryInfo(struct ndr_pull *ndr, struct wkssvc_QueryInfo *r) -{ - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint32 _level; - NDR_CHECK(ndr_pull_uint32(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); - } - NDR_CHECK(ndr_pull_wkssvc_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->out.info)); - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_wkssvc_SetInfo(struct ndr_pull *ndr, struct wkssvc_SetInfo *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRWKSTAUSERENUM(struct ndr_pull *ndr, struct WKSSVC_NETRWKSTAUSERENUM *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRWKSTAUSERGETINFO(struct ndr_pull *ndr, struct WKSSVC_NETRWKSTAUSERGETINFO *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRWKSTAUSERSETINFO(struct ndr_pull *ndr, struct WKSSVC_NETRWKSTAUSERSETINFO *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_wkssvc_TransportInfo0(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_TransportInfo0 *r) -{ - uint32 _ptr_name; - uint32 _ptr_address; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->quality_of_service)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->vc_count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); - if (_ptr_name) { - NDR_ALLOC(ndr, r->name); - } else { - r->name = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_address)); - if (_ptr_address) { - NDR_ALLOC(ndr, r->address); - } else { - r->address = NULL; - } - NDR_CHECK(ndr_pull_uint32(ndr, &r->wan_link)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->name) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); - } - if (r->address) { - NDR_CHECK(ndr_pull_unistr(ndr, &r->address)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_wkssvc_TransportInfoArray(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_TransportInfoArray *r) -{ - uint32 _ptr_transports; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_transports)); - if (_ptr_transports) { - NDR_ALLOC(ndr, r->transports); - } else { - r->transports = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->transports) { - { - uint32 _array_size; - NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); - if (r->count > _array_size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); - } - } - NDR_ALLOC_N_SIZE(ndr, r->transports, r->count, sizeof(r->transports[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->transports, sizeof(r->transports[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_wkssvc_TransportInfo0)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_wkssvc_TransportInfo(struct ndr_pull *ndr, int ndr_flags, uint16 level, union wkssvc_TransportInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_struct_start(ndr)); - switch (level) { - case 0: { - uint32 _ptr_array; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); - if (_ptr_array) { - NDR_ALLOC(ndr, r->array); - } else { - r->array = NULL; - } - break; } - - default: { - break; } - - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 0: - if (r->array) { - NDR_CHECK(ndr_pull_wkssvc_TransportInfoArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->array)); - } - break; - - default: - break; - - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_wkssvc_TransportEnum(struct ndr_pull *ndr, struct wkssvc_TransportEnum *r) -{ - uint32 _ptr_resume_handle; - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.level)); - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint32 _level; - NDR_CHECK(ndr_pull_uint32(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); - } - NDR_CHECK(ndr_pull_wkssvc_TransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->out.info)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->out.totalentries)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); - if (_ptr_resume_handle) { - NDR_ALLOC(ndr, r->out.resume_handle); - } else { - r->out.resume_handle = NULL; - } - if (r->out.resume_handle) { - NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); - } - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRWKSTATRANSPORTADD(struct ndr_pull *ndr, struct WKSSVC_NETRWKSTATRANSPORTADD *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRWKSTATRANSPORTDEL(struct ndr_pull *ndr, struct WKSSVC_NETRWKSTATRANSPORTDEL *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRUSEADD(struct ndr_pull *ndr, struct WKSSVC_NETRUSEADD *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRUSEGETINFO(struct ndr_pull *ndr, struct WKSSVC_NETRUSEGETINFO *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRUSEDEL(struct ndr_pull *ndr, struct WKSSVC_NETRUSEDEL *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRUSEENUM(struct ndr_pull *ndr, struct WKSSVC_NETRUSEENUM *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRMESSAGEBUFFERSEND(struct ndr_pull *ndr, struct WKSSVC_NETRMESSAGEBUFFERSEND *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct ndr_pull *ndr, struct WKSSVC_NETRWORKSTATIONSTATISTICSGET *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEADD(struct ndr_pull *ndr, struct WKSSVC_NETRLOGONDOMAINNAMEADD *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEDEL(struct ndr_pull *ndr, struct WKSSVC_NETRLOGONDOMAINNAMEDEL *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRJOINDOMAIN(struct ndr_pull *ndr, struct WKSSVC_NETRJOINDOMAIN *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRUNJOINDOMAIN(struct ndr_pull *ndr, struct WKSSVC_NETRUNJOINDOMAIN *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct ndr_pull *ndr, struct WKSSVC_NETRRENAMEMACHINEINDOMAIN *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRVALIDATENAME(struct ndr_pull *ndr, struct WKSSVC_NETRVALIDATENAME *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRGETJOININFORMATION(struct ndr_pull *ndr, struct WKSSVC_NETRGETJOININFORMATION *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRGETJOINABLEOUS(struct ndr_pull *ndr, struct WKSSVC_NETRGETJOINABLEOUS *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRJOINDOMAIN2(struct ndr_pull *ndr, struct WKSSVC_NETRJOINDOMAIN2 *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRUNJOINDOMAIN2(struct ndr_pull *ndr, struct WKSSVC_NETRUNJOINDOMAIN2 *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRRENAMEMACHINEINDOMAIN2(struct ndr_pull *ndr, struct WKSSVC_NETRRENAMEMACHINEINDOMAIN2 *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRVALIDATENAME2(struct ndr_pull *ndr, struct WKSSVC_NETRVALIDATENAME2 *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRGETJOINABLEOUS2(struct ndr_pull *ndr, struct WKSSVC_NETRGETJOINABLEOUS2 *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRADDALTERNATECOMPUTERNAME(struct ndr_pull *ndr, struct WKSSVC_NETRADDALTERNATECOMPUTERNAME *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME(struct ndr_pull *ndr, struct WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct ndr_pull *ndr, struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_WKSSVC_NETRENUMERATECOMPUTERNAMES(struct ndr_pull *ndr, struct WKSSVC_NETRENUMERATECOMPUTERNAMES *r) -{ - NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -void ndr_print_wkssvc_Info100(struct ndr_print *ndr, const char *name, struct wkssvc_Info100 *r) -{ - ndr_print_struct(ndr, name, "wkssvc_Info100"); - ndr->depth++; - ndr_print_uint32(ndr, "platform_id", r->platform_id); - ndr_print_ptr(ndr, "server", r->server); - ndr->depth++; - if (r->server) { - ndr_print_unistr(ndr, "server", r->server); - } - ndr->depth--; - ndr_print_ptr(ndr, "domain", r->domain); - ndr->depth++; - if (r->domain) { - ndr_print_unistr(ndr, "domain", r->domain); - } - ndr->depth--; - ndr_print_uint32(ndr, "ver_major", r->ver_major); - ndr_print_uint32(ndr, "ver_minor", r->ver_minor); - ndr->depth--; -} - -void ndr_print_wkssvc_Info101(struct ndr_print *ndr, const char *name, struct wkssvc_Info101 *r) -{ - ndr_print_struct(ndr, name, "wkssvc_Info101"); - ndr->depth++; - ndr_print_uint32(ndr, "platform_id", r->platform_id); - ndr_print_ptr(ndr, "server", r->server); - ndr->depth++; - if (r->server) { - ndr_print_unistr(ndr, "server", r->server); - } - ndr->depth--; - ndr_print_ptr(ndr, "domain", r->domain); - ndr->depth++; - if (r->domain) { - ndr_print_unistr(ndr, "domain", r->domain); - } - ndr->depth--; - ndr_print_uint32(ndr, "ver_major", r->ver_major); - ndr_print_uint32(ndr, "ver_minor", r->ver_minor); - ndr_print_ptr(ndr, "lan_root", r->lan_root); - ndr->depth++; - if (r->lan_root) { - ndr_print_unistr(ndr, "lan_root", r->lan_root); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_wkssvc_Info102(struct ndr_print *ndr, const char *name, struct wkssvc_Info102 *r) -{ - ndr_print_struct(ndr, name, "wkssvc_Info102"); - ndr->depth++; - ndr_print_uint32(ndr, "platform_id", r->platform_id); - ndr_print_ptr(ndr, "server", r->server); - ndr->depth++; - if (r->server) { - ndr_print_unistr(ndr, "server", r->server); - } - ndr->depth--; - ndr_print_ptr(ndr, "domain", r->domain); - ndr->depth++; - if (r->domain) { - ndr_print_unistr(ndr, "domain", r->domain); - } - ndr->depth--; - ndr_print_uint32(ndr, "ver_major", r->ver_major); - ndr_print_uint32(ndr, "ver_minor", r->ver_minor); - ndr_print_ptr(ndr, "lan_root", r->lan_root); - ndr->depth++; - if (r->lan_root) { - ndr_print_unistr(ndr, "lan_root", r->lan_root); - } - ndr->depth--; - ndr_print_uint32(ndr, "logged_on_users", r->logged_on_users); - ndr->depth--; -} - -void ndr_print_wkssvc_Info502(struct ndr_print *ndr, const char *name, struct wkssvc_Info502 *r) -{ - ndr_print_struct(ndr, name, "wkssvc_Info502"); - ndr->depth++; - ndr_print_uint32(ndr, "char_wait", r->char_wait); - ndr_print_uint32(ndr, "collection_time", r->collection_time); - ndr_print_uint32(ndr, "maximum_collection_count", r->maximum_collection_count); - ndr_print_uint32(ndr, "keep_connection", r->keep_connection); - ndr_print_uint32(ndr, "max_commands", r->max_commands); - ndr_print_uint32(ndr, "session_timeout", r->session_timeout); - ndr_print_uint32(ndr, "size_char_buf", r->size_char_buf); - ndr_print_uint32(ndr, "max_threads", r->max_threads); - ndr_print_uint32(ndr, "lock_quota", r->lock_quota); - ndr_print_uint32(ndr, "lock_increment", r->lock_increment); - ndr_print_uint32(ndr, "lock_maximum", r->lock_maximum); - ndr_print_uint32(ndr, "pipe_increment", r->pipe_increment); - ndr_print_uint32(ndr, "pipe_maximum", r->pipe_maximum); - ndr_print_uint32(ndr, "cache_file_timeout", r->cache_file_timeout); - ndr_print_uint32(ndr, "dormant_file_limit", r->dormant_file_limit); - ndr_print_uint32(ndr, "read_ahead_throughput", r->read_ahead_throughput); - ndr_print_uint32(ndr, "num_mailslot_buffers", r->num_mailslot_buffers); - ndr_print_uint32(ndr, "num_srv_announce_buffers", r->num_srv_announce_buffers); - ndr_print_uint32(ndr, "max_illegal_dgram_events", r->max_illegal_dgram_events); - ndr_print_uint32(ndr, "dgram_event_reset_freq", r->dgram_event_reset_freq); - ndr_print_uint32(ndr, "log_election_packets", r->log_election_packets); - ndr_print_uint32(ndr, "use_opportunistic_locking", r->use_opportunistic_locking); - ndr_print_uint32(ndr, "use_unlock_behind", r->use_unlock_behind); - ndr_print_uint32(ndr, "use_close_behind", r->use_close_behind); - ndr_print_uint32(ndr, "buf_named_pipes", r->buf_named_pipes); - ndr_print_uint32(ndr, "use_lock_read_unlock", r->use_lock_read_unlock); - ndr_print_uint32(ndr, "utilize_nt_caching", r->utilize_nt_caching); - ndr_print_uint32(ndr, "use_raw_read", r->use_raw_read); - ndr_print_uint32(ndr, "use_raw_write", r->use_raw_write); - ndr_print_uint32(ndr, "use_write_raw_data", r->use_write_raw_data); - ndr_print_uint32(ndr, "use_encryption", r->use_encryption); - ndr_print_uint32(ndr, "buf_files_deny_write", r->buf_files_deny_write); - ndr_print_uint32(ndr, "buf_read_only_files", r->buf_read_only_files); - ndr_print_uint32(ndr, "force_core_create_mode", r->force_core_create_mode); - ndr_print_uint32(ndr, "use_512_byte_max_transfer", r->use_512_byte_max_transfer); - ndr->depth--; -} - -void ndr_print_wkssvc_Info(struct ndr_print *ndr, const char *name, uint16 level, union wkssvc_Info *r) -{ - ndr_print_union(ndr, name, level, "wkssvc_Info"); - switch (level) { - case 100: - ndr_print_ptr(ndr, "info100", r->info100); - ndr->depth++; - if (r->info100) { - ndr_print_wkssvc_Info100(ndr, "info100", r->info100); - } - ndr->depth--; - break; - - case 101: - ndr_print_ptr(ndr, "info101", r->info101); - ndr->depth++; - if (r->info101) { - ndr_print_wkssvc_Info101(ndr, "info101", r->info101); - } - ndr->depth--; - break; - - case 102: - ndr_print_ptr(ndr, "info102", r->info102); - ndr->depth++; - if (r->info102) { - ndr_print_wkssvc_Info102(ndr, "info102", r->info102); - } - ndr->depth--; - break; - - case 502: - ndr_print_ptr(ndr, "info502", r->info502); - ndr->depth++; - if (r->info502) { - ndr_print_wkssvc_Info502(ndr, "info502", r->info502); - } - ndr->depth--; - break; - - default: - ndr_print_bad_level(ndr, name, level); - } -} - -void ndr_print_wkssvc_QueryInfo(struct ndr_print *ndr, const char *name, int flags, struct wkssvc_QueryInfo *r) -{ - ndr_print_struct(ndr, name, "wkssvc_QueryInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "wkssvc_QueryInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "server_name", r->in.server_name); - ndr->depth++; - if (r->in.server_name) { - ndr_print_unistr(ndr, "server_name", r->in.server_name); - } - ndr->depth--; - ndr_print_uint32(ndr, "level", r->in.level); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "wkssvc_QueryInfo"); - ndr->depth++; - ndr_print_wkssvc_Info(ndr, "info", r->in.level, &r->out.info); - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_wkssvc_SetInfo(struct ndr_print *ndr, const char *name, int flags, struct wkssvc_SetInfo *r) -{ - ndr_print_struct(ndr, name, "wkssvc_SetInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "wkssvc_SetInfo"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "wkssvc_SetInfo"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRWKSTAUSERENUM(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRWKSTAUSERENUM *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRWKSTAUSERENUM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRWKSTAUSERENUM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRWKSTAUSERENUM"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRWKSTAUSERGETINFO(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRWKSTAUSERGETINFO *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRWKSTAUSERGETINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRWKSTAUSERGETINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRWKSTAUSERGETINFO"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRWKSTAUSERSETINFO(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRWKSTAUSERSETINFO *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRWKSTAUSERSETINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRWKSTAUSERSETINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRWKSTAUSERSETINFO"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_wkssvc_TransportInfo0(struct ndr_print *ndr, const char *name, struct wkssvc_TransportInfo0 *r) -{ - ndr_print_struct(ndr, name, "wkssvc_TransportInfo0"); - ndr->depth++; - ndr_print_uint32(ndr, "quality_of_service", r->quality_of_service); - ndr_print_uint32(ndr, "vc_count", r->vc_count); - ndr_print_ptr(ndr, "name", r->name); - ndr->depth++; - if (r->name) { - ndr_print_unistr(ndr, "name", r->name); - } - ndr->depth--; - ndr_print_ptr(ndr, "address", r->address); - ndr->depth++; - if (r->address) { - ndr_print_unistr(ndr, "address", r->address); - } - ndr->depth--; - ndr_print_uint32(ndr, "wan_link", r->wan_link); - ndr->depth--; -} - -void ndr_print_wkssvc_TransportInfoArray(struct ndr_print *ndr, const char *name, struct wkssvc_TransportInfoArray *r) -{ - ndr_print_struct(ndr, name, "wkssvc_TransportInfoArray"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "transports", r->transports); - ndr->depth++; - if (r->transports) { - ndr_print_array(ndr, "transports", r->transports, sizeof(r->transports[0]), r->count, (ndr_print_fn_t)ndr_print_wkssvc_TransportInfo0); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_wkssvc_TransportInfo(struct ndr_print *ndr, const char *name, uint16 level, union wkssvc_TransportInfo *r) -{ - ndr_print_union(ndr, name, level, "wkssvc_TransportInfo"); - switch (level) { - case 0: - ndr_print_ptr(ndr, "array", r->array); - ndr->depth++; - if (r->array) { - ndr_print_wkssvc_TransportInfoArray(ndr, "array", r->array); - } - ndr->depth--; - break; - - default: - break; - - } -} - -void ndr_print_wkssvc_TransportEnum(struct ndr_print *ndr, const char *name, int flags, struct wkssvc_TransportEnum *r) -{ - ndr_print_struct(ndr, name, "wkssvc_TransportEnum"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "wkssvc_TransportEnum"); - ndr->depth++; - ndr_print_ptr(ndr, "server_name", r->in.server_name); - ndr->depth++; - if (r->in.server_name) { - ndr_print_unistr(ndr, "server_name", r->in.server_name); - } - ndr->depth--; - ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_wkssvc_TransportInfo(ndr, "info", r->in.level, &r->in.info); - ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer); - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - if (r->in.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "wkssvc_TransportEnum"); - ndr->depth++; - ndr_print_uint32(ndr, "level", r->out.level); - ndr_print_wkssvc_TransportInfo(ndr, "info", r->in.level, &r->out.info); - ndr_print_uint32(ndr, "totalentries", r->out.totalentries); - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - if (r->out.resume_handle) { - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - } - ndr->depth--; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRWKSTATRANSPORTADD(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRWKSTATRANSPORTADD *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRWKSTATRANSPORTADD"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRWKSTATRANSPORTADD"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRWKSTATRANSPORTADD"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRWKSTATRANSPORTDEL(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRWKSTATRANSPORTDEL *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRWKSTATRANSPORTDEL"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRWKSTATRANSPORTDEL"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRWKSTATRANSPORTDEL"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRUSEADD(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRUSEADD *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRUSEADD"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRUSEADD"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRUSEADD"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRUSEGETINFO(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRUSEGETINFO *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRUSEGETINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRUSEGETINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRUSEGETINFO"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRUSEDEL(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRUSEDEL *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRUSEDEL"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRUSEDEL"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRUSEDEL"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRUSEENUM(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRUSEENUM *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRUSEENUM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRUSEENUM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRUSEENUM"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRMESSAGEBUFFERSEND(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRMESSAGEBUFFERSEND *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRMESSAGEBUFFERSEND"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRMESSAGEBUFFERSEND"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRMESSAGEBUFFERSEND"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRWORKSTATIONSTATISTICSGET *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRWORKSTATIONSTATISTICSGET"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRWORKSTATIONSTATISTICSGET"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRWORKSTATIONSTATISTICSGET"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRLOGONDOMAINNAMEADD(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRLOGONDOMAINNAMEADD *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRLOGONDOMAINNAMEADD"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRLOGONDOMAINNAMEADD"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRLOGONDOMAINNAMEADD"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRLOGONDOMAINNAMEDEL(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRLOGONDOMAINNAMEDEL *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRLOGONDOMAINNAMEDEL"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRLOGONDOMAINNAMEDEL"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRLOGONDOMAINNAMEDEL"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRJOINDOMAIN(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRJOINDOMAIN *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRJOINDOMAIN"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRJOINDOMAIN"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRJOINDOMAIN"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRUNJOINDOMAIN(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRUNJOINDOMAIN *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRUNJOINDOMAIN"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRUNJOINDOMAIN"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRUNJOINDOMAIN"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRRENAMEMACHINEINDOMAIN *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRRENAMEMACHINEINDOMAIN"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRRENAMEMACHINEINDOMAIN"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRRENAMEMACHINEINDOMAIN"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRVALIDATENAME(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRVALIDATENAME *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRVALIDATENAME"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRVALIDATENAME"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRVALIDATENAME"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRGETJOININFORMATION(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRGETJOININFORMATION *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRGETJOININFORMATION"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRGETJOININFORMATION"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRGETJOININFORMATION"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRGETJOINABLEOUS(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRGETJOINABLEOUS *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRGETJOINABLEOUS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRGETJOINABLEOUS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRGETJOINABLEOUS"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRJOINDOMAIN2(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRJOINDOMAIN2 *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRJOINDOMAIN2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRJOINDOMAIN2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRJOINDOMAIN2"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRUNJOINDOMAIN2(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRUNJOINDOMAIN2 *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRUNJOINDOMAIN2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRUNJOINDOMAIN2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRUNJOINDOMAIN2"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRRENAMEMACHINEINDOMAIN2(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRRENAMEMACHINEINDOMAIN2 *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRRENAMEMACHINEINDOMAIN2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRRENAMEMACHINEINDOMAIN2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRRENAMEMACHINEINDOMAIN2"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRVALIDATENAME2(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRVALIDATENAME2 *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRVALIDATENAME2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRVALIDATENAME2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRVALIDATENAME2"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRGETJOINABLEOUS2(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRGETJOINABLEOUS2 *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRGETJOINABLEOUS2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRGETJOINABLEOUS2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRGETJOINABLEOUS2"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRADDALTERNATECOMPUTERNAME(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRADDALTERNATECOMPUTERNAME *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRADDALTERNATECOMPUTERNAME"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRADDALTERNATECOMPUTERNAME"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRADDALTERNATECOMPUTERNAME"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRSETPRIMARYCOMPUTERNAME"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRSETPRIMARYCOMPUTERNAME"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRSETPRIMARYCOMPUTERNAME"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_WKSSVC_NETRENUMERATECOMPUTERNAMES(struct ndr_print *ndr, const char *name, int flags, struct WKSSVC_NETRENUMERATECOMPUTERNAMES *r) -{ - ndr_print_struct(ndr, name, "WKSSVC_NETRENUMERATECOMPUTERNAMES"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "WKSSVC_NETRENUMERATECOMPUTERNAMES"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "WKSSVC_NETRENUMERATECOMPUTERNAMES"); - ndr->depth++; - ndr_print_WERROR(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - diff --git a/source4/librpc/ndr/ndr_wkssvc.h b/source4/librpc/ndr/ndr_wkssvc.h deleted file mode 100644 index f08aea1139..0000000000 --- a/source4/librpc/ndr/ndr_wkssvc.h +++ /dev/null @@ -1,450 +0,0 @@ -/* header auto-generated by pidl */ - -#define DCERPC_WKSSVC_UUID "6bffd098-a112-3610-9833-46c3f87e345a" -#define DCERPC_WKSSVC_VERSION 1.0 -#define DCERPC_WKSSVC_NAME "wkssvc" - -#define DCERPC_WKSSVC_QUERYINFO 0 -#define DCERPC_WKSSVC_SETINFO 1 -#define DCERPC_WKSSVC_NETRWKSTAUSERENUM 2 -#define DCERPC_WKSSVC_NETRWKSTAUSERGETINFO 3 -#define DCERPC_WKSSVC_NETRWKSTAUSERSETINFO 4 -#define DCERPC_WKSSVC_TRANSPORTENUM 5 -#define DCERPC_WKSSVC_NETRWKSTATRANSPORTADD 6 -#define DCERPC_WKSSVC_NETRWKSTATRANSPORTDEL 7 -#define DCERPC_WKSSVC_NETRUSEADD 8 -#define DCERPC_WKSSVC_NETRUSEGETINFO 9 -#define DCERPC_WKSSVC_NETRUSEDEL 10 -#define DCERPC_WKSSVC_NETRUSEENUM 11 -#define DCERPC_WKSSVC_NETRMESSAGEBUFFERSEND 12 -#define DCERPC_WKSSVC_NETRWORKSTATIONSTATISTICSGET 13 -#define DCERPC_WKSSVC_NETRLOGONDOMAINNAMEADD 14 -#define DCERPC_WKSSVC_NETRLOGONDOMAINNAMEDEL 15 -#define DCERPC_WKSSVC_NETRJOINDOMAIN 16 -#define DCERPC_WKSSVC_NETRUNJOINDOMAIN 17 -#define DCERPC_WKSSVC_NETRRENAMEMACHINEINDOMAIN 18 -#define DCERPC_WKSSVC_NETRVALIDATENAME 19 -#define DCERPC_WKSSVC_NETRGETJOININFORMATION 20 -#define DCERPC_WKSSVC_NETRGETJOINABLEOUS 21 -#define DCERPC_WKSSVC_NETRJOINDOMAIN2 22 -#define DCERPC_WKSSVC_NETRUNJOINDOMAIN2 23 -#define DCERPC_WKSSVC_NETRRENAMEMACHINEINDOMAIN2 24 -#define DCERPC_WKSSVC_NETRVALIDATENAME2 25 -#define DCERPC_WKSSVC_NETRGETJOINABLEOUS2 26 -#define DCERPC_WKSSVC_NETRADDALTERNATECOMPUTERNAME 27 -#define DCERPC_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME 28 -#define DCERPC_WKSSVC_NETRSETPRIMARYCOMPUTERNAME 29 -#define DCERPC_WKSSVC_NETRENUMERATECOMPUTERNAMES 30 - - -struct wkssvc_Info100 { - uint32 platform_id; - const char *server; - const char *domain; - uint32 ver_major; - uint32 ver_minor; -}; - -struct wkssvc_Info101 { - uint32 platform_id; - const char *server; - const char *domain; - uint32 ver_major; - uint32 ver_minor; - const char *lan_root; -}; - -struct wkssvc_Info102 { - uint32 platform_id; - const char *server; - const char *domain; - uint32 ver_major; - uint32 ver_minor; - const char *lan_root; - uint32 logged_on_users; -}; - -struct wkssvc_Info502 { - uint32 char_wait; - uint32 collection_time; - uint32 maximum_collection_count; - uint32 keep_connection; - uint32 max_commands; - uint32 session_timeout; - uint32 size_char_buf; - uint32 max_threads; - uint32 lock_quota; - uint32 lock_increment; - uint32 lock_maximum; - uint32 pipe_increment; - uint32 pipe_maximum; - uint32 cache_file_timeout; - uint32 dormant_file_limit; - uint32 read_ahead_throughput; - uint32 num_mailslot_buffers; - uint32 num_srv_announce_buffers; - uint32 max_illegal_dgram_events; - uint32 dgram_event_reset_freq; - uint32 log_election_packets; - uint32 use_opportunistic_locking; - uint32 use_unlock_behind; - uint32 use_close_behind; - uint32 buf_named_pipes; - uint32 use_lock_read_unlock; - uint32 utilize_nt_caching; - uint32 use_raw_read; - uint32 use_raw_write; - uint32 use_write_raw_data; - uint32 use_encryption; - uint32 buf_files_deny_write; - uint32 buf_read_only_files; - uint32 force_core_create_mode; - uint32 use_512_byte_max_transfer; -}; - -union wkssvc_Info { -/* [case(100)] */ struct wkssvc_Info100 *info100; -/* [case(101)] */ struct wkssvc_Info101 *info101; -/* [case(102)] */ struct wkssvc_Info102 *info102; -/* [case(502)] */ struct wkssvc_Info502 *info502; -}; - -struct wkssvc_QueryInfo { - struct { - const char *server_name; - uint32 level; - } in; - - struct { - union wkssvc_Info info; - WERROR result; - } out; - -}; - -struct wkssvc_SetInfo { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRWKSTAUSERENUM { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRWKSTAUSERGETINFO { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRWKSTAUSERSETINFO { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct wkssvc_TransportInfo0 { - uint32 quality_of_service; - uint32 vc_count; - const char *name; - const char *address; - uint32 wan_link; -}; - -struct wkssvc_TransportInfoArray { - uint32 count; - struct wkssvc_TransportInfo0 *transports; -}; - -union wkssvc_TransportInfo { -/* [case(0)] */ struct wkssvc_TransportInfoArray *array; -/* [case(default)] */ }; - -struct wkssvc_TransportEnum { - struct { - const char *server_name; - uint32 level; - union wkssvc_TransportInfo info; - uint32 max_buffer; - uint32 *resume_handle; - } in; - - struct { - uint32 level; - union wkssvc_TransportInfo info; - uint32 totalentries; - uint32 *resume_handle; - WERROR result; - } out; - -}; - -struct WKSSVC_NETRWKSTATRANSPORTADD { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRWKSTATRANSPORTDEL { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRUSEADD { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRUSEGETINFO { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRUSEDEL { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRUSEENUM { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRMESSAGEBUFFERSEND { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRWORKSTATIONSTATISTICSGET { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRLOGONDOMAINNAMEADD { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRLOGONDOMAINNAMEDEL { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRJOINDOMAIN { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRUNJOINDOMAIN { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRRENAMEMACHINEINDOMAIN { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRVALIDATENAME { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRGETJOININFORMATION { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRGETJOINABLEOUS { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRJOINDOMAIN2 { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRUNJOINDOMAIN2 { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRRENAMEMACHINEINDOMAIN2 { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRVALIDATENAME2 { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRGETJOINABLEOUS2 { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRADDALTERNATECOMPUTERNAME { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - -struct WKSSVC_NETRENUMERATECOMPUTERNAMES { - struct { - } in; - - struct { - WERROR result; - } out; - -}; - |