/* parser auto-generated by pidl */

#include "replace.h"
#include "bin/default/librpc/gen_ndr/ndr_unixinfo.h"

#include "librpc/gen_ndr/ndr_security.h"
static enum ndr_err_code ndr_push_unixinfo_GetPWUidInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct unixinfo_GetPWUidInfo *r)
{
	NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->shell, CH_UTF8)));
		NDR_CHECK(ndr_push_align(ndr, 4));
		NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
		NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->homedir, CH_UTF8)));
		NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
		NDR_CHECK(ndr_push_uint3264(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));
		NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
		NDR_CHECK(ndr_push_uint3264(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));
		NDR_CHECK(ndr_push_trailer_align(ndr, 4));
	}
	if (ndr_flags & NDR_BUFFERS) {
	}
	return NDR_ERR_SUCCESS;
}

static enum ndr_err_code ndr_pull_unixinfo_GetPWUidInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct unixinfo_GetPWUidInfo *r)
{
	uint32_t size_homedir_0 = 0;
	uint32_t length_homedir_0 = 0;
	uint32_t size_shell_0 = 0;
	uint32_t length_shell_0 = 0;
	NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_array_size(ndr, &r->shell));
		NDR_CHECK(ndr_pull_align(ndr, 4));
		NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
		NDR_CHECK(ndr_pull_array_size(ndr, &r->homedir));
		NDR_CHECK(ndr_pull_array_length(ndr, &r->homedir));
		NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->homedir, &size_homedir_0));
		NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->homedir, &length_homedir_0));
		if (length_homedir_0 > size_homedir_0) {
			return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_homedir_0, length_homedir_0);
		}
		NDR_CHECK(ndr_check_string_terminator(ndr, length_homedir_0, sizeof(uint8_t)));
		NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->homedir, length_homedir_0, sizeof(uint8_t), CH_UTF8));
		NDR_CHECK(ndr_pull_array_length(ndr, &r->shell));
		NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->shell, &size_shell_0));
		NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->shell, &length_shell_0));
		if (length_shell_0 > size_shell_0) {
			return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_shell_0, length_shell_0);
		}
		NDR_CHECK(ndr_check_string_terminator(ndr, length_shell_0, sizeof(uint8_t)));
		NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->shell, length_shell_0, sizeof(uint8_t), CH_UTF8));
		NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
	}
	if (ndr_flags & NDR_BUFFERS) {
	}
	return NDR_ERR_SUCCESS;
}

_PUBLIC_ void ndr_print_unixinfo_GetPWUidInfo(struct ndr_print *ndr, const char *name, const struct unixinfo_GetPWUidInfo *r)
{
	ndr_print_struct(ndr, name, "unixinfo_GetPWUidInfo");
	if (r == NULL) { ndr_print_null(ndr); return; }
	ndr->depth++;
	ndr_print_NTSTATUS(ndr, "status", r->status);
	ndr_print_string(ndr, "homedir", r->homedir);
	ndr_print_string(ndr, "shell", r->shell);
	ndr->depth--;
}

static enum ndr_err_code ndr_push_unixinfo_SidToUid(struct ndr_push *ndr, ndr_flags_type flags, const struct unixinfo_SidToUid *r)
{
	NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
	if (flags & NDR_IN) {
		NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->in.sid));
	}
	if (flags & NDR_OUT) {
		if (r->out.uid == NULL) {
			return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
		}
		NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.uid));
		NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
	}
	return NDR_ERR_SUCCESS;
}

static enum ndr_err_code ndr_pull_unixinfo_SidToUid(struct ndr_pull *ndr, ndr_flags_type flags, struct unixinfo_SidToUid *r)
{
	TALLOC_CTX *_mem_save_uid_0 = NULL;
	NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
	if (flags & NDR_IN) {
		NDR_ZERO_STRUCT(r->out);

		NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->in.sid));
		NDR_PULL_ALLOC(ndr, r->out.uid);
		NDR_ZERO_STRUCTP(r->out.uid);
	}
	if (flags & NDR_OUT) {
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
#endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
		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 NDR_ERR_SUCCESS;
}

