summaryrefslogtreecommitdiff
path: root/source4/rpc_server/winreg
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-15 20:36:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:47 -0500
commit6adb5717f5d6d4cb67b4d5baef8d99edaadd9a23 (patch)
treef974d28e77168d251f73bae28e5f4978c1482b9a /source4/rpc_server/winreg
parentd9b4bdd5bb32806162514f7e010a97d24fb94549 (diff)
downloadsamba-6adb5717f5d6d4cb67b4d5baef8d99edaadd9a23.tar.gz
r18566: fixed the winreg pipe and winreg tests
Jerry, there is a big difference on the wire between these two: [out] uint32 x; and [out] uint32 *x; if you change from [out] uint32 x; then you need to change to: [out,ref] uint32 *x; otherwise it changes the format on the wire, which means we are no longer compatible with MS servers. but be aware that even if you change to a ref ptr, you also need to change all the client code to set all the return variables in the out part of the structure. That's why I don't like the MIDL restriction of forcing the use of ref pointers for output variables - it makes life much harder when writing client code, and makes the code much more error prone (just look at all the extra code needed to make this work again). I know we could auto-allocate these variables in the generated client side NDR code, but if we did that then we would have no way of doing a _real_ ref out pointer, which we really wanted to set to some already allocated variable. So please hold off on changing our idl to use the MIDL convention for output variables until Jelmer and I have had a good "chat" about this :-) (This used to be commit 555aed43ba3c08360ca7fa921622b80732a7f657)
Diffstat (limited to 'source4/rpc_server/winreg')
-rw-r--r--source4/rpc_server/winreg/rpc_winreg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c
index 86a78a5e9e6..adcbb749dac 100644
--- a/source4/rpc_server/winreg/rpc_winreg.c
+++ b/source4/rpc_server/winreg/rpc_winreg.c
@@ -523,7 +523,11 @@ static WERROR winreg_GetVersion(struct dcesrv_call_state *dce_call, TALLOC_CTX *
DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
+ r->out.version = talloc(mem_ctx, uint32_t);
+ NT_STATUS_HAVE_NO_MEMORY(r->out.version);
+
*r->out.version = 5;
+
return WERR_OK;
}