diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-12-15 00:16:54 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:27 -0500 |
commit | d8c3428b3bb10075cec3b37adbca54db634d3b00 (patch) | |
tree | 3d75a8bab1f735e29c1e8dfae06dd2be9c970a8e /source4/rpc_server/winreg | |
parent | 707d1808982fa3788156999016904475eef26ffe (diff) | |
download | samba-d8c3428b3bb10075cec3b37adbca54db634d3b00.tar.gz samba-d8c3428b3bb10075cec3b37adbca54db634d3b00.tar.xz samba-d8c3428b3bb10075cec3b37adbca54db634d3b00.zip |
r4209: Fix several smaller bugs
Add "predef" and "set" commands in regshell
Some of the remote calls from a Windows box work now.
(This used to be commit f3e05782804fe4b4942fa966f1b9650c64bc234d)
Diffstat (limited to 'source4/rpc_server/winreg')
-rw-r--r-- | source4/rpc_server/winreg/rpc_winreg.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c index b34ccfa4b9e..20bf7f9117f 100644 --- a/source4/rpc_server/winreg/rpc_winreg.c +++ b/source4/rpc_server/winreg/rpc_winreg.c @@ -328,7 +328,8 @@ static WERROR winreg_QueryInfoKey(struct dcesrv_call_state *dce_call, TALLOC_CTX } r->out.secdescsize = 0; /* FIXME */ - ZERO_STRUCT(r->out.last_changed_time); /* FIXME */ if (!W_ERROR_IS_OK(ret)) { + ZERO_STRUCT(r->out.last_changed_time); /* FIXME */ + if (!W_ERROR_IS_OK(ret)) { return ret; } @@ -414,7 +415,22 @@ static WERROR winreg_SetKeySecurity(struct dcesrv_call_state *dce_call, TALLOC_C static WERROR winreg_SetValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct winreg_SetValue *r) { - return WERR_NOT_SUPPORTED; + struct dcesrv_handle *h; + struct registry_key *key; + WERROR result; + + h = dcesrv_handle_fetch(dce_call->conn, r->in.handle, HTYPE_REGKEY); + DCESRV_CHECK_HANDLE(h); + + key = h->data; + + result = reg_val_set(key, r->in.name.name, r->in.type, r->in.data, r->in.size); + + if (!W_ERROR_IS_OK(result)) { + return result; + } + + return WERR_OK; } |