Example #1
0
_PUBLIC_ enum ndr_err_code ndr_pull_pcap_data(struct ndr_pull *ndr, int ndr_flags, struct pcap_data *r)
{
    uint32_t size_printers_0 = 0;
    uint32_t cntr_printers_0;
    TALLOC_CTX *_mem_save_printers_0;
    if (ndr_flags & NDR_SCALARS) {
        NDR_CHECK(ndr_pull_array_size(ndr, &r->printers));
        NDR_CHECK(ndr_pull_align(ndr, 5));
        NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
        size_printers_0 = ndr_get_array_size(ndr, &r->printers);
        NDR_PULL_ALLOC_N(ndr, r->printers, size_printers_0);
        _mem_save_printers_0 = NDR_PULL_GET_MEM_CTX(ndr);
        NDR_PULL_SET_MEM_CTX(ndr, r->printers, 0);
        for (cntr_printers_0 = 0; cntr_printers_0 < size_printers_0; cntr_printers_0++) {
            NDR_CHECK(ndr_pull_pcap_printer(ndr, NDR_SCALARS, &r->printers[cntr_printers_0]));
        }
        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printers_0, 0);
        if (r->printers) {
            NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->printers, r->count));
        }
        NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    }
    if (ndr_flags & NDR_BUFFERS) {
        size_printers_0 = ndr_get_array_size(ndr, &r->printers);
        _mem_save_printers_0 = NDR_PULL_GET_MEM_CTX(ndr);
        NDR_PULL_SET_MEM_CTX(ndr, r->printers, 0);
        for (cntr_printers_0 = 0; cntr_printers_0 < size_printers_0; cntr_printers_0++) {
            NDR_CHECK(ndr_pull_pcap_printer(ndr, NDR_BUFFERS, &r->printers[cntr_printers_0]));
        }
        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printers_0, 0);
    }
    return NDR_ERR_SUCCESS;
}
Example #2
0
static enum ndr_err_code ndr_pull_echo_SinkData(struct ndr_pull *ndr, int flags, struct echo_SinkData *r)
{
	if (flags & NDR_IN) {
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.len));
		NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
		NDR_PULL_ALLOC_N(ndr, r->in.data, ndr_get_array_size(ndr, &r->in.data));
		NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, ndr_get_array_size(ndr, &r->in.data)));
		if (r->in.data) {
			NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, r->in.len));
		}
	}
	if (flags & NDR_OUT) {
	}
	return NDR_ERR_SUCCESS;
}
Example #3
0
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;
}
Example #4
0
static enum ndr_err_code ndr_pull_echo_Surrounding(struct ndr_pull *ndr, int ndr_flags, struct echo_Surrounding *r)
{
	uint32_t cntr_surrounding_0;
	TALLOC_CTX *_mem_save_surrounding_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_array_size(ndr, &r->surrounding));
		NDR_CHECK(ndr_pull_align(ndr, 4));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->x));
		NDR_PULL_ALLOC_N(ndr, r->surrounding, ndr_get_array_size(ndr, &r->surrounding));
		_mem_save_surrounding_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->surrounding, 0);
		for (cntr_surrounding_0 = 0; cntr_surrounding_0 < r->x; cntr_surrounding_0++) {
			NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->surrounding[cntr_surrounding_0]));
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_surrounding_0, 0);
		if (r->surrounding) {
			NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->surrounding, r->x));
		}
	}
	if (ndr_flags & NDR_BUFFERS) {
	}
	return NDR_ERR_SUCCESS;
}
Example #5
0
_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;
}
Example #6
0
_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;
}
Example #7
0
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;
}
Example #8
0
static enum ndr_err_code ndr_pull_frsapi_IsPathReplicated(struct ndr_pull *ndr, int flags, struct frsapi_IsPathReplicated *r)
{
	uint32_t _ptr_path;
	uint32_t size_path_1 = 0;
	uint32_t length_path_1 = 0;
	TALLOC_CTX *_mem_save_path_0;
	TALLOC_CTX *_mem_save_replicated_0;
	TALLOC_CTX *_mem_save_primary_0;
	TALLOC_CTX *_mem_save_root_0;
	TALLOC_CTX *_mem_save_replica_set_guid_0;
	if (flags & NDR_IN) {
		ZERO_STRUCT(r->out);

		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
		if (_ptr_path) {
			NDR_PULL_ALLOC(ndr, r->in.path);
		} else {
			r->in.path = NULL;
		}
		if (r->in.path) {
			_mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->in.path, 0);
			NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
			NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
			size_path_1 = ndr_get_array_size(ndr, &r->in.path);
			length_path_1 = ndr_get_array_length(ndr, &r->in.path);
			if (length_path_1 > size_path_1) {
				return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
			}
			NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
			NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, length_path_1, sizeof(uint16_t), CH_UTF16));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
		}
		NDR_CHECK(ndr_pull_frsapi_ReplicaSetType(ndr, NDR_SCALARS, &r->in.replica_set_type));
		NDR_PULL_ALLOC(ndr, r->out.replicated);
		ZERO_STRUCTP(r->out.replicated);
		NDR_PULL_ALLOC(ndr, r->out.primary);
		ZERO_STRUCTP(r->out.primary);
		NDR_PULL_ALLOC(ndr, r->out.root);
		ZERO_STRUCTP(r->out.root);
		NDR_PULL_ALLOC(ndr, r->out.replica_set_guid);
		ZERO_STRUCTP(r->out.replica_set_guid);
	}
	if (flags & NDR_OUT) {
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.replicated);
		}
		_mem_save_replicated_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.replicated, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.replicated));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_replicated_0, LIBNDR_FLAG_REF_ALLOC);
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.primary);
		}
		_mem_save_primary_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.primary, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.primary));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_primary_0, LIBNDR_FLAG_REF_ALLOC);
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.root);
		}
		_mem_save_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.root, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.root));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_root_0, LIBNDR_FLAG_REF_ALLOC);
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.replica_set_guid);
		}
		_mem_save_replica_set_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.replica_set_guid, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->out.replica_set_guid));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_replica_set_guid_0, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
	}
	return NDR_ERR_SUCCESS;
}
Example #9
0
static enum ndr_err_code ndr_pull_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_pull *ndr, int ndr_flags, struct dssetup_DsRolePrimaryDomInfoBasic *r)
{
	uint32_t _ptr_domain;
	uint32_t size_domain_1 = 0;
	uint32_t length_domain_1 = 0;
	TALLOC_CTX *_mem_save_domain_0;
	uint32_t _ptr_dns_domain;
	uint32_t size_dns_domain_1 = 0;
	uint32_t length_dns_domain_1 = 0;
	TALLOC_CTX *_mem_save_dns_domain_0;
	uint32_t _ptr_forest;
	uint32_t size_forest_1 = 0;
	uint32_t length_forest_1 = 0;
	TALLOC_CTX *_mem_save_forest_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 5));
		NDR_CHECK(ndr_pull_dssetup_DsRole(ndr, NDR_SCALARS, &r->role));
		NDR_CHECK(ndr_pull_dssetup_DsRoleFlags(ndr, NDR_SCALARS, &r->flags));
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
		if (_ptr_domain) {
			NDR_PULL_ALLOC(ndr, r->domain);
		} else {
			r->domain = NULL;
		}
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_domain));
		if (_ptr_dns_domain) {
			NDR_PULL_ALLOC(ndr, r->dns_domain);
		} else {
			r->dns_domain = NULL;
		}
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest));
		if (_ptr_forest) {
			NDR_PULL_ALLOC(ndr, r->forest);
		} else {
			r->forest = NULL;
		}
		NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
		NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
	}
	if (ndr_flags & NDR_BUFFERS) {
		if (r->domain) {
			_mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
			NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
			NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
			size_domain_1 = ndr_get_array_size(ndr, &r->domain);
			length_domain_1 = ndr_get_array_length(ndr, &r->domain);
			if (length_domain_1 > size_domain_1) {
				return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
			}
			NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
			NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
		}
		if (r->dns_domain) {
			_mem_save_dns_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->dns_domain, 0);
			NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_domain));
			NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_domain));
			size_dns_domain_1 = ndr_get_array_size(ndr, &r->dns_domain);
			length_dns_domain_1 = ndr_get_array_length(ndr, &r->dns_domain);
			if (length_dns_domain_1 > size_dns_domain_1) {
				return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dns_domain_1, length_dns_domain_1);
			}
			NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_domain_1, sizeof(uint16_t)));
			NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_domain, length_dns_domain_1, sizeof(uint16_t), CH_UTF16));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_domain_0, 0);
		}
		if (r->forest) {
			_mem_save_forest_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->forest, 0);
			NDR_CHECK(ndr_pull_array_size(ndr, &r->forest));
			NDR_CHECK(ndr_pull_array_length(ndr, &r->forest));
			size_forest_1 = ndr_get_array_size(ndr, &r->forest);
			length_forest_1 = ndr_get_array_length(ndr, &r->forest);
			if (length_forest_1 > size_forest_1) {
				return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_forest_1, length_forest_1);
			}
			NDR_CHECK(ndr_check_string_terminator(ndr, length_forest_1, sizeof(uint16_t)));
			NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->forest, length_forest_1, sizeof(uint16_t), CH_UTF16));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_0, 0);
		}
	}
	return NDR_ERR_SUCCESS;
}
Example #10
0
static enum ndr_err_code ndr_pull_RemoteActivation(struct ndr_pull *ndr, int flags, struct RemoteActivation *r)
{
	uint32_t size_pwszObjectName_1 = 0;
	uint32_t length_pwszObjectName_1 = 0;
	uint32_t size_pIIDs_1 = 0;
	uint32_t cntr_pIIDs_1;
	uint32_t size_protseq_0 = 0;
	uint32_t cntr_protseq_0;
	uint32_t size_ifaces_0 = 0;
	uint32_t cntr_ifaces_0;
	uint32_t size_results_0 = 0;
	uint32_t cntr_results_0;
	TALLOC_CTX *_mem_save_that_0;
	TALLOC_CTX *_mem_save_pObjectStorage_0;
	TALLOC_CTX *_mem_save_pIIDs_1;
	TALLOC_CTX *_mem_save_protseq_0;
	TALLOC_CTX *_mem_save_pOxid_0;
	TALLOC_CTX *_mem_save_pdsaOxidBindings_0;
	TALLOC_CTX *_mem_save_ipidRemUnknown_0;
	TALLOC_CTX *_mem_save_AuthnHint_0;
	TALLOC_CTX *_mem_save_ServerVersion_0;
	TALLOC_CTX *_mem_save_hr_0;
	TALLOC_CTX *_mem_save_ifaces_0;
	TALLOC_CTX *_mem_save_ifaces_1;
	TALLOC_CTX *_mem_save_results_0;
	if (flags & NDR_IN) {
		ZERO_STRUCT(r->out);

		NDR_CHECK(ndr_pull_ORPCTHIS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.this_object));
		NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->in.Clsid));
		NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pwszObjectName));
		NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pwszObjectName));
		size_pwszObjectName_1 = ndr_get_array_size(ndr, &r->in.pwszObjectName);
		length_pwszObjectName_1 = ndr_get_array_length(ndr, &r->in.pwszObjectName);
		if (length_pwszObjectName_1 > size_pwszObjectName_1) {
			return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_pwszObjectName_1, length_pwszObjectName_1);
		}
		NDR_CHECK(ndr_check_string_terminator(ndr, length_pwszObjectName_1, sizeof(uint16_t)));
		NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pwszObjectName, length_pwszObjectName_1, sizeof(uint16_t), CH_UTF16));
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->in.pObjectStorage);
		}
		_mem_save_pObjectStorage_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->in.pObjectStorage, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pObjectStorage));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pObjectStorage_0, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ClientImpLevel));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Mode));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Interfaces));
		if (r->in.Interfaces < 1 || r->in.Interfaces > 32768) {
			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
		}
		NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pIIDs));
		size_pIIDs_1 = ndr_get_array_size(ndr, &r->in.pIIDs);
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC_N(ndr, r->in.pIIDs, size_pIIDs_1);
		}
		_mem_save_pIIDs_1 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->in.pIIDs, 0);
		for (cntr_pIIDs_1 = 0; cntr_pIIDs_1 < size_pIIDs_1; cntr_pIIDs_1++) {
			NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->in.pIIDs[cntr_pIIDs_1]));
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pIIDs_1, 0);
		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.num_protseqs));
		NDR_CHECK(ndr_pull_array_size(ndr, &r->in.protseq));
		size_protseq_0 = ndr_get_array_size(ndr, &r->in.protseq);
		NDR_PULL_ALLOC_N(ndr, r->in.protseq, size_protseq_0);
		_mem_save_protseq_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->in.protseq, 0);
		for (cntr_protseq_0 = 0; cntr_protseq_0 < size_protseq_0; cntr_protseq_0++) {
			NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.protseq[cntr_protseq_0]));
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_protseq_0, 0);
		NDR_PULL_ALLOC(ndr, r->out.that);
		ZERO_STRUCTP(r->out.that);
		NDR_PULL_ALLOC(ndr, r->out.pOxid);
		ZERO_STRUCTP(r->out.pOxid);
		NDR_PULL_ALLOC(ndr, r->out.pdsaOxidBindings);
		ZERO_STRUCTP(r->out.pdsaOxidBindings);
		NDR_PULL_ALLOC(ndr, r->out.ipidRemUnknown);
		ZERO_STRUCTP(r->out.ipidRemUnknown);
		NDR_PULL_ALLOC(ndr, r->out.AuthnHint);
		ZERO_STRUCTP(r->out.AuthnHint);
		NDR_PULL_ALLOC(ndr, r->out.ServerVersion);
		ZERO_STRUCTP(r->out.ServerVersion);
		NDR_PULL_ALLOC(ndr, r->out.hr);
		ZERO_STRUCTP(r->out.hr);
		if (r->in.pIIDs) {
			NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.pIIDs, r->in.Interfaces));
		}
		if (r->in.protseq) {
			NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.protseq, r->in.num_protseqs));
		}
	}
	if (flags & NDR_OUT) {
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.that);
		}
		_mem_save_that_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.that, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_ORPCTHAT(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.that));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_that_0, LIBNDR_FLAG_REF_ALLOC);
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.pOxid);
		}
		_mem_save_pOxid_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.pOxid, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.pOxid));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pOxid_0, LIBNDR_FLAG_REF_ALLOC);
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.pdsaOxidBindings);
		}
		_mem_save_pdsaOxidBindings_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.pdsaOxidBindings, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_DUALSTRINGARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pdsaOxidBindings));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdsaOxidBindings_0, LIBNDR_FLAG_REF_ALLOC);
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.ipidRemUnknown);
		}
		_mem_save_ipidRemUnknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.ipidRemUnknown, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->out.ipidRemUnknown));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ipidRemUnknown_0, LIBNDR_FLAG_REF_ALLOC);
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.AuthnHint);
		}
		_mem_save_AuthnHint_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.AuthnHint, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.AuthnHint));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_AuthnHint_0, LIBNDR_FLAG_REF_ALLOC);
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.ServerVersion);
		}
		_mem_save_ServerVersion_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.ServerVersion, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_COMVERSION(ndr, NDR_SCALARS, r->out.ServerVersion));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServerVersion_0, LIBNDR_FLAG_REF_ALLOC);
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->out.hr);
		}
		_mem_save_hr_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.hr, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, r->out.hr));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hr_0, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_array_size(ndr, &r->out.ifaces));
		size_ifaces_0 = ndr_get_array_size(ndr, &r->out.ifaces);
		NDR_PULL_ALLOC_N(ndr, r->out.ifaces, size_ifaces_0);
		_mem_save_ifaces_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.ifaces, 0);
		for (cntr_ifaces_0 = 0; cntr_ifaces_0 < size_ifaces_0; cntr_ifaces_0++) {
			if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
				NDR_PULL_ALLOC(ndr, r->out.ifaces[cntr_ifaces_0]);
			}
		}
		for (cntr_ifaces_0 = 0; cntr_ifaces_0 < size_ifaces_0; cntr_ifaces_0++) {
			_mem_save_ifaces_1 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->out.ifaces[cntr_ifaces_0], LIBNDR_FLAG_REF_ALLOC);
			NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ifaces[cntr_ifaces_0]));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ifaces_1, LIBNDR_FLAG_REF_ALLOC);
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ifaces_0, 0);
		NDR_CHECK(ndr_pull_array_size(ndr, &r->out.results));
		size_results_0 = ndr_get_array_size(ndr, &r->out.results);
		NDR_PULL_ALLOC_N(ndr, r->out.results, size_results_0);
		_mem_save_results_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->out.results, 0);
		for (cntr_results_0 = 0; cntr_results_0 < size_results_0; cntr_results_0++) {
			NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.results[cntr_results_0]));
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_results_0, 0);
		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
		if (r->out.ifaces) {
			NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.ifaces, r->in.Interfaces));
		}
		if (r->out.results) {
			NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.results, r->in.Interfaces));
		}
	}
	return NDR_ERR_SUCCESS;
}
Example #11
0
static enum ndr_err_code ndr_pull_pcap_printer(struct ndr_pull *ndr, int ndr_flags, struct pcap_printer *r)
{
    uint32_t _ptr_name;
    uint32_t size_name_1 = 0;
    uint32_t length_name_1 = 0;
    TALLOC_CTX *_mem_save_name_0;
    uint32_t _ptr_info;
    uint32_t size_info_1 = 0;
    uint32_t length_info_1 = 0;
    TALLOC_CTX *_mem_save_info_0;
    uint32_t _ptr_location;
    uint32_t size_location_1 = 0;
    uint32_t length_location_1 = 0;
    TALLOC_CTX *_mem_save_location_0;
    if (ndr_flags & NDR_SCALARS) {
        NDR_CHECK(ndr_pull_align(ndr, 5));
        NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
        if (_ptr_name) {
            NDR_PULL_ALLOC(ndr, r->name);
        } else {
            r->name = NULL;
        }
        NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
        if (_ptr_info) {
            NDR_PULL_ALLOC(ndr, r->info);
        } else {
            r->info = NULL;
        }
        NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_location));
        if (_ptr_location) {
            NDR_PULL_ALLOC(ndr, r->location);
        } else {
            r->location = NULL;
        }
        NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    }
    if (ndr_flags & NDR_BUFFERS) {
        if (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_array_size(ndr, &r->name));
            NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
            size_name_1 = ndr_get_array_size(ndr, &r->name);
            length_name_1 = ndr_get_array_length(ndr, &r->name);
            if (length_name_1 > size_name_1) {
                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
            }
            NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint8_t)));
            NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint8_t), CH_UTF8));
            NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
        }
        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_array_size(ndr, &r->info));
            NDR_CHECK(ndr_pull_array_length(ndr, &r->info));
            size_info_1 = ndr_get_array_size(ndr, &r->info);
            length_info_1 = ndr_get_array_length(ndr, &r->info);
            if (length_info_1 > size_info_1) {
                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_info_1, length_info_1);
            }
            NDR_CHECK(ndr_check_string_terminator(ndr, length_info_1, sizeof(uint8_t)));
            NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->info, length_info_1, sizeof(uint8_t), CH_UTF8));
            NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
        }
        if (r->location) {
            _mem_save_location_0 = NDR_PULL_GET_MEM_CTX(ndr);
            NDR_PULL_SET_MEM_CTX(ndr, r->location, 0);
            NDR_CHECK(ndr_pull_array_size(ndr, &r->location));
            NDR_CHECK(ndr_pull_array_length(ndr, &r->location));
            size_location_1 = ndr_get_array_size(ndr, &r->location);
            length_location_1 = ndr_get_array_length(ndr, &r->location);
            if (length_location_1 > size_location_1) {
                return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_location_1, length_location_1);
            }
            NDR_CHECK(ndr_check_string_terminator(ndr, length_location_1, sizeof(uint8_t)));
            NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->location, length_location_1, sizeof(uint8_t), CH_UTF8));
            NDR_PULL_SET_MEM_CTX(ndr, _mem_save_location_0, 0);
        }
    }
    return NDR_ERR_SUCCESS;
}