Isolate nested IPC sockets and define session ownership policy
This commit is contained in:
1 parent
97026a0db7
commit
ce024d4794
42 files changed
+635
-147
No files matched your search
@@ -24,10 +24,7 @@ struct BridgeInner {
|
||||
|
||||
impl Bridge {
|
||||
pub(crate) fn connect() -> Result<Self, String> {
|
||||
let path = std::env::var_os("XDG_RUNTIME_DIR")
|
||||
.map(std::path::PathBuf::from)
|
||||
.ok_or("Missing runtime directory")?
|
||||
.join("ferese/control.sock");
|
||||
let path = ferese_ipc::socket::resolve(None).map_err(|error| error.to_string())?;
|
||||
let stream = UnixStream::connect(path).map_err(|error| error.to_string())?;
|
||||
Self::from_stream(stream, Duration::from_secs(2))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user