#include "librpc/gen_ndr/ndr_lsa.h"
#include "librpc/gen_ndr/ndr_initshutdown.h"
#include "librpc/gen_ndr/ndr_security.h"
-NTSTATUS ndr_push_winreg_AccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+static enum ndr_err_code ndr_push_winreg_AccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_AccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+static enum ndr_err_code ndr_pull_winreg_AccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
*r = v;
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
{
ndr_print_uint32(ndr, name, r);
ndr->depth++;
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_QUERY_VALUE", KEY_QUERY_VALUE, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_SET_VALUE", KEY_SET_VALUE, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_CREATE_SUB_KEY", KEY_CREATE_SUB_KEY, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_ENUMERATE_SUB_KEYS", KEY_ENUMERATE_SUB_KEYS, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_NOTIFY", KEY_NOTIFY, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_CREATE_LINK", KEY_CREATE_LINK, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_WOW64_64KEY", KEY_WOW64_64KEY, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_WOW64_32KEY", KEY_WOW64_32KEY, r);
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r)
+static enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r)
+static enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
*r = v;
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_Type(struct ndr_print *ndr, const char *name, enum winreg_Type r)
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-_PUBLIC_ NTSTATUS ndr_push_winreg_String(struct ndr_push *ndr, int ndr_flags, const struct winreg_String *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_String(struct ndr_push *ndr, int ndr_flags, const struct winreg_String *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name)*2));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name)*2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
}
if (ndr_flags & NDR_BUFFERS) {
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-_PUBLIC_ NTSTATUS ndr_pull_winreg_String(struct ndr_pull *ndr, int ndr_flags, struct winreg_String *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_String(struct ndr_pull *ndr, int ndr_flags, struct winreg_String *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_String(struct ndr_print *ndr, const char *name, const struct winreg_String *r)
{
ndr_print_struct(ndr, name, "winreg_String");
ndr->depth++;
- ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name)*2:r->name_len);
- ndr_print_uint16(ndr, "name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name)*2:r->name_size);
+ ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->name_len);
+ ndr_print_uint16(ndr, "name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->name_size);
ndr_print_ptr(ndr, "name", r->name);
ndr->depth++;
if (r->name) {
ndr->depth--;
}
-NTSTATUS ndr_push_KeySecurityData(struct ndr_push *ndr, int ndr_flags, const struct KeySecurityData *r)
+static enum ndr_err_code ndr_push_KeySecurityData(struct ndr_push *ndr, int ndr_flags, const struct KeySecurityData *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->len));
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_KeySecurityData(struct ndr_pull *ndr, int ndr_flags, struct KeySecurityData *r)
+static enum ndr_err_code ndr_pull_KeySecurityData(struct ndr_pull *ndr, int ndr_flags, struct KeySecurityData *r)
{
uint32_t _ptr_data;
TALLOC_CTX *_mem_save_data_0;
NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->data, r->len));
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_KeySecurityData(struct ndr_print *ndr, const char *name, const struct KeySecurityData *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_SecBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_SecBuf *r)
+static enum ndr_err_code ndr_push_winreg_SecBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_SecBuf *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
if (ndr_flags & NDR_BUFFERS) {
NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_BUFFERS, &r->sd));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_SecBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_SecBuf *r)
+static enum ndr_err_code ndr_pull_winreg_SecBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_SecBuf *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
if (ndr_flags & NDR_BUFFERS) {
NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_BUFFERS, &r->sd));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, const struct winreg_SecBuf *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_CreateAction(struct ndr_push *ndr, int ndr_flags, enum winreg_CreateAction r)
+static enum ndr_err_code ndr_push_winreg_CreateAction(struct ndr_push *ndr, int ndr_flags, enum winreg_CreateAction r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_CreateAction(struct ndr_pull *ndr, int ndr_flags, enum winreg_CreateAction *r)
+static enum ndr_err_code ndr_pull_winreg_CreateAction(struct ndr_pull *ndr, int ndr_flags, enum winreg_CreateAction *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
*r = v;
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_CreateAction(struct ndr_print *ndr, const char *name, enum winreg_CreateAction r)
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_winreg_StringBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_StringBuf *r)
+static enum ndr_err_code ndr_push_winreg_StringBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_StringBuf *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term_null(r->name)*2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term_null(r->name) * 2));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
}
if (ndr_flags & NDR_BUFFERS) {
if (r->name) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size/2));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size / 2));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term_null(r->name)*2/2));
- NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term_null(r->name)*2/2, sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term_null(r->name) * 2 / 2));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term_null(r->name) * 2 / 2, sizeof(uint16_t), CH_UTF16));
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_StringBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_StringBuf *r)
+static enum ndr_err_code ndr_pull_winreg_StringBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_StringBuf *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
}
if (r->name) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->name, r->size/2));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->name, r->size / 2));
}
if (r->name) {
- NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->name, r->length/2));
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->name, r->length / 2));
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r)
{
ndr_print_struct(ndr, name, "winreg_StringBuf");
ndr->depth++;
- ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term_null(r->name)*2:r->length);
+ ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term_null(r->name) * 2:r->length);
ndr_print_uint16(ndr, "size", r->size);
ndr_print_ptr(ndr, "name", r->name);
ndr->depth++;
ndr->depth--;
}
-NTSTATUS ndr_push_KeySecurityAttribute(struct ndr_push *ndr, int ndr_flags, const struct KeySecurityAttribute *r)
+static enum ndr_err_code ndr_push_winreg_ValNameBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_ValNameBuf *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size / 2));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2 / 2));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term(r->name) * 2 / 2, sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_winreg_ValNameBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_ValNameBuf *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_uint16(ndr, NDR_SCALARS, &r->length));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+ if (_ptr_name) {
+ NDR_PULL_ALLOC(ndr, r->name);
+ } else {
+ r->name = NULL;
+ }
+ }
+ 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));
+ if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
+ }
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
+ }
+ if (r->name) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->name, r->size / 2));
+ }
+ if (r->name) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->name, r->length / 2));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r)
+{
+ ndr_print_struct(ndr, name, "winreg_ValNameBuf");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->length);
+ ndr_print_uint16(ndr, "size", r->size);
+ ndr_print_ptr(ndr, "name", r->name);
+ ndr->depth++;
+ if (r->name) {
+ ndr_print_string(ndr, "name", r->name);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_KeySecurityAttribute(struct ndr_push *ndr, int ndr_flags, const struct KeySecurityAttribute *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
if (ndr_flags & NDR_BUFFERS) {
NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_BUFFERS, &r->sec_data));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_KeySecurityAttribute(struct ndr_pull *ndr, int ndr_flags, struct KeySecurityAttribute *r)
+static enum ndr_err_code ndr_pull_KeySecurityAttribute(struct ndr_pull *ndr, int ndr_flags, struct KeySecurityAttribute *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
if (ndr_flags & NDR_BUFFERS) {
NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_BUFFERS, &r->sec_data));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_KeySecurityAttribute(struct ndr_print *ndr, const char *name, const struct KeySecurityAttribute *r)
ndr->depth--;
}
-NTSTATUS ndr_push_QueryMultipleValue(struct ndr_push *ndr, int ndr_flags, const struct QueryMultipleValue *r)
+static enum ndr_err_code ndr_push_QueryMultipleValue(struct ndr_push *ndr, int ndr_flags, const struct QueryMultipleValue *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->name));
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_QueryMultipleValue(struct ndr_pull *ndr, int ndr_flags, struct QueryMultipleValue *r)
+static enum ndr_err_code ndr_pull_QueryMultipleValue(struct ndr_pull *ndr, int ndr_flags, struct QueryMultipleValue *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_QueryMultipleValue(struct ndr_print *ndr, const char *name, const struct QueryMultipleValue *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKCR(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCR *r)
+static enum ndr_err_code ndr_push_winreg_OpenHKCR(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCR *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
}
if (flags & NDR_OUT) {
- if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_OpenHKCR(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCR *r)
+static enum ndr_err_code ndr_pull_winreg_OpenHKCR(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCR *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_OpenHKCR(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCR *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKCU(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCU *r)
+static enum ndr_err_code ndr_push_winreg_OpenHKCU(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCU *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
}
if (flags & NDR_OUT) {
- if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_OpenHKCU(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCU *r)
+static enum ndr_err_code ndr_pull_winreg_OpenHKCU(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCU *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_OpenHKCU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCU *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct winreg_OpenHKLM *r)
+static enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct winreg_OpenHKLM *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
}
if (flags & NDR_OUT) {
- if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flags, struct winreg_OpenHKLM *r)
+static enum ndr_err_code ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flags, struct winreg_OpenHKLM *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_OpenHKLM(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKLM *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKPD(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPD *r)
+static enum ndr_err_code ndr_push_winreg_OpenHKPD(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPD *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
}
if (flags & NDR_OUT) {
- if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_OpenHKPD(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPD *r)
+static enum ndr_err_code ndr_pull_winreg_OpenHKPD(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPD *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_OpenHKPD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPD *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKU(struct ndr_push *ndr, int flags, const struct winreg_OpenHKU *r)
+static enum ndr_err_code ndr_push_winreg_OpenHKU(struct ndr_push *ndr, int flags, const struct winreg_OpenHKU *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
}
if (flags & NDR_OUT) {
- if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_OpenHKU(struct ndr_pull *ndr, int flags, struct winreg_OpenHKU *r)
+static enum ndr_err_code ndr_pull_winreg_OpenHKU(struct ndr_pull *ndr, int flags, struct winreg_OpenHKU *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_OpenHKU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKU *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct winreg_CloseKey *r)
+static enum ndr_err_code ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct winreg_CloseKey *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
}
if (flags & NDR_OUT) {
- if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flags, struct winreg_CloseKey *r)
+static enum ndr_err_code ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flags, struct winreg_CloseKey *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_CloseKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CloseKey *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct winreg_CreateKey *r)
+static enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct winreg_CreateKey *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyclass));
}
}
if (flags & NDR_OUT) {
- if (r->out.new_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.new_handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_handle));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.action_taken));
if (r->out.action_taken) {
}
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winreg_CreateKey *r)
+static enum ndr_err_code ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winreg_CreateKey *r)
{
uint32_t _ptr_secdesc;
uint32_t _ptr_action_taken;
}
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CreateKey *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct winreg_DeleteKey *r)
+static enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct winreg_DeleteKey *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.key));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, int flags, struct winreg_DeleteKey *r)
+static enum ndr_err_code ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, int flags, struct winreg_DeleteKey *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_DeleteKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteKey *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_DeleteValue(struct ndr_push *ndr, int flags, const struct winreg_DeleteValue *r)
+static enum ndr_err_code ndr_push_winreg_DeleteValue(struct ndr_push *ndr, int flags, const struct winreg_DeleteValue *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.value));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_DeleteValue(struct ndr_pull *ndr, int flags, struct winreg_DeleteValue *r)
+static enum ndr_err_code ndr_pull_winreg_DeleteValue(struct ndr_pull *ndr, int flags, struct winreg_DeleteValue *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_DeleteValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteValue *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct winreg_EnumKey *r)
+static enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct winreg_EnumKey *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.enum_index));
- if (r->in.name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.name == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.keyclass));
if (r->in.keyclass) {
}
}
if (flags & NDR_OUT) {
- if (r->out.name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.name == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.keyclass));
if (r->out.keyclass) {
}
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_EnumKey *r)
+static enum ndr_err_code ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_EnumKey *r)
{
uint32_t _ptr_keyclass;
uint32_t _ptr_last_changed_time;
}
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_EnumKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumKey *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_EnumValue(struct ndr_push *ndr, int flags, const struct winreg_EnumValue *r)
+static enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int flags, const struct winreg_EnumValue *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.enum_index));
- if (r->in.name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
+ if (r->in.name == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.type));
if (r->in.type) {
NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->in.type));
}
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data));
- if (r->in.data) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.data_size));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.value));
+ if (r->in.value) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.size));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.value_length));
- NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, *r->in.value_length));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.length));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.value, *r->in.length));
}
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data_size));
- if (r->in.data_size) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.data_size));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.size));
+ if (r->in.size) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.size));
}
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.value_length));
- if (r->in.value_length) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.value_length));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.length));
+ if (r->in.length) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.length));
}
}
if (flags & NDR_OUT) {
- if (r->out.name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
+ if (r->out.name == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.type));
if (r->out.type) {
NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->out.type));
}
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.data));
- if (r->out.data) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_size));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.value));
+ if (r->out.value) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.size));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.value_length));
- NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, *r->out.value_length));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.value, *r->out.length));
}
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.data_size));
- if (r->out.data_size) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_size));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.size));
+ if (r->out.size) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.size));
}
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.value_length));
- if (r->out.value_length) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.value_length));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.length));
+ if (r->out.length) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
}
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int flags, struct winreg_EnumValue *r)
+static enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int flags, struct winreg_EnumValue *r)
{
uint32_t _ptr_type;
- uint32_t _ptr_data;
- uint32_t _ptr_data_size;
- uint32_t _ptr_value_length;
+ uint32_t _ptr_value;
+ uint32_t _ptr_size;
+ uint32_t _ptr_length;
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_name_0;
TALLOC_CTX *_mem_save_type_0;
- TALLOC_CTX *_mem_save_data_0;
- TALLOC_CTX *_mem_save_data_size_0;
- TALLOC_CTX *_mem_save_value_length_0;
+ TALLOC_CTX *_mem_save_value_0;
+ TALLOC_CTX *_mem_save_size_0;
+ TALLOC_CTX *_mem_save_length_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
}
_mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
+ NDR_CHECK(ndr_pull_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_type));
if (_ptr_type) {
NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->in.type));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, 0);
}
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
- if (_ptr_data) {
- NDR_PULL_ALLOC(ndr, r->in.data);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
+ if (_ptr_value) {
+ NDR_PULL_ALLOC(ndr, r->in.value);
} else {
- r->in.data = NULL;
- }
- if (r->in.data) {
- _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->in.data, 0);
- NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
- NDR_CHECK(ndr_pull_array_length(ndr, &r->in.data));
- if (ndr_get_array_length(ndr, &r->in.data) > ndr_get_array_size(ndr, &r->in.data)) {
- 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.data), ndr_get_array_length(ndr, &r->in.data));
+ r->in.value = NULL;
+ }
+ if (r->in.value) {
+ _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.value, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value));
+ if (ndr_get_array_length(ndr, &r->in.value) > ndr_get_array_size(ndr, &r->in.value)) {
+ 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.value), ndr_get_array_length(ndr, &r->in.value));
}
- 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_length(ndr, &r->in.data)));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
+ NDR_PULL_ALLOC_N(ndr, r->in.value, ndr_get_array_size(ndr, &r->in.value));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.value, ndr_get_array_length(ndr, &r->in.value)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
}
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_size));
- if (_ptr_data_size) {
- NDR_PULL_ALLOC(ndr, r->in.data_size);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_size));
+ if (_ptr_size) {
+ NDR_PULL_ALLOC(ndr, r->in.size);
} else {
- r->in.data_size = NULL;
+ r->in.size = NULL;
}
- if (r->in.data_size) {
- _mem_save_data_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->in.data_size, 0);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.data_size));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_size_0, 0);
+ if (r->in.size) {
+ _mem_save_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.size, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.size));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_size_0, 0);
}
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value_length));
- if (_ptr_value_length) {
- NDR_PULL_ALLOC(ndr, r->in.value_length);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_length));
+ if (_ptr_length) {
+ NDR_PULL_ALLOC(ndr, r->in.length);
} else {
- r->in.value_length = NULL;
+ r->in.length = NULL;
}
- if (r->in.value_length) {
- _mem_save_value_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->in.value_length, 0);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.value_length));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_length_0, 0);
+ if (r->in.length) {
+ _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.length, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.length));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, 0);
}
NDR_PULL_ALLOC(ndr, r->out.name);
*r->out.name = *r->in.name;
- if (r->in.data) {
- if (r->in.data_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, *r->in.data_size));
+ if (r->in.value) {
+ if (r->in.size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.value, *r->in.size));
}
- if (r->in.data) {
- if (r->in.value_length == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.data, *r->in.value_length));
+ if (r->in.value) {
+ if (r->in.length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.value, *r->in.length));
}
}
if (flags & NDR_OUT) {
}
_mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
+ NDR_CHECK(ndr_pull_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_type));
if (_ptr_type) {
NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->out.type));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, 0);
}
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
- if (_ptr_data) {
- NDR_PULL_ALLOC(ndr, r->out.data);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
+ if (_ptr_value) {
+ NDR_PULL_ALLOC(ndr, r->out.value);
} else {
- r->out.data = NULL;
- }
- if (r->out.data) {
- _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.data, 0);
- NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
- NDR_CHECK(ndr_pull_array_length(ndr, &r->out.data));
- if (ndr_get_array_length(ndr, &r->out.data) > ndr_get_array_size(ndr, &r->out.data)) {
- 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.data), ndr_get_array_length(ndr, &r->out.data));
+ r->out.value = NULL;
+ }
+ if (r->out.value) {
+ _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.value, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.value));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->out.value));
+ if (ndr_get_array_length(ndr, &r->out.value) > ndr_get_array_size(ndr, &r->out.value)) {
+ 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.value), ndr_get_array_length(ndr, &r->out.value));
}
- NDR_PULL_ALLOC_N(ndr, r->out.data, ndr_get_array_size(ndr, &r->out.data));
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, ndr_get_array_length(ndr, &r->out.data)));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
+ NDR_PULL_ALLOC_N(ndr, r->out.value, ndr_get_array_size(ndr, &r->out.value));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.value, ndr_get_array_length(ndr, &r->out.value)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
}
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_size));
- if (_ptr_data_size) {
- NDR_PULL_ALLOC(ndr, r->out.data_size);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_size));
+ if (_ptr_size) {
+ NDR_PULL_ALLOC(ndr, r->out.size);
} else {
- r->out.data_size = NULL;
+ r->out.size = NULL;
}
- if (r->out.data_size) {
- _mem_save_data_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.data_size, 0);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.data_size));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_size_0, 0);
+ if (r->out.size) {
+ _mem_save_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.size, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.size));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_size_0, 0);
}
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value_length));
- if (_ptr_value_length) {
- NDR_PULL_ALLOC(ndr, r->out.value_length);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_length));
+ if (_ptr_length) {
+ NDR_PULL_ALLOC(ndr, r->out.length);
} else {
- r->out.value_length = NULL;
+ r->out.length = NULL;
}
- if (r->out.value_length) {
- _mem_save_value_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.value_length, 0);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.value_length));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_length_0, 0);
+ if (r->out.length) {
+ _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.length, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.length));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, 0);
}
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
- if (r->out.data) {
- if (r->out.data_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, *r->out.data_size));
+ if (r->out.value) {
+ if (r->out.size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.value, *r->out.size));
}
- if (r->out.data) {
- if (r->out.value_length == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.data, *r->out.value_length));
+ if (r->out.value) {
+ if (r->out.length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.value, *r->out.length));
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumValue *r)
ndr_print_uint32(ndr, "enum_index", r->in.enum_index);
ndr_print_ptr(ndr, "name", r->in.name);
ndr->depth++;
- ndr_print_winreg_StringBuf(ndr, "name", r->in.name);
+ ndr_print_winreg_ValNameBuf(ndr, "name", r->in.name);
ndr->depth--;
ndr_print_ptr(ndr, "type", r->in.type);
ndr->depth++;
ndr_print_winreg_Type(ndr, "type", *r->in.type);
}
ndr->depth--;
- ndr_print_ptr(ndr, "data", r->in.data);
+ ndr_print_ptr(ndr, "value", r->in.value);
ndr->depth++;
- if (r->in.data) {
- ndr_print_array_uint8(ndr, "data", r->in.data, *r->in.value_length);
+ if (r->in.value) {
+ if (r->in.length == NULL) return;
+ ndr_print_array_uint8(ndr, "value", r->in.value, *r->in.length);
}
ndr->depth--;
- ndr_print_ptr(ndr, "data_size", r->in.data_size);
+ ndr_print_ptr(ndr, "size", r->in.size);
ndr->depth++;
- if (r->in.data_size) {
- ndr_print_uint32(ndr, "data_size", *r->in.data_size);
+ if (r->in.size) {
+ ndr_print_uint32(ndr, "size", *r->in.size);
}
ndr->depth--;
- ndr_print_ptr(ndr, "value_length", r->in.value_length);
+ ndr_print_ptr(ndr, "length", r->in.length);
ndr->depth++;
- if (r->in.value_length) {
- ndr_print_uint32(ndr, "value_length", *r->in.value_length);
+ if (r->in.length) {
+ ndr_print_uint32(ndr, "length", *r->in.length);
}
ndr->depth--;
ndr->depth--;
ndr->depth++;
ndr_print_ptr(ndr, "name", r->out.name);
ndr->depth++;
- ndr_print_winreg_StringBuf(ndr, "name", r->out.name);
+ ndr_print_winreg_ValNameBuf(ndr, "name", r->out.name);
ndr->depth--;
ndr_print_ptr(ndr, "type", r->out.type);
ndr->depth++;
ndr_print_winreg_Type(ndr, "type", *r->out.type);
}
ndr->depth--;
- ndr_print_ptr(ndr, "data", r->out.data);
+ ndr_print_ptr(ndr, "value", r->out.value);
ndr->depth++;
- if (r->out.data) {
- ndr_print_array_uint8(ndr, "data", r->out.data, *r->out.value_length);
+ if (r->out.value) {
+ if (r->out.length == NULL) return;
+ ndr_print_array_uint8(ndr, "value", r->out.value, *r->out.length);
}
ndr->depth--;
- ndr_print_ptr(ndr, "data_size", r->out.data_size);
+ ndr_print_ptr(ndr, "size", r->out.size);
ndr->depth++;
- if (r->out.data_size) {
- ndr_print_uint32(ndr, "data_size", *r->out.data_size);
+ if (r->out.size) {
+ ndr_print_uint32(ndr, "size", *r->out.size);
}
ndr->depth--;
- ndr_print_ptr(ndr, "value_length", r->out.value_length);
+ ndr_print_ptr(ndr, "length", r->out.length);
ndr->depth++;
- if (r->out.value_length) {
- ndr_print_uint32(ndr, "value_length", *r->out.value_length);
+ if (r->out.length) {
+ ndr_print_uint32(ndr, "length", *r->out.length);
}
ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct winreg_FlushKey *r)
+static enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct winreg_FlushKey *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flags, struct winreg_FlushKey *r)
+static enum ndr_err_code ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flags, struct winreg_FlushKey *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_FlushKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_FlushKey *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_GetKeySecurity *r)
+static enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_GetKeySecurity *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
- if (r->in.sd == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.sd == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd));
}
if (flags & NDR_OUT) {
- if (r->out.sd == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.sd == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sd));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_GetKeySecurity *r)
+static enum ndr_err_code ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_GetKeySecurity *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sd_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_GetKeySecurity(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetKeySecurity *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_LoadKey(struct ndr_push *ndr, int flags, const struct winreg_LoadKey *r)
+static enum ndr_err_code ndr_push_winreg_LoadKey(struct ndr_push *ndr, int flags, const struct winreg_LoadKey *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.keyname));
if (r->in.keyname) {
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_LoadKey(struct ndr_pull *ndr, int flags, struct winreg_LoadKey *r)
+static enum ndr_err_code ndr_pull_winreg_LoadKey(struct ndr_pull *ndr, int flags, struct winreg_LoadKey *r)
{
uint32_t _ptr_keyname;
uint32_t _ptr_filename;
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_LoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_LoadKey *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, const struct winreg_NotifyChangeKeyValue *r)
+static enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, const struct winreg_NotifyChangeKeyValue *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.watch_subtree));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.notify_filter));
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, int flags, struct winreg_NotifyChangeKeyValue *r)
+static enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, int flags, struct winreg_NotifyChangeKeyValue *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_NotifyChangeKeyValue *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct winreg_OpenKey *r)
+static enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct winreg_OpenKey *r)
{
if (flags & NDR_IN) {
- if (r->in.parent_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.parent_handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.parent_handle));
NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyname));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
}
if (flags & NDR_OUT) {
- if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags, struct winreg_OpenKey *r)
+static enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags, struct winreg_OpenKey *r)
{
TALLOC_CTX *_mem_save_parent_handle_0;
TALLOC_CTX *_mem_save_handle_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_OpenKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenKey *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int flags, const struct winreg_QueryInfoKey *r)
+static enum ndr_err_code ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int flags, const struct winreg_QueryInfoKey *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
- if (r->in.classname == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.classname == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.classname));
}
if (flags & NDR_OUT) {
- if (r->out.classname == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.classname == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.classname));
- if (r->out.num_subkeys == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.num_subkeys == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_subkeys));
- if (r->out.max_subkeylen == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.max_subkeylen == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_subkeylen));
- if (r->out.max_classlen == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.max_classlen == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_classlen));
- if (r->out.num_values == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.num_values == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_values));
- if (r->out.max_valnamelen == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.max_valnamelen == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_valnamelen));
- if (r->out.max_valbufsize == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.max_valbufsize == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_valbufsize));
- if (r->out.secdescsize == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.secdescsize == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.secdescsize));
- if (r->out.last_changed_time == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.last_changed_time == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, *r->out.last_changed_time));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int flags, struct winreg_QueryInfoKey *r)
+static enum ndr_err_code ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int flags, struct winreg_QueryInfoKey *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_classname_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_last_changed_time_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_QueryInfoKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryInfoKey *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struct winreg_QueryValue *r)
+static enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struct winreg_QueryValue *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
- NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.value_name));
+ if (r->in.value_name == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.value_name));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.type));
if (r->in.type) {
NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->in.type));
}
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winreg_QueryValue *r)
+static enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winreg_QueryValue *r)
{
uint32_t _ptr_type;
uint32_t _ptr_data;
uint32_t _ptr_data_size;
uint32_t _ptr_value_length;
TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_value_name_0;
TALLOC_CTX *_mem_save_type_0;
TALLOC_CTX *_mem_save_data_0;
TALLOC_CTX *_mem_save_data_size_0;
NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.value_name));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.value_name);
+ }
+ _mem_save_value_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.value_name, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.value_name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_name_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_type));
if (_ptr_type) {
NDR_PULL_ALLOC(ndr, r->in.type);
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_length_0, 0);
}
if (r->in.data) {
- if (r->in.data_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.data_size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, *r->in.data_size));
}
if (r->in.data) {
- if (r->in.value_length == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.value_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.data, *r->in.value_length));
}
}
}
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
if (r->out.data) {
- if (r->out.data_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.data_size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, *r->out.data_size));
}
if (r->out.data) {
- if (r->out.value_length == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.value_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.data, *r->out.value_length));
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryValue *r)
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
- ndr_print_winreg_String(ndr, "value_name", &r->in.value_name);
+ ndr_print_ptr(ndr, "value_name", r->in.value_name);
+ ndr->depth++;
+ ndr_print_winreg_String(ndr, "value_name", r->in.value_name);
+ ndr->depth--;
ndr_print_ptr(ndr, "type", r->in.type);
ndr->depth++;
if (r->in.type) {
ndr_print_ptr(ndr, "data", r->in.data);
ndr->depth++;
if (r->in.data) {
+ if (r->in.value_length == NULL) return;
ndr_print_array_uint8(ndr, "data", r->in.data, *r->in.value_length);
}
ndr->depth--;
ndr_print_ptr(ndr, "data", r->out.data);
ndr->depth++;
if (r->out.data) {
+ if (r->out.value_length == NULL) return;
ndr_print_array_uint8(ndr, "data", r->out.data, *r->out.value_length);
}
ndr->depth--;
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_ReplaceKey(struct ndr_push *ndr, int flags, const struct winreg_ReplaceKey *r)
+static enum ndr_err_code ndr_push_winreg_ReplaceKey(struct ndr_push *ndr, int flags, const struct winreg_ReplaceKey *r)
{
if (flags & NDR_IN) {
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_ReplaceKey(struct ndr_pull *ndr, int flags, struct winreg_ReplaceKey *r)
+static enum ndr_err_code ndr_pull_winreg_ReplaceKey(struct ndr_pull *ndr, int flags, struct winreg_ReplaceKey *r)
{
if (flags & NDR_IN) {
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_ReplaceKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_ReplaceKey *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_RestoreKey(struct ndr_push *ndr, int flags, const struct winreg_RestoreKey *r)
+static enum ndr_err_code ndr_push_winreg_RestoreKey(struct ndr_push *ndr, int flags, const struct winreg_RestoreKey *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
- if (r->in.filename == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.filename == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_RestoreKey(struct ndr_pull *ndr, int flags, struct winreg_RestoreKey *r)
+static enum ndr_err_code ndr_pull_winreg_RestoreKey(struct ndr_pull *ndr, int flags, struct winreg_RestoreKey *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_filename_0;
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_RestoreKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_RestoreKey *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_SaveKey(struct ndr_push *ndr, int flags, const struct winreg_SaveKey *r)
+static enum ndr_err_code ndr_push_winreg_SaveKey(struct ndr_push *ndr, int flags, const struct winreg_SaveKey *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
- if (r->in.filename == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.filename == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sec_attrib));
if (r->in.sec_attrib) {
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_SaveKey(struct ndr_pull *ndr, int flags, struct winreg_SaveKey *r)
+static enum ndr_err_code ndr_pull_winreg_SaveKey(struct ndr_pull *ndr, int flags, struct winreg_SaveKey *r)
{
uint32_t _ptr_sec_attrib;
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_SaveKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SaveKey *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_SetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_SetKeySecurity *r)
+static enum ndr_err_code ndr_push_winreg_SetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_SetKeySecurity *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
- if (r->in.sd == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.sd == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd));
}
if (flags & NDR_OUT) {
- if (r->out.sd == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sd));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_SetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_SetKeySecurity *r)
+static enum ndr_err_code ndr_pull_winreg_SetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_SetKeySecurity *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sd_0;
if (flags & NDR_IN) {
- ZERO_STRUCT(r->out);
-
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.handle);
}
NDR_PULL_SET_MEM_CTX(ndr, r->in.sd, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_PULL_ALLOC(ndr, r->out.sd);
- *r->out.sd = *r->in.sd;
}
if (flags & NDR_OUT) {
- if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.sd);
- }
- _mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.sd, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sd));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_SetKeySecurity(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SetKeySecurity *r)
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "winreg_SetKeySecurity");
ndr->depth++;
- ndr_print_ptr(ndr, "sd", r->out.sd);
- ndr->depth++;
- ndr_print_KeySecurityData(ndr, "sd", r->out.sd);
- ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
}
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_SetValue(struct ndr_push *ndr, int flags, const struct winreg_SetValue *r)
+static enum ndr_err_code ndr_push_winreg_SetValue(struct ndr_push *ndr, int flags, const struct winreg_SetValue *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->in.type));
- if (r->in.data == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.data == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.size));
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.size));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.size));
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_SetValue(struct ndr_pull *ndr, int flags, struct winreg_SetValue *r)
+static enum ndr_err_code ndr_pull_winreg_SetValue(struct ndr_pull *ndr, int flags, struct winreg_SetValue *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_SetValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SetValue *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_UnLoadKey(struct ndr_push *ndr, int flags, const struct winreg_UnLoadKey *r)
+static enum ndr_err_code ndr_push_winreg_UnLoadKey(struct ndr_push *ndr, int flags, const struct winreg_UnLoadKey *r)
{
if (flags & NDR_IN) {
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_UnLoadKey(struct ndr_pull *ndr, int flags, struct winreg_UnLoadKey *r)
+static enum ndr_err_code ndr_pull_winreg_UnLoadKey(struct ndr_pull *ndr, int flags, struct winreg_UnLoadKey *r)
{
if (flags & NDR_IN) {
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_UnLoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_UnLoadKey *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_InitiateSystemShutdown(struct ndr_push *ndr, int flags, const struct winreg_InitiateSystemShutdown *r)
+static enum ndr_err_code ndr_push_winreg_InitiateSystemShutdown(struct ndr_push *ndr, int flags, const struct winreg_InitiateSystemShutdown *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hostname));
}
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
- NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.reboot));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.do_reboot));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_InitiateSystemShutdown(struct ndr_pull *ndr, int flags, struct winreg_InitiateSystemShutdown *r)
+static enum ndr_err_code ndr_pull_winreg_InitiateSystemShutdown(struct ndr_pull *ndr, int flags, struct winreg_InitiateSystemShutdown *r)
{
uint32_t _ptr_hostname;
uint32_t _ptr_message;
}
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.reboot));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.do_reboot));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_InitiateSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdown *r)
ndr->depth--;
ndr_print_uint32(ndr, "timeout", r->in.timeout);
ndr_print_uint8(ndr, "force_apps", r->in.force_apps);
- ndr_print_uint8(ndr, "reboot", r->in.reboot);
+ ndr_print_uint8(ndr, "do_reboot", r->in.do_reboot);
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_AbortSystemShutdown(struct ndr_push *ndr, int flags, const struct winreg_AbortSystemShutdown *r)
+static enum ndr_err_code ndr_push_winreg_AbortSystemShutdown(struct ndr_push *ndr, int flags, const struct winreg_AbortSystemShutdown *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_AbortSystemShutdown(struct ndr_pull *ndr, int flags, struct winreg_AbortSystemShutdown *r)
+static enum ndr_err_code ndr_pull_winreg_AbortSystemShutdown(struct ndr_pull *ndr, int flags, struct winreg_AbortSystemShutdown *r)
{
uint32_t _ptr_server;
TALLOC_CTX *_mem_save_server_0;
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_AbortSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_AbortSystemShutdown *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struct winreg_GetVersion *r)
+static enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struct winreg_GetVersion *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
}
if (flags & NDR_OUT) {
- if (r->out.version == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.version == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.version));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int flags, struct winreg_GetVersion *r)
+static enum ndr_err_code ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int flags, struct winreg_GetVersion *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_version_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetVersion *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKCC(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCC *r)
+static enum ndr_err_code ndr_push_winreg_OpenHKCC(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCC *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
}
if (flags & NDR_OUT) {
- if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_OpenHKCC(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCC *r)
+static enum ndr_err_code ndr_pull_winreg_OpenHKCC(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCC *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_OpenHKCC(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCC *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKDD(struct ndr_push *ndr, int flags, const struct winreg_OpenHKDD *r)
+static enum ndr_err_code ndr_push_winreg_OpenHKDD(struct ndr_push *ndr, int flags, const struct winreg_OpenHKDD *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
}
if (flags & NDR_OUT) {
- if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_OpenHKDD(struct ndr_pull *ndr, int flags, struct winreg_OpenHKDD *r)
+static enum ndr_err_code ndr_pull_winreg_OpenHKDD(struct ndr_pull *ndr, int flags, struct winreg_OpenHKDD *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_OpenHKDD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKDD *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues *r)
+static enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues *r)
{
uint32_t cntr_values_1;
if (flags & NDR_IN) {
- if (r->in.key_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.key_handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.key_handle));
- if (r->in.values == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.values == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_values));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_values));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.buffer_size));
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, *r->in.buffer_size));
}
- if (r->in.buffer_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.buffer_size == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.buffer_size));
}
if (flags & NDR_OUT) {
- if (r->out.values == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.values == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_values));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_values));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.buffer_size));
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, *r->out.buffer_size));
}
- if (r->out.buffer_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.buffer_size == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.buffer_size));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues *r)
+static enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues *r)
{
uint32_t cntr_values_1;
uint32_t _ptr_buffer;
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC_N(ndr, r->in.values, ndr_get_array_size(ndr, &r->in.values));
}
- memcpy(r->out.values,r->in.values,ndr_get_array_size(ndr, &r->in.values) * sizeof(*r->in.values));
+ memcpy(r->out.values, r->in.values, ndr_get_array_size(ndr, &r->in.values) * sizeof(*r->in.values));
_mem_save_values_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.values, 0);
for (cntr_values_1 = 0; cntr_values_1 < r->in.num_values; cntr_values_1++) {
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.buffer_size));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_size_0, LIBNDR_FLAG_REF_ALLOC);
NDR_PULL_ALLOC_N(ndr, r->out.values, r->in.num_values);
- memcpy(r->out.values, r->in.values, r->in.num_values * sizeof(*r->in.values));
+ memcpy(r->out.values, r->in.values, (r->in.num_values) * sizeof(*r->in.values));
NDR_PULL_ALLOC(ndr, r->out.buffer_size);
*r->out.buffer_size = *r->in.buffer_size;
if (r->in.values) {
NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.values, r->in.num_values));
}
if (r->in.buffer) {
- if (r->in.buffer_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, *r->in.buffer_size));
}
if (r->in.buffer) {
- if (r->in.buffer_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.buffer, *r->in.buffer_size));
}
}
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC_N(ndr, r->out.values, ndr_get_array_size(ndr, &r->out.values));
}
- memcpy(r->out.values,r->in.values,ndr_get_array_size(ndr, &r->out.values) * sizeof(*r->in.values));
+ memcpy(r->out.values, r->in.values, ndr_get_array_size(ndr, &r->out.values) * sizeof(*r->in.values));
_mem_save_values_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.values, 0);
for (cntr_values_1 = 0; cntr_values_1 < r->in.num_values; cntr_values_1++) {
NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.values, r->in.num_values));
}
if (r->out.buffer) {
- if (r->out.buffer_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, *r->out.buffer_size));
}
if (r->out.buffer) {
- if (r->out.buffer_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.buffer, *r->out.buffer_size));
}
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryMultipleValues *r)
ndr->depth--;
ndr_print_ptr(ndr, "values", r->in.values);
ndr->depth++;
- ndr->print(ndr, "%s: ARRAY(%d)", "values", r->in.num_values);
+ ndr->print(ndr, "%s: ARRAY(%d)", "values", (int)r->in.num_values);
ndr->depth++;
for (cntr_values_1=0;cntr_values_1<r->in.num_values;cntr_values_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_values_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_values_1) != -1) {
ndr_print_QueryMultipleValue(ndr, "values", &r->in.values[cntr_values_1]);
free(idx_1);
}
ndr->depth++;
ndr_print_ptr(ndr, "values", r->out.values);
ndr->depth++;
- ndr->print(ndr, "%s: ARRAY(%d)", "values", r->in.num_values);
+ ndr->print(ndr, "%s: ARRAY(%d)", "values", (int)r->in.num_values);
ndr->depth++;
for (cntr_values_1=0;cntr_values_1<r->in.num_values;cntr_values_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_values_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_values_1) != -1) {
ndr_print_QueryMultipleValue(ndr, "values", &r->out.values[cntr_values_1]);
free(idx_1);
}
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_InitiateSystemShutdownEx(struct ndr_push *ndr, int flags, const struct winreg_InitiateSystemShutdownEx *r)
+static enum ndr_err_code ndr_push_winreg_InitiateSystemShutdownEx(struct ndr_push *ndr, int flags, const struct winreg_InitiateSystemShutdownEx *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hostname));
}
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
- NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.reboot));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.do_reboot));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reason));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_InitiateSystemShutdownEx(struct ndr_pull *ndr, int flags, struct winreg_InitiateSystemShutdownEx *r)
+static enum ndr_err_code ndr_pull_winreg_InitiateSystemShutdownEx(struct ndr_pull *ndr, int flags, struct winreg_InitiateSystemShutdownEx *r)
{
uint32_t _ptr_hostname;
uint32_t _ptr_message;
}
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.reboot));
+ 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 NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_InitiateSystemShutdownEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdownEx *r)
ndr->depth--;
ndr_print_uint32(ndr, "timeout", r->in.timeout);
ndr_print_uint8(ndr, "force_apps", r->in.force_apps);
- ndr_print_uint8(ndr, "reboot", r->in.reboot);
+ ndr_print_uint8(ndr, "do_reboot", r->in.do_reboot);
ndr_print_uint32(ndr, "reason", r->in.reason);
ndr->depth--;
}
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_SaveKeyEx(struct ndr_push *ndr, int flags, const struct winreg_SaveKeyEx *r)
+static enum ndr_err_code ndr_push_winreg_SaveKeyEx(struct ndr_push *ndr, int flags, const struct winreg_SaveKeyEx *r)
{
if (flags & NDR_IN) {
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_SaveKeyEx(struct ndr_pull *ndr, int flags, struct winreg_SaveKeyEx *r)
+static enum ndr_err_code ndr_pull_winreg_SaveKeyEx(struct ndr_pull *ndr, int flags, struct winreg_SaveKeyEx *r)
{
if (flags & NDR_IN) {
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_SaveKeyEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SaveKeyEx *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKPT(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPT *r)
+static enum ndr_err_code ndr_push_winreg_OpenHKPT(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPT *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
}
if (flags & NDR_OUT) {
- if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_OpenHKPT(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPT *r)
+static enum ndr_err_code ndr_pull_winreg_OpenHKPT(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPT *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_OpenHKPT(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPT *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKPN(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPN *r)
+static enum ndr_err_code ndr_push_winreg_OpenHKPN(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPN *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
}
if (flags & NDR_OUT) {
- if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_OpenHKPN(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPN *r)
+static enum ndr_err_code ndr_pull_winreg_OpenHKPN(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPN *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_OpenHKPN(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPN *r)
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_QueryMultipleValues2(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues2 *r)
+static enum ndr_err_code ndr_push_winreg_QueryMultipleValues2(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues2 *r)
{
if (flags & NDR_IN) {
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
-NTSTATUS ndr_pull_winreg_QueryMultipleValues2(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues2 *r)
+static enum ndr_err_code ndr_pull_winreg_QueryMultipleValues2(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues2 *r)
{
if (flags & NDR_IN) {
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
- return NT_STATUS_OK;
+ return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_winreg_QueryMultipleValues2(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryMultipleValues2 *r)
ndr->depth--;
}
-const struct dcerpc_interface_call winreg_calls[] = {
+static const struct ndr_interface_call winreg_calls[] = {
{
"winreg_OpenHKCR",
sizeof(struct winreg_OpenHKCR),
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKCR,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKCR,
(ndr_print_function_t) ndr_print_winreg_OpenHKCR,
- False,
+ false,
},
{
"winreg_OpenHKCU",
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKCU,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKCU,
(ndr_print_function_t) ndr_print_winreg_OpenHKCU,
- False,
+ false,
},
{
"winreg_OpenHKLM",
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKLM,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKLM,
(ndr_print_function_t) ndr_print_winreg_OpenHKLM,
- False,
+ false,
},
{
"winreg_OpenHKPD",
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKPD,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKPD,
(ndr_print_function_t) ndr_print_winreg_OpenHKPD,
- False,
+ false,
},
{
"winreg_OpenHKU",
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKU,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKU,
(ndr_print_function_t) ndr_print_winreg_OpenHKU,
- False,
+ false,
},
{
"winreg_CloseKey",
(ndr_push_flags_fn_t) ndr_push_winreg_CloseKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_CloseKey,
(ndr_print_function_t) ndr_print_winreg_CloseKey,
- False,
+ false,
},
{
"winreg_CreateKey",
(ndr_push_flags_fn_t) ndr_push_winreg_CreateKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_CreateKey,
(ndr_print_function_t) ndr_print_winreg_CreateKey,
- False,
+ false,
},
{
"winreg_DeleteKey",
(ndr_push_flags_fn_t) ndr_push_winreg_DeleteKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_DeleteKey,
(ndr_print_function_t) ndr_print_winreg_DeleteKey,
- False,
+ false,
},
{
"winreg_DeleteValue",
(ndr_push_flags_fn_t) ndr_push_winreg_DeleteValue,
(ndr_pull_flags_fn_t) ndr_pull_winreg_DeleteValue,
(ndr_print_function_t) ndr_print_winreg_DeleteValue,
- False,
+ false,
},
{
"winreg_EnumKey",
(ndr_push_flags_fn_t) ndr_push_winreg_EnumKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_EnumKey,
(ndr_print_function_t) ndr_print_winreg_EnumKey,
- False,
+ false,
},
{
"winreg_EnumValue",
(ndr_push_flags_fn_t) ndr_push_winreg_EnumValue,
(ndr_pull_flags_fn_t) ndr_pull_winreg_EnumValue,
(ndr_print_function_t) ndr_print_winreg_EnumValue,
- False,
+ false,
},
{
"winreg_FlushKey",
(ndr_push_flags_fn_t) ndr_push_winreg_FlushKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_FlushKey,
(ndr_print_function_t) ndr_print_winreg_FlushKey,
- False,
+ false,
},
{
"winreg_GetKeySecurity",
(ndr_push_flags_fn_t) ndr_push_winreg_GetKeySecurity,
(ndr_pull_flags_fn_t) ndr_pull_winreg_GetKeySecurity,
(ndr_print_function_t) ndr_print_winreg_GetKeySecurity,
- False,
+ false,
},
{
"winreg_LoadKey",
(ndr_push_flags_fn_t) ndr_push_winreg_LoadKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_LoadKey,
(ndr_print_function_t) ndr_print_winreg_LoadKey,
- False,
+ false,
},
{
"winreg_NotifyChangeKeyValue",
(ndr_push_flags_fn_t) ndr_push_winreg_NotifyChangeKeyValue,
(ndr_pull_flags_fn_t) ndr_pull_winreg_NotifyChangeKeyValue,
(ndr_print_function_t) ndr_print_winreg_NotifyChangeKeyValue,
- False,
+ false,
},
{
"winreg_OpenKey",
(ndr_push_flags_fn_t) ndr_push_winreg_OpenKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenKey,
(ndr_print_function_t) ndr_print_winreg_OpenKey,
- False,
+ false,
},
{
"winreg_QueryInfoKey",
(ndr_push_flags_fn_t) ndr_push_winreg_QueryInfoKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_QueryInfoKey,
(ndr_print_function_t) ndr_print_winreg_QueryInfoKey,
- False,
+ false,
},
{
"winreg_QueryValue",
(ndr_push_flags_fn_t) ndr_push_winreg_QueryValue,
(ndr_pull_flags_fn_t) ndr_pull_winreg_QueryValue,
(ndr_print_function_t) ndr_print_winreg_QueryValue,
- False,
+ false,
},
{
"winreg_ReplaceKey",
(ndr_push_flags_fn_t) ndr_push_winreg_ReplaceKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_ReplaceKey,
(ndr_print_function_t) ndr_print_winreg_ReplaceKey,
- False,
+ false,
},
{
"winreg_RestoreKey",
(ndr_push_flags_fn_t) ndr_push_winreg_RestoreKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_RestoreKey,
(ndr_print_function_t) ndr_print_winreg_RestoreKey,
- False,
+ false,
},
{
"winreg_SaveKey",
(ndr_push_flags_fn_t) ndr_push_winreg_SaveKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_SaveKey,
(ndr_print_function_t) ndr_print_winreg_SaveKey,
- False,
+ false,
},
{
"winreg_SetKeySecurity",
(ndr_push_flags_fn_t) ndr_push_winreg_SetKeySecurity,
(ndr_pull_flags_fn_t) ndr_pull_winreg_SetKeySecurity,
(ndr_print_function_t) ndr_print_winreg_SetKeySecurity,
- False,
+ false,
},
{
"winreg_SetValue",
(ndr_push_flags_fn_t) ndr_push_winreg_SetValue,
(ndr_pull_flags_fn_t) ndr_pull_winreg_SetValue,
(ndr_print_function_t) ndr_print_winreg_SetValue,
- False,
+ false,
},
{
"winreg_UnLoadKey",
(ndr_push_flags_fn_t) ndr_push_winreg_UnLoadKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_UnLoadKey,
(ndr_print_function_t) ndr_print_winreg_UnLoadKey,
- False,
+ false,
},
{
"winreg_InitiateSystemShutdown",
(ndr_push_flags_fn_t) ndr_push_winreg_InitiateSystemShutdown,
(ndr_pull_flags_fn_t) ndr_pull_winreg_InitiateSystemShutdown,
(ndr_print_function_t) ndr_print_winreg_InitiateSystemShutdown,
- False,
+ false,
},
{
"winreg_AbortSystemShutdown",
(ndr_push_flags_fn_t) ndr_push_winreg_AbortSystemShutdown,
(ndr_pull_flags_fn_t) ndr_pull_winreg_AbortSystemShutdown,
(ndr_print_function_t) ndr_print_winreg_AbortSystemShutdown,
- False,
+ false,
},
{
"winreg_GetVersion",
(ndr_push_flags_fn_t) ndr_push_winreg_GetVersion,
(ndr_pull_flags_fn_t) ndr_pull_winreg_GetVersion,
(ndr_print_function_t) ndr_print_winreg_GetVersion,
- False,
+ false,
},
{
"winreg_OpenHKCC",
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKCC,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKCC,
(ndr_print_function_t) ndr_print_winreg_OpenHKCC,
- False,
+ false,
},
{
"winreg_OpenHKDD",
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKDD,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKDD,
(ndr_print_function_t) ndr_print_winreg_OpenHKDD,
- False,
+ false,
},
{
"winreg_QueryMultipleValues",
(ndr_push_flags_fn_t) ndr_push_winreg_QueryMultipleValues,
(ndr_pull_flags_fn_t) ndr_pull_winreg_QueryMultipleValues,
(ndr_print_function_t) ndr_print_winreg_QueryMultipleValues,
- False,
+ false,
},
{
"winreg_InitiateSystemShutdownEx",
(ndr_push_flags_fn_t) ndr_push_winreg_InitiateSystemShutdownEx,
(ndr_pull_flags_fn_t) ndr_pull_winreg_InitiateSystemShutdownEx,
(ndr_print_function_t) ndr_print_winreg_InitiateSystemShutdownEx,
- False,
+ false,
},
{
"winreg_SaveKeyEx",
(ndr_push_flags_fn_t) ndr_push_winreg_SaveKeyEx,
(ndr_pull_flags_fn_t) ndr_pull_winreg_SaveKeyEx,
(ndr_print_function_t) ndr_print_winreg_SaveKeyEx,
- False,
+ false,
},
{
"winreg_OpenHKPT",
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKPT,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKPT,
(ndr_print_function_t) ndr_print_winreg_OpenHKPT,
- False,
+ false,
},
{
"winreg_OpenHKPN",
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKPN,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKPN,
(ndr_print_function_t) ndr_print_winreg_OpenHKPN,
- False,
+ false,
},
{
"winreg_QueryMultipleValues2",
(ndr_push_flags_fn_t) ndr_push_winreg_QueryMultipleValues2,
(ndr_pull_flags_fn_t) ndr_pull_winreg_QueryMultipleValues2,
(ndr_print_function_t) ndr_print_winreg_QueryMultipleValues2,
- False,
+ false,
},
- { NULL, 0, NULL, NULL, NULL, False }
+ { NULL, 0, NULL, NULL, NULL, false }
};
-const char * const winreg_endpoint_strings[] = {
+static const char * const winreg_endpoint_strings[] = {
"ncacn_np:[\\pipe\\winreg]",
"ncacn_ip_tcp:",
"ncalrpc:",
};
-const struct dcerpc_endpoint_list winreg_endpoints = {
+static const struct ndr_interface_string_array winreg_endpoints = {
.count = 3,
.names = winreg_endpoint_strings
};
-const char * const winreg_authservice_strings[] = {
+static const char * const winreg_authservice_strings[] = {
"host",
};
-const struct dcerpc_authservice_list winreg_authservices = {
- .count = 3,
+static const struct ndr_interface_string_array winreg_authservices = {
+ .count = 1,
.names = winreg_authservice_strings
};
-const struct dcerpc_interface_table dcerpc_table_winreg = {
+const struct ndr_interface_table ndr_table_winreg = {
.name = "winreg",
.syntax_id = {
{0x338cd001,0x2244,0x31f1,{0xaa,0xaa},{0x90,0x00,0x38,0x00,0x10,0x03}},
- DCERPC_WINREG_VERSION
+ NDR_WINREG_VERSION
},
- .helpstring = DCERPC_WINREG_HELPSTRING,
+ .helpstring = NDR_WINREG_HELPSTRING,
.num_calls = 35,
.calls = winreg_calls,
.endpoints = &winreg_endpoints,