1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r1060: check for an invalid session key in samr_set_password()

This commit is contained in:
Andrew Tridgell 2004-06-07 08:50:21 +00:00 committed by Gerald (Jerry) Carter
parent d62c0661f9
commit 5a90187c2c

View File

@ -695,6 +695,11 @@ NTSTATUS samr_set_password(struct dcesrv_call_state *dce_call,
uint32_t new_pass_len;
DATA_BLOB session_key = dce_call->conn->session_key;
if (session_key.length == 0) {
DEBUG(3,("Bad session key in samr_set_password\n"));
return NT_STATUS_WRONG_PASSWORD;
}
arcfour_crypt_blob(pwbuf->data, 516, &session_key);
if (!decode_pw_buffer(pwbuf->data, new_pass, sizeof(new_pass),