mirror of
https://github.com/netbirdio/IronRDP.git
synced 2026-05-22 18:43:12 -07: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:
co-authored by
Benoît Cortier
parent
42cc02d6f6
commit
87014d4afb
@@ -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(())
|
||||
|
||||
Reference in New Issue
Block a user