diff options
author | Gerald Carter <jerry@samba.org> | 2005-04-05 17:49:16 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:56:29 -0500 |
commit | b4c720412978c0a49e11846c7cfe553d055cca1f (patch) | |
tree | 116877fbe698b0a9babb1faacab28d1b83bc1225 /source3/rpc_server/srv_reg.c | |
parent | 78355805efb1e8e3ef9a5073841275ffa80da77a (diff) | |
download | samba-b4c720412978c0a49e11846c7cfe553d055cca1f.tar.gz samba-b4c720412978c0a49e11846c7cfe553d055cca1f.tar.bz2 samba-b4c720412978c0a49e11846c7cfe553d055cca1f.zip |
r6218: * fix a segv in EnumPrinters():rpc_buffer_alloc when the caller does not provide an
RPC_BUFFER in the request
* add initial (but wire untested) support for RegRestoreKey()
(This used to be commit 22855c7aae940cc4082c231a470f612b8fc6fa0d)
Diffstat (limited to 'source3/rpc_server/srv_reg.c')
-rw-r--r-- | source3/rpc_server/srv_reg.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_reg.c b/source3/rpc_server/srv_reg.c index b2b3920e9e..a90650c536 100644 --- a/source3/rpc_server/srv_reg.c +++ b/source3/rpc_server/srv_reg.c @@ -369,8 +369,31 @@ static BOOL api_reg_enum_value(pipes_struct *p) } /******************************************************************* - api_reg_save_key - ********************************************************************/ + ******************************************************************/ + +static BOOL api_reg_restore_key(pipes_struct *p) +{ + REG_Q_RESTORE_KEY q_u; + REG_R_RESTORE_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_restore_key("", &q_u, data, 0)) + return False; + + r_u.status = _reg_restore_key(p, &q_u, &r_u); + + if(!reg_io_r_restore_key("", &r_u, rdata, 0)) + return False; + + return True; +} + +/******************************************************************* + ******************************************************************/ static BOOL api_reg_save_key(pipes_struct *p) { @@ -412,7 +435,8 @@ static struct api_struct api_reg_cmds[] = { "REG_SHUTDOWN_EX" , REG_SHUTDOWN_EX , api_reg_shutdown_ex }, { "REG_ABORT_SHUTDOWN" , REG_ABORT_SHUTDOWN , api_reg_abort_shutdown }, { "REG_GETVERSION" , REG_GETVERSION , api_reg_getversion }, - { "REG_SAVE_KEY" , REG_SAVE_KEY , api_reg_save_key } + { "REG_SAVE_KEY" , REG_SAVE_KEY , api_reg_save_key }, + { "REG_RESTORE_KEY" , REG_RESTORE_KEY , api_reg_restore_key } }; void reg_get_pipe_fns( struct api_struct **fns, int *n_fns ) |