summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-03-08 16:16:11 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-03-08 16:16:11 +1100
commit6ac77d19b5a25a53459a58e4828fa9eac0bf11f4 (patch)
treebb504eecdcb94d6c82b522f5de0fd13de130fb41 /source4
parentbb6a2c8076e5e9eabad4ee7f09f6df979616fd13 (diff)
parent46bcb10b5abb21758cf234764b64220ede1b7ab5 (diff)
downloadsamba-6ac77d19b5a25a53459a58e4828fa9eac0bf11f4.tar.gz
samba-6ac77d19b5a25a53459a58e4828fa9eac0bf11f4.tar.bz2
samba-6ac77d19b5a25a53459a58e4828fa9eac0bf11f4.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba into wspp-schema
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/util/errormap.c4
-rw-r--r--source4/ntptr/simple_ldb/ntptr_simple_ldb.c8
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c22
-rwxr-xr-xsource4/selftest/tests.sh2
-rw-r--r--source4/torture/rpc/samba3rpc.c2
-rw-r--r--source4/torture/rpc/spoolss.c102
-rw-r--r--source4/torture/rpc/spoolss_win.c8
7 files changed, 113 insertions, 35 deletions
diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c
index 0185e66c39..930e45b214 100644
--- a/source4/libcli/util/errormap.c
+++ b/source4/libcli/util/errormap.c
@@ -1356,6 +1356,10 @@ const struct unix_error_map unix_nt_errmap[] = {
#ifdef ENOSYS
{ ENOSYS, NT_STATUS_INVALID_SYSTEM_SERVICE },
#endif
+#ifdef ECANCELED
+ { ECANCELED, NT_STATUS_CANCELLED },
+#endif
+
{ 0, NT_STATUS_UNSUCCESSFUL }
};
diff --git a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
index 459babce0e..aea5d08c3f 100644
--- a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
+++ b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
@@ -259,7 +259,7 @@ static WERROR sptr_EnumPrintServerForms(struct ntptr_GenericHandle *server, TALL
return WERR_UNKNOWN_LEVEL;
}
- r->out.info = info;
+ *r->out.info = info;
*r->out.count = count;
return WERR_OK;
}
@@ -587,7 +587,7 @@ static WERROR sptr_EnumPrinters(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx
return WERR_UNKNOWN_LEVEL;
}
- r->out.info = info;
+ *r->out.info = info;
*r->out.count = count;
return WERR_OK;
}
@@ -645,7 +645,7 @@ static WERROR sptr_EnumPorts(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,
return WERR_UNKNOWN_LEVEL;
}
- r->out.info = info;
+ *r->out.info = info;
*r->out.count = count;
return WERR_OK;
}
@@ -692,7 +692,7 @@ static WERROR sptr_EnumMonitors(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx
return WERR_UNKNOWN_LEVEL;
}
- r->out.info = info;
+ *r->out.info = info;
*r->out.count = count;
return WERR_OK;
}
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index f1ef2f0acb..61c8009716 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -243,8 +243,8 @@ static WERROR dcesrv_spoolss_EnumPrinters(struct dcesrv_call_state *dce_call, TA
status = ntptr_EnumPrinters(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinters, ic, r->out.info, r->in.level, *r->out.count);
- r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinters, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -379,8 +379,8 @@ static WERROR dcesrv_spoolss_EnumPrinterDrivers(struct dcesrv_call_state *dce_ca
status = ntptr_EnumPrinterDrivers(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinterDrivers, ic, r->out.info, r->in.level, *r->out.count);
- r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinterDrivers, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -802,8 +802,8 @@ static WERROR dcesrv_spoolss_EnumForms(struct dcesrv_call_state *dce_call, TALLO
return WERR_FOOBAR;
}
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumForms, ic, r->out.info, r->in.level, *r->out.count);
- r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumForms, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -825,8 +825,8 @@ static WERROR dcesrv_spoolss_EnumPorts(struct dcesrv_call_state *dce_call, TALLO
status = ntptr_EnumPorts(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPorts, ic, r->out.info, r->in.level, *r->out.count);
- r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPorts, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -848,8 +848,8 @@ static WERROR dcesrv_spoolss_EnumMonitors(struct dcesrv_call_state *dce_call, TA
status = ntptr_EnumMonitors(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumMonitors, ic, r->out.info, r->in.level, *r->out.count);
- r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumMonitors, ic, *r->out.info, r->in.level, *r->out.count);
+ *r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
*r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -1001,7 +1001,7 @@ static WERROR dcesrv_spoolss_DeletePrintProvidor(struct dcesrv_call_state *dce_c
static WERROR dcesrv_spoolss_EnumPrintProcDataTypes(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct spoolss_EnumPrintProcDataTypes *r)
{
- DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+ return WERR_OK;
}
diff --git a/source4/selftest/tests.sh b/source4/selftest/tests.sh
index 39e6cff274..821db06414 100755
--- a/source4/selftest/tests.sh
+++ b/source4/selftest/tests.sh
@@ -291,7 +291,7 @@ if test x"${PIDL_TESTS_SKIP}" = x"yes"; then
echo "Skipping pidl tests - PIDL_TESTS_SKIP=yes"
elif $PERL -e 'eval require Test::More;' > /dev/null 2>&1; then
for f in $samba4srcdir/../pidl/tests/*.pl; do
- plantest "pidl.`basename $f .pl`" none $PERL $f "|" $samba4srcdir/../lib/subunit/harness2subunit.pl
+ plantest "pidl.`basename $f .pl`" none $PERL $f "|" $PERL $samba4srcdir/../lib/subunit/harness2subunit.pl
done
else
echo "Skipping pidl tests - Test::More not installed"
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 7cacba7418..fe128fea52 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -2619,6 +2619,7 @@ static bool enumprinters(TALLOC_CTX *mem_ctx, struct dcerpc_pipe *pipe,
DATA_BLOB blob;
uint32_t needed;
uint32_t count;
+ union spoolss_PrinterInfo *info;
r.in.flags = PRINTER_ENUM_LOCAL;
r.in.server = talloc_asprintf(mem_ctx, "\\\\%s", servername);
@@ -2627,6 +2628,7 @@ static bool enumprinters(TALLOC_CTX *mem_ctx, struct dcerpc_pipe *pipe,
r.in.offered = 0;
r.out.needed = &needed;
r.out.count = &count;
+ r.out.info = &info;
status = dcerpc_spoolss_EnumPrinters(pipe, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 9d8bc4b186..ad8158d956 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -108,6 +108,7 @@ static bool test_EnumPorts(struct torture_context *tctx,
DATA_BLOB blob;
uint32_t needed;
uint32_t count;
+ union spoolss_PortInfo *info;
r.in.servername = "";
r.in.level = level;
@@ -115,6 +116,7 @@ static bool test_EnumPorts(struct torture_context *tctx,
r.in.offered = 0;
r.out.needed = &needed;
r.out.count = &count;
+ r.out.info = &info;
torture_comment(tctx, "Testing EnumPorts level %u\n", r.in.level);
@@ -137,8 +139,10 @@ static bool test_EnumPorts(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPorts failed");
+ torture_assert(tctx, info, "EnumPorts returned no info");
+
ctx->port_count[level] = count;
- ctx->ports[level] = r.out.info;
+ ctx->ports[level] = info;
}
for (i=1;i<ARRAY_SIZE(levels);i++) {
@@ -307,6 +311,7 @@ static bool test_EnumPrinterDrivers(struct torture_context *tctx,
DATA_BLOB blob;
uint32_t needed;
uint32_t count;
+ union spoolss_DriverInfo *info;
r.in.server = "";
r.in.environment = SPOOLSS_ARCHITECTURE_NT_X86;
@@ -315,6 +320,7 @@ static bool test_EnumPrinterDrivers(struct torture_context *tctx,
r.in.offered = 0;
r.out.needed = &needed;
r.out.count = &count;
+ r.out.info = &info;
torture_comment(tctx, "Testing EnumPrinterDrivers level %u\n", r.in.level);
@@ -339,7 +345,7 @@ static bool test_EnumPrinterDrivers(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPrinterDrivers failed");
ctx->driver_count[level] = count;
- ctx->drivers[level] = r.out.info;
+ ctx->drivers[level] = info;
}
for (i=1;i<ARRAY_SIZE(levels);i++) {
@@ -426,6 +432,7 @@ static bool test_EnumMonitors(struct torture_context *tctx,
DATA_BLOB blob;
uint32_t needed;
uint32_t count;
+ union spoolss_MonitorInfo *info;
r.in.servername = "";
r.in.level = level;
@@ -433,6 +440,7 @@ static bool test_EnumMonitors(struct torture_context *tctx,
r.in.offered = 0;
r.out.needed = &needed;
r.out.count = &count;
+ r.out.info = &info;
torture_comment(tctx, "Testing EnumMonitors level %u\n", r.in.level);
@@ -456,7 +464,7 @@ static bool test_EnumMonitors(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumMonitors failed");
ctx->monitor_count[level] = count;
- ctx->monitors[level] = r.out.info;
+ ctx->monitors[level] = info;
}
for (i=1;i<ARRAY_SIZE(levels);i++) {
@@ -499,6 +507,7 @@ static bool test_EnumPrintProcessors(struct torture_context *tctx,
DATA_BLOB blob;
uint32_t needed;
uint32_t count;
+ union spoolss_PrintProcessorInfo *info;
r.in.servername = "";
r.in.environment = "Windows NT x86";
@@ -507,6 +516,7 @@ static bool test_EnumPrintProcessors(struct torture_context *tctx,
r.in.offered = 0;
r.out.needed = &needed;
r.out.count = &count;
+ r.out.info = &info;
torture_comment(tctx, "Testing EnumPrintProcessors level %u\n", r.in.level);
@@ -530,7 +540,7 @@ static bool test_EnumPrintProcessors(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPrintProcessors failed");
ctx->print_processor_count[level] = count;
- ctx->print_processors[level] = r.out.info;
+ ctx->print_processors[level] = info;
}
for (i=1;i<ARRAY_SIZE(levels);i++) {
@@ -558,6 +568,57 @@ static bool test_EnumPrintProcessors(struct torture_context *tctx,
return true;
}
+static bool test_EnumPrintProcDataTypes(struct torture_context *tctx,
+ struct dcerpc_pipe *p,
+ struct test_spoolss_context *ctx)
+{
+ NTSTATUS status;
+ struct spoolss_EnumPrintProcDataTypes r;
+ uint16_t levels[] = { 1 };
+ int i, j;
+
+ for (i=0;i<ARRAY_SIZE(levels);i++) {
+ int level = levels[i];
+ DATA_BLOB blob;
+ uint32_t needed;
+ uint32_t count;
+ union spoolss_PrintProcDataTypesInfo *info;
+
+ r.in.servername = "";
+ r.in.print_processor_name = "winprint";
+ r.in.level = level;
+ r.in.buffer = NULL;
+ r.in.offered = 0;
+ r.out.needed = &needed;
+ r.out.count = &count;
+ r.out.info = &info;
+
+ torture_comment(tctx, "Testing EnumPrintProcDataTypes level %u\n", r.in.level);
+
+ status = dcerpc_spoolss_EnumPrintProcDataTypes(p, ctx, &r);
+ torture_assert_ntstatus_ok(tctx, status, "dcerpc_spoolss_EnumPrintProcDataType failed");
+ if (W_ERROR_IS_OK(r.out.result)) {
+ /* TODO: do some more checks here */
+ continue;
+ }
+ torture_assert_werr_equal(tctx, r.out.result, WERR_INSUFFICIENT_BUFFER,
+ "EnumPrintProcDataTypes unexpected return code");
+
+ blob = data_blob_talloc(ctx, NULL, needed);
+ data_blob_clear(&blob);
+ r.in.buffer = &blob;
+ r.in.offered = needed;
+
+ status = dcerpc_spoolss_EnumPrintProcDataTypes(p, ctx, &r);
+ torture_assert_ntstatus_ok(tctx, status, "dcerpc_spoolss_EnumPrintProcDataTypes failed");
+
+ torture_assert_werr_ok(tctx, r.out.result, "EnumPrintProcDataTypes failed");
+ }
+
+ return true;
+}
+
+
static bool test_EnumPrinters(struct torture_context *tctx,
struct dcerpc_pipe *p,
struct test_spoolss_context *ctx)
@@ -572,6 +633,7 @@ static bool test_EnumPrinters(struct torture_context *tctx,
DATA_BLOB blob;
uint32_t needed;
uint32_t count;
+ union spoolss_PrinterInfo *info;
r.in.flags = PRINTER_ENUM_LOCAL;
r.in.server = "";
@@ -580,6 +642,7 @@ static bool test_EnumPrinters(struct torture_context *tctx,
r.in.offered = 0;
r.out.needed = &needed;
r.out.count = &count;
+ r.out.info = &info;
torture_comment(tctx, "Testing EnumPrinters level %u\n", r.in.level);
@@ -603,7 +666,7 @@ static bool test_EnumPrinters(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPrinters failed");
ctx->printer_count[level] = count;
- ctx->printers[level] = r.out.info;
+ ctx->printers[level] = info;
}
for (i=1;i<ARRAY_SIZE(levels);i++) {
@@ -793,12 +856,15 @@ static bool test_EnumForms(struct torture_context *tctx,
for (i=0; i<ARRAY_SIZE(levels); i++) {
+ union spoolss_FormInfo *info;
+
r.in.handle = handle;
r.in.level = levels[i];
r.in.buffer = NULL;
r.in.offered = 0;
r.out.needed = &needed;
r.out.count = &count;
+ r.out.info = &info;
torture_comment(tctx, "Testing EnumForms level %d\n", levels[i]);
@@ -813,7 +879,6 @@ static bool test_EnumForms(struct torture_context *tctx,
torture_fail(tctx, "EnumForms on the PrintServer isn't supported by test server (NT4)");
if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) {
- union spoolss_FormInfo *info;
int j;
DATA_BLOB blob = data_blob_talloc(tctx, NULL, needed);
data_blob_clear(&blob);
@@ -822,9 +887,7 @@ static bool test_EnumForms(struct torture_context *tctx,
status = dcerpc_spoolss_EnumForms(p, tctx, &r);
- torture_assert(tctx, r.out.info, "No forms returned");
-
- info = r.out.info;
+ torture_assert(tctx, info, "No forms returned");
for (j = 0; j < count; j++) {
if (!print_server)
@@ -928,6 +991,7 @@ static bool test_EnumPorts_old(struct torture_context *tctx,
struct spoolss_EnumPorts r;
uint32_t needed;
uint32_t count;
+ union spoolss_PortInfo *info;
r.in.servername = talloc_asprintf(tctx, "\\\\%s",
dcerpc_server_name(p));
@@ -936,6 +1000,7 @@ static bool test_EnumPorts_old(struct torture_context *tctx,
r.in.offered = 0;
r.out.needed = &needed;
r.out.count = &count;
+ r.out.info = &info;
torture_comment(tctx, "Testing EnumPorts\n");
@@ -952,7 +1017,7 @@ static bool test_EnumPorts_old(struct torture_context *tctx,
status = dcerpc_spoolss_EnumPorts(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "EnumPorts failed");
- torture_assert(tctx, r.out.info, "No ports returned");
+ torture_assert(tctx, info, "No ports returned");
}
return true;
@@ -1080,6 +1145,7 @@ static bool test_EnumJobs(struct torture_context *tctx,
struct spoolss_EnumJobs r;
uint32_t needed;
uint32_t count;
+ union spoolss_JobInfo *info;
r.in.handle = handle;
r.in.firstjob = 0;
@@ -1089,6 +1155,7 @@ static bool test_EnumJobs(struct torture_context *tctx,
r.in.offered = 0;
r.out.needed = &needed;
r.out.count = &count;
+ r.out.info = &info;
torture_comment(tctx, "Testing EnumJobs\n");
@@ -1097,7 +1164,6 @@ static bool test_EnumJobs(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx, status, "EnumJobs failed");
if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) {
- union spoolss_JobInfo *info;
int j;
DATA_BLOB blob = data_blob_talloc(tctx, NULL, needed);
data_blob_clear(&blob);
@@ -1106,9 +1172,7 @@ static bool test_EnumJobs(struct torture_context *tctx,
status = dcerpc_spoolss_EnumJobs(p, tctx, &r);
- torture_assert(tctx, r.out.info, "No jobs returned");
-
- info = r.out.info;
+ torture_assert(tctx, info, "No jobs returned");
for (j = 0; j < count; j++) {
@@ -1722,6 +1786,7 @@ static bool test_EnumPrinters_old(struct torture_context *tctx, struct dcerpc_pi
r.in.offered = 0;
r.out.needed = &needed;
r.out.count = &count;
+ r.out.info = &info;
torture_comment(tctx, "Testing EnumPrinters level %u\n", r.in.level);
@@ -1740,13 +1805,11 @@ static bool test_EnumPrinters_old(struct torture_context *tctx, struct dcerpc_pi
torture_assert_werr_ok(tctx, r.out.result, "EnumPrinters failed");
- if (!r.out.info) {
+ if (!info) {
torture_comment(tctx, "No printers returned\n");
return true;
}
- info = r.out.info;
-
for (j=0;j<count;j++) {
if (r.in.level == 1) {
/* the names appear to be comma-separated name lists? */
@@ -1829,6 +1892,7 @@ static bool test_EnumPrinterDrivers_old(struct torture_context *tctx,
uint32_t needed;
uint32_t count;
+ union spoolss_DriverInfo *info;
r.in.server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.environment = "Windows NT x86";
@@ -1837,6 +1901,7 @@ static bool test_EnumPrinterDrivers_old(struct torture_context *tctx,
r.in.offered = 0;
r.out.needed = &needed;
r.out.count = &count;
+ r.out.info = &info;
torture_comment(tctx, "Testing EnumPrinterDrivers level %u\n", r.in.level);
@@ -1856,7 +1921,7 @@ static bool test_EnumPrinterDrivers_old(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPrinterDrivers failed");
- if (!r.out.info) {
+ if (!info) {
torture_comment(tctx, "No printer drivers returned\n");
break;
}
@@ -1937,6 +2002,7 @@ bool torture_rpc_spoolss(struct torture_context *torture)
ret &= test_EnumPrinterDrivers(torture, p, ctx);
ret &= test_EnumMonitors(torture, p, ctx);
ret &= test_EnumPrintProcessors(torture, p, ctx);
+ ret &= test_EnumPrintProcDataTypes(torture, p, ctx);
ret &= test_EnumPrinters(torture, p, ctx);
ret &= test_OpenPrinter_badname(torture, p, "__INVALID_PRINTER__");
ret &= test_OpenPrinter_badname(torture, p, "\\\\__INVALID_HOST__");
diff --git a/source4/torture/rpc/spoolss_win.c b/source4/torture/rpc/spoolss_win.c
index 08fadafe2c..add06522c6 100644
--- a/source4/torture/rpc/spoolss_win.c
+++ b/source4/torture/rpc/spoolss_win.c
@@ -188,6 +188,7 @@ static bool test_EnumPrinters(struct torture_context *tctx,
DATA_BLOB blob = data_blob_talloc_zero(ctx, initial_blob_size);
uint32_t needed;
uint32_t count;
+ union spoolss_PrinterInfo *info;
ep.in.flags = PRINTER_ENUM_NAME;
ep.in.server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
@@ -196,6 +197,7 @@ static bool test_EnumPrinters(struct torture_context *tctx,
ep.in.offered = initial_blob_size;
ep.out.needed = &needed;
ep.out.count = &count;
+ ep.out.info = &info;
status = dcerpc_spoolss_EnumPrinters(p, ctx, &ep);
torture_assert_ntstatus_ok(tctx, status, "EnumPrinters failed.");
@@ -211,7 +213,7 @@ static bool test_EnumPrinters(struct torture_context *tctx,
torture_assert_werr_ok(tctx, ep.out.result, "EnumPrinters failed.");
ctx->printer_count = count;
- ctx->printer_info = ep.out.info;
+ ctx->printer_info = info;
torture_comment(tctx, "Found %d printer(s).\n", ctx->printer_count);
@@ -264,6 +266,7 @@ static bool test_EnumJobs(struct torture_context *tctx,
DATA_BLOB blob = data_blob_talloc_zero(tctx, 1024);
uint32_t needed;
uint32_t count;
+ union spoolss_JobInfo *info;
torture_comment(tctx, "Test EnumJobs\n");
@@ -273,6 +276,7 @@ static bool test_EnumJobs(struct torture_context *tctx,
ej.in.offered = 1024;
ej.out.needed = &needed;
ej.out.count = &count;
+ ej.out.info = &info;
status = dcerpc_spoolss_EnumJobs(p, tctx, &ej);
torture_assert_ntstatus_ok(tctx, status, "EnumJobs failed");
@@ -323,6 +327,7 @@ static bool test_EnumForms(struct torture_context *tctx,
DATA_BLOB blob = data_blob_talloc_zero(tctx, initial_blob_size);
uint32_t needed;
uint32_t count;
+ union spoolss_FormInfo *info;
torture_comment(tctx, "Testing EnumForms\n");
@@ -332,6 +337,7 @@ static bool test_EnumForms(struct torture_context *tctx,
ef.in.offered = initial_blob_size;
ef.out.needed = &needed;
ef.out.count = &count;
+ ef.out.info = &info;
status = dcerpc_spoolss_EnumForms(p, tctx, &ef);
torture_assert_ntstatus_ok(tctx, status, "EnumForms failed");