summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-12-04 18:18:06 +0100
committerGünther Deschner <gd@samba.org>2008-12-05 14:27:03 +0100
commit4bcf8edcf82d378686035e4ef451ca8ab777be4c (patch)
tree962e59fc3905e2db059efaeb9340942f795f3bb5 /source4/torture/rpc
parent7423b6a4b8aadd12fde2f348d8637099b4171848 (diff)
downloadsamba-4bcf8edcf82d378686035e4ef451ca8ab777be4c.tar.gz
samba-4bcf8edcf82d378686035e4ef451ca8ab777be4c.tar.bz2
samba-4bcf8edcf82d378686035e4ef451ca8ab777be4c.zip
s4-samr: fix samr callers after SAMR_FIELD_PASSWORD change.
Guenther
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/samba3rpc.c6
-rw-r--r--source4/torture/rpc/samr.c20
2 files changed, 13 insertions, 13 deletions
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index f1e7e5a367..2207786f17 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -580,8 +580,8 @@ static bool create_user(TALLOC_CTX *mem_ctx, struct smbcli_state *cli,
arcfour_crypt_blob(u_info.info23.password.data, 516,
&session_key);
u_info.info23.info.password_expired = 0;
- u_info.info23.info.fields_present = SAMR_FIELD_PASSWORD |
- SAMR_FIELD_PASSWORD2 |
+ u_info.info23.info.fields_present = SAMR_FIELD_NT_PASSWORD_PRESENT |
+ SAMR_FIELD_LM_PASSWORD_PRESENT |
SAMR_FIELD_EXPIRED_FLAG;
sui2.in.user_handle = wks_handle;
sui2.in.info = &u_info;
@@ -767,7 +767,7 @@ static bool join3(struct smbcli_state *cli,
cli_credentials_get_workstation(wks_creds));
i21->acct_flags = ACB_WSTRUST;
i21->fields_present = SAMR_FIELD_FULL_NAME |
- SAMR_FIELD_ACCT_FLAGS | SAMR_FIELD_PASSWORD;
+ SAMR_FIELD_ACCT_FLAGS | SAMR_FIELD_NT_PASSWORD_PRESENT;
/* this would break the test result expectations
i21->fields_present |= SAMR_FIELD_EXPIRED_FLAG;
i21->password_expired = 1;
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 01ff01674c..cc3c4156ba 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -2074,7 +2074,7 @@ bool test_ChangePasswordRandomBytes(struct dcerpc_pipe *p, struct torture_contex
ZERO_STRUCT(u);
- u.info25.info.fields_present = SAMR_FIELD_PASSWORD;
+ u.info25.info.fields_present = SAMR_FIELD_NT_PASSWORD_PRESENT;
set_pw_in_buffer(u.info25.password.data, &new_random_pass);
@@ -2669,9 +2669,9 @@ static bool test_SetPassword_pwdlastset(struct dcerpc_pipe *p,
* password has been changed, old and new pwdlastset
* need to be the same value */
- if (!(pwd_tests[i].fields_present & SAMR_FIELD_EXPIRED_FLAG) &&
- !((pwd_tests[i].fields_present & SAMR_FIELD_PASSWORD) ||
- (pwd_tests[i].fields_present & SAMR_FIELD_PASSWORD2)))
+ if (!(fields_present[f] & SAMR_FIELD_EXPIRED_FLAG) &&
+ !((fields_present[f] & SAMR_FIELD_NT_PASSWORD_PRESENT) ||
+ (fields_present[f] & SAMR_FIELD_LM_PASSWORD_PRESENT)))
{
torture_assert_int_equal(tctx, pwdlastset_old,
pwdlastset_new, "pwdlastset must be equal");
@@ -2732,9 +2732,9 @@ static bool test_SetPassword_pwdlastset(struct dcerpc_pipe *p,
* password has been changed, old and new pwdlastset
* need to be the same value */
- if (!(pwd_tests[i].fields_present & SAMR_FIELD_EXPIRED_FLAG) &&
- !((pwd_tests[i].fields_present & SAMR_FIELD_PASSWORD) ||
- (pwd_tests[i].fields_present & SAMR_FIELD_PASSWORD2)))
+ if (!(fields_present[f] & SAMR_FIELD_EXPIRED_FLAG) &&
+ !((fields_present[f] & SAMR_FIELD_NT_PASSWORD_PRESENT) ||
+ (fields_present[f] & SAMR_FIELD_LM_PASSWORD_PRESENT)))
{
torture_assert_int_equal(tctx, pwdlastset_old,
pwdlastset_new, "pwdlastset must be equal");
@@ -2787,9 +2787,9 @@ static bool test_user_ops(struct dcerpc_pipe *p,
int i;
uint32_t rid;
const uint32_t password_fields[] = {
- SAMR_FIELD_PASSWORD,
- SAMR_FIELD_PASSWORD2,
- SAMR_FIELD_PASSWORD | SAMR_FIELD_PASSWORD2,
+ SAMR_FIELD_NT_PASSWORD_PRESENT,
+ SAMR_FIELD_LM_PASSWORD_PRESENT,
+ SAMR_FIELD_NT_PASSWORD_PRESENT | SAMR_FIELD_LM_PASSWORD_PRESENT,
0
};