Index: lib/libc/sys/getfh.2 =================================================================== --- lib/libc/sys/getfh.2 +++ lib/libc/sys/getfh.2 @@ -76,12 +76,12 @@ .Fn lgetfh except when the .Fa path -specifies a relative or NULL path, or the +specifies a relative path, or the .Dv AT_BENEATH flag is provided. For .Fn getfhat -and relative or NULL +and relative .Fa path , the status is retrieved from a file relative to the directory associated with the file descriptor Index: sys/kern/vfs_syscalls.c =================================================================== --- sys/kern/vfs_syscalls.c +++ sys/kern/vfs_syscalls.c @@ -4196,8 +4196,8 @@ if ((uap->flags & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH)) != 0) return (EINVAL); - return (kern_getfhat(td, uap->flags, uap->fd, uap->path ? uap->path : ".", - UIO_USERSPACE, uap->fhp)); + return (kern_getfhat(td, uap->flags, uap->fd, uap->path, UIO_USERSPACE, + uap->fhp)); } static int