summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-04-08 23:04:22 +0200
committerGünther Deschner <gd@samba.org>2008-04-08 23:04:22 +0200
commitea0048712d6d9b64f6c492bcc3f527d7db6c3bc4 (patch)
treeb984ebf871756df0f11b437c821917b628a3b4d4
parentb1590027999317463bad3ccaf22823a7aae6ce02 (diff)
downloadsamba-ea0048712d6d9b64f6c492bcc3f527d7db6c3bc4.tar.gz
samba-ea0048712d6d9b64f6c492bcc3f527d7db6c3bc4.tar.bz2
samba-ea0048712d6d9b64f6c492bcc3f527d7db6c3bc4.zip
Re-run make idl.
Guenther (This used to be commit ad3073749089f7166d9070c232ef02e6ba203215)
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.c6
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.h2
-rw-r--r--source3/librpc/gen_ndr/lsa.h2
-rw-r--r--source3/librpc/gen_ndr/ndr_lsa.c39
-rw-r--r--source3/librpc/gen_ndr/srv_lsa.c2
5 files changed, 32 insertions, 19 deletions
diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c
index 8df638f051..4e81f7094c 100644
--- a/source3/librpc/gen_ndr/cli_lsa.c
+++ b/source3/librpc/gen_ndr/cli_lsa.c
@@ -1398,7 +1398,7 @@ NTSTATUS rpccli_lsa_LookupPrivName(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
struct lsa_LUID *luid /* [in] [ref] */,
- struct lsa_StringLarge *name /* [out] [unique] */)
+ struct lsa_StringLarge **name /* [out] [ref] */)
{
struct lsa_LookupPrivName r;
NTSTATUS status;
@@ -1431,9 +1431,7 @@ NTSTATUS rpccli_lsa_LookupPrivName(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (name && r.out.name) {
- *name = *r.out.name;
- }
+ *name = *r.out.name;
/* Return result */
return r.out.result;
diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h
index 6befb1d86d..f3333a091b 100644
--- a/source3/librpc/gen_ndr/cli_lsa.h
+++ b/source3/librpc/gen_ndr/cli_lsa.h
@@ -161,7 +161,7 @@ NTSTATUS rpccli_lsa_LookupPrivName(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
struct lsa_LUID *luid /* [in] [ref] */,
- struct lsa_StringLarge *name /* [out] [unique] */);
+ struct lsa_StringLarge **name /* [out] [ref] */);
NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h
index 044d07b1e0..1e3d3162b2 100644
--- a/source3/librpc/gen_ndr/lsa.h
+++ b/source3/librpc/gen_ndr/lsa.h
@@ -1049,7 +1049,7 @@ struct lsa_LookupPrivName {
} in;
struct {
- struct lsa_StringLarge *name;/* [unique] */
+ struct lsa_StringLarge **name;/* [ref] */
NTSTATUS result;
} out;
diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c
index 396791af54..c7d428b1b9 100644
--- a/source3/librpc/gen_ndr/ndr_lsa.c
+++ b/source3/librpc/gen_ndr/ndr_lsa.c
@@ -7674,9 +7674,12 @@ static enum ndr_err_code ndr_push_lsa_LookupPrivName(struct ndr_push *ndr, int f
NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, r->in.luid));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.name));
- if (r->out.name) {
- NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
+ if (r->out.name == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.name));
+ if (*r->out.name) {
+ NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.name));
}
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
@@ -7689,6 +7692,7 @@ static enum ndr_err_code ndr_pull_lsa_LookupPrivName(struct ndr_pull *ndr, int f
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_luid_0;
TALLOC_CTX *_mem_save_name_0;
+ TALLOC_CTX *_mem_save_name_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -7706,20 +7710,28 @@ static enum ndr_err_code ndr_pull_lsa_LookupPrivName(struct ndr_pull *ndr, int f
NDR_PULL_SET_MEM_CTX(ndr, r->in.luid, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, r->in.luid));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_luid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.name);
+ ZERO_STRUCTP(r->out.name);
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.name);
+ }
+ _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
if (_ptr_name) {
- NDR_PULL_ALLOC(ndr, r->out.name);
+ NDR_PULL_ALLOC(ndr, *r->out.name);
} else {
- r->out.name = NULL;
+ *r->out.name = NULL;
}
- if (r->out.name) {
- _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.name, 0);
- NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
+ if (*r->out.name) {
+ _mem_save_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.name, 0);
+ NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -7750,10 +7762,13 @@ _PUBLIC_ void ndr_print_lsa_LookupPrivName(struct ndr_print *ndr, const char *na
ndr->depth++;
ndr_print_ptr(ndr, "name", r->out.name);
ndr->depth++;
- if (r->out.name) {
- ndr_print_lsa_StringLarge(ndr, "name", r->out.name);
+ ndr_print_ptr(ndr, "name", *r->out.name);
+ ndr->depth++;
+ if (*r->out.name) {
+ ndr_print_lsa_StringLarge(ndr, "name", *r->out.name);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
}
diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c
index e6fca84687..249bdc04bb 100644
--- a/source3/librpc/gen_ndr/srv_lsa.c
+++ b/source3/librpc/gen_ndr/srv_lsa.c
@@ -2521,7 +2521,7 @@ static bool api_lsa_LookupPrivName(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.name = talloc_zero(r, struct lsa_StringLarge);
+ r->out.name = talloc_zero(r, struct lsa_StringLarge *);
if (r->out.name == NULL) {
talloc_free(r);
return false;