_PUBLIC_ void ndr_print_unixinfo_SidToUid(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct unixinfo_SidToUid *r)
{
	ndr_print_struct(ndr, name, "unixinfo_SidToUid");
	if (r == NULL) { ndr_print_null(ndr); return; }
	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--;
}

static enum ndr_err_code ndr_push_unixinfo_UidToSid(struct ndr_push *ndr, ndr_flags_type flags, const struct unixinfo_UidToSid *r)
{
	NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
	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 ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
		}
		NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->out.sid));
		NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
	}
	return NDR_ERR_SUCCESS;
}

static enum ndr_err_code ndr_pull_unixinfo_UidToSid(struct ndr_pull *ndr, ndr_flags_type flags, struct unixinfo_UidToSid *r)
{
	TALLOC_CTX *_mem_save_sid_0 = NULL;
	NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
	if (flags & NDR_IN) {
		NDR_ZERO_STRUCT(r->out);

		NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uid));
		NDR_PULL_ALLOC(ndr, r->out.sid);
		NDR_ZERO_STRUCTP(r->out.sid);
	}
	if (flags & NDR_OUT) {
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
#endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
		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, 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 NDR_ERR_SUCCESS;
}

_PUBLIC_ void ndr_print_unixinfo_UidToSid(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct unixinfo_UidToSid *r)
{
	ndr_print_struct(ndr, name, "unixinfo_UidToSid");
	if (r == NULL) { ndr_print_null(ndr); return; }
	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--;
}

static enum ndr_err_code ndr_push_unixinfo_SidToGid(struct ndr_push *ndr, ndr_flags_type flags, const struct unixinfo_SidToGid *r)
{
	NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
	if (flags & NDR_IN) {
		NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->in.sid));
	}
	if (flags & NDR_OUT) {
		if (r->out.gid == NULL) {
			return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
		}
		NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.gid));
		NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
	}
	return NDR_ERR_SUCCESS;
}

static enum ndr_err_code ndr_pull_unixinfo_SidToGid(struct ndr_pull *ndr, ndr_flags_type flags, struct unixinfo_SidToGid *r)
{
	TALLOC_CTX *_mem_save_gid_0 = NULL;
	NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
	if (flags & NDR_IN) {
		NDR_ZERO_STRUCT(r->out);

		NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->in.sid));
		NDR_PULL_ALLOC(ndr, r->out.gid);
		NDR_ZERO_STRUCTP(r->out.gid);
	}
	if (flags & NDR_OUT) {
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
#endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
		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 NDR_ERR_SUCCESS;
}

_PUBLIC_ void ndr_print_unixinfo_SidToGid(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct unixinfo_SidToGid *r)
{
	ndr_print_struct(ndr, name, "unixinfo_SidToGid");
	if (r == NULL) { ndr_print_null(ndr); return; }
	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--;
}

static enum ndr_err_code ndr_push_unixinfo_GidToSid(struct ndr_push *ndr, ndr_flags_type flags, const struct unixinfo_GidToSid *r)
{
	NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
	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 ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
		}
		NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->out.sid));
		NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
	}
	return NDR_ERR_SUCCESS;
}

static enum ndr_err_code ndr_pull_unixinfo_GidToSid(struct ndr_pull *ndr, ndr_flags_type flags, struct unixinfo_GidToSid *r)
{
	TALLOC_CTX *_mem_save_sid_0 = NULL;
	NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
	if (flags & NDR_IN) {
		NDR_ZERO_STRUCT(r->out);

		NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.gid));
		NDR_PULL_ALLOC(ndr, r->out.sid);
		NDR_ZERO_STRUCTP(r->out.sid);
	}
	if (flags & NDR_OUT) {
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
#endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
		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, 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 NDR_ERR_SUCCESS;
}

