0

blog.gnoack.org · 16d · discuss

If you are using Unix Domain sockets on Linux, and you are not passing file descriptors across Unix Domain Sockets (which is the common case), you should probably use the SO_PASSRIGHTS socket option to turn this feature off. This is a man page extension which I proposed (ref): SO_PASSRIGHTS (since Linux 6.16) This socket option controls whether the socket accepts file descriptors from its peers in SCM_RIGHTS ancillary messages (see below). It is enabled by default. When it is disabled, sendmsg(2) calls that pass file descriptors to this socket fail with the error EPERM. The option is checked when the...