summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-06-16 16:46:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:16 -0500
commit038628b9c5eb033213e187b38f8260573cbf6b17 (patch)
treeb70af13f8610b3f746101686134489fcb7b7cd0c /source4
parentfcb339c087de567c860cc9e5e92253a642b982a4 (diff)
downloadsamba-038628b9c5eb033213e187b38f8260573cbf6b17.tar.gz
samba-038628b9c5eb033213e187b38f8260573cbf6b17.tar.bz2
samba-038628b9c5eb033213e187b38f8260573cbf6b17.zip
r7642: - test NULL server_name in GetPrinterDriverDirectory() too, (same result as "")
- test EnumForms() on the PrintServer (NT4 returns WERR_BADFID) (jerry: how do it get the lists of forms in the printserver gui) metze (This used to be commit fddfe1f04b3ae594e75d702aba4d17ee4d103b8e)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/spoolss.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 86a8c7155f..d5a57ae79a 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -220,6 +220,9 @@ static BOOL test_GetPrinterDriverDirectory(struct test_spoolss_context *ctx)
const char *server;
} levels[] = {{
.level = 1,
+ .server = NULL
+ },{
+ .level = 1,
.server = ""
},{
.level = 78,
@@ -846,7 +849,7 @@ static BOOL test_GetForm(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
static BOOL test_EnumForms(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
- struct policy_handle *handle)
+ struct policy_handle *handle, BOOL print_server)
{
NTSTATUS status;
struct spoolss_EnumForms r;
@@ -864,6 +867,11 @@ static BOOL test_EnumForms(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
+ if (print_server && W_ERROR_EQUAL(r.out.result,WERR_BADFID)) {
+ printf("EnumForms on the PrintServer isn't supported by test server (NT4)\n");
+ return True;
+ }
+
if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) {
union spoolss_FormInfo *info;
int j;
@@ -1809,7 +1817,7 @@ static BOOL test_OpenPrinterEx(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
ret = False;
}
- if (!test_EnumForms(p, mem_ctx, &handle)) {
+ if (!test_EnumForms(p, mem_ctx, &handle, False)) {
ret = False;
}
@@ -2064,6 +2072,8 @@ BOOL torture_rpc_spoolss(void)
ret &= test_GetPrinterData(ctx->p, ctx, &ctx->server_handle, "Architecture");
ret &= test_GetPrinterData(ctx->p, ctx, &ctx->server_handle, "DsPresent");
+ ret &= test_EnumForms(ctx->p, ctx, &ctx->server_handle, True);
+
ret &= test_EnumPorts(ctx);
ret &= test_GetPrinterDriverDirectory(ctx);