diff options
author | Günther Deschner <gd@samba.org> | 2010-02-18 01:43:08 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-02-18 01:48:52 +0100 |
commit | 97d36377d3521c762c20c9a81482741d0f325964 (patch) | |
tree | c3a37b2fdf5c3dd20ef5760de6578234650e79ed /source4/torture | |
parent | a1ba72f84c6256e2b6cacfe4d6016ba2c1b832d1 (diff) | |
download | samba-97d36377d3521c762c20c9a81482741d0f325964.tar.gz samba-97d36377d3521c762c20c9a81482741d0f325964.tar.bz2 samba-97d36377d3521c762c20c9a81482741d0f325964.zip |
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
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/spoolss.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index f57ffe527d..4c8ba0c0f5 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; |