From d5e79de59561e614fce79a9460c3b2caaa459673 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 26 May 2005 20:36:04 +0000 Subject: 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) --- source3/rpc_client/cli_reg.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'source3/rpc_client/cli_reg.c') 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; +} + /* ################################################################# -- cgit