freebsd-src/share
Mark Johnston bfd03046d1 unix: Add support for atomically setting the socket mode
With this patch, it is possible to call fchmod() on a unix socket prior
to binding it to the filesystem namespace, so that the mode is set
atomically.  Without this, one has to call chmod() after bind(), leaving
a window where threads can connect to the socket with the default mode.
After bind(), fchmod() reverts to failing with EINVAL.

This interface is copied from Linux.

The behaviour of fstat() is unmodified, i.e., it continues to return the
mode as set by soo_stat().

PR:		282393
Reviewed by:	kib
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47361
2024-11-03 16:46:53 +00:00
..
colldef Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
colldef_unicode locales: update unicode version 16 and CLDR to version 45 2024-10-14 10:43:39 +02:00
ctypedef ctypedef: Remove || true from localedef command to reveal error sooner 2024-10-15 18:39:31 +08:00
dict Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
doc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
dtrace libdtrace: decode all tcp header flags and add 2023-12-31 15:02:03 +01:00
examples sound examples: Delete stale ossinit.h file 2024-08-24 15:16:21 +03:00
i18n Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
keys Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
man unix: Add support for atomically setting the socket mode 2024-11-03 16:46:53 +00:00
misc committers-src: Add jlduran with emaste as mentor 2024-10-30 04:42:11 +00:00
mk lib/libcrypt: unbundle hash functions 2024-10-25 16:02:38 +02:00
monetdef
monetdef_unicode locales: add missing af_ZA.UTF8 2024-10-14 11:56:30 +02:00
msgdef
msgdef_unicode
numericdef Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
numericdef_unicode locales: update unicode version 16 and CLDR to version 45 2024-10-14 10:43:39 +02:00
security Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
sendmail
skel Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
snmp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
syscons Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
tabset Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
termcap Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
tests Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
timedef Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
vt Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
zoneinfo Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.inc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00