The branch, v3-2-test has been updated
       via  e02b07da063200eaf7f2902b7541237b3f9442d1 (commit)
       via  0b4d39f4bddcbf372365b1ca7c1d1d2ba435299e (commit)
      from  d64b19e77aa499c1ee1aaf788ddf3d6fd36253e4 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit e02b07da063200eaf7f2902b7541237b3f9442d1
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Fri Feb 1 23:32:48 2008 +0100

    Re-run make idl.
    
    Guenther

commit 0b4d39f4bddcbf372365b1ca7c1d1d2ba435299e
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Fri Feb 1 17:08:51 2008 +0100

    Fix samr_QuerySecurity IDL.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/librpc/gen_ndr/cli_samr.c |    2 +-
 source/librpc/gen_ndr/cli_samr.h |    2 +-
 source/librpc/gen_ndr/ndr_samr.c |   22 +++++++++++++++++++---
 source/librpc/gen_ndr/samr.h     |    2 +-
 source/librpc/gen_ndr/srv_samr.c |    2 +-
 source/librpc/idl/samr.idl       |    2 +-
 6 files changed, 24 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/gen_ndr/cli_samr.c b/source/librpc/gen_ndr/cli_samr.c
index 73c123b..1c71645 100644
--- a/source/librpc/gen_ndr/cli_samr.c
+++ b/source/librpc/gen_ndr/cli_samr.c
@@ -136,7 +136,7 @@ NTSTATUS rpccli_samr_QuerySecurity(struct rpc_pipe_client 
*cli,
                                   TALLOC_CTX *mem_ctx,
                                   struct policy_handle *handle,
                                   uint32_t sec_info,
-                                  struct sec_desc_buf *sdbuf)
+                                  struct sec_desc_buf **sdbuf)
 {
        struct samr_QuerySecurity r;
        NTSTATUS status;
diff --git a/source/librpc/gen_ndr/cli_samr.h b/source/librpc/gen_ndr/cli_samr.h
index 23f2d1f..14f47ea 100644
--- a/source/librpc/gen_ndr/cli_samr.h
+++ b/source/librpc/gen_ndr/cli_samr.h
@@ -18,7 +18,7 @@ NTSTATUS rpccli_samr_QuerySecurity(struct rpc_pipe_client 
*cli,
                                   TALLOC_CTX *mem_ctx,
                                   struct policy_handle *handle,
                                   uint32_t sec_info,
-                                  struct sec_desc_buf *sdbuf);
+                                  struct sec_desc_buf **sdbuf);
 NTSTATUS rpccli_samr_Shutdown(struct rpc_pipe_client *cli,
                              TALLOC_CTX *mem_ctx,
                              struct policy_handle *connect_handle);
diff --git a/source/librpc/gen_ndr/ndr_samr.c b/source/librpc/gen_ndr/ndr_samr.c
index adbe549..d6f51b9 100644
--- a/source/librpc/gen_ndr/ndr_samr.c
+++ b/source/librpc/gen_ndr/ndr_samr.c
@@ -5425,7 +5425,11 @@ static enum ndr_err_code 
ndr_push_samr_QuerySecurity(struct ndr_push *ndr, int f
                if (r->out.sdbuf == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, 
"NULL [ref] pointer");
                }
-               NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, 
r->out.sdbuf));
+               if (*r->out.sdbuf == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, 
"NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_ref_ptr(ndr));
+               NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, 
*r->out.sdbuf));
                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
        }
        return NDR_ERR_SUCCESS;
@@ -5433,8 +5437,10 @@ static enum ndr_err_code 
ndr_push_samr_QuerySecurity(struct ndr_push *ndr, int f
 
 static enum ndr_err_code ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, int 
flags, struct samr_QuerySecurity *r)
 {
+       uint32_t _ptr_sdbuf;
        TALLOC_CTX *_mem_save_handle_0;
        TALLOC_CTX *_mem_save_sdbuf_0;
+       TALLOC_CTX *_mem_save_sdbuf_1;
        if (flags & NDR_IN) {
                ZERO_STRUCT(r->out);
 
@@ -5455,7 +5461,14 @@ static enum ndr_err_code 
ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, int f
                }
                _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
                NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, 
r->out.sdbuf));
+               NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_sdbuf));
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, *r->out.sdbuf);
+               }
+               _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, 
*r->out.sdbuf));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, 
LIBNDR_FLAG_REF_ALLOC);
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, 
LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
        }
@@ -5484,7 +5497,10 @@ _PUBLIC_ void ndr_print_samr_QuerySecurity(struct 
ndr_print *ndr, const char *na
                ndr->depth++;
                ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf);
                ndr->depth++;
-               ndr_print_sec_desc_buf(ndr, "sdbuf", r->out.sdbuf);
+               ndr_print_ptr(ndr, "sdbuf", *r->out.sdbuf);
+               ndr->depth++;
+               ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf);
+               ndr->depth--;
                ndr->depth--;
                ndr_print_NTSTATUS(ndr, "result", r->out.result);
                ndr->depth--;
diff --git a/source/librpc/gen_ndr/samr.h b/source/librpc/gen_ndr/samr.h
index 2a6a826..6e79773 100644
--- a/source/librpc/gen_ndr/samr.h
+++ b/source/librpc/gen_ndr/samr.h
@@ -773,7 +773,7 @@ struct samr_QuerySecurity {
        } in;
 
        struct {
-               struct sec_desc_buf *sdbuf;/* [ref] */
+               struct sec_desc_buf **sdbuf;/* [ref] */
                NTSTATUS result;
        } out;
 
diff --git a/source/librpc/gen_ndr/srv_samr.c b/source/librpc/gen_ndr/srv_samr.c
index 72116f3..188c5b1 100644
--- a/source/librpc/gen_ndr/srv_samr.c
+++ b/source/librpc/gen_ndr/srv_samr.c
@@ -273,7 +273,7 @@ static bool api_samr_QuerySecurity(pipes_struct *p)
        }
 
        ZERO_STRUCT(r->out);
-       r->out.sdbuf = talloc_zero(r, struct sec_desc_buf);
+       r->out.sdbuf = talloc_zero(r, struct sec_desc_buf *);
        if (r->out.sdbuf == NULL) {
                talloc_free(r);
                return false;
diff --git a/source/librpc/idl/samr.idl b/source/librpc/idl/samr.idl
index 2c4fef5..3a3eb26 100644
--- a/source/librpc/idl/samr.idl
+++ b/source/librpc/idl/samr.idl
@@ -125,7 +125,7 @@ import "misc.idl", "lsa.idl", "security.idl";
        NTSTATUS samr_QuerySecurity (
                [in,ref]          policy_handle *handle,
                [in]              security_secinfo sec_info,
-               [out,ref]         sec_desc_buf *sdbuf
+               [out,ref]         sec_desc_buf **sdbuf
                );
 
        /******************/


-- 
Samba Shared Repository

Reply via email to