From d2df7e2b10e881ed55e28adaca652e771861533d Mon Sep 17 00:00:00 2001 From: Zeeshan Ali Khan Date: Wed, 8 May 2024 16:12:11 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=85=20zb:=20Gracefully=20handle=20reje?= =?UTF-8?q?ction=20of=20UNIX=20FD=20passing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zbus/src/connection/handshake/client.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/zbus/src/connection/handshake/client.rs b/zbus/src/connection/handshake/client.rs index 5c0be1862..3ffa21ce0 100644 --- a/zbus/src/connection/handshake/client.rs +++ b/zbus/src/connection/handshake/client.rs @@ -1,6 +1,6 @@ use async_trait::async_trait; use std::collections::VecDeque; -use tracing::{debug, instrument, trace}; +use tracing::{debug, instrument, trace, warn}; use sha1::{Digest, Sha1}; @@ -205,12 +205,12 @@ impl Client { self.set_guid(guid)?; } Command::AgreeUnixFD => self.common.set_cap_unix_fd(true), - // This also covers "REJECTED" and "ERROR", which would mean that the server has - // rejected the authentication challenge response (likely cookie) since it - // already agreed to the mechanism. Theoretically we should - // be just trying the next auth mechanism but this most - // likely means something is very wrong and we're already - // too deep into the handshake to recover. + Command::Error(e) => warn!("UNIX file descriptor passing rejected: {e}"), + // This also covers "REJECTED", which would mean that the server has rejected the + // authentication challenge response (likely cookie) since it already agreed to the + // mechanism. Theoretically we should be just trying the next auth mechanism but + // this most likely means something is very wrong and we're already too deep into + // the handshake to recover. cmd => { return Err(Error::Handshake(format!( "Unexpected command from server: {cmd}"