r9388: we should fault bad handles given to winreg_GetVersion()
authorAndrew Tridgell <tridge@samba.org>
Thu, 18 Aug 2005 11:16:32 +0000 (11:16 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:33:32 +0000 (13:33 -0500)
source/rpc_server/winreg/rpc_winreg.c

index 400041451fe1b77a0711cae343252303851f770d..f1dced3817ba090fb8a36f9e189f3d36acce1a23 100644 (file)
@@ -495,8 +495,12 @@ static WERROR winreg_AbortSystemShutdown(struct dcesrv_call_state *dce_call, TAL
   winreg_GetVersion 
 */
 static WERROR winreg_GetVersion(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-                      struct winreg_GetVersion *r)
+                               struct winreg_GetVersion *r)
 {
+       struct dcesrv_handle *h;
+
+       DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
+
        r->out.version = 5;
        return WERR_OK;
 }