Page MenuHomeFreeBSD

vfs: Permit unix sockets to be opened with O_PATH
ClosedPublic

Authored by markj on Sep 15 2021, 4:18 PM.
Tags
None
Referenced Files
F152956981: D31970.id.diff
Sat, Apr 18, 7:54 AM
Unknown Object (File)
Wed, Apr 15, 7:55 PM
Unknown Object (File)
Tue, Apr 14, 1:05 PM
Unknown Object (File)
Mon, Apr 13, 7:25 AM
Unknown Object (File)
Sun, Apr 5, 11:08 AM
Unknown Object (File)
Sun, Apr 5, 8:30 AM
Unknown Object (File)
Feb 8 2026, 1:46 PM
Unknown Object (File)
Feb 8 2026, 7:21 AM

Details

Summary

This is compatible with Linux. 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.
(That is not quite enough to make syslog(3) work in capability mode,
since syslog(3) has to handle the possibility that syslogd was
restarted, in which case we must re-resolve the /var/run/log path.)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable