r19946: in SetKeySec, sd is just a [in,ref] ptr
authorVolker Lendecke <vlendec@samba.org>
Wed, 29 Nov 2006 08:51:18 +0000 (08:51 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:16:14 +0000 (12:16 -0500)
source/librpc/gen_ndr/cli_winreg.c
source/librpc/gen_ndr/ndr_winreg.c
source/librpc/gen_ndr/srv_winreg.c
source/librpc/gen_ndr/winreg.h
source/librpc/idl/winreg.idl

index 7ace36ca5229a9fefc9f728a50f91113d021d8f2..0d52c54467a3d580010a4b9f8aad0c91f9a92074 100644 (file)
@@ -739,7 +739,6 @@ NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *m
        }
        
        /* Return variables */
-       *sd = *r.out.sd;
        
        /* Return result */
        return werror_to_ntstatus(r.out.result);
index bc931dafe8ef5c219bdd8786f871a48a50fcb926..a9a8814e7b0a0e9ef427cdb83ce353714675cf01 100644 (file)
@@ -2875,8 +2875,6 @@ NTSTATUS ndr_push_winreg_SetKeySecurity(struct ndr_push *ndr, int flags, const s
                NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd));
        }
        if (flags & NDR_OUT) {
-               if (r->out.sd == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
-               NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sd));
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
        }
        return NT_STATUS_OK;
@@ -2887,8 +2885,6 @@ NTSTATUS ndr_pull_winreg_SetKeySecurity(struct ndr_pull *ndr, int flags, struct
        TALLOC_CTX *_mem_save_handle_0;
        TALLOC_CTX *_mem_save_sd_0;
        if (flags & NDR_IN) {
-               ZERO_STRUCT(r->out);
-
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
                        NDR_PULL_ALLOC(ndr, r->in.handle);
                }
@@ -2904,17 +2900,8 @@ NTSTATUS ndr_pull_winreg_SetKeySecurity(struct ndr_pull *ndr, int flags, struct
                NDR_PULL_SET_MEM_CTX(ndr, r->in.sd, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_PULL_ALLOC(ndr, r->out.sd);
-               *r->out.sd = *r->in.sd;
        }
        if (flags & NDR_OUT) {
-               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.sd);
-               }
-               _mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.sd, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sd));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
        }
        return NT_STATUS_OK;
@@ -2944,10 +2931,6 @@ _PUBLIC_ void ndr_print_winreg_SetKeySecurity(struct ndr_print *ndr, const char
        if (flags & NDR_OUT) {
                ndr_print_struct(ndr, "out", "winreg_SetKeySecurity");
                ndr->depth++;
-               ndr_print_ptr(ndr, "sd", r->out.sd);
-               ndr->depth++;
-               ndr_print_KeySecurityData(ndr, "sd", r->out.sd);
-               ndr->depth--;
                ndr_print_WERROR(ndr, "result", r->out.result);
                ndr->depth--;
        }
index 674254c513af86be1b57de26bf2cf18232d1e398..30b8da0f1beff258a98e77e94a7b6725f55744f9 100644 (file)
@@ -1499,8 +1499,6 @@ static BOOL api_winreg_SetKeySecurity(pipes_struct *p)
        if (DEBUGLEVEL >= 10)
                NDR_PRINT_IN_DEBUG(winreg_SetKeySecurity, &r);
        
-       ZERO_STRUCT(r.out);
-       r.out.sd = r.in.sd;
        r.out.result = _winreg_SetKeySecurity(p, r.in.handle, r.in.access_mask, r.in.sd);
        
        if (p->rng_fault_state) {
index 4703c3dc07d231948c0a89ab0514909f952e5ed3..54ab5195d40134304090b93a8f5ae5a24a701970 100644 (file)
@@ -406,7 +406,6 @@ struct winreg_SetKeySecurity {
        } in;
 
        struct {
-               struct KeySecurityData *sd;/* [ref] */
                WERROR result;
        } out;
 
index c4907a199f124570b35bac02f3f0b9493c8ac55b..6ec55cc6ede91ed4371f0e5b7feefb0dd5368805 100644 (file)
@@ -275,7 +275,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
        WERROR winreg_SetKeySecurity(
                [in,ref] policy_handle *handle,
                [in] winreg_AccessMask access_mask,
-               [in,out,ref] KeySecurityData *sd
+               [in,ref] KeySecurityData *sd
        );
 
        /******************/