summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/samr.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-11-28 01:56:09 +0100
committerGünther Deschner <gd@samba.org>2008-11-28 14:08:03 +0100
commit206375c8cf802582eec94bc9fb5f71f9b89650f1 (patch)
tree1a789ea33ee533c2a3999c6ce5fb27f8a37b3fec /source4/torture/rpc/samr.c
parent296fae7561bf1ec425b884bd7d1f914b7faac36a (diff)
downloadsamba-206375c8cf802582eec94bc9fb5f71f9b89650f1.tar.gz
samba-206375c8cf802582eec94bc9fb5f71f9b89650f1.tar.bz2
samba-206375c8cf802582eec94bc9fb5f71f9b89650f1.zip
s4-smbtorture: add samr_rand_pass_silent.
Guenther
Diffstat (limited to 'source4/torture/rpc/samr.c')
-rw-r--r--source4/torture/rpc/samr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 6115c0c2a1..808eac0a89 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -508,12 +508,19 @@ static bool test_SetUserInfo(struct dcerpc_pipe *p, struct torture_context *tctx
/*
generate a random password for password change tests
*/
-static char *samr_rand_pass(TALLOC_CTX *mem_ctx, int min_len)
+static char *samr_rand_pass_silent(TALLOC_CTX *mem_ctx, int min_len)
{
size_t len = MAX(8, min_len) + (random() % 6);
char *s = generate_random_str(mem_ctx, len);
+ return s;
+}
+
+static char *samr_rand_pass(TALLOC_CTX *mem_ctx, int min_len)
+{
+ char *s = samr_rand_pass_silent(mem_ctx, min_len);
printf("Generated password '%s'\n", s);
return s;
+
}
/*