*/
#include "includes.h"
+#include "../libcli/auth/libcli_auth.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
struct samu *pwd)
{
char *plaintext_buf = NULL;
- uint32 len = 0;
+ size_t len = 0;
uint32_t acct_ctrl;
NTSTATUS status;
id23->password.data,
&plaintext_buf,
&len,
- STR_UNICODE)) {
+ CH_UTF16)) {
return NT_STATUS_WRONG_PASSWORD;
}
static bool set_user_info_pw(uint8 *pass, struct samu *pwd)
{
- uint32 len = 0;
+ size_t len = 0;
char *plaintext_buf = NULL;
uint32 acct_ctrl;
pass,
&plaintext_buf,
&len,
- STR_UNICODE)) {
+ CH_UTF16)) {
return False;
}
if (!p->server_info->user_session_key.length) {
status = NT_STATUS_NO_USER_SESSION_KEY;
}
- SamOEMhashBlob(info->info23.password.data, 516,
- &p->server_info->user_session_key);
+ arcfour_crypt_blob(info->info23.password.data, 516,
+ &p->server_info->user_session_key);
dump_data(100, info->info23.password.data, 516);
if (!p->server_info->user_session_key.length) {
status = NT_STATUS_NO_USER_SESSION_KEY;
}
- SamOEMhashBlob(info->info24.password.data,
- 516,
- &p->server_info->user_session_key);
+ arcfour_crypt_blob(info->info24.password.data,
+ 516,
+ &p->server_info->user_session_key);
dump_data(100, info->info24.password.data, 516);