mirror of
https://github.com/samba-team/samba.git
synced 2025-03-07 00:58:40 +03:00
The SMB session key must not be more than 16 bytes in SAMR (and
presumably LSA). Tests show that Vista requires the sesion key to be truncated for a domain join. Andrew Bartlett (This used to be commit af629a3738298d27eb2dbecf466ceb503cec9638)
This commit is contained in:
parent
042eefe3eb
commit
768515f4ad
@ -647,11 +647,21 @@ NTSTATUS dcerpc_generic_session_key(struct dcerpc_connection *c,
|
||||
|
||||
/*
|
||||
fetch the user session key - may be default (above) or the SMB session key
|
||||
|
||||
The key is always truncated to 16 bytes
|
||||
*/
|
||||
_PUBLIC_ NTSTATUS dcerpc_fetch_session_key(struct dcerpc_pipe *p,
|
||||
DATA_BLOB *session_key)
|
||||
DATA_BLOB *session_key)
|
||||
{
|
||||
return p->conn->security_state.session_key(p->conn, session_key);
|
||||
NTSTATUS status;
|
||||
status = p->conn->security_state.session_key(p->conn, session_key);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
session_key->length = MIN(session_key->length, 16);
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -270,11 +270,20 @@ NTSTATUS dcesrv_generic_session_key(struct dcesrv_connection *p,
|
||||
|
||||
/*
|
||||
fetch the user session key - may be default (above) or the SMB session key
|
||||
|
||||
The key is always truncated to 16 bytes
|
||||
*/
|
||||
_PUBLIC_ NTSTATUS dcesrv_fetch_session_key(struct dcesrv_connection *p,
|
||||
DATA_BLOB *session_key)
|
||||
{
|
||||
return p->auth_state.session_key(p, session_key);
|
||||
NTSTATUS status = p->auth_state.session_key(p, session_key);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
session_key->length = MIN(session_key->length, 16);
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user