mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
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
This commit is contained in:
parent
a1ba72f84c
commit
97d36377d3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user