summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_client/cli_reg.c8
-rw-r--r--source3/rpc_parse/parse_reg.c14
-rw-r--r--source3/rpc_server/srv_reg.c52
-rw-r--r--source3/rpc_server/srv_reg_nt.c17
4 files changed, 79 insertions, 12 deletions
diff --git a/source3/rpc_client/cli_reg.c b/source3/rpc_client/cli_reg.c
index d152aeecf1..9d7b909d0d 100644
--- a/source3/rpc_client/cli_reg.c
+++ b/source3/rpc_client/cli_reg.c
@@ -256,7 +256,7 @@ WERROR cli_reg_query_key(struct cli_state *cli, TALLOC_CTX *mem_ctx,
****************************************************************************/
WERROR cli_reg_getversion(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, uint32 *unk)
+ POLICY_HND *hnd, uint32 *version)
{
REG_Q_GETVERSION in;
REG_R_GETVERSION out;
@@ -278,7 +278,7 @@ WERROR cli_reg_getversion(struct cli_state *cli, TALLOC_CTX *mem_ctx,
if ( !W_ERROR_IS_OK( out.status ) )
return out.status;
- *unk = out.unknown;
+ *version = out.win_version;
return out.status;
}
@@ -403,8 +403,8 @@ WERROR cli_reg_delete_val(struct cli_state *cli, TALLOC_CTX *mem_ctx,
CLI_DO_RPC( cli, mem_ctx, PI_WINREG, REG_DELETE_VALUE,
in, out,
qbuf, rbuf,
- reg_io_q_delete_val,
- reg_io_r_delete_val,
+ reg_io_q_delete_value,
+ reg_io_r_delete_value,
WERR_GENERAL_FAILURE );
return out.status;
diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c
index 7957478af0..9f50f50acf 100644
--- a/source3/rpc_parse/parse_reg.c
+++ b/source3/rpc_parse/parse_reg.c
@@ -326,13 +326,13 @@ void init_reg_q_delete_val(REG_Q_DELETE_VALUE *q_c, POLICY_HND *hnd,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_delete_val(const char *desc, REG_Q_DELETE_VALUE *q_u,
+BOOL reg_io_q_delete_value(const char *desc, REG_Q_DELETE_VALUE *q_u,
prs_struct *ps, int depth)
{
if ( !q_u )
return False;
- prs_debug(ps, depth, desc, "reg_io_q_delete_val");
+ prs_debug(ps, depth, desc, "reg_io_q_delete_value");
depth++;
if(!prs_align(ps))
@@ -354,13 +354,13 @@ BOOL reg_io_q_delete_val(const char *desc, REG_Q_DELETE_VALUE *q_u,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_delete_val(const char *desc, REG_R_DELETE_VALUE *r_u,
+BOOL reg_io_r_delete_value(const char *desc, REG_R_DELETE_VALUE *r_u,
prs_struct *ps, int depth)
{
if ( !r_u )
return False;
- prs_debug(ps, depth, desc, "reg_io_r_delete_val");
+ prs_debug(ps, depth, desc, "reg_io_r_delete_value");
depth++;
if(!prs_align(ps))
@@ -563,7 +563,7 @@ BOOL reg_io_r_getversion(const char *desc, REG_R_GETVERSION *r_u, prs_struct *p
if(!prs_align(ps))
return False;
- if(!prs_uint32("unknown", ps, depth, &r_u->unknown))
+ if(!prs_uint32("win_version", ps, depth, &r_u->win_version))
return False;
if(!prs_werror("status" , ps, depth, &r_u->status))
return False;
@@ -1237,7 +1237,7 @@ BOOL reg_io_q_set_value(const char *desc, REG_Q_SET_VALUE *q_u, prs_struct *ps,
if (q_u == NULL)
return False;
- prs_debug(ps, depth, desc, "reg_io_q_set_val");
+ prs_debug(ps, depth, desc, "reg_io_q_set_value");
depth++;
if(!prs_align(ps))
@@ -1274,7 +1274,7 @@ BOOL reg_io_r_set_value(const char *desc, REG_R_SET_VALUE *q_u, prs_struct *ps,
if ( !q_u )
return False;
- prs_debug(ps, depth, desc, "reg_io_r_set_val");
+ prs_debug(ps, depth, desc, "reg_io_r_set_value");
depth++;
if(!prs_align(ps))
diff --git a/source3/rpc_server/srv_reg.c b/source3/rpc_server/srv_reg.c
index 8c703f3a5a..c0abc2a9c2 100644
--- a/source3/rpc_server/srv_reg.c
+++ b/source3/rpc_server/srv_reg.c
@@ -465,6 +465,54 @@ static BOOL api_reg_set_value(pipes_struct *p)
}
/*******************************************************************
+ ******************************************************************/
+
+static BOOL api_reg_delete_key(pipes_struct *p)
+{
+ REG_Q_DELETE_KEY q_u;
+ REG_R_DELETE_KEY r_u;
+ prs_struct *data = &p->in_data.data;
+ prs_struct *rdata = &p->out_data.rdata;
+
+ ZERO_STRUCT(q_u);
+ ZERO_STRUCT(r_u);
+
+ if(!reg_io_q_delete_key("", &q_u, data, 0))
+ return False;
+
+ r_u.status = _reg_delete_key(p, &q_u, &r_u);
+
+ if(!reg_io_r_delete_key("", &r_u, rdata, 0))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+ ******************************************************************/
+
+static BOOL api_reg_delete_value(pipes_struct *p)
+{
+ REG_Q_DELETE_VALUE q_u;
+ REG_R_DELETE_VALUE r_u;
+ prs_struct *data = &p->in_data.data;
+ prs_struct *rdata = &p->out_data.rdata;
+
+ ZERO_STRUCT(q_u);
+ ZERO_STRUCT(r_u);
+
+ if(!reg_io_q_delete_value("", &q_u, data, 0))
+ return False;
+
+ r_u.status = _reg_delete_value(p, &q_u, &r_u);
+
+ if(!reg_io_r_delete_value("", &r_u, rdata, 0))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
array of \PIPE\reg operations
********************************************************************/
@@ -486,7 +534,9 @@ static struct api_struct api_reg_cmds[] =
{ "REG_SAVE_KEY" , REG_SAVE_KEY , api_reg_save_key },
{ "REG_RESTORE_KEY" , REG_RESTORE_KEY , api_reg_restore_key },
{ "REG_CREATE_KEY" , REG_CREATE_KEY , api_reg_create_key },
- { "REG_SET_VALUE" , REG_SET_VALUE , api_reg_set_value }
+ { "REG_SET_VALUE" , REG_SET_VALUE , api_reg_set_value },
+ { "REG_DELETE_KEY" , REG_DELETE_KEY , api_reg_delete_key },
+ { "REG_DELETE_VALUE" , REG_DELETE_VALUE , api_reg_delete_value }
};
void reg_get_pipe_fns( struct api_struct **fns, int *n_fns )
diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c
index ec9a79f534..2a80594128 100644
--- a/source3/rpc_server/srv_reg_nt.c
+++ b/source3/rpc_server/srv_reg_nt.c
@@ -1175,3 +1175,20 @@ WERROR _reg_set_value(pipes_struct *p, REG_Q_SET_VALUE *q_u, REG_R_SET_VALUE *r
return WERR_ACCESS_DENIED;
}
+/*******************************************************************
+ ********************************************************************/
+
+WERROR _reg_delete_key(pipes_struct *p, REG_Q_DELETE_KEY *q_u, REG_R_DELETE_KEY *r_u)
+{
+ return WERR_ACCESS_DENIED;
+}
+
+
+/*******************************************************************
+ ********************************************************************/
+
+WERROR _reg_delete_value(pipes_struct *p, REG_Q_DELETE_VALUE *q_u, REG_R_DELETE_VALUE *r_u)
+{
+ return WERR_ACCESS_DENIED;
+}
+