From 1cdeb0c0d280312df3e1c93a30e03cd0a7459fe9 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Fri, 19 Mar 2010 20:23:36 +0100 Subject: s4:WINREG RPC - specify the performed create action for "CreateKey" To make the WINREG RPC testsuite happy. --- source4/rpc_server/winreg/rpc_winreg.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c index 61920b20a8..5491bb602f 100644 --- a/source4/rpc_server/winreg/rpc_winreg.c +++ b/source4/rpc_server/winreg/rpc_winreg.c @@ -144,12 +144,21 @@ static WERROR dcesrv_winreg_CreateKey(struct dcesrv_call_state *dce_call, result = reg_key_add_name(newh, key, r->in.name.name, NULL, r->in.secdesc?&sd:NULL, (struct registry_key **)&newh->data); + + r->out.action_taken = talloc(mem_ctx, enum winreg_CreateAction); + if (r->out.action_taken == NULL) { + talloc_free(newh); + return WERR_NOMEM; + } + *r->out.action_taken = REG_ACTION_NONE; + if (W_ERROR_IS_OK(result)) { r->out.new_handle = &newh->wire_handle; + *r->out.action_taken = REG_CREATED_NEW_KEY; } else { talloc_free(newh); } - + return result; default: return WERR_ACCESS_DENIED; -- cgit