summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-19 13:06:11 +0100
committerGünther Deschner <gd@samba.org>2009-02-19 13:06:11 +0100
commit7d44cd50e8b420c6981ff93f42085ff664b686c5 (patch)
treed61f6ee606b93760d049ede14a7c494bfe1e5c90 /librpc
parent1852cd0a6075279d48689a2c4c1cd4e25d2e3452 (diff)
downloadsamba-7d44cd50e8b420c6981ff93f42085ff664b686c5.tar.gz
samba-7d44cd50e8b420c6981ff93f42085ff664b686c5.tar.bz2
samba-7d44cd50e8b420c6981ff93f42085ff664b686c5.zip
s3: re-run make samba3-idl.
Guenther
Diffstat (limited to 'librpc')
-rw-r--r--librpc/gen_ndr/cli_spoolss.c16
-rw-r--r--librpc/gen_ndr/cli_spoolss.h7
-rw-r--r--librpc/gen_ndr/ndr_spoolss.c285
-rw-r--r--librpc/gen_ndr/ndr_spoolss.h8
-rw-r--r--librpc/gen_ndr/spoolss.h18
-rw-r--r--librpc/gen_ndr/srv_spoolss.c24
6 files changed, 358 insertions, 0 deletions
diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c
index 3793dfe11e..02a05b94ff 100644
--- a/librpc/gen_ndr/cli_spoolss.c
+++ b/librpc/gen_ndr/cli_spoolss.c
@@ -832,12 +832,24 @@ NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli,
NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ const char *server /* [in] [unique,charset(UTF16)] */,
+ const char *environment /* [in] [unique,charset(UTF16)] */,
+ uint32_t level /* [in] */,
+ DATA_BLOB *buffer /* [in] [unique] */,
+ uint32_t offered /* [in] */,
+ union spoolss_PrintProcessorDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
+ uint32_t *needed /* [out] [ref] */,
WERROR *werror)
{
struct spoolss_GetPrintProcessorDirectory r;
NTSTATUS status;
/* In parameters */
+ r.in.server = server;
+ r.in.environment = environment;
+ r.in.level = level;
+ r.in.buffer = buffer;
+ r.in.offered = offered;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
@@ -862,6 +874,10 @@ NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli,
}
/* Return variables */
+ if (info && r.out.info) {
+ *info = *r.out.info;
+ }
+ *needed = *r.out.needed;
/* Return result */
if (werror) {
diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h
index 06e9ec91fc..bb38d59cfb 100644
--- a/librpc/gen_ndr/cli_spoolss.h
+++ b/librpc/gen_ndr/cli_spoolss.h
@@ -128,6 +128,13 @@ NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli,
WERROR *werror);
NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ const char *server /* [in] [unique,charset(UTF16)] */,
+ const char *environment /* [in] [unique,charset(UTF16)] */,
+ uint32_t level /* [in] */,
+ DATA_BLOB *buffer /* [in] [unique] */,
+ uint32_t offered /* [in] */,
+ union spoolss_PrintProcessorDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
+ uint32_t *needed /* [out] [ref] */,
WERROR *werror);
NTSTATUS rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c
index 4aafa4a1b7..f7f08e5ffa 100644
--- a/librpc/gen_ndr/ndr_spoolss.c
+++ b/librpc/gen_ndr/ndr_spoolss.c
@@ -11068,6 +11068,138 @@ _PUBLIC_ void ndr_print_spoolss_PrintProcessorInfo(struct ndr_print *ndr, const
}
}
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorDirectoryInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrintProcessorDirectoryInfo1 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->directory_name));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorDirectoryInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrintProcessorDirectoryInfo1 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->directory_name));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_PrintProcessorDirectoryInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrintProcessorDirectoryInfo1 *r)
+{
+ ndr_print_struct(ndr, name, "spoolss_PrintProcessorDirectoryInfo1");
+ ndr->depth++;
+ ndr_print_string(ndr, "directory_name", r->directory_name);
+ ndr->depth--;
+}
+
+_PUBLIC_ size_t ndr_size_spoolss_PrintProcessorDirectoryInfo1(const struct spoolss_PrintProcessorDirectoryInfo1 *r, struct smb_iconv_convenience *ic, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrintProcessorDirectoryInfo1, ic);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorDirectoryInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrintProcessorDirectoryInfo *r)
+{
+ uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
+ if (ndr_flags & NDR_SCALARS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case 1: {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
+ NDR_CHECK(ndr_push_spoolss_PrintProcessorDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
+ switch (level) {
+ case 1:
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorDirectoryInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_PrintProcessorDirectoryInfo *r)
+{
+ uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
+ int level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ switch (level) {
+ case 1: {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
+ NDR_CHECK(ndr_pull_spoolss_PrintProcessorDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
+ switch (level) {
+ case 1:
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_PrintProcessorDirectoryInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrintProcessorDirectoryInfo *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "spoolss_PrintProcessorDirectoryInfo");
+ switch (level) {
+ case 1:
+ ndr_print_spoolss_PrintProcessorDirectoryInfo1(ndr, "info1", &r->info1);
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+_PUBLIC_ size_t ndr_size_spoolss_PrintProcessorDirectoryInfo(const union spoolss_PrintProcessorDirectoryInfo *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
+{
+ return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_PrintProcessorDirectoryInfo, ic);
+}
+
static enum ndr_err_code ndr_push_spoolss_DocumentInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DocumentInfo1 *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -16654,8 +16786,42 @@ _PUBLIC_ void ndr_print_spoolss_EnumPrintProcessors(struct ndr_print *ndr, const
static enum ndr_err_code ndr_push_spoolss_GetPrintProcessorDirectory(struct ndr_push *ndr, int flags, const struct spoolss_GetPrintProcessorDirectory *r)
{
if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
+ if (r->in.server) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.environment));
+ if (r->in.environment) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.environment, ndr_charset_length(r->in.environment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
+ if (r->in.buffer) {
+ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
}
if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
+ if (r->out.info) {
+ {
+ struct ndr_push *_ndr_info;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
+ NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_spoolss_PrintProcessorDirectoryInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
+ }
+ }
+ if (r->out.needed == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -16663,9 +16829,97 @@ static enum ndr_err_code ndr_push_spoolss_GetPrintProcessorDirectory(struct ndr_
static enum ndr_err_code ndr_pull_spoolss_GetPrintProcessorDirectory(struct ndr_pull *ndr, int flags, struct spoolss_GetPrintProcessorDirectory *r)
{
+ uint32_t _ptr_server;
+ uint32_t _ptr_environment;
+ uint32_t _ptr_buffer;
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_server_0;
+ TALLOC_CTX *_mem_save_environment_0;
+ TALLOC_CTX *_mem_save_buffer_0;
+ TALLOC_CTX *_mem_save_info_0;
+ TALLOC_CTX *_mem_save_needed_0;
if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
+ if (_ptr_server) {
+ NDR_PULL_ALLOC(ndr, r->in.server);
+ } else {
+ r->in.server = NULL;
+ }
+ if (r->in.server) {
+ _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
+ if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server), ndr_get_array_length(ndr, &r->in.server));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_environment));
+ if (_ptr_environment) {
+ NDR_PULL_ALLOC(ndr, r->in.environment);
+ } else {
+ r->in.environment = NULL;
+ }
+ if (r->in.environment) {
+ _mem_save_environment_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.environment, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.environment));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.environment));
+ if (ndr_get_array_length(ndr, &r->in.environment) > ndr_get_array_size(ndr, &r->in.environment)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.environment), ndr_get_array_length(ndr, &r->in.environment));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.environment), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.environment, ndr_get_array_length(ndr, &r->in.environment), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_environment_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
+ if (_ptr_buffer) {
+ NDR_PULL_ALLOC(ndr, r->in.buffer);
+ } else {
+ r->in.buffer = NULL;
+ }
+ if (r->in.buffer) {
+ _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
+ NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
}
if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ } else {
+ r->out.info = NULL;
+ }
+ if (r->out.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
+ {
+ struct ndr_pull *_ndr_info;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
+ NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_spoolss_PrintProcessorDirectoryInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ }
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -16681,11 +16935,42 @@ _PUBLIC_ void ndr_print_spoolss_GetPrintProcessorDirectory(struct ndr_print *ndr
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "spoolss_GetPrintProcessorDirectory");
ndr->depth++;
+ ndr_print_ptr(ndr, "server", r->in.server);
+ ndr->depth++;
+ if (r->in.server) {
+ ndr_print_string(ndr, "server", r->in.server);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "environment", r->in.environment);
+ ndr->depth++;
+ if (r->in.environment) {
+ ndr_print_string(ndr, "environment", r->in.environment);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_ptr(ndr, "buffer", r->in.buffer);
+ ndr->depth++;
+ if (r->in.buffer) {
+ ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "spoolss_GetPrintProcessorDirectory");
ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ if (r->out.info) {
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_spoolss_PrintProcessorDirectoryInfo(ndr, "info", r->out.info);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "needed", r->out.needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
+ ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
}
diff --git a/librpc/gen_ndr/ndr_spoolss.h b/librpc/gen_ndr/ndr_spoolss.h
index 239ddf2565..3dc92962eb 100644
--- a/librpc/gen_ndr/ndr_spoolss.h
+++ b/librpc/gen_ndr/ndr_spoolss.h
@@ -287,6 +287,14 @@ void ndr_print_spoolss_PrintProcessorInfo1(struct ndr_print *ndr, const char *na
enum ndr_err_code ndr_push_spoolss_PrintProcessorInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrintProcessorInfo *r);
enum ndr_err_code ndr_pull_spoolss_PrintProcessorInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_PrintProcessorInfo *r);
void ndr_print_spoolss_PrintProcessorInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrintProcessorInfo *r);
+enum ndr_err_code ndr_push_spoolss_PrintProcessorDirectoryInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrintProcessorDirectoryInfo1 *r);
+enum ndr_err_code ndr_pull_spoolss_PrintProcessorDirectoryInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrintProcessorDirectoryInfo1 *r);
+void ndr_print_spoolss_PrintProcessorDirectoryInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrintProcessorDirectoryInfo1 *r);
+size_t ndr_size_spoolss_PrintProcessorDirectoryInfo1(const struct spoolss_PrintProcessorDirectoryInfo1 *r, struct smb_iconv_convenience *ic, int flags);
+enum ndr_err_code ndr_push_spoolss_PrintProcessorDirectoryInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrintProcessorDirectoryInfo *r);
+enum ndr_err_code ndr_pull_spoolss_PrintProcessorDirectoryInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_PrintProcessorDirectoryInfo *r);
+void ndr_print_spoolss_PrintProcessorDirectoryInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrintProcessorDirectoryInfo *r);
+size_t ndr_size_spoolss_PrintProcessorDirectoryInfo(const union spoolss_PrintProcessorDirectoryInfo *r, uint32_t level, struct smb_iconv_convenience *ic, int flags);
void ndr_print_spoolss_DocumentInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_DocumentInfo1 *r);
void ndr_print_spoolss_DocumentInfo(struct ndr_print *ndr, const char *name, const union spoolss_DocumentInfo *r);
enum ndr_err_code ndr_push_spoolss_OSVersion(struct ndr_push *ndr, int ndr_flags, const struct spoolss_OSVersion *r);
diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h
index f0f5203452..5d858cad0c 100644
--- a/librpc/gen_ndr/spoolss.h
+++ b/librpc/gen_ndr/spoolss.h
@@ -815,6 +815,14 @@ union spoolss_PrintProcessorInfo {
struct spoolss_PrintProcessorInfo1 info1;/* [case] */
}/* [relative_base,nodiscriminant,public] */;
+struct spoolss_PrintProcessorDirectoryInfo1 {
+ const char * directory_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
+}/* [gensize,public] */;
+
+union spoolss_PrintProcessorDirectoryInfo {
+ struct spoolss_PrintProcessorDirectoryInfo1 info1;/* [case] */
+}/* [gensize,relative_base,nodiscriminant,public] */;
+
struct spoolss_DocumentInfo1 {
const char *document_name;/* [unique,charset(UTF16)] */
const char *output_file;/* [unique,charset(UTF16)] */
@@ -1618,6 +1626,16 @@ struct spoolss_EnumPrintProcessors {
struct spoolss_GetPrintProcessorDirectory {
struct {
+ const char *server;/* [unique,charset(UTF16)] */
+ const char *environment;/* [unique,charset(UTF16)] */
+ uint32_t level;
+ DATA_BLOB *buffer;/* [unique] */
+ uint32_t offered;
+ } in;
+
+ struct {
+ union spoolss_PrintProcessorDirectoryInfo *info;/* [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */
+ uint32_t *needed;/* [ref] */
WERROR result;
} out;
diff --git a/librpc/gen_ndr/srv_spoolss.c b/librpc/gen_ndr/srv_spoolss.c
index f48cf51b9b..f6c17cb1fa 100644
--- a/librpc/gen_ndr/srv_spoolss.c
+++ b/librpc/gen_ndr/srv_spoolss.c
@@ -1334,6 +1334,19 @@ static bool api_spoolss_GetPrintProcessorDirectory(pipes_struct *p)
NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(r, union spoolss_PrintProcessorDirectoryInfo);
+ if (r->out.info == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.result = _spoolss_GetPrintProcessorDirectory(p, r);
if (p->rng_fault_state) {
@@ -7731,6 +7744,17 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
case NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY: {
struct spoolss_GetPrintProcessorDirectory *r = (struct spoolss_GetPrintProcessorDirectory *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(mem_ctx, union spoolss_PrintProcessorDirectoryInfo);
+ if (r->out.info == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
r->out.result = _spoolss_GetPrintProcessorDirectory(cli->pipes_struct, r);
return NT_STATUS_OK;
}