summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/librpc/ndr/ndr_spoolss.c33
-rw-r--r--source4/librpc/ndr/ndr_spoolss.h18
-rw-r--r--source4/librpc/rpc/rpc_spoolss.c16
3 files changed, 51 insertions, 16 deletions
diff --git a/source4/librpc/ndr/ndr_spoolss.c b/source4/librpc/ndr/ndr_spoolss.c
index be3082d69e..319e2dade0 100644
--- a/source4/librpc/ndr/ndr_spoolss.c
+++ b/source4/librpc/ndr/ndr_spoolss.c
@@ -2,8 +2,19 @@
#include "includes.h"
-NTSTATUS ndr_push_spoolss_00(struct ndr_push *ndr, struct spoolss_00 *r)
+NTSTATUS ndr_push_spoolss_EnumPrinters(struct ndr_push *ndr, struct spoolss_EnumPrinters *r)
{
+ NDR_CHECK(ndr_push_uint32(ndr, r->in.flags));
+ NDR_CHECK(ndr_push_ptr(ndr, r->in.server));
+ if (r->in.server) {
+ NDR_CHECK(ndr_push_unistr(ndr, r->in.server));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, r->in.level));
+ NDR_CHECK(ndr_push_ptr(ndr, r->in.buffer));
+ if (r->in.buffer) {
+ NDR_CHECK(ndr_push_uint8_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.buffer));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, r->in.offered));
return NT_STATUS_OK;
}
@@ -176,8 +187,9 @@ NTSTATUS ndr_push_spoolss_1c(struct ndr_push *ndr, struct spoolss_1c *r)
return NT_STATUS_OK;
}
-NTSTATUS ndr_push_spoolss_1d(struct ndr_push *ndr, struct spoolss_1d *r)
+NTSTATUS ndr_push_spoolss_ClosePrinter(struct ndr_push *ndr, struct spoolss_ClosePrinter *r)
{
+ NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
return NT_STATUS_OK;
}
@@ -667,8 +679,20 @@ NTSTATUS ndr_push_spoolss_5f(struct ndr_push *ndr, struct spoolss_5f *r)
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_spoolss_00(struct ndr_pull *ndr, struct spoolss_00 *r)
+NTSTATUS ndr_pull_spoolss_EnumPrinters(struct ndr_pull *ndr, struct spoolss_EnumPrinters *r)
{
+ uint32 _ptr_buffer;
+ NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_buffer));
+ if (_ptr_buffer) {
+ NDR_ALLOC(ndr, r->out.buffer);
+ } else {
+ r->out.buffer = NULL;
+ }
+ if (r->out.buffer) {
+ NDR_CHECK(ndr_pull_uint8_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.buffer));
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->out.needed));
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->out.returned));
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
@@ -870,8 +894,9 @@ NTSTATUS ndr_pull_spoolss_1c(struct ndr_pull *ndr, struct spoolss_1c *r)
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_spoolss_1d(struct ndr_pull *ndr, struct spoolss_1d *r)
+NTSTATUS ndr_pull_spoolss_ClosePrinter(struct ndr_pull *ndr, struct spoolss_ClosePrinter *r)
{
+ NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle));
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
diff --git a/source4/librpc/ndr/ndr_spoolss.h b/source4/librpc/ndr/ndr_spoolss.h
index a0fa0d6e14..dcacef337a 100644
--- a/source4/librpc/ndr/ndr_spoolss.h
+++ b/source4/librpc/ndr/ndr_spoolss.h
@@ -1,10 +1,18 @@
/* header auto-generated by pidl */
-struct spoolss_00 {
+struct spoolss_EnumPrinters {
struct {
+ uint32 flags;
+ const char *server;
+ uint32 level;
+ struct uint8_buf *buffer;
+ uint32 offered;
} in;
struct {
+ struct uint8_buf *buffer;
+ uint32 needed;
+ uint32 returned;
NTSTATUS result;
} out;
@@ -290,11 +298,13 @@ struct spoolss_1c {
};
-struct spoolss_1d {
+struct spoolss_ClosePrinter {
struct {
+ struct policy_handle *handle;
} in;
struct {
+ struct policy_handle *handle;
NTSTATUS result;
} out;
@@ -990,7 +1000,7 @@ struct spoolss_5f {
};
-#define DCERPC_SPOOLSS_00 0
+#define DCERPC_SPOOLSS_ENUMPRINTERS 0
#define DCERPC_SPOOLSS_01 1
#define DCERPC_SPOOLSS_02 2
#define DCERPC_SPOOLSS_03 3
@@ -1019,7 +1029,7 @@ struct spoolss_5f {
#define DCERPC_SPOOLSS_1A 26
#define DCERPC_SPOOLSS_1B 27
#define DCERPC_SPOOLSS_1C 28
-#define DCERPC_SPOOLSS_1D 29
+#define DCERPC_SPOOLSS_CLOSEPRINTER 29
#define DCERPC_SPOOLSS_1E 30
#define DCERPC_SPOOLSS_1F 31
#define DCERPC_SPOOLSS_20 32
diff --git a/source4/librpc/rpc/rpc_spoolss.c b/source4/librpc/rpc/rpc_spoolss.c
index d8ec769b61..45ee3726fd 100644
--- a/source4/librpc/rpc/rpc_spoolss.c
+++ b/source4/librpc/rpc/rpc_spoolss.c
@@ -3,12 +3,12 @@
#include "includes.h"
-NTSTATUS dcerpc_spoolss_00(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct spoolss_00 *r)
+NTSTATUS dcerpc_spoolss_EnumPrinters(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct spoolss_EnumPrinters *r)
{
NTSTATUS status;
- status = dcerpc_ndr_request(p, DCERPC_SPOOLSS_00, mem_ctx,
- (ndr_push_fn_t) ndr_push_spoolss_00,
- (ndr_pull_fn_t) ndr_pull_spoolss_00,
+ status = dcerpc_ndr_request(p, DCERPC_SPOOLSS_ENUMPRINTERS, mem_ctx,
+ (ndr_push_fn_t) ndr_push_spoolss_EnumPrinters,
+ (ndr_pull_fn_t) ndr_pull_spoolss_EnumPrinters,
r);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -409,12 +409,12 @@ NTSTATUS dcerpc_spoolss_1c(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct sp
return r->out.result;
}
-NTSTATUS dcerpc_spoolss_1d(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct spoolss_1d *r)
+NTSTATUS dcerpc_spoolss_ClosePrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct spoolss_ClosePrinter *r)
{
NTSTATUS status;
- status = dcerpc_ndr_request(p, DCERPC_SPOOLSS_1D, mem_ctx,
- (ndr_push_fn_t) ndr_push_spoolss_1d,
- (ndr_pull_fn_t) ndr_pull_spoolss_1d,
+ status = dcerpc_ndr_request(p, DCERPC_SPOOLSS_CLOSEPRINTER, mem_ctx,
+ (ndr_push_fn_t) ndr_push_spoolss_ClosePrinter,
+ (ndr_pull_fn_t) ndr_pull_spoolss_ClosePrinter,
r);
if (!NT_STATUS_IS_OK(status)) {
return status;