summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr/ndr_unixinfo.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-09-06 22:08:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:51:08 -0500
commit82ed0866182afa6b8a2285f46bdd8f326db9032f (patch)
tree61588031b77049f68b911b71e786edddceedadc5 /source3/librpc/gen_ndr/ndr_unixinfo.c
parent34047286866aa0f37dd863c692a3e9efe56a898c (diff)
downloadsamba-82ed0866182afa6b8a2285f46bdd8f326db9032f.tar.gz
samba-82ed0866182afa6b8a2285f46bdd8f326db9032f.tar.bz2
samba-82ed0866182afa6b8a2285f46bdd8f326db9032f.zip
r18193: Not quite to autogenerated NDR but closer thanks to Jelmer's
initial work. I'm including the librpc/gen_ndr directory in svn temporarily just to get some compile issues straightened out. (This used to be commit cf271aa433cfa606be5dbf3ed1d94fe3caf57653)
Diffstat (limited to 'source3/librpc/gen_ndr/ndr_unixinfo.c')
-rw-r--r--source3/librpc/gen_ndr/ndr_unixinfo.c519
1 files changed, 519 insertions, 0 deletions
diff --git a/source3/librpc/gen_ndr/ndr_unixinfo.c b/source3/librpc/gen_ndr/ndr_unixinfo.c
new file mode 100644
index 0000000000..7d42668526
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_unixinfo.c
@@ -0,0 +1,519 @@
+/* parser auto-generated by pidl */
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
+#include <stdarg.h>
+#include <string.h>
+#include <core/nterr.h>
+#include <ndr/ndr_misc.h>
+#include <ndr/ndr_dcerpc.h>
+#include "gen_ndr/ndr_unixinfo.h"
+#include <dcerpc.h>
+
+#include <ndr/ndr_security.h>
+NTSTATUS ndr_push_unixinfo_GetPWUidInfo(struct ndr_push *ndr, int ndr_flags, const struct unixinfo_GetPWUidInfo *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->homedir));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->shell));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->homedir) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->homedir, CH_UTF8)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->homedir, CH_UTF8)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->homedir, ndr_charset_length(r->homedir, CH_UTF8), sizeof(uint8_t), CH_UTF8));
+ }
+ if (r->shell) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->shell, CH_UTF8)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->shell, CH_UTF8)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->shell, ndr_charset_length(r->shell, CH_UTF8), sizeof(uint8_t), CH_UTF8));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_unixinfo_GetPWUidInfo(struct ndr_pull *ndr, int ndr_flags, struct unixinfo_GetPWUidInfo *r)
+{
+ uint32_t _ptr_homedir;
+ TALLOC_CTX *_mem_save_homedir_0;
+ uint32_t _ptr_shell;
+ TALLOC_CTX *_mem_save_shell_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_homedir));
+ if (_ptr_homedir) {
+ NDR_PULL_ALLOC(ndr, r->homedir);
+ } else {
+ r->homedir = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_shell));
+ if (_ptr_shell) {
+ NDR_PULL_ALLOC(ndr, r->shell);
+ } else {
+ r->shell = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->homedir) {
+ _mem_save_homedir_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->homedir, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->homedir));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->homedir));
+ if (ndr_get_array_length(ndr, &r->homedir) > ndr_get_array_size(ndr, &r->homedir)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->homedir), ndr_get_array_length(ndr, &r->homedir));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->homedir), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->homedir, ndr_get_array_length(ndr, &r->homedir), sizeof(uint8_t), CH_UTF8));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_homedir_0, 0);
+ }
+ if (r->shell) {
+ _mem_save_shell_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->shell, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->shell));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->shell));
+ if (ndr_get_array_length(ndr, &r->shell) > ndr_get_array_size(ndr, &r->shell)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->shell), ndr_get_array_length(ndr, &r->shell));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->shell), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->shell, ndr_get_array_length(ndr, &r->shell), sizeof(uint8_t), CH_UTF8));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_shell_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+void ndr_print_unixinfo_GetPWUidInfo(struct ndr_print *ndr, const char *name, const struct unixinfo_GetPWUidInfo *r)
+{
+ ndr_print_struct(ndr, name, "unixinfo_GetPWUidInfo");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "status", r->status);
+ ndr_print_ptr(ndr, "homedir", r->homedir);
+ ndr->depth++;
+ if (r->homedir) {
+ ndr_print_string(ndr, "homedir", r->homedir);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "shell", r->shell);
+ ndr->depth++;
+ if (r->shell) {
+ ndr_print_string(ndr, "shell", r->shell);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_unixinfo_SidToUid(struct ndr_push *ndr, int flags, const struct unixinfo_SidToUid *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.uid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.uid));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_unixinfo_SidToUid(struct ndr_pull *ndr, int flags, struct unixinfo_SidToUid *r)
+{
+ TALLOC_CTX *_mem_save_uid_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid));
+ NDR_PULL_ALLOC(ndr, r->out.uid);
+ ZERO_STRUCTP(r->out.uid);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.uid);
+ }
+ _mem_save_uid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.uid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.uid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+void ndr_print_unixinfo_SidToUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToUid *r)
+{
+ ndr_print_struct(ndr, name, "unixinfo_SidToUid");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "unixinfo_SidToUid");
+ ndr->depth++;
+ ndr_print_dom_sid(ndr, "sid", &r->in.sid);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "unixinfo_SidToUid");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "uid", r->out.uid);
+ ndr->depth++;
+ ndr_print_hyper(ndr, "uid", *r->out.uid);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_unixinfo_UidToSid(struct ndr_push *ndr, int flags, const struct unixinfo_UidToSid *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uid));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.sid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_unixinfo_UidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_UidToSid *r)
+{
+ TALLOC_CTX *_mem_save_sid_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uid));
+ NDR_PULL_ALLOC(ndr, r->out.sid);
+ ZERO_STRUCTP(r->out.sid);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.sid);
+ }
+ _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+void ndr_print_unixinfo_UidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_UidToSid *r)
+{
+ ndr_print_struct(ndr, name, "unixinfo_UidToSid");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "unixinfo_UidToSid");
+ ndr->depth++;
+ ndr_print_hyper(ndr, "uid", r->in.uid);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "unixinfo_UidToSid");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "sid", r->out.sid);
+ ndr->depth++;
+ ndr_print_dom_sid(ndr, "sid", r->out.sid);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_unixinfo_SidToGid(struct ndr_push *ndr, int flags, const struct unixinfo_SidToGid *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.gid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.gid));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_unixinfo_SidToGid(struct ndr_pull *ndr, int flags, struct unixinfo_SidToGid *r)
+{
+ TALLOC_CTX *_mem_save_gid_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid));
+ NDR_PULL_ALLOC(ndr, r->out.gid);
+ ZERO_STRUCTP(r->out.gid);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.gid);
+ }
+ _mem_save_gid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.gid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.gid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+void ndr_print_unixinfo_SidToGid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToGid *r)
+{
+ ndr_print_struct(ndr, name, "unixinfo_SidToGid");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "unixinfo_SidToGid");
+ ndr->depth++;
+ ndr_print_dom_sid(ndr, "sid", &r->in.sid);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "unixinfo_SidToGid");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "gid", r->out.gid);
+ ndr->depth++;
+ ndr_print_hyper(ndr, "gid", *r->out.gid);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_unixinfo_GidToSid(struct ndr_push *ndr, int flags, const struct unixinfo_GidToSid *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.gid));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.sid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_unixinfo_GidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_GidToSid *r)
+{
+ TALLOC_CTX *_mem_save_sid_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.gid));
+ NDR_PULL_ALLOC(ndr, r->out.sid);
+ ZERO_STRUCTP(r->out.sid);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.sid);
+ }
+ _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+void ndr_print_unixinfo_GidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GidToSid *r)
+{
+ ndr_print_struct(ndr, name, "unixinfo_GidToSid");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "unixinfo_GidToSid");
+ ndr->depth++;
+ ndr_print_hyper(ndr, "gid", r->in.gid);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "unixinfo_GidToSid");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "sid", r->out.sid);
+ ndr->depth++;
+ ndr_print_dom_sid(ndr, "sid", r->out.sid);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_unixinfo_GetPWUid(struct ndr_push *ndr, int flags, const struct unixinfo_GetPWUid *r)
+{
+ uint32_t cntr_uids_0;
+ uint32_t cntr_infos_1;
+ if (flags & NDR_IN) {
+ if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
+ for (cntr_uids_0 = 0; cntr_uids_0 < *r->in.count; cntr_uids_0++) {
+ NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uids[cntr_uids_0]));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
+ if (r->out.infos == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
+ for (cntr_infos_1 = 0; cntr_infos_1 < *r->out.count; cntr_infos_1++) {
+ NDR_CHECK(ndr_push_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_1]));
+ }
+ for (cntr_infos_1 = 0; cntr_infos_1 < *r->out.count; cntr_infos_1++) {
+ NDR_CHECK(ndr_push_unixinfo_GetPWUidInfo(ndr, NDR_BUFFERS, &r->out.infos[cntr_infos_1]));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, int flags, struct unixinfo_GetPWUid *r)
+{
+ uint32_t cntr_uids_0;
+ uint32_t cntr_infos_1;
+ TALLOC_CTX *_mem_save_count_0;
+ TALLOC_CTX *_mem_save_uids_0;
+ TALLOC_CTX *_mem_save_infos_1;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
+ if (*r->in.count < 0 || *r->in.count > 1023) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.uids));
+ NDR_PULL_ALLOC_N(ndr, r->in.uids, ndr_get_array_size(ndr, &r->in.uids));
+ _mem_save_uids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.uids, 0);
+ for (cntr_uids_0 = 0; cntr_uids_0 < *r->in.count; cntr_uids_0++) {
+ NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uids[cntr_uids_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uids_0, 0);
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ *r->out.count = *r->in.count;
+ if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_PULL_ALLOC_N(ndr, r->out.infos, *r->in.count);
+ memset(r->out.infos, 0, *r->in.count * sizeof(*r->out.infos));
+ if (r->in.uids) {
+ if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.uids, *r->in.count));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
+ if (*r->out.count < 0 || *r->out.count > 1023) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.infos));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC_N(ndr, r->out.infos, ndr_get_array_size(ndr, &r->out.infos));
+ }
+ _mem_save_infos_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.infos, 0);
+ for (cntr_infos_1 = 0; cntr_infos_1 < *r->out.count; cntr_infos_1++) {
+ NDR_CHECK(ndr_pull_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_1]));
+ }
+ for (cntr_infos_1 = 0; cntr_infos_1 < *r->out.count; cntr_infos_1++) {
+ NDR_CHECK(ndr_pull_unixinfo_GetPWUidInfo(ndr, NDR_BUFFERS, &r->out.infos[cntr_infos_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_infos_1, 0);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.infos) {
+ if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.infos, *r->out.count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GetPWUid *r)
+{
+ uint32_t cntr_uids_0;
+ uint32_t cntr_infos_1;
+ ndr_print_struct(ndr, name, "unixinfo_GetPWUid");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "unixinfo_GetPWUid");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "count", r->in.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->in.count);
+ ndr->depth--;
+ ndr->print(ndr, "%s: ARRAY(%d)", "uids", *r->in.count);
+ ndr->depth++;
+ for (cntr_uids_0=0;cntr_uids_0<*r->in.count;cntr_uids_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_uids_0);
+ if (idx_0) {
+ ndr_print_hyper(ndr, "uids", r->in.uids[cntr_uids_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "unixinfo_GetPWUid");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "count", r->out.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->out.count);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "infos", r->out.infos);
+ ndr->depth++;
+ ndr->print(ndr, "%s: ARRAY(%d)", "infos", *r->out.count);
+ ndr->depth++;
+ for (cntr_infos_1=0;cntr_infos_1<*r->out.count;cntr_infos_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_infos_1);
+ if (idx_1) {
+ ndr_print_unixinfo_GetPWUidInfo(ndr, "infos", &r->out.infos[cntr_infos_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+