SO_PASSRIGHTS for Unix Domain Sockets 0 ▲ Blog on blog.gnoack.org 1 hour ago · Tech · hide · 0 comments If you are using Unix Domain sockets on Linux, and you are not accepting file descriptors from these Unix Domain Sockets (which is the common case), you should probably disable the SO_PASSRIGHTS socket option to turn this feature off. The underlying problem is: When SO_PASSRIGHTS is enabled, and a sender process sends a file descriptor using SCM_RIGHTS, it becomes part of the receiving process. If the recipient then does not actually read the file descriptor, the receiving process implicitly closes it. For most files this is fine, but it is possible to contruct degerate files which block for a long time when closing and which will block the receiver process during that time. 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… No comments yet. Log in to reply on the Fediverse. Comments will appear here.