summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-06-05 01:26:49 +0200
committerGünther Deschner <gd@samba.org>2010-06-05 01:26:49 +0200
commit6309f7b9505d1de60ef01a7129e2d6022cdc8b9d (patch)
tree1f4c90ca6f0df93b521f3f8e5cd8e0cfc1a961fe /source4/torture
parent3ad2fa672818269f2cbb7a63ff71df4f2cc81a95 (diff)
downloadsamba-6309f7b9505d1de60ef01a7129e2d6022cdc8b9d.tar.gz
samba-6309f7b9505d1de60ef01a7129e2d6022cdc8b9d.tar.bz2
samba-6309f7b9505d1de60ef01a7129e2d6022cdc8b9d.zip
s4-smbtorture: make RPC-SPOOLSS-ACCESS more compatible with older samba releases.
Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/spoolss_access.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/torture/rpc/spoolss_access.c b/source4/torture/rpc/spoolss_access.c
index f86c2e3dcb..812a280e9e 100644
--- a/source4/torture/rpc/spoolss_access.c
+++ b/source4/torture/rpc/spoolss_access.c
@@ -357,7 +357,7 @@ static bool spoolss_access_setup_sd(struct torture_context *tctx,
}
static bool test_EnumPrinters_findone(struct torture_context *tctx,
- struct dcerpc_binding_handle *b,
+ struct dcerpc_pipe *p,
const char **printername)
{
struct spoolss_EnumPrinters r;
@@ -365,11 +365,12 @@ static bool test_EnumPrinters_findone(struct torture_context *tctx,
union spoolss_PrinterInfo *info;
uint32_t needed;
int i;
+ struct dcerpc_binding_handle *b = p->binding_handle;
*printername = NULL;
r.in.flags = PRINTER_ENUM_LOCAL;
- r.in.server = NULL;
+ r.in.server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.level = 1;
r.in.buffer = NULL;
r.in.offered = 0;
@@ -414,9 +415,11 @@ static bool torture_rpc_spoolss_access_setup_common(struct torture_context *tctx
const char *printername;
const char *binding = torture_setting_string(tctx, "binding", NULL);
- testuser = torture_create_testuser(tctx, t->user.username,
- torture_setting_string(tctx, "workgroup", NULL),
- ACB_NORMAL, &testuser_passwd);
+ testuser = torture_create_testuser_max_pwlen(tctx, t->user.username,
+ torture_setting_string(tctx, "workgroup", NULL),
+ ACB_NORMAL,
+ &testuser_passwd,
+ 32);
if (!testuser) {
torture_fail(tctx, "Failed to create test user");
}
@@ -464,7 +467,7 @@ static bool torture_rpc_spoolss_access_setup_common(struct torture_context *tctx
"Error connecting to server");
torture_assert(tctx,
- test_EnumPrinters_findone(tctx, spoolss_pipe->binding_handle, &printername),
+ test_EnumPrinters_findone(tctx, spoolss_pipe, &printername),
"failed to enumerate printers");
if (t->user.sd) {