From 566b8f4d465a8a1b754eb7c094751759a12a7cd2 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 31 Mar 2025 23:02:49 +0900 Subject: [PATCH] core/manager: update comment --- src/core/manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/manager.c b/src/core/manager.c index 110f20455d..06d6f51a13 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -1109,10 +1109,10 @@ static int manager_setup_notify(Manager *m) { if (r < 0) return log_error_errno(r, "Failed to enable SO_PASSCRED for notify socket: %m"); + // TODO: enforce SO_PASSPIDFD when our baseline of the kernel version is bumped to >= 6.5. r = setsockopt_int(fd, SOL_SOCKET, SO_PASSPIDFD, true); if (r < 0 && r != -ENOPROTOOPT) log_warning_errno(r, "Failed to enable SO_PASSPIDFD for notify socket, ignoring: %m"); - // TODO: maybe enforce SO_PASSPIDFD? m->notify_fd = TAKE_FD(fd); @@ -5002,8 +5002,8 @@ static int manager_dispatch_pidref_transport_fd(sd_event_source *source, int fd, * - Child PIDFD in SCM_RIGHTS in message body * - Child PID in message IOV * - * SO_PASSPIDFD may not be supported by the kernel so we fall back to using parent PID from ucreds - * and accept some raciness. */ + * SO_PASSPIDFD may not be supported by the kernel (it is supported since v6.5) so we fall back to + * using parent PID from ucreds and accept some raciness. */ n = recvmsg_safe(m->pidref_transport_fds[0], &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC|MSG_TRUNC); if (ERRNO_IS_NEG_TRANSIENT(n)) return 0; /* Spurious wakeup, try again */