summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/librpc/gen_ndr/cli_srvsvc.c9
-rw-r--r--source3/librpc/gen_ndr/cli_srvsvc.h3
-rw-r--r--source3/librpc/gen_ndr/ndr_srvsvc.c119
-rw-r--r--source3/librpc/gen_ndr/ndr_srvsvc.h1
-rw-r--r--source3/librpc/gen_ndr/srv_srvsvc.c3
-rw-r--r--source3/librpc/gen_ndr/srvsvc.h11
6 files changed, 72 insertions, 74 deletions
diff --git a/source3/librpc/gen_ndr/cli_srvsvc.c b/source3/librpc/gen_ndr/cli_srvsvc.c
index 18bec1f8ec..386b25c56f 100644
--- a/source3/librpc/gen_ndr/cli_srvsvc.c
+++ b/source3/librpc/gen_ndr/cli_srvsvc.c
@@ -491,8 +491,7 @@ NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli,
const char *server_unc,
const char *path,
const char *user,
- uint32_t *level,
- union srvsvc_NetFileCtr *ctr,
+ struct srvsvc_NetFileInfoCtr *info_ctr,
uint32_t max_buffer,
uint32_t *totalentries,
uint32_t *resume_handle,
@@ -505,8 +504,7 @@ NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli,
r.in.server_unc = server_unc;
r.in.path = path;
r.in.user = user;
- r.in.level = level;
- r.in.ctr = ctr;
+ r.in.info_ctr = info_ctr;
r.in.max_buffer = max_buffer;
r.in.resume_handle = resume_handle;
@@ -534,8 +532,7 @@ NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli,
}
/* Return variables */
- *level = *r.out.level;
- *ctr = *r.out.ctr;
+ *info_ctr = *r.out.info_ctr;
*totalentries = *r.out.totalentries;
if (resume_handle && r.out.resume_handle) {
*resume_handle = *r.out.resume_handle;
diff --git a/source3/librpc/gen_ndr/cli_srvsvc.h b/source3/librpc/gen_ndr/cli_srvsvc.h
index bccf95e1ef..9b5da3bdf0 100644
--- a/source3/librpc/gen_ndr/cli_srvsvc.h
+++ b/source3/librpc/gen_ndr/cli_srvsvc.h
@@ -75,8 +75,7 @@ NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli,
const char *server_unc,
const char *path,
const char *user,
- uint32_t *level,
- union srvsvc_NetFileCtr *ctr,
+ struct srvsvc_NetFileInfoCtr *info_ctr,
uint32_t max_buffer,
uint32_t *totalentries,
uint32_t *resume_handle,
diff --git a/source3/librpc/gen_ndr/ndr_srvsvc.c b/source3/librpc/gen_ndr/ndr_srvsvc.c
index bfb4ced648..5645e36ae5 100644
--- a/source3/librpc/gen_ndr/ndr_srvsvc.c
+++ b/source3/librpc/gen_ndr/ndr_srvsvc.c
@@ -2238,6 +2238,44 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *nam
}
}
+static enum ndr_err_code ndr_push_srvsvc_NetFileInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfoCtr *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
+ NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS, &r->ctr));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_BUFFERS, &r->ctr));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_srvsvc_NetFileInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfoCtr *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
+ NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS, &r->ctr));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_BUFFERS, &r->ctr));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetFileInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfoCtr *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetFileInfoCtr");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", r->level);
+ ndr_print_set_switch_value(ndr, &r->ctr, r->level);
+ ndr_print_srvsvc_NetFileCtr(ndr, "ctr", &r->ctr);
+ ndr->depth--;
+}
+
static enum ndr_err_code ndr_push_srvsvc_NetSessInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo0 *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -14401,15 +14439,10 @@ static enum ndr_err_code ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, int f
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
}
- if (r->in.level == NULL) {
- return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
- }
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
- if (r->in.ctr == NULL) {
+ if (r->in.info_ctr == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
- NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_CHECK(ndr_push_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
if (r->in.resume_handle) {
@@ -14417,15 +14450,10 @@ static enum ndr_err_code ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, int f
}
}
if (flags & NDR_OUT) {
- if (r->out.level == NULL) {
- return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
- }
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
- if (r->out.ctr == NULL) {
+ if (r->out.info_ctr == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
- NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ NDR_CHECK(ndr_push_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
if (r->out.totalentries == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -14448,8 +14476,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, int f
TALLOC_CTX *_mem_save_server_unc_0;
TALLOC_CTX *_mem_save_path_0;
TALLOC_CTX *_mem_save_user_0;
- TALLOC_CTX *_mem_save_level_0;
- TALLOC_CTX *_mem_save_ctr_0;
+ TALLOC_CTX *_mem_save_info_ctr_0;
TALLOC_CTX *_mem_save_totalentries_0;
TALLOC_CTX *_mem_save_resume_handle_0;
if (flags & NDR_IN) {
@@ -14510,20 +14537,12 @@ static enum ndr_err_code ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, int f
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
}
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->in.level);
- }
- _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
- if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->in.ctr);
+ NDR_PULL_ALLOC(ndr, r->in.info_ctr);
}
- _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
- NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
if (_ptr_resume_handle) {
@@ -14537,29 +14556,19 @@ static enum ndr_err_code ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, int f
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
}
- NDR_PULL_ALLOC(ndr, r->out.level);
- *r->out.level = *r->in.level;
- NDR_PULL_ALLOC(ndr, r->out.ctr);
- *r->out.ctr = *r->in.ctr;
+ NDR_PULL_ALLOC(ndr, r->out.info_ctr);
+ *r->out.info_ctr = *r->in.info_ctr;
NDR_PULL_ALLOC(ndr, r->out.totalentries);
ZERO_STRUCTP(r->out.totalentries);
}
if (flags & NDR_OUT) {
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.level);
- }
- _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
- if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.ctr);
+ NDR_PULL_ALLOC(ndr, r->out.info_ctr);
}
- _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
- NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.totalentries);
}
@@ -14612,14 +14621,9 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *na
ndr_print_string(ndr, "user", r->in.user);
}
ndr->depth--;
- ndr_print_ptr(ndr, "level", r->in.level);
- ndr->depth++;
- ndr_print_uint32(ndr, "level", *r->in.level);
- ndr->depth--;
- ndr_print_ptr(ndr, "ctr", r->in.ctr);
+ ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
ndr->depth++;
- ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
- ndr_print_srvsvc_NetFileCtr(ndr, "ctr", r->in.ctr);
+ ndr_print_srvsvc_NetFileInfoCtr(ndr, "info_ctr", r->in.info_ctr);
ndr->depth--;
ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
@@ -14633,14 +14637,9 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *na
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "srvsvc_NetFileEnum");
ndr->depth++;
- ndr_print_ptr(ndr, "level", r->out.level);
- ndr->depth++;
- ndr_print_uint32(ndr, "level", *r->out.level);
- ndr->depth--;
- ndr_print_ptr(ndr, "ctr", r->out.ctr);
+ ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
ndr->depth++;
- ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
- ndr_print_srvsvc_NetFileCtr(ndr, "ctr", r->out.ctr);
+ ndr_print_srvsvc_NetFileInfoCtr(ndr, "info_ctr", r->out.info_ctr);
ndr->depth--;
ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
ndr->depth++;
diff --git a/source3/librpc/gen_ndr/ndr_srvsvc.h b/source3/librpc/gen_ndr/ndr_srvsvc.h
index 0469040c49..cd341fa374 100644
--- a/source3/librpc/gen_ndr/ndr_srvsvc.h
+++ b/source3/librpc/gen_ndr/ndr_srvsvc.h
@@ -143,6 +143,7 @@ void ndr_print_srvsvc_NetFileInfo3(struct ndr_print *ndr, const char *name, cons
void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr3 *r);
void ndr_print_srvsvc_NetFileInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileInfo *r);
void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileCtr *r);
+void ndr_print_srvsvc_NetFileInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfoCtr *r);
void ndr_print_srvsvc_NetSessInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo0 *r);
void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr0 *r);
void ndr_print_srvsvc_NetSessInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo1 *r);
diff --git a/source3/librpc/gen_ndr/srv_srvsvc.c b/source3/librpc/gen_ndr/srv_srvsvc.c
index 2817542131..100f2cacf9 100644
--- a/source3/librpc/gen_ndr/srv_srvsvc.c
+++ b/source3/librpc/gen_ndr/srv_srvsvc.c
@@ -748,8 +748,7 @@ static bool api_srvsvc_NetFileEnum(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.level = r->in.level;
- r->out.ctr = r->in.ctr;
+ r->out.info_ctr = r->in.info_ctr;
r->out.totalentries = talloc_zero(r, uint32_t);
if (r->out.totalentries == NULL) {
talloc_free(r);
diff --git a/source3/librpc/gen_ndr/srvsvc.h b/source3/librpc/gen_ndr/srvsvc.h
index 31a9ba61cd..6a74904571 100644
--- a/source3/librpc/gen_ndr/srvsvc.h
+++ b/source3/librpc/gen_ndr/srvsvc.h
@@ -135,6 +135,11 @@ union srvsvc_NetFileCtr {
struct srvsvc_NetFileCtr3 *ctr3;/* [unique,case(3)] */
};
+struct srvsvc_NetFileInfoCtr {
+ uint32_t level;
+ union srvsvc_NetFileCtr ctr;/* [switch_is(level)] */
+};
+
struct srvsvc_NetSessInfo0 {
const char *client;/* [unique,charset(UTF16)] */
};
@@ -1173,15 +1178,13 @@ struct srvsvc_NetFileEnum {
const char *path;/* [unique,charset(UTF16)] */
const char *user;/* [unique,charset(UTF16)] */
uint32_t max_buffer;
- uint32_t *level;/* [ref] */
- union srvsvc_NetFileCtr *ctr;/* [ref,switch_is(*level)] */
+ struct srvsvc_NetFileInfoCtr *info_ctr;/* [ref] */
uint32_t *resume_handle;/* [unique] */
} in;
struct {
uint32_t *totalentries;/* [ref] */
- uint32_t *level;/* [ref] */
- union srvsvc_NetFileCtr *ctr;/* [ref,switch_is(*level)] */
+ struct srvsvc_NetFileInfoCtr *info_ctr;/* [ref] */
uint32_t *resume_handle;/* [unique] */
WERROR result;
} out;