From 19d99a64262735581c20d88ca449ca14f247f361 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 11 May 2010 23:55:53 +0200 Subject: s4-smbtorture: add torture_create_testuser_max_pwlen() that allows to set maxpwlen. required for upcoming rap pwd tests. Guenther --- source4/torture/rpc/testjoin.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c index cad84dbe2f..0e61960fec 100644 --- a/source4/torture/rpc/testjoin.c +++ b/source4/torture/rpc/testjoin.c @@ -114,11 +114,12 @@ static NTSTATUS DeleteUser_byname(struct dcerpc_binding_handle *b, when finished */ -struct test_join *torture_create_testuser(struct torture_context *torture, - const char *username, - const char *domain, - uint16_t acct_type, - const char **random_password) +struct test_join *torture_create_testuser_max_pwlen(struct torture_context *torture, + const char *username, + const char *domain, + uint16_t acct_type, + const char **random_password, + int max_pw_len) { NTSTATUS status; struct samr_Connect c; @@ -317,7 +318,7 @@ again: policy_min_pw_len = pwp.out.info->min_password_length; } - random_pw = generate_random_password(join, MAX(8, policy_min_pw_len), 255); + random_pw = generate_random_password(join, MAX(8, policy_min_pw_len), max_pw_len); printf("Setting account password '%s'\n", random_pw); @@ -394,6 +395,15 @@ failed: } +struct test_join *torture_create_testuser(struct torture_context *torture, + const char *username, + const char *domain, + uint16_t acct_type, + const char **random_password) +{ + return torture_create_testuser_max_pwlen(torture, username, domain, acct_type, random_password, 255); +} + _PUBLIC_ struct test_join *torture_join_domain(struct torture_context *tctx, const char *machine_name, uint32_t acct_flags, -- cgit