Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167133082
D58792.id183904.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
903 B
Referenced Files
None
Subscribers
None
D58792.id183904.diff
View Options
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -3114,8 +3114,15 @@
* socket, it is the peer, so return success (or its error) with no
* fallback; if not, it may be an O_PATH handle for a bound socket's
* vnode, so fall through to an EMPTYPATH lookup.
+ *
+ * The descriptor-names-the-peer interpretation only applies to
+ * connectat(2) with a real fd. connect(2) passes AT_FDCWD, and a
+ * sockaddr whose sun_path begins with a NUL byte (e.g. a Linux
+ * abstract namespace name passed through the linuxulator) must keep
+ * failing the pathname lookup with ENOENT as it historically did,
+ * so callers like libxcb fall back to the pathname socket.
*/
- if (*buf == '\0') {
+ if (*buf == '\0' && fd != AT_FDCWD) {
error = unp_socket_fd_peer(td, fd, so2p);
if (error != ENOTSOCK)
return (error);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 20, 9:05 AM (9 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36605419
Default Alt Text
D58792.id183904.diff (903 B)
Attached To
Mode
D58792: unix: only treat an empty sun_path as a peer descriptor for connectat(2)
Attached
Detach File
Event Timeline
Log In to Comment