various: turn off SO_PASSRIGHTS where fds are not expected

This commit is contained in:
Mike Yuan
2025-06-17 13:16:44 +02:00
parent ed6b7b6ace
commit 85352c095e
7 changed files with 37 additions and 9 deletions
+4
View File
@@ -3716,6 +3716,10 @@ static int setup_notify_child(const void *directory) {
if (r < 0)
log_debug_errno(r, "Failed to enable SO_PASSPIDFD, ignoring: %m");
r = setsockopt_int(fd, SOL_SOCKET, SO_PASSRIGHTS, false);
if (r < 0)
log_debug_errno(r, "Failed to turn off SO_PASSRIGHTS, ignoring: %m");
return TAKE_FD(fd);
}