mirror of
https://github.com/Devolutions/IronRDP.git
synced 2025-08-04 15:18:17 +00:00
fix(acceptor): raise credssp error to caller (#563)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Co-authored-by: Benoît Cortier <bcortier@proton.me>
This commit is contained in:
parent
42cc02d6f6
commit
87014d4afb
1 changed files with 11 additions and 7 deletions
|
@ -172,16 +172,17 @@ where
|
|||
Ok(())
|
||||
}
|
||||
|
||||
let result = match credssp_loop(framed, acceptor, buf, client_computer_name, public_key, kerberos_config).await {
|
||||
Ok(_) => EarlyUserAuthResult::Success,
|
||||
Err(err) => {
|
||||
warn!("credssp: {err}");
|
||||
EarlyUserAuthResult::AccessDenied
|
||||
}
|
||||
};
|
||||
let result = credssp_loop(framed, acceptor, buf, client_computer_name, public_key, kerberos_config).await;
|
||||
|
||||
if protocol.intersects(nego::SecurityProtocol::HYBRID_EX) {
|
||||
trace!(?result, "HYBRID_EX");
|
||||
|
||||
let result = if result.is_ok() {
|
||||
EarlyUserAuthResult::Success
|
||||
} else {
|
||||
EarlyUserAuthResult::AccessDenied
|
||||
};
|
||||
|
||||
buf.clear();
|
||||
result
|
||||
.to_buffer(&mut *buf)
|
||||
|
@ -192,6 +193,9 @@ where
|
|||
.await
|
||||
.map_err(|e| ironrdp_connector::custom_err!("write all", e))?;
|
||||
}
|
||||
|
||||
result?;
|
||||
|
||||
acceptor.mark_credssp_as_done();
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue