From e8797a3ecc03cbbdbc51c3952ac72fd663d5849c Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Thu, 31 Jan 2013 22:06:20 +0100 Subject: [PATCH] s4-torture: also deal with "Microsoft XPS Document Writer v4" as default driver. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Guenther Signed-off-by: Günther Deschner Reviewed-by: David Disseldorp --- source4/torture/rpc/spoolss.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 32cc2974c70..cd7dbb913a1 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -7767,7 +7767,6 @@ static bool torture_rpc_spoolss_printer_setup_common(struct torture_context *tct t->driver.local.driver_directory= "/usr/share/cups/drivers"; - t->info2.drivername = "Microsoft XPS Document Writer"; t->info2.portname = "LPT1:"; printer_name = t->info2.printername; @@ -7785,6 +7784,8 @@ static bool torture_rpc_spoolss_printer_setup_common(struct torture_context *tct &t->driver.local.driver_directory), "failed to compose local driver directory"); + t->info2.drivername = "Microsoft XPS Document Writer"; + if (test_EnumPrinterDrivers_findone(tctx, b, server_name_slash, t->driver.remote.environment, 3, t->info2.drivername, NULL)) { torture_comment(tctx, "driver '%s' (architecture: %s, version: 3) is present on server\n", t->info2.drivername, t->driver.remote.environment); @@ -7794,6 +7795,16 @@ static bool torture_rpc_spoolss_printer_setup_common(struct torture_context *tct torture_comment(tctx, "driver '%s' (architecture: %s, version: 3) does not exist on the server\n", t->info2.drivername, t->driver.remote.environment); + + t->info2.drivername = "Microsoft XPS Document Writer v4"; + + if (test_EnumPrinterDrivers_findone(tctx, b, server_name_slash, t->driver.remote.environment, 3, t->info2.drivername, NULL)) { + torture_comment(tctx, "driver '%s' (architecture: %s, version: 4) is present on server\n", + t->info2.drivername, t->driver.remote.environment); + t->have_driver = true; + goto try_add; + } + torture_comment(tctx, "trying to upload own driver\n"); if (!directory_exist(t->driver.local.driver_directory)) { -- 2.11.4.GIT