summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-04-30 14:38:07 +0200
committerGünther Deschner <gd@samba.org>2010-05-04 19:38:05 +0200
commitf5e41c5cde30e72a7f3597814cebaee4c1f0f9b4 (patch)
treeb77dd8ef20b37e8c4e7c5e1a34893d53066c82c2 /source4/torture
parent6683b0d4b6908e54af501701bd20a12990e3e77f (diff)
downloadsamba-f5e41c5cde30e72a7f3597814cebaee4c1f0f9b4.tar.gz
samba-f5e41c5cde30e72a7f3597814cebaee4c1f0f9b4.tar.bz2
samba-f5e41c5cde30e72a7f3597814cebaee4c1f0f9b4.zip
s4-torture: Fixed spoolss dsspooler printername test.
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/spoolss.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index bb114b658a..cb15ffd5e3 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -4972,6 +4972,7 @@ static bool test_PrinterData_DsSpooler(struct torture_context *tctx,
union spoolss_SetPrinterInfo sinfo;
union spoolss_PrinterInfo info;
struct dcerpc_binding_handle *b = p->binding_handle;
+ const char *pname;
ZERO_STRUCT(info_ctr);
ZERO_STRUCT(devmode_ctr);
@@ -5061,7 +5062,14 @@ do {\
TEST_SZ("description", info.info2.comment);
TEST_SZ("driverName", info.info2.drivername);
TEST_SZ("location", info.info2.location);
- TEST_SZ("printerName", info.info2.printername);
+
+ pname = strrchr(info.info2.printername, '\\');
+ if (pname == NULL) {
+ pname = info.info2.printername;
+ } else {
+ pname++;
+ }
+ TEST_SZ("printerName", pname);
/* TEST_SZ("printSeparatorFile", info.info2.sepfile); */
/* TEST_SZ("printShareName", info.info2.sharename); */