summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2007-06-28 18:08:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:53:30 -0500
commit698093b0283faa902f238d545c15397d49b3384c (patch)
treee634076261316e07b66185297be8e7276e8179a7 /source4/torture
parent00389db3846be4a589b84eadf61ddb0403a39043 (diff)
downloadsamba-698093b0283faa902f238d545c15397d49b3384c.tar.gz
samba-698093b0283faa902f238d545c15397d49b3384c.tar.bz2
samba-698093b0283faa902f238d545c15397d49b3384c.zip
r23643: Fix the build farm tests. We were incorrectly passing the
RPC-SAMBA3-GETUSERNAME tests before the previous password expiration fixes, because if you create a user and only set the password administratrively, the "last set time" should not get updated. Needed to add some more of the fields_present flags to do this. (This used to be commit ce5637de22c19551c0ce5147658ceae33b976ef1)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/samba3rpc.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index d5a00557cf..78fec79b24 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -536,24 +536,29 @@ static BOOL create_user(TALLOC_CTX *mem_ctx, struct smbcli_state *cli,
union samr_UserInfo u_info;
DATA_BLOB session_key;
- encode_pw_buffer(u_info.info24.password.data, password,
+
+ ZERO_STRUCT(u_info);
+ encode_pw_buffer(u_info.info23.password.data, password,
STR_UNICODE);
- u_info.info24.pw_len = strlen_m(password)*2;
status = dcerpc_fetch_session_key(samr_pipe, &session_key);
if (!NT_STATUS_IS_OK(status)) {
d_printf("dcerpc_fetch_session_key failed\n");
goto done;
}
- arcfour_crypt_blob(u_info.info24.password.data, 516,
+ 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 |
+ SAMR_FIELD_EXPIRED_FLAG;
sui2.in.user_handle = wks_handle;
sui2.in.info = &u_info;
- sui2.in.level = 24;
+ sui2.in.level = 23;
status = dcerpc_samr_SetUserInfo2(samr_pipe, tmp_ctx, &sui2);
if (!NT_STATUS_IS_OK(status)) {
- d_printf("samr_SetUserInfo(24) failed: %s\n",
+ d_printf("samr_SetUserInfo(23) failed: %s\n",
nt_errstr(status));
goto done;
}