コード例 #1
0
ファイル: ndr_echo.c プロジェクト: jameshilliard/WECB-BH-GPL
static enum ndr_err_code ndr_pull_echo_TestSurrounding(struct ndr_pull *ndr, int flags, struct echo_TestSurrounding *r)
{
	TALLOC_CTX *_mem_save_data_0;
	if (flags & NDR_IN) {
		ZERO_STRUCT(r->out);

		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->in.data);
		}
		_mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_echo_Surrounding(ndr, NDR_SCALARS, r->in.data));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
		NDR_PULL_ALLOC(ndr, r->out.data);
		*r->out.data = *r->in.data;
	}
	if (flags & NDR_OUT) {
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.data);
		}
		_mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.data, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_echo_Surrounding(ndr, NDR_SCALARS, r->out.data));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
	}
	return NDR_ERR_SUCCESS;
}
コード例 #2
0
ファイル: ndr_rot.c プロジェクト: nikatshun/asuswrt-merlin
static enum ndr_err_code ndr_pull_rot_get_modification_time(struct ndr_pull *ndr, int flags, struct rot_get_modification_time *r)
{
	TALLOC_CTX *_mem_save_moniker_0;
	TALLOC_CTX *_mem_save_t_0;
	if (flags & NDR_IN) {
		ZERO_STRUCT(r->out);

		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->in.moniker);
		}
		_mem_save_moniker_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->in.moniker, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.moniker));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_moniker_0, LIBNDR_FLAG_REF_ALLOC);
		NDR_PULL_ALLOC(ndr, r->out.t);
		ZERO_STRUCTP(r->out.t);
	}
	if (flags & NDR_OUT) {
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.t);
		}
		_mem_save_t_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.t, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, r->out.t));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_t_0, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
	}
	return NDR_ERR_SUCCESS;
}
コード例 #3
0
ファイル: ndr_drsblobs.c プロジェクト: AllardJ/Tomato
_PUBLIC_ enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r)
{
	uint32_t _ptr_current;
	TALLOC_CTX *_mem_save_current_0;
	uint32_t _ptr_previous;
	TALLOC_CTX *_mem_save_previous_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 4));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_current));
		if (_ptr_current) {
			NDR_PULL_ALLOC(ndr, r->current);
			NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->current, _ptr_current));
		} else {
			r->current = NULL;
		}
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_previous));
		if (_ptr_previous) {
			NDR_PULL_ALLOC(ndr, r->previous);
			NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->previous, _ptr_previous));
		} else {
			r->previous = NULL;
		}
	}
	if (ndr_flags & NDR_BUFFERS) {
		if (r->current) {
			uint32_t _relative_save_offset;
			_relative_save_offset = ndr->offset;
			NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->current));
			_mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
			NDR_CHECK(ndr_pull_AuthenticationInformationArray_with_count(ndr, NDR_SCALARS|NDR_BUFFERS, r->count, r->current));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
			ndr->offset = _relative_save_offset;
		}
		if (r->previous) {
			uint32_t _relative_save_offset;
			_relative_save_offset = ndr->offset;
			NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->previous));
			_mem_save_previous_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->previous, 0);
			NDR_CHECK(ndr_pull_AuthenticationInformationArray_with_count(ndr, NDR_SCALARS|NDR_BUFFERS, r->count, r->previous));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_0, 0);
			ndr->offset = _relative_save_offset;
		}
	}
	return NDR_ERR_SUCCESS;
}
コード例 #4
0
static enum ndr_err_code ndr_pull_PAC_LOGON_INFO(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO *r)
{
	uint32_t _ptr_res_group_dom_sid;
	TALLOC_CTX *_mem_save_res_group_dom_sid_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 4));
		NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3));
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_res_group_dom_sid));
		if (_ptr_res_group_dom_sid) {
			NDR_PULL_ALLOC(ndr, r->res_group_dom_sid);
		} else {
			r->res_group_dom_sid = NULL;
		}
		NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->res_groups));
	}
	if (ndr_flags & NDR_BUFFERS) {
		NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3));
		if (r->res_group_dom_sid) {
			_mem_save_res_group_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->res_group_dom_sid, 0);
			NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->res_group_dom_sid));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_res_group_dom_sid_0, 0);
		}
		NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->res_groups));
	}
	return NDR_ERR_SUCCESS;
}
コード例 #5
0
ファイル: ndr_dcom.c プロジェクト: hanwoody/winexe
NTSTATUS ndr_pull_WbemQualifiers(struct ndr_pull *ndr, int ndr_flags, struct WbemQualifiers *r)
{
	uint32_t endofs;
	uint32_t len;
	TALLOC_CTX *mem_ctx;

	mem_ctx = ndr->current_mem_ctx;

        if (ndr_flags & NDR_SCALARS) {
	        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &endofs));
		endofs += ndr->offset - 4;

		r->count = 0;
		len = 10;
		r->item = talloc_array(mem_ctx, struct WbemQualifier*, len);
		ndr->current_mem_ctx = r->item;
		while (ndr->offset < endofs) {
			if (r->count >= len) {
				len += 3;
				r->item = talloc_realloc(mem_ctx, r->item, struct WbemQualifier*, len);
			}
			NDR_PULL_ALLOC(ndr, r->item[r->count]);
			NDR_CHECK(ndr_pull_WbemQualifier(ndr, NDR_SCALARS, r->item[r->count]));
			++r->count;
		}
