diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2 --- a/lib/libc/sys/open.2 +++ b/lib/libc/sys/open.2 @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd May 6, 2021 +.Dd October 9, 2021 .Dt OPEN 2 .Os .Sh NAME @@ -327,7 +327,7 @@ The other functionality of the returned file descriptor is limited to the descriptor-level operations. It can be used for -.Bl -tag -width SCM_RIGHTS -offset indent -compact +.Bl -tag -width readlinkat(2) -offset indent -compact .It Xr fcntl 2 but advisory locking is not allowed .It Xr dup 2 @@ -346,6 +346,7 @@ .It Xr kqueue 2 using for .Dv EVFILT_VNODE +.It Xr readlinkat 2 .El But operations like .Xr read 2 , diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2640,8 +2640,8 @@ if (count > IOSIZE_MAX) return (EINVAL); - NDINIT_AT(&nd, LOOKUP, NOFOLLOW | LOCKSHARED | LOCKLEAF | AUDITVNODE1, - pathseg, path, fd, td); + NDINIT_AT(&nd, LOOKUP, NOFOLLOW | LOCKSHARED | LOCKLEAF | AUDITVNODE1 | + EMPTYPATH, pathseg, path, fd, td); if ((error = namei(&nd)) != 0) return (error);