summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-04-13 14:48:32 +0200
committerGünther Deschner <gd@samba.org>2009-04-13 16:10:50 +0200
commit81aca44d30783d1c162498a257fc47cc44a649fb (patch)
treebee3dd4ad755f6681f3c177610d6738c2ad6439e /source4/torture
parent609e401b976a99ad82e37c2c3617684c8bb3e6c4 (diff)
downloadsamba-81aca44d30783d1c162498a257fc47cc44a649fb.tar.gz
samba-81aca44d30783d1c162498a257fc47cc44a649fb.tar.bz2
samba-81aca44d30783d1c162498a257fc47cc44a649fb.zip
s4-smbtorture: use printerinfo level 1 name, not description in
test_EnumPrinters_old(). Guenther
Diffstat (limited to 'source4/torture')
-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;
}