diff options
author | Gerald Carter <jerry@samba.org> | 2005-06-16 20:59:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:57:18 -0500 |
commit | b2db8a9bd3aad8e56ab4d95b05d2db7773057e8b (patch) | |
tree | d6bdf9c295b0f64c904194572415b89becec8e95 /source3/rpc_server/srv_reg.c | |
parent | 17eb05228ee93c9790a0bacbfb0e5e282aa180d2 (diff) | |
download | samba-b2db8a9bd3aad8e56ab4d95b05d2db7773057e8b.tar.gz samba-b2db8a9bd3aad8e56ab4d95b05d2db7773057e8b.tar.bz2 samba-b2db8a9bd3aad8e56ab4d95b05d2db7773057e8b.zip |
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 used to be commit 023728c0595eaef60e357d32a25e2c4cee9e21f4)
Diffstat (limited to 'source3/rpc_server/srv_reg.c')
-rw-r--r-- | source3/rpc_server/srv_reg.c | 52 |
1 files changed, 51 insertions, 1 deletions
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 ) |