diff options
author | Luke Leighton <lkcl@samba.org> | 1998-11-10 22:03:34 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-11-10 22:03:34 +0000 |
commit | c098e44df44e3c6ace3ce00d28140329821e8f3d (patch) | |
tree | a003f886e8434a6cfcf6f4c2f970530f661c8a5c /source3/rpc_client | |
parent | 10844fa9803a9c60d88a11df0983d84e87caf5c3 (diff) | |
download | samba-c098e44df44e3c6ace3ce00d28140329821e8f3d.tar.gz samba-c098e44df44e3c6ace3ce00d28140329821e8f3d.tar.bz2 samba-c098e44df44e3c6ace3ce00d28140329821e8f3d.zip |
registry modification requires a "sync" or "refresh" on the parent key.
opcode 0xb added to do this. a likely candidate name is "RegFlushKey".
(This used to be commit 5e9567e3c7d4ee8624a448fcccfcd8003913dbbf)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_reg.c | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_reg.c b/source3/rpc_client/cli_reg.c index da92ab90bb..459a865fc0 100644 --- a/source3/rpc_client/cli_reg.c +++ b/source3/rpc_client/cli_reg.c @@ -147,6 +147,62 @@ BOOL do_reg_open_unk_4(struct cli_state *cli, uint16 unknown_0, uint32 level, } /**************************************************************************** +do a REG Unknown 0xB command. sent after a create key or create value. +this might be some sort of "sync" or "refresh" command, sent after +modification of the registry... +****************************************************************************/ +BOOL do_reg_unk_b(struct cli_state *cli, POLICY_HND *hnd) +{ + prs_struct rbuf; + prs_struct buf; + REG_Q_UNK_B q_o; + BOOL valid_query = False; + + if (hnd == NULL) return False; + + prs_init(&buf , 1024, 4, SAFETY_MARGIN, False); + prs_init(&rbuf, 0 , 4, SAFETY_MARGIN, True ); + + /* create and send a MSRPC command with api REG_UNK_B */ + + DEBUG(4,("REG Unknown 0xB\n")); + + make_reg_q_unk_b(&q_o, hnd); + + /* turn parameters into data stream */ + reg_io_q_unk_b("", &q_o, &buf, 0); + + /* send the data on \PIPE\ */ + if (rpc_api_pipe_req(cli, REG_UNK_B, &buf, &rbuf)) + { + REG_R_UNK_B r_o; + BOOL p; + + ZERO_STRUCT(r_o); + + reg_io_r_unk_b("", &r_o, &rbuf, 0); + p = rbuf.offset != 0; + + if (p && r_o.status != 0) + { + /* report error code */ + DEBUG(0,("REG_UNK_B: %s\n", get_nt_error_msg(r_o.status))); + p = False; + } + + if (p) + { + valid_query = True; + } + } + + prs_mem_free(&rbuf); + prs_mem_free(&buf ); + + return valid_query; +} + +/**************************************************************************** do a REG Query Key ****************************************************************************/ BOOL do_reg_query_key(struct cli_state *cli, POLICY_HND *hnd, |