Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
cgwalters committed Nov 14, 2022
1 parent 54bf421 commit a3cb121
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 9 deletions.
37 changes: 37 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tokio = { version = "1.16.1", features = ["time", "process", "rt", "net"] }
xmlrpc = "0.15.1"
termcolor = "1.1.3"
tokio-unix-ipc = { version = "0.2.0", features = ["serde"] }

[build-dependencies]
anyhow = "1.0"
Expand Down
10 changes: 2 additions & 8 deletions rpmostree-cxxrs.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2954,10 +2954,7 @@ extern "C"
daemon_init_inner$ (debug);
throw$.ptr = nullptr;
},
[&] (const char *catch$) noexcept {
throw$.len = ::std::strlen (catch$);
throw$.ptr = const_cast<char *> (::cxxbridge1$exception (catch$, throw$.len));
});
::rust::detail::Fail (throw$));
return throw$;
}

Expand All @@ -2971,10 +2968,7 @@ extern "C"
daemon_main_inner$ ();
throw$.ptr = nullptr;
},
[&] (const char *catch$) noexcept {
throw$.len = ::std::strlen (catch$);
throw$.ptr = const_cast<char *> (::cxxbridge1$exception (catch$, throw$.len));
});
::rust::detail::Fail (throw$));
return throw$;
}

Expand Down
2 changes: 2 additions & 0 deletions rust/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ pub(crate) fn client_handle_fd_argument(
fn start_daemon_via_socket() -> Result<()> {
use cap_std::io_lifetimes::IntoSocketlike;

let conn = tokio::net::UnixStream::connect("/run/rpm-ostree/client.sock")?;

let address = sockaddr()?;
let socket = rustix::net::socket(
rustix::net::AddressFamily::UNIX,
Expand Down
2 changes: 1 addition & 1 deletion src/daemon/rpm-ostreed.socket
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ConditionKernelCommandLine=ostree

[Socket]
ListenSequentialPacket=/run/rpm-ostree/client.sock
ListenStream=/run/rpm-ostree/client.sock
SocketMode=0600

[Install]
Expand Down

0 comments on commit a3cb121

Please sign in to comment.