diff options
author | Gerald Carter <jerry@samba.org> | 2005-05-26 20:36:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:57:00 -0500 |
commit | d5e79de59561e614fce79a9460c3b2caaa459673 (patch) | |
tree | 43c6c7f352ff1c0f9f16808466b47069db3655e7 /source3/rpc_client | |
parent | 45d03e327ae8b2b9b9761ed76161d4467b27f730 (diff) | |
download | samba-d5e79de59561e614fce79a9460c3b2caaa459673.tar.gz samba-d5e79de59561e614fce79a9460c3b2caaa459673.tar.bz2 samba-d5e79de59561e614fce79a9460c3b2caaa459673.zip |
r6995: * fixing segfault when writing out registry values of zero length
* add RegSaveKey() client function
* add 'net rpc registry save' subcommand
(This used to be commit f35e0a0a8d8df5c39e61ebd34c4aecbc5c9bb635)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_reg.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_reg.c b/source3/rpc_client/cli_reg.c index 164bdd3129..74866e4b8e 100644 --- a/source3/rpc_client/cli_reg.c +++ b/source3/rpc_client/cli_reg.c @@ -651,6 +651,31 @@ WERROR cli_reg_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, return out.status; } +/**************************************************************************** +do a REG Query Info +****************************************************************************/ +WERROR cli_reg_save_key( struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *hnd, const char *filename ) +{ + REG_Q_SAVE_KEY in; + REG_R_SAVE_KEY out; + prs_struct qbuf, rbuf; + + ZERO_STRUCT (in); + ZERO_STRUCT (out); + + init_q_reg_save_key( &in, hnd, filename ); + + CLI_DO_RPC( cli, mem_ctx, PI_WINREG, REG_SAVE_KEY, + in, out, + qbuf, rbuf, + reg_io_q_save_key, + reg_io_r_save_key, + WERR_GENERAL_FAILURE ); + + return out.status; +} + /* ################################################################# |