コード例 #6
0
ファイル: ndr_perfcount.c プロジェクト: Alexandr-Galko/samba
_PUBLIC_ enum ndr_err_code ndr_pull_PERF_INSTANCE_DEFINITION(struct ndr_pull *ndr, int ndr_flags, struct PERF_INSTANCE_DEFINITION *r)
{
	uint32_t _ptr_data;
	TALLOC_CTX *_mem_save_data_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 5));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ByteLength));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ParentObjectTitleIndex));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ParentObjectTitlePointer));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->UniqueID));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->NameOffset));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->NameLength));
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
		if (_ptr_data) {
			NDR_PULL_ALLOC(ndr, r->data);
		} else {
			r->data = NULL;
		}
		NDR_CHECK(ndr_pull_PERF_COUNTER_BLOCK(ndr, NDR_SCALARS, &r->counter_data));
		NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
	}
	if (ndr_flags & NDR_BUFFERS) {
		if (r->data) {
			_mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
			NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->data));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
		}
	}
	return NDR_ERR_SUCCESS;
}
コード例 #7
0
_PUBLIC_ enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO_CTR *r)
{
	uint32_t _ptr_info;
	TALLOC_CTX *_mem_save_info_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 4));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
		if (_ptr_info) {
			NDR_PULL_ALLOC(ndr, r->info);
		} else {
			r->info = NULL;
		}
	}
	if (ndr_flags & NDR_BUFFERS) {
		if (r->info) {
			_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
			NDR_CHECK(ndr_pull_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
		}
	}
	return NDR_ERR_SUCCESS;
}
コード例 #8
0
ファイル: ndr_security.c プロジェクト: AllardJ/Tomato
_PUBLIC_ enum ndr_err_code ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_desc_buf *r)
{
	uint32_t _ptr_sd;
	TALLOC_CTX *_mem_save_sd_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 5));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sd_size));
		if (r->sd_size > 0x40000) {
			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
		}
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd));
		if (_ptr_sd) {
			NDR_PULL_ALLOC(ndr, r->sd);
		} else {
			r->sd = NULL;
		}
		NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
	}
	if (ndr_flags & NDR_BUFFERS) {
		if (r->sd) {
			_mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->sd, 0);
			{
				struct ndr_pull *_ndr_sd;
				NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sd, 4, -1));
				NDR_CHECK(ndr_pull_security_descriptor(_ndr_sd, NDR_SCALARS|NDR_BUFFERS, r->sd));
				NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sd, 4, -1));
			}
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, 0);
		}
	}
	return NDR_ERR_SUCCESS;
}
コード例 #9
0
static enum ndr_err_code ndr_pull_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleGetPrimaryDomainInformation *r)
{
	uint32_t _ptr_info;
	TALLOC_CTX *_mem_save_info_0;
	if (flags & NDR_IN) {
		ZERO_STRUCT(r->out);

		NDR_CHECK(ndr_pull_dssetup_DsRoleInfoLevel(ndr, NDR_SCALARS, &r->in.level));
	}
	if (flags & NDR_OUT) {
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
		if (_ptr_info) {
			NDR_PULL_ALLOC(ndr, r->out.info);
		} else {
			r->out.info = NULL;
		}
		if (r->out.info) {
			_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
			NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
			NDR_CHECK(ndr_pull_dssetup_DsRoleInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
		}
		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
	}
	return NDR_ERR_SUCCESS;
}
コード例 #10
0
ファイル: ndr_echo.c プロジェクト: jameshilliard/WECB-BH-GPL
static enum ndr_err_code ndr_pull_echo_TestCall(struct ndr_pull *ndr, int flags, struct echo_TestCall *r)
{
	uint32_t _ptr_s2;
	TALLOC_CTX *_mem_save_s2_0;
	TALLOC_CTX *_mem_save_s2_1;
	if (flags & NDR_IN) {
		ZERO_STRUCT(r->out);

		NDR_CHECK(ndr_pull_array_size(ndr, &r->in.s1));
		NDR_CHECK(ndr_pull_array_length(ndr, &r->in.s1));
		if (ndr_get_array_length(ndr, &r->in.s1) > ndr_get_array_size(ndr, &r->in.s1)) {
			return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.s1), ndr_get_array_length(ndr, &r->in.s1));
		}
		NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.s1), sizeof(uint16_t)));
		NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.s1, ndr_get_array_length(ndr, &r->in.s1), sizeof(uint16_t), CH_UTF16));
		NDR_PULL_ALLOC(ndr, r->out.s2);
		ZERO_STRUCTP(r->out.s2);
	}
	if (flags & NDR_OUT) {
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.s2);
		}
		_mem_save_s2_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.s2, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s2));
		if (_ptr_s2) {
			NDR_PULL_ALLOC(ndr, *r->out.s2);
		} else {
			*r->out.s2 = NULL;
		}
		if (*r->out.s2) {
			_mem_save_s2_1 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, *r->out.s2, 0);
			NDR_CHECK(ndr_pull_array_size(ndr, r->out.s2));
			NDR_CHECK(ndr_pull_array_length(ndr, r->out.s2));
			if (ndr_get_array_length(ndr, r->out.s2) > ndr_get_array_size(ndr, r->out.s2)) {
				return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.s2), ndr_get_array_length(ndr, r->out.s2));
			}
			NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.s2), sizeof(uint16_t)));
			NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.s2, ndr_get_array_length(ndr, r->out.s2), sizeof(uint16_t), CH_UTF16));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s2_1, 0);
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s2_0, LIBNDR_FLAG_REF_ALLOC);
	}
	return NDR_ERR_SUCCESS;
}
コード例 #11
0
ファイル: ndr_echo.c プロジェクト: jameshilliard/WECB-BH-GPL
static enum ndr_err_code ndr_pull_echo_TestDoublePointer(struct ndr_pull *ndr, int flags, struct echo_TestDoublePointer *r)
{
	uint32_t _ptr_data;
	TALLOC_CTX *_mem_save_data_0;
	TALLOC_CTX *_mem_save_data_1;
	TALLOC_CTX *_mem_save_data_2;
	if (flags & NDR_IN) {
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->in.data);
		}
		_mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
		if (_ptr_data) {
			NDR_PULL_ALLOC(ndr, *r->in.data);
		} else {
			*r->in.data = NULL;
		}
		if (*r->in.data) {
			_mem_save_data_1 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, *r->in.data, 0);
			NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
			if (_ptr_data) {
				NDR_PULL_ALLOC(ndr, **r->in.data);
			} else {
				**r->in.data = NULL;
			}
			if (**r->in.data) {
				_mem_save_data_2 = NDR_PULL_GET_MEM_CTX(ndr);
				NDR_PULL_SET_MEM_CTX(ndr, **r->in.data, 0);
				NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, **r->in.data));
				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_2, 0);
			}
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_1, 0);
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
	}
	if (flags & NDR_OUT) {
		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.result));
	}
	return NDR_ERR_SUCCESS;
}
コード例 #12
0
static enum ndr_err_code ndr_pull_initshutdown_InitEx(struct ndr_pull *ndr, int flags, struct initshutdown_InitEx *r)
{
	uint32_t _ptr_hostname;
	uint32_t _ptr_message;
	TALLOC_CTX *_mem_save_hostname_0;
	TALLOC_CTX *_mem_save_message_0;
	if (flags & NDR_IN) {
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hostname));
		if (_ptr_hostname) {
			NDR_PULL_ALLOC(ndr, r->in.hostname);
		} else {
			r->in.hostname = NULL;
		}
		if (r->in.hostname) {
			_mem_save_hostname_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->in.hostname, 0);
			NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.hostname));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hostname_0, 0);
		}
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_message));
		if (_ptr_message) {
			NDR_PULL_ALLOC(ndr, r->in.message);
		} else {
			r->in.message = NULL;
		}
		if (r->in.message) {
			_mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
			NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
		}
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
		NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.force_apps));
		NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.do_reboot));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reason));
	}
	if (flags & NDR_OUT) {
		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
	}
	return NDR_ERR_SUCCESS;
}
コード例 #13
0
ファイル: ndr_frsapi.c プロジェクト: nikatshun/asuswrt-merlin
static enum ndr_err_code ndr_pull_frsapi_InfoW(struct ndr_pull *ndr, int flags, struct frsapi_InfoW *r)
{
	uint32_t _ptr_info;
	TALLOC_CTX *_mem_save_info_0;
	if (flags & NDR_IN) {
		ZERO_STRUCT(r->out);

		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.length));
		if (r->in.length > 0x10000) {
			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
		}
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
		if (_ptr_info) {
			NDR_PULL_ALLOC(ndr, r->in.info);
		} else {
			r->in.info = NULL;
		}
		if (r->in.info) {
			_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
			NDR_CHECK(ndr_pull_frsapi_Info(ndr, NDR_SCALARS, r->in.info));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
		}
	}
	if (flags & NDR_OUT) {
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
		if (_ptr_info) {
			NDR_PULL_ALLOC(ndr, r->out.info);
		} else {
			r->out.info = NULL;
		}
		if (r->out.info) {
			_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
			NDR_CHECK(ndr_pull_frsapi_Info(ndr, NDR_SCALARS, r->out.info));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
		}
		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
	}
	return NDR_ERR_SUCCESS;
}
コード例 #14
0
ファイル: ndr_echo.c プロジェクト: jameshilliard/WECB-BH-GPL
static enum ndr_err_code ndr_pull_echo_AddOne(struct ndr_pull *ndr, int flags, struct echo_AddOne *r)
{
	TALLOC_CTX *_mem_save_out_data_0;
	if (flags & NDR_IN) {
		ZERO_STRUCT(r->out);

		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.in_data));
		NDR_PULL_ALLOC(ndr, r->out.out_data);
		ZERO_STRUCTP(r->out.out_data);
	}
	if (flags & NDR_OUT) {
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.out_data);
		}
		_mem_save_out_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.out_data, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.out_data));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_out_data_0, LIBNDR_FLAG_REF_ALLOC);
	}
	return NDR_ERR_SUCCESS;
}
コード例 #15
0
ファイル: ndr_krb5pac.c プロジェクト: Alexander--/samba
enum ndr_err_code ndr_pull_PAC_BUFFER(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER *r)
{
	uint32_t _ptr_info;
	TALLOC_CTX *_mem_save_info_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 4));
		NDR_CHECK(ndr_pull_PAC_TYPE(ndr, NDR_SCALARS, &r->type));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
		{
			uint32_t _flags_save_PAC_INFO = ndr->flags;
			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
			NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
			if (_ptr_info) {
				NDR_PULL_ALLOC(ndr, r->info);
				NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->info, _ptr_info));
			} else {
				r->info = NULL;
			}
			ndr->flags = _flags_save_PAC_INFO;
		}
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad));
	}
	if (ndr_flags & NDR_BUFFERS) {
		{
			uint32_t _flags_save_PAC_INFO = ndr->flags;
			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
			if (r->info) {
				uint32_t _relative_save_offset;
				_relative_save_offset = ndr->offset;
				NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->info));
				_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
				NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
				{
					struct ndr_pull *_ndr_info_pad;
					struct ndr_pull *_ndr_info;
					NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info_pad, 0, NDR_ROUND(r->_ndr_size, 8)));
					NDR_CHECK(ndr_pull_subcontext_start(_ndr_info_pad, &_ndr_info, 0, r->_ndr_size));
					NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->info, r->type));
					NDR_CHECK(ndr_pull_PAC_INFO(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->info));
					NDR_CHECK(ndr_pull_subcontext_end(_ndr_info_pad, _ndr_info, 0, r->_ndr_size));
					NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info_pad, 0, NDR_ROUND(r->_ndr_size, 8)));
				}
				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
				if (ndr->offset > ndr->relative_highest_offset) {
					ndr->relative_highest_offset = ndr->offset;
				}
				ndr->offset = _relative_save_offset;
			}
			ndr->flags = _flags_save_PAC_INFO;
		}
	}
	return NDR_ERR_SUCCESS;
}
コード例 #16
0
ファイル: ndr_rot.c プロジェクト: nikatshun/asuswrt-merlin
static enum ndr_err_code ndr_pull_rot_add(struct ndr_pull *ndr, int flags, struct rot_add *r)
{
	TALLOC_CTX *_mem_save_unk_0;
	TALLOC_CTX *_mem_save_moniker_0;
	TALLOC_CTX *_mem_save_rotid_0;
	if (flags & NDR_IN) {
		ZERO_STRUCT(r->out);

		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->in.unk);
		}
		_mem_save_unk_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->in.unk, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.unk));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unk_0, LIBNDR_FLAG_REF_ALLOC);
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->in.moniker);
		}
		_mem_save_moniker_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->in.moniker, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.moniker));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_moniker_0, LIBNDR_FLAG_REF_ALLOC);
		NDR_PULL_ALLOC(ndr, r->out.rotid);
		ZERO_STRUCTP(r->out.rotid);
	}
	if (flags & NDR_OUT) {
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.rotid);
		}
		_mem_save_rotid_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.rotid, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rotid));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rotid_0, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
	}
	return NDR_ERR_SUCCESS;
}
コード例 #17
0
ファイル: ndr_witness.c プロジェクト: miguelinux/samba
_PUBLIC_ enum ndr_err_code ndr_pull_witness_notifyResponse(struct ndr_pull *ndr, int ndr_flags, struct witness_notifyResponse *r)
{
    uint32_t _flags_save_STRUCT = ndr->flags;
    ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    if (ndr_flags & NDR_SCALARS) {
        NDR_CHECK(ndr_pull_align(ndr, 4));
        NDR_CHECK(ndr_pull_witness_notifyResponse_type(ndr, NDR_SCALARS, &r->type));
        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num));
        {
            uint32_t _flags_save_witness_notifyResponse_message = ndr->flags;
            uint32_t _ptr_messages;
            ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
            NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_messages));
            if (_ptr_messages) {
                NDR_PULL_ALLOC(ndr, r->messages);
            } else {
                r->messages = NULL;
            }
            if (r->messages) {
                uint32_t size_messages_0 = 0;
                uint32_t cntr_messages_0;
                TALLOC_CTX *_mem_save_messages_0;

                size_messages_0 = r->num;
                NDR_PULL_ALLOC_N(ndr, r->messages, size_messages_0);
                _mem_save_messages_0 = NDR_PULL_GET_MEM_CTX(ndr);
                NDR_PULL_SET_MEM_CTX(ndr, r->messages, 0);
                {
                    struct ndr_pull *_ndr_messages;
                    NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_messages, 4, r->length));
                    for (cntr_messages_0 = 0; cntr_messages_0 < (size_messages_0); cntr_messages_0++) {
                        NDR_CHECK(ndr_pull_set_switch_value(_ndr_messages, &r->messages[cntr_messages_0], r->type));
                        NDR_CHECK(ndr_pull_witness_notifyResponse_message(_ndr_messages, NDR_SCALARS, &r->messages[cntr_messages_0]));
                    }
                    NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_messages, 4, r->length));
                }
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_messages_0, 0);
            }
            ndr->flags = _flags_save_witness_notifyResponse_message;
        }
        NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    }
    if (ndr_flags & NDR_BUFFERS) {
    }
    ndr->flags = _flags_save_STRUCT;

    return NDR_ERR_SUCCESS;
}
コード例 #18
0
ファイル: ndr_echo.c プロジェクト: jameshilliard/WECB-BH-GPL
static enum ndr_err_code ndr_pull_echo_TestCall2(struct ndr_pull *ndr, int flags, struct echo_TestCall2 *r)
{
	TALLOC_CTX *_mem_save_info_0;
	if (flags & NDR_IN) {
		ZERO_STRUCT(r->out);

		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
		NDR_PULL_ALLOC(ndr, r->out.info);
		ZERO_STRUCTP(r->out.info);
	}
	if (flags & NDR_OUT) {
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.info);
		}
		_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
		NDR_CHECK(ndr_pull_echo_Info(ndr, NDR_SCALARS, r->out.info));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
	}
	return NDR_ERR_SUCCESS;
}
コード例 #19
0
ファイル: ndr_rot.c プロジェクト: nikatshun/asuswrt-merlin
static enum ndr_err_code ndr_pull_rot_is_listed(struct ndr_pull *ndr, int flags, struct rot_is_listed *r)
{
	TALLOC_CTX *_mem_save_moniker_0;
	if (flags & NDR_IN) {
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->in.moniker);
		}
		_mem_save_moniker_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->in.moniker, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.moniker));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_moniker_0, LIBNDR_FLAG_REF_ALLOC);
	}
	if (flags & NDR_OUT) {
		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
	}
	return NDR_ERR_SUCCESS;
}
コード例 #20
0
ファイル: ndr_rot.c プロジェクト: nikatshun/asuswrt-merlin
static enum ndr_err_code ndr_pull_rot_set_modification_time(struct ndr_pull *ndr, int flags, struct rot_set_modification_time *r)
{
	TALLOC_CTX *_mem_save_t_0;
	if (flags & NDR_IN) {
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rotid));
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->in.t);
		}
		_mem_save_t_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->in.t, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, r->in.t));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_t_0, LIBNDR_FLAG_REF_ALLOC);
	}
	if (flags & NDR_OUT) {
		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
	}
	return NDR_ERR_SUCCESS;
}
コード例 #21
0
ファイル: ndr_ntprinting.c プロジェクト: Alexandr-Galko/samba
_PUBLIC_ enum ndr_err_code ndr_pull_ntprinting_printer(struct ndr_pull *ndr, int ndr_flags, struct ntprinting_printer *r)
{
	uint32_t _ptr_devmode;
	TALLOC_CTX *_mem_save_devmode_0;
	{
		uint32_t _flags_save_STRUCT = ndr->flags;
		ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
		if (ndr_flags & NDR_SCALARS) {
			NDR_CHECK(ndr_pull_align(ndr, 5));
			NDR_CHECK(ndr_pull_ntprinting_printer_info(ndr, NDR_SCALARS, &r->info));
			NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
			if (_ptr_devmode) {
				NDR_PULL_ALLOC(ndr, r->devmode);
			} else {
				r->devmode = NULL;
			}
		}
		if (ndr_flags & NDR_BUFFERS) {
			if (r->devmode) {
				_mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
				NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
				NDR_CHECK(ndr_pull_ntprinting_devicemode(ndr, NDR_SCALARS|NDR_BUFFERS, r->devmode));
				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
			}
		}
		if (ndr_flags & NDR_SCALARS) {
			r->count = 0;
			NDR_PULL_ALLOC_N(ndr, r->printer_data, r->count);
			while (ndr->offset + 4 <= ndr->data_size) {
				uint32_t ptr = 0;
				ptr = IVAL(ndr->data, ndr->offset);
				if (ptr == 0) {
					break;
				}
				r->printer_data = talloc_realloc(ndr, r->printer_data, struct ntprinting_printer_data, r->count + 1);
				NDR_ERR_HAVE_NO_MEMORY(r->printer_data);
				NDR_CHECK(ndr_pull_ntprinting_printer_data(ndr, NDR_SCALARS, &r->printer_data[r->count]));
				r->count++;
			}
			NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
		}
		ndr->flags = _flags_save_STRUCT;
	}
コード例 #22
0
ファイル: ndr_dcom.c プロジェクト: hanwoody/winexe
_PUBLIC_ NTSTATUS ndr_pull_WbemQualifier(struct ndr_pull *ndr, int ndr_flags, struct WbemQualifier *r)
{
        uint32_t _ptr_name;
        TALLOC_CTX *_mem_save_name_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
                if (_ptr_name != 0xFFFFFFFF) {
                        NDR_PULL_ALLOC(ndr, r->name);
                        NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->name, _ptr_name));
                } else {
                        r->name = NULL;
                }
                NDR_CHECK(ndr_pull_WBEM_FLAVOR_TYPE(ndr, NDR_SCALARS, &r->flavors));
                NDR_CHECK(ndr_pull_CIMTYPE_ENUMERATION(ndr, NDR_SCALARS, &r->cimtype));
                NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->value, r->cimtype & CIM_TYPEMASK));
                NDR_CHECK(ndr_pull_CIMVAR(ndr, NDR_SCALARS, &r->value));
        }
        if (ndr_flags & NDR_BUFFERS) {
		uint32_t relofs;
		relofs = ndr_token_peek(&ndr->relative_list, r->name);
		if (relofs & 0x80000000) {
			relofs &= 0xFF;
			if ((relofs < sizeof(qualifier_keys)/sizeof(qualifier_keys[0])) && qualifier_keys[relofs]) {
				r->name = talloc_strdup(ndr->current_mem_ctx, qualifier_keys[relofs]);
			} else {
				r->name = talloc_asprintf(ndr->current_mem_ctx, "%s%d", qn_unknown, relofs);
			}
		} else if (r->name) {
                        struct ndr_pull_save _relative_save;
                        ndr_pull_save(ndr, &_relative_save);
                        NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->name));
                        _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
                        NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
                        NDR_CHECK(ndr_pull_CIMSTRING(ndr, NDR_SCALARS, &r->name));
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
                        ndr_pull_restore(ndr, &_relative_save);
                }
                NDR_CHECK(ndr_pull_CIMVAR(ndr, NDR_BUFFERS, &r->value));
        }
        return NT_STATUS_OK;
}
コード例 #23
0
static enum ndr_err_code ndr_pull_initshutdown_Abort(struct ndr_pull *ndr, int flags, struct initshutdown_Abort *r)
{
	uint32_t _ptr_server;
	TALLOC_CTX *_mem_save_server_0;
	if (flags & NDR_IN) {
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
		if (_ptr_server) {
			NDR_PULL_ALLOC(ndr, r->in.server);
		} else {
			r->in.server = NULL;
		}
		if (r->in.server) {
			_mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
			NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.server));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
		}
	}
	if (flags & NDR_OUT) {
		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
	}
	return NDR_ERR_SUCCESS;
}
コード例 #24
0
ファイル: ndr_xattr.c プロジェクト: gojdic/samba
_PUBLIC_ enum ndr_err_code ndr_pull_xattr_DosStreams(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosStreams *r)
{
	uint32_t _ptr_streams;
	uint32_t cntr_streams_1;
	TALLOC_CTX *_mem_save_streams_0;
	TALLOC_CTX *_mem_save_streams_1;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 4));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_streams));
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_streams));
		if (_ptr_streams) {
			NDR_PULL_ALLOC(ndr, r->streams);
		} else {
			r->streams = NULL;
		}
	}
	if (ndr_flags & NDR_BUFFERS) {
		if (r->streams) {
			_mem_save_streams_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->streams, 0);
			NDR_CHECK(ndr_pull_array_size(ndr, &r->streams));
			NDR_PULL_ALLOC_N(ndr, r->streams, ndr_get_array_size(ndr, &r->streams));
			_mem_save_streams_1 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->streams, 0);
			for (cntr_streams_1 = 0; cntr_streams_1 < r->num_streams; cntr_streams_1++) {
				NDR_CHECK(ndr_pull_xattr_DosStream(ndr, NDR_SCALARS, &r->streams[cntr_streams_1]));
			}
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_streams_1, 0);
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_streams_0, 0);
		}
		if (r->streams) {
			NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->streams, r->num_streams));
		}
	}
	return NDR_ERR_SUCCESS;
}
コード例 #25
0
ファイル: ndr_xattr.c プロジェクト: gojdic/samba
_PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor_hash(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor_hash *r)
{
	uint32_t _ptr_sd;
	TALLOC_CTX *_mem_save_sd_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 4));
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd));
		if (_ptr_sd) {
			NDR_PULL_ALLOC(ndr, r->sd);
		} else {
			r->sd = NULL;
		}
		NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
	}
	if (ndr_flags & NDR_BUFFERS) {
		if (r->sd) {
			_mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->sd, 0);
			NDR_CHECK(ndr_pull_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->sd));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, 0);
		}
	}
	return NDR_ERR_SUCCESS;
}
コード例 #26
0
ファイル: ndr_frsapi.c プロジェクト: nikatshun/asuswrt-merlin
static enum ndr_err_code ndr_pull_frsapi_GetDsPollingIntervalW(struct ndr_pull *ndr, int flags, struct frsapi_GetDsPollingIntervalW *r)
{
	TALLOC_CTX *_mem_save_CurrentInterval_0;
	TALLOC_CTX *_mem_save_DsPollingLongInterval_0;
	TALLOC_CTX *_mem_save_DsPollingShortInterval_0;
	if (flags & NDR_IN) {
		ZERO_STRUCT(r->out);

		NDR_PULL_ALLOC(ndr, r->out.CurrentInterval);
		ZERO_STRUCTP(r->out.CurrentInterval);
		NDR_PULL_ALLOC(ndr, r->out.DsPollingLongInterval);
		ZERO_STRUCTP(r->out.DsPollingLongInterval);
		NDR_PULL_ALLOC(ndr, r->out.DsPollingShortInterval);
		ZERO_STRUCTP(r->out.DsPollingShortInterval);
	}
	if (flags & NDR_OUT) {
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.CurrentInterval);
		}
		_mem_save_CurrentInterval_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.CurrentInterval, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.CurrentInterval));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_CurrentInterval_0, LIBNDR_FLAG_REF_ALLOC);
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.DsPollingLongInterval);
		}
		_mem_save_DsPollingLongInterval_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.DsPollingLongInterval, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.DsPollingLongInterval));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DsPollingLongInterval_0, LIBNDR_FLAG_REF_ALLOC);
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.DsPollingShortInterval);
		}
		_mem_save_DsPollingShortInterval_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.DsPollingShortInterval, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.DsPollingShortInterval));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DsPollingShortInterval_0, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
	}
	return NDR_ERR_SUCCESS;
}
コード例 #27
0
ファイル: ndr_security.c プロジェクト: AllardJ/Tomato
_PUBLIC_ enum ndr_err_code ndr_pull_security_token(struct ndr_pull *ndr, int ndr_flags, struct security_token *r)
{
	uint32_t _ptr_user_sid;
	TALLOC_CTX *_mem_save_user_sid_0;
	uint32_t _ptr_group_sid;
	TALLOC_CTX *_mem_save_group_sid_0;
	uint32_t _ptr_sids;
	uint32_t cntr_sids_0;
	TALLOC_CTX *_mem_save_sids_0;
	TALLOC_CTX *_mem_save_sids_1;
	uint32_t _ptr_default_dacl;
	TALLOC_CTX *_mem_save_default_dacl_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 5));
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_sid));
		if (_ptr_user_sid) {
			NDR_PULL_ALLOC(ndr, r->user_sid);
		} else {
			r->user_sid = NULL;
		}
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_sid));
		if (_ptr_group_sid) {
			NDR_PULL_ALLOC(ndr, r->group_sid);
		} else {
			r->group_sid = NULL;
		}
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
		NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
		NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
		_mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
		for (cntr_sids_0 = 0; cntr_sids_0 < r->num_sids; cntr_sids_0++) {
			NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
			if (_ptr_sids) {
				NDR_PULL_ALLOC(ndr, r->sids[cntr_sids_0]);
			} else {
				r->sids[cntr_sids_0] = NULL;
			}
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
		NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->privilege_mask));
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_dacl));
		if (_ptr_default_dacl) {
			NDR_PULL_ALLOC(ndr, r->default_dacl);
		} else {
			r->default_dacl = NULL;
		}
		if (r->sids) {
			NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
		}
		NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
	}
	if (ndr_flags & NDR_BUFFERS) {
		if (r->user_sid) {
			_mem_save_user_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->user_sid, 0);
			NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->user_sid));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_sid_0, 0);
		}
		if (r->group_sid) {
			_mem_save_group_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->group_sid, 0);
			NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->group_sid));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_sid_0, 0);
		}
		_mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
		for (cntr_sids_0 = 0; cntr_sids_0 < r->num_sids; cntr_sids_0++) {
			if (r->sids[cntr_sids_0]) {
				_mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
				NDR_PULL_SET_MEM_CTX(ndr, r->sids[cntr_sids_0], 0);
				NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->sids[cntr_sids_0]));
				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
			}
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
		if (r->default_dacl) {
			_mem_save_default_dacl_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->default_dacl, 0);
			NDR_CHECK(ndr_pull_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->default_dacl));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_dacl_0, 0);
		}
	}
	return NDR_ERR_SUCCESS;
}
コード例 #28
0
ファイル: ndr_security.c プロジェクト: AllardJ/Tomato
_PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor *r)
{
	uint32_t _ptr_owner_sid;
	TALLOC_CTX *_mem_save_owner_sid_0;
	uint32_t _ptr_group_sid;
	TALLOC_CTX *_mem_save_group_sid_0;
	uint32_t _ptr_sacl;
	TALLOC_CTX *_mem_save_sacl_0;
	uint32_t _ptr_dacl;
	TALLOC_CTX *_mem_save_dacl_0;
	{
		uint32_t _flags_save_STRUCT = ndr->flags;
		ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
		if (ndr_flags & NDR_SCALARS) {
			NDR_CHECK(ndr_pull_align(ndr, 5));
			NDR_CHECK(ndr_pull_security_descriptor_revision(ndr, NDR_SCALARS, &r->revision));
			NDR_CHECK(ndr_pull_security_descriptor_type(ndr, NDR_SCALARS, &r->type));
			NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_owner_sid));
			if (_ptr_owner_sid) {
				NDR_PULL_ALLOC(ndr, r->owner_sid);
				NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->owner_sid, _ptr_owner_sid));
			} else {
				r->owner_sid = NULL;
			}
			NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_sid));
			if (_ptr_group_sid) {
				NDR_PULL_ALLOC(ndr, r->group_sid);
				NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->group_sid, _ptr_group_sid));
			} else {
				r->group_sid = NULL;
			}
			NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sacl));
			if (_ptr_sacl) {
				NDR_PULL_ALLOC(ndr, r->sacl);
				NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sacl, _ptr_sacl));
			} else {
				r->sacl = NULL;
			}
			NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dacl));
			if (_ptr_dacl) {
				NDR_PULL_ALLOC(ndr, r->dacl);
				NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dacl, _ptr_dacl));
			} else {
				r->dacl = NULL;
			}
			NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
		}
		if (ndr_flags & NDR_BUFFERS) {
			if (r->owner_sid) {
				uint32_t _relative_save_offset;
				_relative_save_offset = ndr->offset;
				NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->owner_sid));
				_mem_save_owner_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
				NDR_PULL_SET_MEM_CTX(ndr, r->owner_sid, 0);
				NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->owner_sid));
				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_owner_sid_0, 0);
				ndr->offset = _relative_save_offset;
			}
			if (r->group_sid) {
				uint32_t _relative_save_offset;
				_relative_save_offset = ndr->offset;
				NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->group_sid));
				_mem_save_group_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
				NDR_PULL_SET_MEM_CTX(ndr, r->group_sid, 0);
				NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->group_sid));
				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_sid_0, 0);
				ndr->offset = _relative_save_offset;
			}
			if (r->sacl) {
				uint32_t _relative_save_offset;
				_relative_save_offset = ndr->offset;
				NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sacl));
				_mem_save_sacl_0 = NDR_PULL_GET_MEM_CTX(ndr);
				NDR_PULL_SET_MEM_CTX(ndr, r->sacl, 0);
				NDR_CHECK(ndr_pull_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->sacl));
				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sacl_0, 0);
				ndr->offset = _relative_save_offset;
			}
			if (r->dacl) {
				uint32_t _relative_save_offset;
				_relative_save_offset = ndr->offset;
				NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dacl));
				_mem_save_dacl_0 = NDR_PULL_GET_MEM_CTX(ndr);
				NDR_PULL_SET_MEM_CTX(ndr, r->dacl, 0);
				NDR_CHECK(ndr_pull_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->dacl));
				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dacl_0, 0);
				ndr->offset = _relative_save_offset;
			}
		}
		ndr->flags = _flags_save_STRUCT;
	}
	return NDR_ERR_SUCCESS;
}
コード例 #29
0
ファイル: ndr_perfcount.c プロジェクト: Alexandr-Galko/samba
_PUBLIC_ enum ndr_err_code ndr_pull_PERF_DATA_BLOCK(struct ndr_pull *ndr, int ndr_flags, struct PERF_DATA_BLOCK *r)
{
	uint32_t size_Signature_0 = 0;
	uint32_t cntr_Signature_0;
	uint32_t _ptr_data;
	TALLOC_CTX *_mem_save_data_0;
	uint32_t size_objects_0 = 0;
	uint32_t cntr_objects_0;
	TALLOC_CTX *_mem_save_objects_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 8));
		size_Signature_0 = 4;
		for (cntr_Signature_0 = 0; cntr_Signature_0 < size_Signature_0; cntr_Signature_0++) {
			NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Signature[cntr_Signature_0]));
		}
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->LittleEndian));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Version));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Revision));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->TotalByteLength));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->HeaderLength));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->NumObjectTypes));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DefaultObject));
		NDR_CHECK(ndr_pull_SYSTEMTIME(ndr, NDR_SCALARS, &r->SystemTime));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Padding));
		NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PerfTime));
		NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PerfFreq));
		NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->PerfTime100nSec));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SystemNameLength));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SystemNameOffset));
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
		if (_ptr_data) {
			NDR_PULL_ALLOC(ndr, r->data);
		} else {
			r->data = NULL;
		}
		size_objects_0 = r->NumObjectTypes;
		NDR_PULL_ALLOC_N(ndr, r->objects, size_objects_0);
		_mem_save_objects_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->objects, 0);
		for (cntr_objects_0 = 0; cntr_objects_0 < size_objects_0; cntr_objects_0++) {
			NDR_CHECK(ndr_pull_PERF_OBJECT_TYPE(ndr, NDR_SCALARS, &r->objects[cntr_objects_0]));
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objects_0, 0);
		NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
	}
	if (ndr_flags & NDR_BUFFERS) {
		if (r->data) {
			_mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
			NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->data));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
		}
		size_objects_0 = r->NumObjectTypes;
		_mem_save_objects_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->objects, 0);
		for (cntr_objects_0 = 0; cntr_objects_0 < size_objects_0; cntr_objects_0++) {
			NDR_CHECK(ndr_pull_PERF_OBJECT_TYPE(ndr, NDR_BUFFERS, &r->objects[cntr_objects_0]));
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objects_0, 0);
	}
	return NDR_ERR_SUCCESS;
}
コード例 #30
0
ファイル: ndr_frsapi.c プロジェクト: nikatshun/asuswrt-merlin
static enum ndr_err_code ndr_pull_frsapi_ForceReplication(struct ndr_pull *ndr, int flags, struct frsapi_ForceReplication *r)
{
	uint32_t _ptr_replica_set_guid;
	uint32_t _ptr_connection_guid;
	uint32_t _ptr_replica_set_name;
	uint32_t size_replica_set_name_1 = 0;
	uint32_t length_replica_set_name_1 = 0;
	uint32_t _ptr_partner_dns_name;
	uint32_t size_partner_dns_name_1 = 0;
	uint32_t length_partner_dns_name_1 = 0;
	TALLOC_CTX *_mem_save_replica_set_guid_0;
	TALLOC_CTX *_mem_save_connection_guid_0;
	TALLOC_CTX *_mem_save_replica_set_name_0;
	TALLOC_CTX *_mem_save_partner_dns_name_0;
	if (flags & NDR_IN) {
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_replica_set_guid));
		if (_ptr_replica_set_guid) {
			NDR_PULL_ALLOC(ndr, r->in.replica_set_guid);
		} else {
			r->in.replica_set_guid = NULL;
		}
		if (r->in.replica_set_guid) {
			_mem_save_replica_set_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->in.replica_set_guid, 0);
			NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.replica_set_guid));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_replica_set_guid_0, 0);
		}
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_connection_guid));
		if (_ptr_connection_guid) {
			NDR_PULL_ALLOC(ndr, r->in.connection_guid);
		} else {
			r->in.connection_guid = NULL;
		}
		if (r->in.connection_guid) {
			_mem_save_connection_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->in.connection_guid, 0);
			NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.connection_guid));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connection_guid_0, 0);
		}
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_replica_set_name));
		if (_ptr_replica_set_name) {
			NDR_PULL_ALLOC(ndr, r->in.replica_set_name);
		} else {
			r->in.replica_set_name = NULL;
		}
		if (r->in.replica_set_name) {
			_mem_save_replica_set_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->in.replica_set_name, 0);
			NDR_CHECK(ndr_pull_array_size(ndr, &r->in.replica_set_name));
			NDR_CHECK(ndr_pull_array_length(ndr, &r->in.replica_set_name));
			size_replica_set_name_1 = ndr_get_array_size(ndr, &r->in.replica_set_name);
			length_replica_set_name_1 = ndr_get_array_length(ndr, &r->in.replica_set_name);
			if (length_replica_set_name_1 > size_replica_set_name_1) {
				return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_replica_set_name_1, length_replica_set_name_1);
			}
			NDR_CHECK(ndr_check_string_terminator(ndr, length_replica_set_name_1, sizeof(uint16_t)));
			NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.replica_set_name, length_replica_set_name_1, sizeof(uint16_t), CH_UTF16));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_replica_set_name_0, 0);
		}
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partner_dns_name));
		if (_ptr_partner_dns_name) {
			NDR_PULL_ALLOC(ndr, r->in.partner_dns_name);
		} else {
			r->in.partner_dns_name = NULL;
		}
		if (r->in.partner_dns_name) {
			_mem_save_partner_dns_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->in.partner_dns_name, 0);
			NDR_CHECK(ndr_pull_array_size(ndr, &r->in.partner_dns_name));
			NDR_CHECK(ndr_pull_array_length(ndr, &r->in.partner_dns_name));
			size_partner_dns_name_1 = ndr_get_array_size(ndr, &r->in.partner_dns_name);
			length_partner_dns_name_1 = ndr_get_array_length(ndr, &r->in.partner_dns_name);
			if (length_partner_dns_name_1 > size_partner_dns_name_1) {
				return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_partner_dns_name_1, length_partner_dns_name_1);
			}
			NDR_CHECK(ndr_check_string_terminator(ndr, length_partner_dns_name_1, sizeof(uint16_t)));
			NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.partner_dns_name, length_partner_dns_name_1, sizeof(uint16_t), CH_UTF16));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partner_dns_name_0, 0);
		}
	}
	if (flags & NDR_OUT) {
		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
	}
	return NDR_ERR_SUCCESS;
}