From 97d36377d3521c762c20c9a81482741d0f325964 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Thu, 18 Feb 2010 01:43:08 +0100 Subject: [PATCH] s4-smbtorture: try more combinations to find printers in test_EnumPrinters_findname(). Also take a note of servers returning full UNC printer paths although we did not set the servername. Guenther --- source4/torture/rpc/spoolss.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index f57ffe527d4..4c8ba0c0f51 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -3886,6 +3886,7 @@ static bool test_EnumPrinters_findname(struct torture_context *tctx, for (i=0; i < count; i++) { const char *current = NULL; + const char *p; switch (level) { case 1: @@ -3897,6 +3898,19 @@ static bool test_EnumPrinters_findname(struct torture_context *tctx, *found = true; break; } + + p = strrchr(current, '\\'); + if (p) { + if (!e.in.server) { + torture_warning(tctx, + "server returns printername %s incl. servername although we did not set servername", current); + } + p++; + if (strequal(p, name)) { + *found = true; + break; + } + } } return true; -- 2.34.1