mirror of
https://gitlab.com/marcandre.lureau/qemu-display.git
synced 2025-04-14 08:44:46 +00:00
qemu-display: use anonymouse auth on win32
zbus dropped support for COOKIE_SHA1, which is the default used by glib/gio on win32. QEMU must be adjusted to support anonymous connections, which should be okay since the connections are hand-over p2p. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
6a59a5a43a
commit
56b52bad53
@ -269,15 +269,15 @@ impl Audio {
|
||||
&p0,
|
||||
)?;
|
||||
self.proxy.register_out_listener(p0).await?;
|
||||
let c = zbus::connection::Builder::unix_stream(p1)
|
||||
.p2p()
|
||||
let conn = zbus::connection::Builder::unix_stream(p1).p2p()
|
||||
.serve_at(
|
||||
"/org/qemu/Display1/AudioOutListener",
|
||||
AudioOutListener { handler },
|
||||
)?
|
||||
.build()
|
||||
.await?;
|
||||
self.out_listener.replace(c);
|
||||
)?;
|
||||
#[cfg(windows)]
|
||||
let conn = conn.auth_mechanism(zbus::AuthMechanism::Anonymous);
|
||||
let conn = conn.build().await?;
|
||||
self.out_listener.replace(conn);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -289,15 +289,16 @@ impl Audio {
|
||||
&p0,
|
||||
)?;
|
||||
self.proxy.register_in_listener(p0).await?;
|
||||
let c = zbus::connection::Builder::unix_stream(p1)
|
||||
let conn = zbus::connection::Builder::unix_stream(p1)
|
||||
.p2p()
|
||||
.serve_at(
|
||||
"/org/qemu/Display1/AudioInListener",
|
||||
AudioInListener { handler },
|
||||
)?
|
||||
.build()
|
||||
.await?;
|
||||
self.in_listener.replace(c);
|
||||
)?;
|
||||
#[cfg(windows)]
|
||||
let conn = conn.auth_mechanism(zbus::AuthMechanism::Anonymous);
|
||||
let conn = conn.build().await?;
|
||||
self.in_listener.replace(conn);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
@ -113,12 +113,15 @@ impl Console {
|
||||
&p0,
|
||||
)?;
|
||||
self.proxy.register_listener(p0).await?;
|
||||
let c = zbus::connection::Builder::unix_stream(p1)
|
||||
let conn = zbus::connection::Builder::unix_stream(p1)
|
||||
.p2p()
|
||||
.serve_at("/org/qemu/Display1/Listener", ConsoleListener::new(handler))?
|
||||
.serve_at("/org/qemu/Display1/Listener", ConsoleListener::new(handler))?;
|
||||
#[cfg(windows)]
|
||||
let conn = conn.auth_mechanism(zbus::AuthMechanism::Anonymous);
|
||||
let conn = conn
|
||||
.build()
|
||||
.await?;
|
||||
*self.listener.write().unwrap() = Some(c);
|
||||
*self.listener.write().unwrap() = Some(conn);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -196,10 +196,10 @@ impl<'d> Display<'d> {
|
||||
fdname: "fdname".into(),
|
||||
})?;
|
||||
|
||||
let conn = zbus::connection::Builder::unix_stream(p1)
|
||||
.p2p()
|
||||
.build()
|
||||
.await?;
|
||||
let conn = zbus::connection::Builder::unix_stream(p1).p2p();
|
||||
#[cfg(windows)]
|
||||
let conn = conn.auth_mechanism(zbus::AuthMechanism::Anonymous);
|
||||
let conn = conn.build().await?;
|
||||
|
||||
Self::new(
|
||||
&conn,
|
||||
|
Loading…
x
Reference in New Issue
Block a user