mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
r7649: * fix compile breakage (sorry, should have done a make clean before the
last checking). * rename unknown field in REG_GETVERSION * add server stubs for RegDeleteKey() and RegDeleteValue()
This commit is contained in:
parent
867fd3052b
commit
023728c059
@ -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;
|
||||
|
@ -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))
|
||||
|
@ -464,6 +464,54 @@ static BOOL api_reg_set_value(pipes_struct *p)
|
||||
return True;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
******************************************************************/
|
||||
|
||||
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 )
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user