diff options
author | Gerald Carter <jerry@samba.org> | 2005-06-16 20:04:16 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:57:18 -0500 |
commit | bb2616d0180d21e5962a028617d274c51f5dcc63 (patch) | |
tree | b5d79cbe39d03fba0573068ec3b41d919c7deeb7 /source3/rpc_server/srv_reg.c | |
parent | eb2280663f086b61b064ba0ca16aff98c5d81ba1 (diff) | |
download | samba-bb2616d0180d21e5962a028617d274c51f5dcc63.tar.gz samba-bb2616d0180d21e5962a028617d274c51f5dcc63.tar.bz2 samba-bb2616d0180d21e5962a028617d274c51f5dcc63.zip |
r7645: adding server stubs for RegCreateKey() and RegSetValue()
(This used to be commit ce82566badfb907a2f72e2f7d90a7bbbe3811177)
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 a90650c536..8c703f3a5a 100644 --- a/source3/rpc_server/srv_reg.c +++ b/source3/rpc_server/srv_reg.c @@ -417,6 +417,54 @@ static BOOL api_reg_save_key(pipes_struct *p) } /******************************************************************* + ******************************************************************/ + +static BOOL api_reg_create_key(pipes_struct *p) +{ + REG_Q_CREATE_KEY q_u; + REG_R_CREATE_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_create_key("", &q_u, data, 0)) + return False; + + r_u.status = _reg_create_key(p, &q_u, &r_u); + + if(!reg_io_r_create_key("", &r_u, rdata, 0)) + return False; + + return True; +} + +/******************************************************************* + ******************************************************************/ + +static BOOL api_reg_set_value(pipes_struct *p) +{ + REG_Q_SET_VALUE q_u; + REG_R_SET_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_set_value("", &q_u, data, 0)) + return False; + + r_u.status = _reg_set_value(p, &q_u, &r_u); + + if(!reg_io_r_set_value("", &r_u, rdata, 0)) + return False; + + return True; +} + +/******************************************************************* array of \PIPE\reg operations ********************************************************************/ @@ -436,7 +484,9 @@ static struct api_struct api_reg_cmds[] = { "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_RESTORE_KEY" , REG_RESTORE_KEY , api_reg_restore_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 } }; void reg_get_pipe_fns( struct api_struct **fns, int *n_fns ) |