diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-06-06 09:59:43 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:17:42 -0500 |
commit | 9a831a3963d9784a470b7d3971b54bd9bde3d7c3 (patch) | |
tree | 0312550c7dae4e894645e7fc2a4c2b9acf5c29e1 /source4/torture/rpc | |
parent | aa5ff56d89814bc92decc7e9db6e2ed8cf8630b7 (diff) | |
download | samba-9a831a3963d9784a470b7d3971b54bd9bde3d7c3.tar.gz samba-9a831a3963d9784a470b7d3971b54bd9bde3d7c3.tar.bz2 samba-9a831a3963d9784a470b7d3971b54bd9bde3d7c3.zip |
r7328: fix GetPrinterData and SetPrinterData, with zero length subcontexts
metze
(This used to be commit 73d597bacf83492ed3da2307dd6785548b903b39)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/spoolss.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index b9d48a6da4..7f56212b74 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -1324,9 +1324,8 @@ static BOOL test_SetPrinterData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r.in.handle = handle; r.in.value_name = value_name; - r.in.type = 0; - r.in.buffer = data_blob_talloc(mem_ctx, "dog", 4); - r.in.real_len = 4; + r.in.type = SPOOLSS_PRINTER_DATA_TYPE_STRING; + r.in.data.string = "dog"; printf("Testing SetPrinterData\n"); @@ -1337,6 +1336,10 @@ static BOOL test_SetPrinterData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return False; } + if (!test_GetPrinterData(p, mem_ctx, handle, value_name)) { + return False; + } + if (!test_DeletePrinterData(p, mem_ctx, handle, value_name)) { return False; } @@ -1828,7 +1831,7 @@ BOOL torture_rpc_spoolss(void) ret &= test_GetPrinterData(ctx->p, ctx, &ctx->server_handle, "Architecture"); - /*ret &= test_GetPrinterData(ctx->p, ctx, &ctx->server_handle, "DefaultSpoolDirectory");*/ + ret &= test_GetPrinterData(ctx->p, ctx, &ctx->server_handle, "DefaultSpoolDirectory"); ret &= test_EnumPorts(ctx); |