summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-01-19 00:22:57 +0100
committerGünther Deschner <gd@samba.org>2010-01-19 14:14:30 +0100
commit2b68215a226aab978e5f01470e8b4afbb291134b (patch)
treef50cad7bac1f39082723268cdc2611def16910c5
parente0660ed1bc72effa5715587e105eb5096a3d70d0 (diff)
downloadsamba-2b68215a226aab978e5f01470e8b4afbb291134b.tar.gz
samba-2b68215a226aab978e5f01470e8b4afbb291134b.tar.bz2
samba-2b68215a226aab978e5f01470e8b4afbb291134b.zip
s4-smbtorture: restructure spoolss server implementations in RPC-SPOOLSS-NOTIFY.
Guenther
-rw-r--r--source4/torture/rpc/spoolss_notify.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source4/torture/rpc/spoolss_notify.c b/source4/torture/rpc/spoolss_notify.c
index eacf6943fc..3d37781cb5 100644
--- a/source4/torture/rpc/spoolss_notify.c
+++ b/source4/torture/rpc/spoolss_notify.c
@@ -23,6 +23,7 @@
#include "system/filesys.h"
#include "torture/rpc/rpc.h"
#include "librpc/gen_ndr/ndr_spoolss_c.h"
+#include "librpc/gen_ndr/ndr_spoolss.h"
#include "rpc_server/dcerpc_server.h"
#include "rpc_server/service_rpc.h"
#include "smbd/process_model.h"
@@ -76,6 +77,23 @@ static struct received_packet {
struct received_packet *prev, *next;
} *received_packets = NULL;
+static WERROR _spoolss_ReplyOpenPrinter(struct dcesrv_call_state *dce_call,
+ TALLOC_CTX *mem_ctx,
+ struct spoolss_ReplyOpenPrinter *r)
+{
+ DEBUG(1,("_spoolss_ReplyOpenPrinter\n"));
+
+ NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, r);
+
+ r->out.handle = talloc(r, struct policy_handle);
+ r->out.handle->handle_type = 42;
+ r->out.handle->uuid = GUID_random();
+ r->out.result = WERR_OK;
+
+ NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter, r);
+
+ return WERR_OK;
+}
static NTSTATUS spoolss__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
{
@@ -91,7 +109,7 @@ static NTSTATUS spoolss__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_
switch (opnum) {
case 58: {
struct spoolss_ReplyOpenPrinter *r2 = (struct spoolss_ReplyOpenPrinter *)r;
- r2->out.result = WERR_OK;
+ r2->out.result = _spoolss_ReplyOpenPrinter(dce_call, mem_ctx, r2);
break;
}