module-protocol-native: Fix socket activation

Fix path comparison in is_socket_unix() and don't unset LISTEN_FDS since
the function that uses it is called more than once and it was not unset
when sd_listen_fds() was used.

Fixes #5140
This commit is contained in:
Jonas Holmberg 2026-03-02 10:28:26 +01:00
parent d206b06c70
commit f4e174870e
3 changed files with 7 additions and 11 deletions

View file

@ -576,7 +576,7 @@ static bool is_stale_socket(int fd, const struct sockaddr_un *addr_un)
static int check_socket_activation(const char *path)
{
const int n = listen_fd();
const int n = listen_fds();
for (int i = 0; i < n; i++) {
const int fd = LISTEN_FDS_START + i;