summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/testjoin.c22
1 files changed, 16 insertions, 6 deletions
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,