diff options
author | Günther Deschner <gd@samba.org> | 2010-05-11 23:55:53 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-05-12 00:16:50 +0200 |
commit | 19d99a64262735581c20d88ca449ca14f247f361 (patch) | |
tree | 6da4f6c42d310e9782cedf2587a8aa2432d27a27 /source4 | |
parent | 40e7a5879c3cca212d302d3bce78e1c6e588849c (diff) | |
download | samba-19d99a64262735581c20d88ca449ca14f247f361.tar.gz samba-19d99a64262735581c20d88ca449ca14f247f361.tar.bz2 samba-19d99a64262735581c20d88ca449ca14f247f361.zip |
s4-smbtorture: add torture_create_testuser_max_pwlen() that allows to set maxpwlen.
required for upcoming rap pwd tests.
Guenther
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/rpc/testjoin.c | 22 |
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, |