_PUBLIC_ void ndr_print_unixinfo_GidToSid(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct unixinfo_GidToSid *r)
{
	ndr_print_struct(ndr, name, "unixinfo_GidToSid");
	if (r == NULL) { ndr_print_null(ndr); return; }
	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--;
}

static enum ndr_err_code ndr_push_unixinfo_GetPWUid(struct ndr_push *ndr, ndr_flags_type flags, const struct unixinfo_GetPWUid *r)
{
	uint32_t cntr_uids_0;
	uint32_t cntr_infos_0;
	NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
	if (flags & NDR_IN) {
		if (r->in.count == NULL) {
			return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
		}
		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
		NDR_CHECK(ndr_push_uint3264(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 ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
		}
		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
		NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.count));
		for (cntr_infos_0 = 0; cntr_infos_0 < (*r->out.count); cntr_infos_0++) {
			NDR_CHECK(ndr_push_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_0]));
		}
		NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
	}
	return NDR_ERR_SUCCESS;
}

static enum ndr_err_code ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, ndr_flags_type flags, struct unixinfo_GetPWUid *r)
{
	uint32_t size_uids_0 = 0;
	uint32_t cntr_uids_0;
	uint32_t size_infos_0 = 0;
	uint32_t cntr_infos_0;
	TALLOC_CTX *_mem_save_count_0 = NULL;
	TALLOC_CTX *_mem_save_uids_0 = NULL;
	TALLOC_CTX *_mem_save_infos_0 = NULL;
	NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
	if (flags & NDR_IN) {
		NDR_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 > 1023) {
			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(*r->in.count), (uint32_t)(0), (uint32_t)(1023));
		}
		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_CHECK(ndr_get_array_size(ndr, (void*)&r->in.uids, &size_uids_0));
		NDR_PULL_ALLOC_N(ndr, r->in.uids, size_uids_0);
		_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 < (size_uids_0); 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.uids) {
			NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.uids, *r->in.count));
		}
	}
	if (flags & NDR_OUT) {
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
		if (r->in.count == NULL) {
			NDR_PULL_ALLOC(ndr, r->in.count);
			NDR_ZERO_STRUCTP(r->in.count);
		}
#endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
		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 > 1023) {
			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(*r->out.count), (uint32_t)(0), (uint32_t)(1023));
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_array_size(ndr, &r->out.infos));
		NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.infos, &size_infos_0));
		NDR_PULL_ALLOC_N(ndr, r->out.infos, size_infos_0);
		_mem_save_infos_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.infos, 0);
		for (cntr_infos_0 = 0; cntr_infos_0 < (size_infos_0); cntr_infos_0++) {
			NDR_CHECK(ndr_pull_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_0]));
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_infos_0, 0);
		NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
		if (r->out.infos) {
			NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.infos, *r->out.count));
		}
	}
	return NDR_ERR_SUCCESS;
}

