mirror of
https://github.com/samba-team/samba.git
synced 2025-09-03 05:49:28 +03:00
r1060: check for an invalid session key in samr_set_password()
(This used to be commit 5a90187c2c
)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
6d5a47aa9b
commit
bd40d94a05
@ -695,6 +695,11 @@ NTSTATUS samr_set_password(struct dcesrv_call_state *dce_call,
|
|||||||
uint32_t new_pass_len;
|
uint32_t new_pass_len;
|
||||||
DATA_BLOB session_key = dce_call->conn->session_key;
|
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);
|
arcfour_crypt_blob(pwbuf->data, 516, &session_key);
|
||||||
|
|
||||||
if (!decode_pw_buffer(pwbuf->data, new_pass, sizeof(new_pass),
|
if (!decode_pw_buffer(pwbuf->data, new_pass, sizeof(new_pass),
|
||||||
|
Reference in New Issue
Block a user