summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in2
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/librpc/gen_ndr/cli_winreg.c2
-rw-r--r--source3/librpc/gen_ndr/cli_winreg.h2
-rw-r--r--source3/librpc/gen_ndr/ndr_winreg.c89
-rw-r--r--source3/librpc/gen_ndr/ndr_winreg.h1
-rw-r--r--source3/librpc/gen_ndr/winreg.h10
-rw-r--r--source3/librpc/idl/winreg.idl410
-rw-r--r--source3/utils/net_rpc_registry.c2
9 files changed, 15 insertions, 504 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 6fe26d3d1b..eddcaaac42 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1208,7 +1208,7 @@ modules:: SHOWFLAGS $(MODULES)
samba3-idl::
@PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh librpc/idl/lsa.idl \
- ../librpc/idl/dfs.idl ../librpc/idl/echo.idl librpc/idl/winreg.idl \
+ ../librpc/idl/dfs.idl ../librpc/idl/echo.idl ../librpc/idl/winreg.idl \
../librpc/idl/initshutdown.idl librpc/idl/srvsvc.idl ../librpc/idl/svcctl.idl \
../librpc/idl/eventlog.idl ../librpc/idl/wkssvc.idl librpc/idl/netlogon.idl \
../librpc/idl/notify.idl ../librpc/idl/epmapper.idl librpc/idl/messaging.idl \
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 18bbd11ab9..ad2c719988 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3538,7 +3538,6 @@ _PUBLIC_ void ndr_print_KeySecurityData(struct ndr_print *ndr, const char *name,
_PUBLIC_ void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, const struct winreg_SecBuf *r);
_PUBLIC_ void ndr_print_winreg_CreateAction(struct ndr_print *ndr, const char *name, enum winreg_CreateAction r);
_PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r);
-_PUBLIC_ void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r);
_PUBLIC_ void ndr_print_KeySecurityAttribute(struct ndr_print *ndr, const char *name, const struct KeySecurityAttribute *r);
_PUBLIC_ void ndr_print_QueryMultipleValue(struct ndr_print *ndr, const char *name, const struct QueryMultipleValue *r);
_PUBLIC_ void ndr_print_winreg_OpenHKCR(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCR *r);
diff --git a/source3/librpc/gen_ndr/cli_winreg.c b/source3/librpc/gen_ndr/cli_winreg.c
index d558a5a185..17b7281c72 100644
--- a/source3/librpc/gen_ndr/cli_winreg.c
+++ b/source3/librpc/gen_ndr/cli_winreg.c
@@ -497,7 +497,7 @@ NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
uint32_t enum_index /* [in] */,
- struct winreg_ValNameBuf *name /* [in,out] [ref] */,
+ struct winreg_StringBuf *name /* [in,out] [ref] */,
enum winreg_Type *type /* [in,out] [unique] */,
uint8_t *value /* [in,out] [unique,length_is(*length),size_is(*size)] */,
uint32_t *size /* [in,out] [unique] */,
diff --git a/source3/librpc/gen_ndr/cli_winreg.h b/source3/librpc/gen_ndr/cli_winreg.h
index ce2bfcd5ec..fb27bce9d2 100644
--- a/source3/librpc/gen_ndr/cli_winreg.h
+++ b/source3/librpc/gen_ndr/cli_winreg.h
@@ -68,7 +68,7 @@ NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
uint32_t enum_index /* [in] */,
- struct winreg_ValNameBuf *name /* [in,out] [ref] */,
+ struct winreg_StringBuf *name /* [in,out] [ref] */,
enum winreg_Type *type /* [in,out] [unique] */,
uint8_t *value /* [in,out] [unique,length_is(*length),size_is(*size)] */,
uint32_t *size /* [in,out] [unique] */,
diff --git a/source3/librpc/gen_ndr/ndr_winreg.c b/source3/librpc/gen_ndr/ndr_winreg.c
index 41c9acd7b9..791d11103d 100644
--- a/source3/librpc/gen_ndr/ndr_winreg.c
+++ b/source3/librpc/gen_ndr/ndr_winreg.c
@@ -275,77 +275,6 @@ static enum ndr_err_code ndr_push_winreg_StringBuf(struct ndr_push *ndr, int ndr
{
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, 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_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 NDR_ERR_SUCCESS;
-}
-
-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;
- 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_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, "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_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));
@@ -361,7 +290,7 @@ static enum ndr_err_code ndr_push_winreg_ValNameBuf(struct ndr_push *ndr, int nd
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_winreg_ValNameBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_ValNameBuf *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;
@@ -398,9 +327,9 @@ static enum ndr_err_code ndr_pull_winreg_ValNameBuf(struct ndr_pull *ndr, int nd
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r)
+_PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r)
{
- ndr_print_struct(ndr, name, "winreg_ValNameBuf");
+ ndr_print_struct(ndr, name, "winreg_StringBuf");
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);
@@ -1529,7 +1458,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int f
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_winreg_StringBuf(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));
@@ -1554,7 +1483,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int f
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_winreg_StringBuf(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));
@@ -1607,7 +1536,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int f
}
_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_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
+ NDR_CHECK(ndr_pull_winreg_StringBuf(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) {
@@ -1680,7 +1609,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int f
}
_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_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
+ NDR_CHECK(ndr_pull_winreg_StringBuf(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) {
@@ -1766,7 +1695,7 @@ _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name
ndr_print_uint32(ndr, "enum_index", r->in.enum_index);
ndr_print_ptr(ndr, "name", r->in.name);
ndr->depth++;
- ndr_print_winreg_ValNameBuf(ndr, "name", r->in.name);
+ ndr_print_winreg_StringBuf(ndr, "name", r->in.name);
ndr->depth--;
ndr_print_ptr(ndr, "type", r->in.type);
ndr->depth++;
@@ -1800,7 +1729,7 @@ _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name
ndr->depth++;
ndr_print_ptr(ndr, "name", r->out.name);
ndr->depth++;
- ndr_print_winreg_ValNameBuf(ndr, "name", r->out.name);
+ ndr_print_winreg_StringBuf(ndr, "name", r->out.name);
ndr->depth--;
ndr_print_ptr(ndr, "type", r->out.type);
ndr->depth++;
diff --git a/source3/librpc/gen_ndr/ndr_winreg.h b/source3/librpc/gen_ndr/ndr_winreg.h
index ed988638ff..8dea3ae273 100644
--- a/source3/librpc/gen_ndr/ndr_winreg.h
+++ b/source3/librpc/gen_ndr/ndr_winreg.h
@@ -93,7 +93,6 @@ void ndr_print_KeySecurityData(struct ndr_print *ndr, const char *name, const st
void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, const struct winreg_SecBuf *r);
void ndr_print_winreg_CreateAction(struct ndr_print *ndr, const char *name, enum winreg_CreateAction r);
void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r);
-void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r);
enum ndr_err_code ndr_push_winreg_NotifyChangeType(struct ndr_push *ndr, int ndr_flags, uint32_t r);
enum ndr_err_code ndr_pull_winreg_NotifyChangeType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
void ndr_print_winreg_NotifyChangeType(struct ndr_print *ndr, const char *name, uint32_t r);
diff --git a/source3/librpc/gen_ndr/winreg.h b/source3/librpc/gen_ndr/winreg.h
index 0f3c45ebb7..fbbab33c8d 100644
--- a/source3/librpc/gen_ndr/winreg.h
+++ b/source3/librpc/gen_ndr/winreg.h
@@ -84,12 +84,6 @@ enum winreg_CreateAction
;
struct winreg_StringBuf {
- uint16_t length;/* [value(strlen_m_term_null(name)*2)] */
- uint16_t size;
- const char *name;/* [unique,length_is(length/2),charset(UTF16),size_is(size/2)] */
-};
-
-struct winreg_ValNameBuf {
uint16_t length;/* [value(strlen_m_term(name)*2)] */
uint16_t size;
const char *name;/* [unique,length_is(length/2),charset(UTF16),size_is(size/2)] */
@@ -267,7 +261,7 @@ struct winreg_EnumValue {
struct {
struct policy_handle *handle;/* [ref] */
uint32_t enum_index;
- struct winreg_ValNameBuf *name;/* [ref] */
+ struct winreg_StringBuf *name;/* [ref] */
enum winreg_Type *type;/* [unique] */
uint8_t *value;/* [unique,length_is(*length),size_is(*size)] */
uint32_t *size;/* [unique] */
@@ -275,7 +269,7 @@ struct winreg_EnumValue {
} in;
struct {
- struct winreg_ValNameBuf *name;/* [ref] */
+ struct winreg_StringBuf *name;/* [ref] */
enum winreg_Type *type;/* [unique] */
uint8_t *value;/* [unique,length_is(*length),size_is(*size)] */
uint32_t *size;/* [unique] */
diff --git a/source3/librpc/idl/winreg.idl b/source3/librpc/idl/winreg.idl
deleted file mode 100644
index 58f5eab805..0000000000
--- a/source3/librpc/idl/winreg.idl
+++ /dev/null
@@ -1,410 +0,0 @@
-/*
- winreg interface definition
-*/
-
-import "lsa.idl", "security.idl";
-
-[
- uuid("338cd001-2244-31f1-aaaa-900038001003"),
- version(1.0),
- endpoint("ncacn_np:[\\pipe\\winreg]","ncacn_ip_tcp:","ncalrpc:"),
- pointer_default(unique),
- helpstring("Remote Registry Service")
-] interface winreg
-{
- typedef bitmap security_secinfo security_secinfo;
-
- typedef [bitmap32bit] bitmap {
- KEY_QUERY_VALUE = 0x00001,
- KEY_SET_VALUE = 0x00002,
- KEY_CREATE_SUB_KEY = 0x00004,
- KEY_ENUMERATE_SUB_KEYS = 0x00008,
- KEY_NOTIFY = 0x00010,
- KEY_CREATE_LINK = 0x00020,
- KEY_WOW64_64KEY = 0x00100,
- KEY_WOW64_32KEY = 0x00200
- } winreg_AccessMask;
-
- typedef [public,v1_enum] enum {
- REG_NONE = 0,
- REG_SZ = 1,
- REG_EXPAND_SZ = 2,
- REG_BINARY = 3,
- REG_DWORD = 4,
- REG_DWORD_BIG_ENDIAN = 5,
- REG_LINK = 6,
- REG_MULTI_SZ = 7,
- REG_RESOURCE_LIST = 8,
- REG_FULL_RESOURCE_DESCRIPTOR = 9,
- REG_RESOURCE_REQUIREMENTS_LIST = 10,
- REG_QWORD = 11
- } winreg_Type;
-
- typedef [public,noejs] struct {
- [value(strlen_m_term(name)*2)] uint16 name_len;
- [value(strlen_m_term(name)*2)] uint16 name_size;
- [string,charset(UTF16)] uint16 *name;
- } winreg_String;
-
- /******************/
- /* Function: 0x00 */
- WERROR winreg_OpenHKCR(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x01 */
- WERROR winreg_OpenHKCU(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x02 */
- [public] WERROR winreg_OpenHKLM(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x03 */
- WERROR winreg_OpenHKPD(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x04 */
- WERROR winreg_OpenHKU(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x05 */
- [public] WERROR winreg_CloseKey(
- [in,out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x06 */
-
- typedef struct {
- [size_is(size),length_is(len)] uint8 *data;
- uint32 size;
- uint32 len;
- } KeySecurityData;
-
- typedef struct {
- uint32 length;
- KeySecurityData sd;
- boolean8 inherit;
- } winreg_SecBuf;
-
- typedef [v1_enum] enum {
- REG_ACTION_NONE = 0, /* used by caller */
- REG_CREATED_NEW_KEY = 1,
- REG_OPENED_EXISTING_KEY = 2
- } winreg_CreateAction;
-
- [public] WERROR winreg_CreateKey(
- [in,ref] policy_handle *handle,
- [in] winreg_String name,
- [in] winreg_String keyclass,
- [in] uint32 options,
- [in] winreg_AccessMask access_mask,
- [in,unique] winreg_SecBuf *secdesc,
- [out,ref] policy_handle *new_handle,
- [in,out,unique] winreg_CreateAction *action_taken
- );
-
- /******************/
- /* Function: 0x07 */
- [public] WERROR winreg_DeleteKey(
- [in,ref] policy_handle *handle,
- [in] winreg_String key
- );
-
- /******************/
- /* Function: 0x08 */
- WERROR winreg_DeleteValue(
- [in,ref] policy_handle *handle,
- [in] winreg_String value
- );
-
- typedef struct {
- [value(strlen_m_term_null(name)*2)] uint16 length;
- /* size cannot be auto-set by value() as it is the
- amount of space the server is allowed to use for this
- string in the reply, not its current size */
- uint16 size;
- [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
- } winreg_StringBuf;
-
- /******************/
- /* Function: 0x09 */
- [public] WERROR winreg_EnumKey(
- [in,ref] policy_handle *handle,
- [in] uint32 enum_index,
- [in,out,ref] winreg_StringBuf *name,
- [in,out,unique] winreg_StringBuf *keyclass,
- [in,out,unique] NTTIME *last_changed_time
- );
-
- typedef struct {
- [value(strlen_m_term(name)*2)] uint16 length;
- /* size cannot be auto-set by value() as it is the
- amount of space the server is allowed to use for this
- string in the reply, not its current size */
- uint16 size;
- [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
- } winreg_ValNameBuf;
-
- /******************/
- /* Function: 0x0a */
-
- [public] WERROR winreg_EnumValue(
- [in,ref] policy_handle *handle,
- [in] uint32 enum_index,
- [in,out,ref] winreg_ValNameBuf *name,
- [in,out,unique] winreg_Type *type,
- [in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
- [in,out,unique] uint32 *size,
- [in,out,unique] uint32 *length
- );
-
- /******************/
- /* Function: 0x0b */
- [public] WERROR winreg_FlushKey(
- [in,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x0c */
- [public] WERROR winreg_GetKeySecurity(
- [in,ref] policy_handle *handle,
- [in] security_secinfo sec_info,
- [in,out,ref] KeySecurityData *sd
- );
-
- /******************/
- /* Function: 0x0d */
- WERROR winreg_LoadKey(
- [in,ref] policy_handle *handle,
- [in,unique] winreg_String *keyname,
- [in,unique] winreg_String *filename
- );
-
- /******************/
- /* Function: 0x0e */
- typedef [public,bitmap32bit] bitmap {
- REG_NOTIFY_CHANGE_NAME = 0x00000001,
- REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002,
- REG_NOTIFY_CHANGE_LAST_SET = 0x00000004,
- REG_NOTIFY_CHANGE_SECURITY = 0x00000008
- } winreg_NotifyChangeType;
-
- [public] WERROR winreg_NotifyChangeKeyValue(
- [in,ref] policy_handle *handle,
- [in] boolean8 watch_subtree,
- [in] winreg_NotifyChangeType notify_filter,
- [in] uint32 unknown,
- [in] winreg_String string1,
- [in] winreg_String string2,
- [in] uint32 unknown2
- );
-
- /******************/
- /* Function: 0x0f */
- [public] WERROR winreg_OpenKey(
- [in,ref] policy_handle *parent_handle,
- [in] winreg_String keyname,
- [in] uint32 unknown,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x10 */
- [public] WERROR winreg_QueryInfoKey(
- [in,ref] policy_handle *handle,
- [in,out,ref] winreg_String *classname,
- [out,ref] uint32 *num_subkeys,
- [out,ref] uint32 *max_subkeylen,
- [out,ref] uint32 *max_classlen,
- [out,ref] uint32 *num_values,
- [out,ref] uint32 *max_valnamelen,
- [out,ref] uint32 *max_valbufsize,
- [out,ref] uint32 *secdescsize,
- [out,ref] NTTIME *last_changed_time
- );
-
- /******************/
- /* Function: 0x11 */
- [public] WERROR winreg_QueryValue(
- [in,ref] policy_handle *handle,
- [in,ref] winreg_String *value_name,
- [in,out,unique] winreg_Type *type,
- [in,out,unique,size_is(*data_size),length_is(*data_length)] uint8 *data,
- [in,out,unique] uint32 *data_size,
- [in,out,unique] uint32 *data_length
- );
-
- /******************/
- /* Function: 0x12 */
- [todo] WERROR winreg_ReplaceKey(
- );
-
- /******************/
- /* Function: 0x13 */
- WERROR winreg_RestoreKey(
- [in,ref] policy_handle *handle,
- [in,ref] winreg_String *filename,
- [in] uint32 flags
- );
-
- /******************/
- /* Function: 0x14 */
-
- typedef struct {
- uint32 data_size;
- KeySecurityData sec_data;
- uint8 inherit;
- } KeySecurityAttribute;
-
- WERROR winreg_SaveKey(
- [in,ref] policy_handle *handle,
- [in,ref] winreg_String *filename,
- [in,unique] KeySecurityAttribute *sec_attrib
- );
-
- /******************/
- /* Function: 0x15 */
- WERROR winreg_SetKeySecurity(
- [in,ref] policy_handle *handle,
- [in] security_secinfo sec_info,
- [in,ref] KeySecurityData *sd
- );
-
- /******************/
- /* Function: 0x16 */
- WERROR winreg_SetValue(
- [in,ref] policy_handle *handle,
- [in] winreg_String name,
- [in] winreg_Type type,
- [in,size_is(size),ref] uint8 *data,
- [in] uint32 size
- );
-
- /******************/
- /* Function: 0x17 */
- [todo] WERROR winreg_UnLoadKey(
- );
-
- /******************/
- /* Function: 0x18 */
- WERROR winreg_InitiateSystemShutdown(
- [in,unique] uint16 *hostname,
- /*
- * Note: lsa_String and winreg_String both result
- * in WERR_INVALID_PARAM
- */
- [in,unique] lsa_StringLarge *message,
- [in] uint32 timeout,
- [in] uint8 force_apps,
- [in] uint8 do_reboot
- );
-
- /******************/
- /* Function: 0x19 */
- WERROR winreg_AbortSystemShutdown(
- [in,unique] uint16 *server
- );
-
- /******************/
- /* Function: 0x1a */
- [public] WERROR winreg_GetVersion(
- [in,ref] policy_handle *handle,
- [out,ref] uint32 *version
- );
-
- /******************/
- /* Function: 0x1b */
- WERROR winreg_OpenHKCC(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x1c */
- WERROR winreg_OpenHKDD(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- typedef struct {
- winreg_String *name;
- winreg_Type type;
- uint32 offset;
- uint32 length;
- } QueryMultipleValue;
-
- /******************/
- /* Function: 0x1d */
- [public] WERROR winreg_QueryMultipleValues(
- [in,ref] policy_handle *key_handle,
- [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
- [in] uint32 num_values,
- [in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
- [in,out,ref] uint32 *buffer_size
- );
-
- /******************/
- /* Function: 0x1e */
- WERROR winreg_InitiateSystemShutdownEx(
- [in,unique] uint16 *hostname,
- /*
- * Note: lsa_String and winreg_String both result
- * in WERR_INVALID_PARAM
- */
- [in,unique] lsa_StringLarge *message,
- [in] uint32 timeout,
- [in] uint8 force_apps,
- [in] uint8 do_reboot,
- [in] uint32 reason
- );
-
- /******************/
- /* Function: 0x1f */
- [todo] WERROR winreg_SaveKeyEx(
- );
-
- /******************/
- /* Function: 0x20 */
- WERROR winreg_OpenHKPT(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x21 */
- WERROR winreg_OpenHKPN(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x22 */
- [todo] WERROR winreg_QueryMultipleValues2(
- );
-}
diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c
index 005e3ca556..4a39043768 100644
--- a/source3/utils/net_rpc_registry.c
+++ b/source3/utils/net_rpc_registry.c
@@ -272,7 +272,7 @@ static NTSTATUS registry_enumvalues(TALLOC_CTX *ctx,
uint32 value_length;
char n;
- struct winreg_ValNameBuf name_buf;
+ struct winreg_StringBuf name_buf;
WERROR err;
n = '\0';