_PUBLIC_ void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct unixinfo_GetPWUid *r)
{
	uint32_t cntr_uids_0;
	uint32_t cntr_infos_0;
	ndr_print_struct(ndr, name, "unixinfo_GetPWUid");
	if (r == NULL) { ndr_print_null(ndr); return; }
	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(%"PRIu32")", "uids", (uint32_t)(*r->in.count));
		ndr->depth++;
		for (cntr_uids_0 = 0; cntr_uids_0 < (*r->in.count); cntr_uids_0++) {
			ndr_print_hyper(ndr, "uids", r->in.uids[cntr_uids_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(ndr, "%s: ARRAY(%"PRIu32")", "infos", (uint32_t)(*r->out.count));
		ndr->depth++;
		for (cntr_infos_0 = 0; cntr_infos_0 < (*r->out.count); cntr_infos_0++) {
			ndr_print_unixinfo_GetPWUidInfo(ndr, "infos", &r->out.infos[cntr_infos_0]);
		}
		ndr->depth--;
		ndr_print_NTSTATUS(ndr, "result", r->out.result);
		ndr->depth--;
	}
	ndr->depth--;
}

#ifndef SKIP_NDR_TABLE_unixinfo
static const struct ndr_interface_public_struct unixinfo_public_structs[] = {
	{ .name = NULL }
};

static const struct ndr_interface_call unixinfo_calls[] = {
	{
		"unixinfo_SidToUid",
		sizeof(struct unixinfo_SidToUid),
		(ndr_push_flags_fn_t) ndr_push_unixinfo_SidToUid,
		(ndr_pull_flags_fn_t) ndr_pull_unixinfo_SidToUid,
		(ndr_print_function_t) ndr_print_unixinfo_SidToUid,
		{ 0, NULL },
		{ 0, NULL },
	},
	{
		"unixinfo_UidToSid",
		sizeof(struct unixinfo_UidToSid),
		(ndr_push_flags_fn_t) ndr_push_unixinfo_UidToSid,
		(ndr_pull_flags_fn_t) ndr_pull_unixinfo_UidToSid,
		(ndr_print_function_t) ndr_print_unixinfo_UidToSid,
		{ 0, NULL },
		{ 0, NULL },
	},
	{
		"unixinfo_SidToGid",
		sizeof(struct unixinfo_SidToGid),
		(ndr_push_flags_fn_t) ndr_push_unixinfo_SidToGid,
		(ndr_pull_flags_fn_t) ndr_pull_unixinfo_SidToGid,
		(ndr_print_function_t) ndr_print_unixinfo_SidToGid,
		{ 0, NULL },
		{ 0, NULL },
	},
	{
		"unixinfo_GidToSid",
		sizeof(struct unixinfo_GidToSid),
		(ndr_push_flags_fn_t) ndr_push_unixinfo_GidToSid,
		(ndr_pull_flags_fn_t) ndr_pull_unixinfo_GidToSid,
		(ndr_print_function_t) ndr_print_unixinfo_GidToSid,
		{ 0, NULL },
		{ 0, NULL },
	},
	{
		"unixinfo_GetPWUid",
		sizeof(struct unixinfo_GetPWUid),
		(ndr_push_flags_fn_t) ndr_push_unixinfo_GetPWUid,
		(ndr_pull_flags_fn_t) ndr_pull_unixinfo_GetPWUid,
		(ndr_print_function_t) ndr_print_unixinfo_GetPWUid,
		{ 0, NULL },
		{ 0, NULL },
	},
	{ .name = NULL }
};

static const char * const unixinfo_endpoint_strings[] = {
	"ncacn_np:[\\pipe\\unixinfo]", 
	"ncacn_ip_tcp:", 
	"ncalrpc:", 
};

static const struct ndr_interface_string_array unixinfo_endpoints = {
	.count	= 3,
	.names	= unixinfo_endpoint_strings
};

static const char * const unixinfo_authservice_strings[] = {
	"host", 
};

static const struct ndr_interface_string_array unixinfo_authservices = {
	.count	= 1,
	.names	= unixinfo_authservice_strings
};


const struct ndr_interface_table ndr_table_unixinfo = {
	.name		= "unixinfo",
	.syntax_id	= {
		{0x9c54e310,0xa955,0x4885,{0xbd,0x31},{0x78,0x78,0x71,0x47,0xdf,0xa6}},
		NDR_UNIXINFO_VERSION
	},
	.helpstring	= NDR_UNIXINFO_HELPSTRING,
	.num_calls	= 5,
	.calls		= unixinfo_calls,
	.num_public_structs	= 0,
	.public_structs		= unixinfo_public_structs,
	.endpoints	= &unixinfo_endpoints,
	.authservices	= &unixinfo_authservices
};

#endif /* SKIP_NDR_TABLE_unixinfo */
