diff options
-rw-r--r-- | source4/torture/rpc/spoolss.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 94ced04a98..7a9d8c3635 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -571,7 +571,7 @@ static BOOL test_GetPrinterDataEx(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, } static BOOL test_EnumPrinterData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, - struct policy_handle *handle) + struct policy_handle *handle) { NTSTATUS status; struct spoolss_EnumPrinterData r; @@ -618,6 +618,38 @@ static BOOL test_EnumPrinterData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return True; } +static BOOL test_EnumPrinterDataEx(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, + struct policy_handle *handle) +{ + NTSTATUS status; + struct spoolss_EnumPrinterDataEx r; + + r.in.handle = handle; + r.in.key_name = "PrinterDriverData"; + r.in.buf_size = 0; + + printf("Testing EnumPrinterDataEx\n"); + + status = dcerpc_spoolss_EnumPrinterDataEx(p, mem_ctx, &r); + + if (!NT_STATUS_IS_OK(status)) { + printf("EnumPrinterDataEx failed - %s\n", nt_errstr(status)); + return False; + } + + r.in.buf_size = r.out.buf_size; + + status = dcerpc_spoolss_EnumPrinterDataEx(p, mem_ctx, &r); + + if (!NT_STATUS_IS_OK(status)) { + printf("EnumPrinterDataEx failed - %s\n", nt_errstr(status)); + return False; + } + + return True; +} + + static BOOL test_DeletePrinterData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *value_name) @@ -907,6 +939,10 @@ static BOOL test_OpenPrinterEx(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, ret = False; } + if (!test_EnumPrinterDataEx(p, mem_ctx, &handle)) { + ret = False; + } + if (!test_EnumJobs(p, mem_ctx, &handle)) { ret = False; } |