summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/librpc/gen_ndr/cli_samr.c2
-rw-r--r--source3/librpc/gen_ndr/cli_samr.h2
-rw-r--r--source3/librpc/gen_ndr/ndr_samr.c22
-rw-r--r--source3/librpc/gen_ndr/samr.h2
-rw-r--r--source3/librpc/gen_ndr/srv_samr.c2
5 files changed, 23 insertions, 7 deletions
diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c
index 1c71645069..a688e67fea 100644
--- a/source3/librpc/gen_ndr/cli_samr.c
+++ b/source3/librpc/gen_ndr/cli_samr.c
@@ -218,7 +218,7 @@ NTSTATUS rpccli_samr_LookupDomain(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *connect_handle,
struct lsa_String *domain_name,
- struct dom_sid2 *sid)
+ struct dom_sid2 **sid)
{
struct samr_LookupDomain r;
NTSTATUS status;
diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h
index 14f47ea925..d1e262cd43 100644
--- a/source3/librpc/gen_ndr/cli_samr.h
+++ b/source3/librpc/gen_ndr/cli_samr.h
@@ -26,7 +26,7 @@ NTSTATUS rpccli_samr_LookupDomain(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *connect_handle,
struct lsa_String *domain_name,
- struct dom_sid2 *sid);
+ struct dom_sid2 **sid);
NTSTATUS rpccli_samr_EnumDomains(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *connect_handle,
diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c
index d6f51b94b0..1d003f21fe 100644
--- a/source3/librpc/gen_ndr/ndr_samr.c
+++ b/source3/librpc/gen_ndr/ndr_samr.c
@@ -5581,7 +5581,11 @@ static enum ndr_err_code ndr_push_samr_LookupDomain(struct ndr_push *ndr, int fl
if (r->out.sid == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
+ if (*r->out.sid == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_ref_ptr(ndr));
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -5589,9 +5593,11 @@ static enum ndr_err_code ndr_push_samr_LookupDomain(struct ndr_push *ndr, int fl
static enum ndr_err_code ndr_pull_samr_LookupDomain(struct ndr_pull *ndr, int flags, struct samr_LookupDomain *r)
{
+ uint32_t _ptr_sid;
TALLOC_CTX *_mem_save_connect_handle_0;
TALLOC_CTX *_mem_save_domain_name_0;
TALLOC_CTX *_mem_save_sid_0;
+ TALLOC_CTX *_mem_save_sid_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -5618,7 +5624,14 @@ static enum ndr_err_code ndr_pull_samr_LookupDomain(struct ndr_pull *ndr, int fl
}
_mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
+ NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_sid));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, *r->out.sid);
+ }
+ _mem_save_sid_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.sid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_1, LIBNDR_FLAG_REF_ALLOC);
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
@@ -5650,7 +5663,10 @@ _PUBLIC_ void ndr_print_samr_LookupDomain(struct ndr_print *ndr, const char *nam
ndr->depth++;
ndr_print_ptr(ndr, "sid", r->out.sid);
ndr->depth++;
- ndr_print_dom_sid2(ndr, "sid", r->out.sid);
+ ndr_print_ptr(ndr, "sid", *r->out.sid);
+ ndr->depth++;
+ ndr_print_dom_sid2(ndr, "sid", *r->out.sid);
+ ndr->depth--;
ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h
index 6e79773fab..ba917c8367 100644
--- a/source3/librpc/gen_ndr/samr.h
+++ b/source3/librpc/gen_ndr/samr.h
@@ -799,7 +799,7 @@ struct samr_LookupDomain {
} in;
struct {
- struct dom_sid2 *sid;/* [ref] */
+ struct dom_sid2 **sid;/* [ref] */
NTSTATUS result;
} out;
diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c
index 188c5b1eb2..215d773aa1 100644
--- a/source3/librpc/gen_ndr/srv_samr.c
+++ b/source3/librpc/gen_ndr/srv_samr.c
@@ -426,7 +426,7 @@ static bool api_samr_LookupDomain(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.sid = talloc_zero(r, struct dom_sid2);
+ r->out.sid = talloc_zero(r, struct dom_sid2 *);
if (r->out.sid == NULL) {
talloc_free(r);
return false;