core/socket: introduce AcceptFileDescriptors=

This controls the new SO_PASSRIGHTS socket option in kernel v6.16.
Note that I intentionally choose a different naming scheme than
Pass*=, since all other Pass*= options controls whether some extra
bits are attached to the message, while this one's about denying
file descriptor transfer and it feels more explicit this way.
And diverging from underlying socket option name is precedented
by Timestamping=. But happy to change it to just say PassRights=
if people disagree.
This commit is contained in:
Mike Yuan
2025-06-06 21:01:33 +02:00
parent f66eeedf6f
commit 5c12797fc3
7 changed files with 35 additions and 0 deletions

View File

@@ -771,6 +771,17 @@
<xi:include href="version-info.xml" xpointer="v246"/></listitem>
</varlistentry>
<varlistentry>
<term><varname>AcceptFileDescriptors=</varname></term>
<listitem><para>Takes a boolean value. This controls the <constant>SO_PASSRIGHTS</constant> socket
option, which when disabled prohibits the peer from sending <constant>SCM_RIGHTS</constant>
ancillary messages (aka file descriptors) via <constant>AF_UNIX</constant> sockets. Defaults to
<option>true</option>.</para>
<xi:include href="version-info.xml" xpointer="v258"/></listitem>
</varlistentry>
<varlistentry>
<term><varname>Timestamping=</varname></term>
<listitem><para>Takes one of <literal>off</literal>, <literal>us</literal> (alias: