summaryrefslogtreecommitdiff
path: root/librpc/gen_ndr
diff options
context:
space:
mode:
Diffstat (limited to 'librpc/gen_ndr')
-rw-r--r--librpc/gen_ndr/cli_winreg.c12
-rw-r--r--librpc/gen_ndr/cli_winreg.h8
-rw-r--r--librpc/gen_ndr/ndr_winreg.c38
-rw-r--r--librpc/gen_ndr/ndr_winreg.h1
-rw-r--r--librpc/gen_ndr/winreg.h19
5 files changed, 60 insertions, 18 deletions
diff --git a/librpc/gen_ndr/cli_winreg.c b/librpc/gen_ndr/cli_winreg.c
index 1c37f51986..0afc00ce16 100644
--- a/librpc/gen_ndr/cli_winreg.c
+++ b/librpc/gen_ndr/cli_winreg.c
@@ -939,7 +939,7 @@ struct tevent_req *rpccli_winreg_CreateKey_send(TALLOC_CTX *mem_ctx,
struct policy_handle *_handle /* [in] [ref] */,
struct winreg_String _name /* [in] */,
struct winreg_String _keyclass /* [in] */,
- uint32_t _options /* [in] */,
+ enum winreg_KeyType _options /* [in] */,
uint32_t _access_mask /* [in] */,
struct winreg_SecBuf *_secdesc /* [in] [unique] */,
struct policy_handle *_new_handle /* [out] [ref] */,
@@ -1058,7 +1058,7 @@ NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli,
struct policy_handle *handle /* [in] [ref] */,
struct winreg_String name /* [in] */,
struct winreg_String keyclass /* [in] */,
- uint32_t options /* [in] */,
+ enum winreg_KeyType options /* [in] */,
uint32_t access_mask /* [in] */,
struct winreg_SecBuf *secdesc /* [in] [unique] */,
struct policy_handle *new_handle /* [out] [ref] */,
@@ -2388,7 +2388,7 @@ struct tevent_req *rpccli_winreg_OpenKey_send(TALLOC_CTX *mem_ctx,
struct rpc_pipe_client *cli,
struct policy_handle *_parent_handle /* [in] [ref] */,
struct winreg_String _keyname /* [in] */,
- uint32_t _unknown /* [in] */,
+ enum winreg_KeyType _options /* [in] */,
uint32_t _access_mask /* [in] */,
struct policy_handle *_handle /* [out] [ref] */)
{
@@ -2407,7 +2407,7 @@ struct tevent_req *rpccli_winreg_OpenKey_send(TALLOC_CTX *mem_ctx,
/* In parameters */
state->orig.in.parent_handle = _parent_handle;
state->orig.in.keyname = _keyname;
- state->orig.in.unknown = _unknown;
+ state->orig.in.options = _options;
state->orig.in.access_mask = _access_mask;
/* Out parameters */
@@ -2497,7 +2497,7 @@ NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *parent_handle /* [in] [ref] */,
struct winreg_String keyname /* [in] */,
- uint32_t unknown /* [in] */,
+ enum winreg_KeyType options /* [in] */,
uint32_t access_mask /* [in] */,
struct policy_handle *handle /* [out] [ref] */,
WERROR *werror)
@@ -2508,7 +2508,7 @@ NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli,
/* In parameters */
r.in.parent_handle = parent_handle;
r.in.keyname = keyname;
- r.in.unknown = unknown;
+ r.in.options = options;
r.in.access_mask = access_mask;
status = cli->dispatch(cli,
diff --git a/librpc/gen_ndr/cli_winreg.h b/librpc/gen_ndr/cli_winreg.h
index bbd9e9a305..bccdbc437b 100644
--- a/librpc/gen_ndr/cli_winreg.h
+++ b/librpc/gen_ndr/cli_winreg.h
@@ -93,7 +93,7 @@ struct tevent_req *rpccli_winreg_CreateKey_send(TALLOC_CTX *mem_ctx,
struct policy_handle *_handle /* [in] [ref] */,
struct winreg_String _name /* [in] */,
struct winreg_String _keyclass /* [in] */,
- uint32_t _options /* [in] */,
+ enum winreg_KeyType _options /* [in] */,
uint32_t _access_mask /* [in] */,
struct winreg_SecBuf *_secdesc /* [in] [unique] */,
struct policy_handle *_new_handle /* [out] [ref] */,
@@ -106,7 +106,7 @@ NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli,
struct policy_handle *handle /* [in] [ref] */,
struct winreg_String name /* [in] */,
struct winreg_String keyclass /* [in] */,
- uint32_t options /* [in] */,
+ enum winreg_KeyType options /* [in] */,
uint32_t access_mask /* [in] */,
struct winreg_SecBuf *secdesc /* [in] [unique] */,
struct policy_handle *new_handle /* [out] [ref] */,
@@ -249,7 +249,7 @@ struct tevent_req *rpccli_winreg_OpenKey_send(TALLOC_CTX *mem_ctx,
struct rpc_pipe_client *cli,
struct policy_handle *_parent_handle /* [in] [ref] */,
struct winreg_String _keyname /* [in] */,
- uint32_t _unknown /* [in] */,
+ enum winreg_KeyType _options /* [in] */,
uint32_t _access_mask /* [in] */,
struct policy_handle *_handle /* [out] [ref] */);
NTSTATUS rpccli_winreg_OpenKey_recv(struct tevent_req *req,
@@ -259,7 +259,7 @@ NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *parent_handle /* [in] [ref] */,
struct winreg_String keyname /* [in] */,
- uint32_t unknown /* [in] */,
+ enum winreg_KeyType options /* [in] */,
uint32_t access_mask /* [in] */,
struct policy_handle *handle /* [out] [ref] */,
WERROR *werror);
diff --git a/librpc/gen_ndr/ndr_winreg.c b/librpc/gen_ndr/ndr_winreg.c
index 6f432d37c5..609cc59cc5 100644
--- a/librpc/gen_ndr/ndr_winreg.c
+++ b/librpc/gen_ndr/ndr_winreg.c
@@ -217,6 +217,32 @@ _PUBLIC_ void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, c
ndr->depth--;
}
+static enum ndr_err_code ndr_push_winreg_KeyType(struct ndr_push *ndr, int ndr_flags, enum winreg_KeyType r)
+{
+ NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_winreg_KeyType(struct ndr_pull *ndr, int ndr_flags, enum winreg_KeyType *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_winreg_KeyType(struct ndr_print *ndr, const char *name, enum winreg_KeyType r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case REG_KEYTYPE_NON_VOLATILE: val = "REG_KEYTYPE_NON_VOLATILE"; break;
+ case REG_KEYTYPE_VOLATILE: val = "REG_KEYTYPE_VOLATILE"; break;
+ case REG_KEYTYPE_SYMLINK: val = "REG_KEYTYPE_SYMLINK"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, 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_enum_uint32(ndr, NDR_SCALARS, r));
@@ -1041,7 +1067,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int f
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, 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));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.options));
+ NDR_CHECK(ndr_push_winreg_KeyType(ndr, NDR_SCALARS, r->in.options));
NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.secdesc));
if (r->in.secdesc) {
@@ -1086,7 +1112,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int f
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.name));
NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyclass));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.options));
+ NDR_CHECK(ndr_pull_winreg_KeyType(ndr, NDR_SCALARS, &r->in.options));
NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
if (_ptr_secdesc) {
@@ -1156,7 +1182,7 @@ _PUBLIC_ void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name
ndr->depth--;
ndr_print_winreg_String(ndr, "name", &r->in.name);
ndr_print_winreg_String(ndr, "keyclass", &r->in.keyclass);
- ndr_print_uint32(ndr, "options", r->in.options);
+ ndr_print_winreg_KeyType(ndr, "options", r->in.options);
ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
ndr_print_ptr(ndr, "secdesc", r->in.secdesc);
ndr->depth++;
@@ -2153,7 +2179,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int fla
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, 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_KeyType(ndr, NDR_SCALARS, r->in.options));
NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
}
if (flags & NDR_OUT) {
@@ -2181,7 +2207,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int fla
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.parent_handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parent_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyname));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
+ NDR_CHECK(ndr_pull_winreg_KeyType(ndr, NDR_SCALARS, &r->in.options));
NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
NDR_PULL_ALLOC(ndr, r->out.handle);
ZERO_STRUCTP(r->out.handle);
@@ -2214,7 +2240,7 @@ _PUBLIC_ void ndr_print_winreg_OpenKey(struct ndr_print *ndr, const char *name,
ndr_print_policy_handle(ndr, "parent_handle", r->in.parent_handle);
ndr->depth--;
ndr_print_winreg_String(ndr, "keyname", &r->in.keyname);
- ndr_print_uint32(ndr, "unknown", r->in.unknown);
+ ndr_print_winreg_KeyType(ndr, "options", r->in.options);
ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
ndr->depth--;
}
diff --git a/librpc/gen_ndr/ndr_winreg.h b/librpc/gen_ndr/ndr_winreg.h
index a496d4ccc6..8bee4dad35 100644
--- a/librpc/gen_ndr/ndr_winreg.h
+++ b/librpc/gen_ndr/ndr_winreg.h
@@ -88,6 +88,7 @@ enum ndr_err_code ndr_pull_winreg_String(struct ndr_pull *ndr, int ndr_flags, st
void ndr_print_winreg_String(struct ndr_print *ndr, const char *name, const struct winreg_String *r);
void ndr_print_KeySecurityData(struct ndr_print *ndr, const char *name, const struct KeySecurityData *r);
void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, const struct winreg_SecBuf *r);
+void ndr_print_winreg_KeyType(struct ndr_print *ndr, const char *name, enum winreg_KeyType 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);
diff --git a/librpc/gen_ndr/winreg.h b/librpc/gen_ndr/winreg.h
index 53d9a35b62..64d978f321 100644
--- a/librpc/gen_ndr/winreg.h
+++ b/librpc/gen_ndr/winreg.h
@@ -42,6 +42,21 @@ struct winreg_SecBuf {
uint8_t inherit;
};
+enum winreg_KeyType
+#ifndef USE_UINT_ENUMS
+ {
+ REG_KEYTYPE_NON_VOLATILE=(int)(0x00000000),
+ REG_KEYTYPE_VOLATILE=(int)(0x00000001),
+ REG_KEYTYPE_SYMLINK=(int)(0x00000002)
+}
+#else
+ { __donnot_use_enum_winreg_KeyType=0x7FFFFFFF}
+#define REG_KEYTYPE_NON_VOLATILE ( 0x00000000 )
+#define REG_KEYTYPE_VOLATILE ( 0x00000001 )
+#define REG_KEYTYPE_SYMLINK ( 0x00000002 )
+#endif
+;
+
enum winreg_CreateAction
#ifndef USE_UINT_ENUMS
{
@@ -177,7 +192,7 @@ struct winreg_CreateKey {
struct policy_handle *handle;/* [ref] */
struct winreg_String name;
struct winreg_String keyclass;
- uint32_t options;
+ enum winreg_KeyType options;
uint32_t access_mask;
struct winreg_SecBuf *secdesc;/* [unique] */
enum winreg_CreateAction *action_taken;/* [unique] */
@@ -323,7 +338,7 @@ struct winreg_OpenKey {
struct {
struct policy_handle *parent_handle;/* [ref] */
struct winreg_String keyname;
- uint32_t unknown;
+ enum winreg_KeyType options;
uint32_t access_mask;
} in;