aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2026-06-04 17:26:09 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2026-06-04 17:55:11 +0000
commit453968c78d27ed5c90562a1178f34fe8d616bf40 (patch)
treefd05046ffe938fc3053b8a34c7149db306afdd33
parentb551429ad65d73a717c7bfc589cfbe62773a8cb1 (diff)
uipc_usrreq: revert addition of EMPTYPATH for bindat(2)
The caller wants the parent vnode, which cannot be provided for emptypath lookups. Reported and reviewed by: markj Fixes: 12c590a9abd7 ("bindat(2)/connectat(2): allow implicit EMPTYPATH for unix domain sockets") Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57448
-rw-r--r--lib/libsys/open.24
-rw-r--r--sys/kern/uipc_usrreq.c5
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/libsys/open.2 b/lib/libsys/open.2
index defc593b15ce..7915f7e8ef0a 100644
--- a/lib/libsys/open.2
+++ b/lib/libsys/open.2
@@ -447,11 +447,9 @@ The other functionality of the returned file descriptor is limited to
the following descriptor-level operations:
.Pp
.Bl -tag -width __acl_aclcheck_fd -offset indent -compact
-.It Xr bindat 2
-for unix domain socket
-.Pq see Xr unix 4
.It Xr connectat 2
for unix domain socket
+.Pq see Xr unix 4
.It Xr fcntl 2
but advisory locking is not allowed
.It Xr dup 2
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index a798aaf4f871..920588627914 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -612,9 +612,8 @@ uipc_bindat(int fd, struct socket *so, struct sockaddr *nam, struct thread *td)
buf[namelen] = 0;
restart:
- NDINIT_ATRIGHTS(&nd, CREATE, NOFOLLOW | LOCKPARENT | NOCACHE |
- EMPTYPATH, UIO_SYSSPACE, buf, fd, cap_rights_init_one(&rights,
- CAP_BINDAT));
+ NDINIT_ATRIGHTS(&nd, CREATE, NOFOLLOW | LOCKPARENT | NOCACHE,
+ UIO_SYSSPACE, buf, fd, cap_rights_init_one(&rights, CAP_BINDAT));
/* SHOULD BE ABLE TO ADOPT EXISTING AND wakeup() ALA FIFO's */
error = namei(&nd);
if (error)