summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/spoolss.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 2bdcc3fdaf..f2a503b6fd 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -1816,10 +1816,17 @@ static bool test_EnumPrinters_old(struct torture_context *tctx, struct dcerpc_pi
for (j=0;j<count;j++) {
if (r.in.level == 1) {
- /* the names appear to be comma-separated name lists? */
- char *name = talloc_strdup(tctx, info[j].info1.name);
- char *comma = strchr(name, ',');
- if (comma) *comma = 0;
+ char *unc = talloc_strdup(tctx, info[j].info1.name);
+ char *slash, *name;
+ name = unc;
+ if (unc[0] == '\\' && unc[1] == '\\') {
+ unc +=2;
+ }
+ slash = strchr(unc, '\\');
+ if (slash) {
+ slash++;
+ name = slash;
+ }
if (!test_OpenPrinter(tctx, p, name)) {
ret = false;
}