diff options
author | Günther Deschner <gd@samba.org> | 2016-09-08 21:09:42 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-09-11 19:57:26 +0200 |
commit | 180fc18f49181adf14714e1d0d59c0820ac23489 (patch) | |
tree | 29727627ef6dcf5bfbe9b9ad2165d1053ea775f4 /source4/torture/rpc/spoolss.c | |
parent | d6d7871bde70459147fa79b27e88ffa9fb480cb6 (diff) | |
download | samba-180fc18f49181adf14714e1d0d59c0820ac23489.tar.gz |
s4-torture: also test NULL servername in spoolss_GetPrinterDriverPackagePath
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/torture/rpc/spoolss.c')
-rw-r--r-- | source4/torture/rpc/spoolss.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 23f2b2ecbd0..1fcf3795fef 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -8063,6 +8063,25 @@ static bool test_get_printer_driver_package_path(struct torture_context *tctx, torture_assert_hresult_ok(tctx, r.out.result, "spoolss_GetPrinterDriverPackagePath failed"); + r.in.servername = NULL; + + torture_assert_ntstatus_ok(tctx, + dcerpc_spoolss_GetPrinterDriverPackagePath_r(b, tctx, &r), + "spoolss_GetPrinterDriverPackagePath failed"); + torture_assert_werr_equal(tctx, + W_ERROR(WIN32_FROM_HRESULT(r.out.result)), WERR_INSUFFICIENT_BUFFER, + "spoolss_GetPrinterDriverPackagePath failed"); + + r.in.driver_package_cab_size = required; + r.in.driver_package_cab = talloc_zero_array(tctx, char, required); + r.out.driver_package_cab = talloc_zero_array(tctx, char, required); + + torture_assert_ntstatus_ok(tctx, + dcerpc_spoolss_GetPrinterDriverPackagePath_r(b, tctx, &r), + "spoolss_GetPrinterDriverPackagePath failed"); + torture_assert_hresult_ok(tctx, r.out.result, + "spoolss_GetPrinterDriverPackagePath failed"); + } return true; |