opnsense-src/lib
Mark Johnston da44138dc2 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

(cherry picked from commit bfd03046d1)
2024-12-03 01:03:26 +00:00
..
atf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
clang Merge llvm-project release/19.x llvmorg-19.1.4-0-gaadaa00de76e 2024-12-01 12:17:17 +01:00
csu csu: Find the main pointer through the GOT 2024-07-15 12:26:22 +00:00
flua flua: Add hash module 2024-04-16 13:54:20 -06:00
geom geli.8: minor proofreading 2024-05-09 14:24:06 -06:00
googletest Fix GoogleTest 1.14.0 import 2023-08-18 19:33:58 -07:00
lib9p Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
lib80211 lib80211: Consistently use item count as the first argument to calloc 2024-11-30 08:55:57 -05:00
libalias Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libarchive libarchive tests: Re-enable a broken test 2024-11-05 00:55:43 +00:00
libauditd Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libbe libbe: Fix some markup issues. 2024-03-22 09:07:03 +01:00
libbearssl libsecureboot: be more verbose about validation failures 2024-01-07 14:39:17 -05:00
libbegemot Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libblacklist Track upstream project rename in contrib/blocklistd 2024-01-07 14:31:11 -05:00
libblocksruntime Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libbluetooth Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
libbsddialog Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
libbsdstat Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libbsm Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libbsnmp Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libbz2 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libc unix: Add support for atomically setting the socket mode 2024-12-03 01:03:26 +00:00
libc++ Merge llvm-project release/19.x llvmorg-19.1.3-0-gab51eccf88f5 2024-12-01 12:17:17 +01:00
libc++experimental Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb 2024-04-19 23:12:03 +02:00
libc_nonshared Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libcalendar Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libcam Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libcapsicum manuals: Fix "skipping end of block" .Ed errors 2024-11-04 11:56:24 -04:00
libcasper libcasper: Consistently use item count as the first argument to calloc 2024-11-30 08:55:57 -05:00
libcbor libcbor: Ignore errors for unknown #pragmas 2024-09-08 14:03:17 +02:00
libclang_rt Merge llvm-project main llvmorg-19-init-18630-gf2ccf80136a0 2024-12-01 12:16:52 +01:00
libcom_err Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libcompat libutil: move ftime to libutil 2024-06-28 12:17:52 +02:00
libcompiler_rt Merge llvm-project main llvmorg-19-init-18630-gf2ccf80136a0 2024-12-01 12:16:52 +01:00
libcrypt lib/libcrypt: use explicit_bzero() to clear sensitive buffers 2024-10-29 16:45:31 +01:00
libcuse Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
libcxxrt libcxxrt: Add a stub implementation of __cxa_call_terminate 2024-10-29 16:34:21 -04:00
libdevctl manuals: Fix some "missing section argument" 2024-11-04 12:15:01 -04:00
libdevdctl Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libdevinfo Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libdevstat Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libdl _dl_iterate_phdr_locked(): fix libc and libdl 2024-11-26 19:15:56 -06:00
libdpv Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libdwarf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libedit Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libefivar Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libelf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libelftc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libevent1 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libexecinfo Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libexpat MFC: MFV: expat 2.6.0. 2024-02-20 22:52:29 -08:00
libfdt libfdt: Make an internal FDT library available 2024-03-29 09:53:19 -04:00
libfetch libfetch: don't include fragments in HTTP requests 2024-09-05 14:05:15 +00:00
libfido2 libfido2: update to 1.14.0 2024-08-01 11:11:45 -04:00
libfigpar Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libgcc_eh libgcc_{eh,s}: restore __*_frame_info symbols post llvm18 2024-04-20 12:04:35 +02:00
libgcc_s libgcc_s: expose __divmoddi4 on i386 2024-04-26 19:30:42 +01:00
libgeom libgeom: Consistently use item count as the first argument to calloc 2024-11-30 08:55:57 -05:00
libgpio libgpio: Fix type mismatch for gpio_pin_[gs]et 2024-01-03 09:43:48 -08:00
libgssapi Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libiconv_modules Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libifconfig libifconfig: Fix bridge status member list 2024-01-28 18:55:56 +01:00
libipsec Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libipt Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libiscsiutil Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
libjail manuals: Fix "unusual .Xr" warnings with a script 2024-11-04 12:13:13 -04:00
libkiconv Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libkvm Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
libldns Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
liblua dirdeps: Add missing dependency files 2024-04-15 20:32:03 -06:00
liblutok Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
liblzma Backport export of lzma_mt_block_size symbol. 2024-04-07 21:01:25 -07:00
libmagic MFC: MFV: file 5.45. 2023-09-14 15:01:08 -07:00
libmd Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
libmemstat Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libmilter Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libmixer mixer.3: Fix mixer_get_mode() description 2024-08-08 16:49:10 +03:00
libmp Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libmt Add IBM TS1170 density codes and specs. 2023-12-14 15:55:24 -05:00
libnetbsd Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:20 -06:00
libnetgraph Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libnetmap libnetmap: remove interface name validation 2024-09-01 17:56:17 +00:00
libnv Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2024-08-06 15:39:53 -04:00
libomp Merge llvm-project release/19.x llvmorg-19.1.3-0-gab51eccf88f5 2024-12-01 12:17:17 +01:00
libopenbsd Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:20 -06:00
libopencsd Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libpam manuals: Fix "unusual .Xr" warnings with a script 2024-11-04 12:13:13 -04:00
libpathconv manuals: Fix "missing end of block" errors 2024-11-04 12:07:50 -04:00
libpcap libpcap: Update to 1.10.5 2024-10-07 14:27:04 -03:00
libpe Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libpfctl libpfctl: ensure we return useful error codes 2024-09-29 20:29:50 +02:00
libpjdlog Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libpmc jevents: Fix bootstrapping on macOS with Clang 16 / Apple Clang 15 2024-05-02 21:10:13 +01:00
libpmcstat Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libproc Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2024-08-06 15:39:53 -04:00
libprocstat libprocstat: add procstat_getrlimitusage() 2024-10-05 10:08:56 +03:00
libradius radlib: fix a memory leak in is_valid_request 2024-09-27 20:54:48 -07:00
libregex Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
librpcsec_gss Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
librpcsvc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
librss manuals: Misc syntax fixes 2024-11-04 11:56:24 -04:00
librt zfs: merge openzfs/zfs@32949f256 (zfs-2.2-release) into stable/14 2023-09-03 09:15:24 +02:00
librtld_db Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2024-08-06 15:39:53 -04:00
libsbuf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libsdp Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
libsecureboot libsecureboot do not report expected unverified files 2024-04-16 13:54:22 -06:00
libsm Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libsmb Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libsmdb Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libsmutil Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libsqlite3 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libssp Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libssp_nonshared Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libstats Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libstdbuf Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libstdthreads libstdthreads: destroy mutexattr in mtx_init() 2024-02-09 02:38:04 +02:00
libsysdecode manuals: Fix "unusual .Xr" warnings with a script 2024-11-04 12:13:13 -04:00
libtacplus Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libtelnet Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libthr libthr: allow very early atfork registration 2024-11-21 22:54:55 -06:00
libthread_db Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2024-08-06 15:39:53 -04:00
libucl Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libufs Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libugidfw Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libulog libulog: Make sure ut_line, ut_user, ut_host are terminated. 2024-05-02 11:08:17 +02:00
libunbound unbound: Vendor import 1.22.0 2024-10-24 20:28:45 -07:00
libusb manuals: Fix dates 2024-11-04 12:16:22 -04:00
libusbhid libusbhid: add missing include guards 2024-06-09 12:32:16 -04:00
libutil ftime.3: fix typo in spelling of libutil 2024-10-20 03:33:44 +03:00
libveriexec manuals: Fix "unusual .Xr" warnings with a script 2024-11-04 12:13:13 -04:00
libvgl Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
libvmmapi libvmmapi: add missing capability strings 2024-04-15 10:05:13 -04:00
libwrap Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libxo Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
liby Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libypclnt Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libz lib{c,lzma,z}: remove -DSYMBOL_VERSIONING from CFLAGS 2023-12-13 22:08:13 +00:00
libzstd libzstd: Explicitly define ZSTD_DISABLE_ASM 2023-08-22 21:01:03 +01:00
msun msun: Fix typo in comment 2024-10-21 11:00:49 +08:00
ncurses ncurses: Fix codegen for key names and codes 2024-10-30 08:53:05 +08:00
nss_tacplus nss_tacplus: Provide dummy setpwent(), getpwent_r(), endpwent(). 2023-09-07 20:28:30 +00:00
ofed Trim various $FreeBSD$ 2023-10-24 11:22:23 -07:00
tests Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile Skip building libclang_rt when WITHOUT_CLANG is used 2024-04-28 10:03:37 +02:00
Makefile.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00