radicle-heartwood-lfs/crates
Lorenz Leutgeb 8a66e4d044 node/systemd: Check that received sockets are AF_UNIX
Our implementation for the control socket is based on AF_UNIX, and as
the note (which is removed) suggests, we should actually check that the
received socket really is of that domain.

This check was not implemented because it is not exposed via `std`, and
a bit cumbersome to do via `libc`.

I did not realize that `socket2` which neatly sits between `std` and
`libc` in terms of its abstractions and is cross-platform allows us to
do this, and we even already depend on it!

So, add the suggested check.

While at it, refactor the function to return early in cases. Now the
progression from a file descriptor to a socket to a listener is nicely
captured in the types and not obstructed too much by indentation.

Also log at the error level.
2025-08-25 17:17:34 +01:00
..
radicle radicle: Fix panic when reading from SQLite database fails 2025-08-25 17:05:21 +01:00
radicle-cli radicle: Fix panic when reading from SQLite database fails 2025-08-25 17:05:21 +01:00
radicle-cli-test fix: upgrade radicle-crypto 2025-08-13 09:20:42 +01:00
radicle-cob cob: add method for loading entry manifest 2025-08-19 14:27:35 +01:00
radicle-crypto fix: upgrade radicle-crypto 2025-08-13 09:20:42 +01:00
radicle-dag repo: Move workspace crates into `crates` subdirectory 2025-06-09 15:09:21 +02:00
radicle-fetch radicle: Fix panic when reading from SQLite database fails 2025-08-25 17:05:21 +01:00
radicle-node node/systemd: Check that received sockets are AF_UNIX 2025-08-25 17:17:34 +01:00
radicle-protocol radicle: Fix panic when reading from SQLite database fails 2025-08-25 17:05:21 +01:00
radicle-remote-helper fix: Normalize filesystem paths with `dunce` 2025-08-22 15:11:43 +01:00
radicle-schemars fix: upgrade radicle-crypto 2025-08-13 09:20:42 +01:00
radicle-signals signals: Guard most of the crate for Unix 2025-08-22 15:19:31 +01:00
radicle-ssh release: prepare crates 2025-08-12 12:13:49 +02:00
radicle-systemd release: prepare crates 2025-08-12 12:13:49 +02:00
radicle-term refactor: Replace return Err(anyhow!()) with anyhow::bail!() 2025-08-17 20:17:11 +02:00