uint8_t nt_password_set,
uint8_t lm_password_set,
uint8_t password_expired,
- uint8_t data[516],
- uint8_t pw_len);
+ struct samr_CryptPassword *pwd_buf);
void init_samr_user_info24(struct samr_UserInfo24 *r,
- uint8_t data[516],
- uint8_t pw_len);
+ struct samr_CryptPassword *pwd_buf,
+ uint8_t password_expired);
void init_samr_CryptPasswordEx(const char *pwd,
DATA_BLOB *session_key,
struct samr_CryptPasswordEx *pwd_buf);
&cli->user_session_key,
&crypt_pwd);
- init_samr_user_info24(&user_info.info24, crypt_pwd.data, 24);
+ init_samr_user_info24(&user_info.info24, &crypt_pwd,
+ PASS_DONT_CHANGE_AT_NEXT_LOGON);
status = rpccli_samr_SetUserInfo2(pipe_hnd, mem_ctx,
&user_pol,
uint8_t nt_password_set,
uint8_t lm_password_set,
uint8_t password_expired,
- uint8_t data[516],
- uint8_t pw_len)
+ struct samr_CryptPassword *pwd_buf)
{
memset(r, '\0', sizeof(*r));
init_samr_user_info21(&r->info,
lm_password_set,
password_expired);
- memcpy(r->password.data, data, sizeof(r->password.data));
+ r->password = *pwd_buf;
}
/*************************************************************************
*************************************************************************/
void init_samr_user_info24(struct samr_UserInfo24 *r,
- uint8_t data[516],
- uint8_t pw_len)
+ struct samr_CryptPassword *pwd_buf,
+ uint8_t password_expired)
{
DEBUG(10, ("init_samr_user_info24:\n"));
- memcpy(r->password.data, data, sizeof(r->password.data));
- r->pw_len = pw_len;
+ r->password = *pwd_buf;
+ r->password_expired = password_expired;
}
/*************************************************************************
0, 0, ACB_DOMTRUST, SAMR_FIELD_ACCT_FLAGS,
hours,
0, 0, 0, 0, 0, 0, 0,
- crypt_pwd.data, 24);
+ &crypt_pwd);
result = rpccli_samr_SetUserInfo2(pipe_hnd, mem_ctx,
&user_pol,
&cli->user_session_key,
&crypt_pwd);
- init_samr_user_info24(&set_info.info24, crypt_pwd.data, 24);
+ init_samr_user_info24(&set_info.info24, &crypt_pwd,
+ PASS_DONT_CHANGE_AT_NEXT_LOGON);
CHECK_RPC_ERR(rpccli_samr_SetUserInfo2(pipe_hnd, mem_ctx,
&user_pol,