]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vfs: Permit unix sockets to be opened with O_PATH
authorMark Johnston <markj@FreeBSD.org>
Fri, 17 Sep 2021 16:34:21 +0000 (12:34 -0400)
committerMark Johnston <markj@FreeBSD.org>
Sun, 17 Oct 2021 21:15:44 +0000 (17:15 -0400)
commit54a01b5326b9b73c4fbccb5bc085b5884eebe814
tree81d8ca834907d8f52a840ea9107deaf0aece53c5
parent9b918d1761ceced37681773936f08eb6b4f9b44b
vfs: Permit unix sockets to be opened with O_PATH

As with FIFOs, a path descriptor for a unix socket cannot be used with
kevent().

In principle connectat(2) and bindat(2) could be modified to support an
AT_EMPTY_PATH-like mode which operates on the socket referenced by an
O_PATH fd referencing a unix socket.  That would eliminate the path
length limit imposed by sockaddr_un.

Update O_PATH tests.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 2bd9826995ca6b23f8b088cfa035c0ad1c578ac3)
sys/kern/vfs_vnops.c
tests/sys/file/path_test.c