]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add AT_EMPTY_PATH for several *at(2) syscalls
authorKonstantin Belousov <kib@FreeBSD.org>
Sun, 7 Mar 2021 14:29:09 +0000 (16:29 +0200)
committerKonstantin Belousov <kib@FreeBSD.org>
Thu, 15 Apr 2021 09:48:11 +0000 (12:48 +0300)
commit509124b62616f73dcdc42263ee109392dafafd99
tree955762ad6dab0613574d56c408e93eb63de36ac3
parentd51b4b0aac43d9d25f7eb3f17b2d3034a5c851d8
Add AT_EMPTY_PATH for several *at(2) syscalls

It is currently allowed to fchownat(2), fchmodat(2), fchflagsat(2),
utimensat(2), fstatat(2), and linkat(2).

For linkat(2), PRIV_VFS_FHOPEN privilege is required to exercise the flag.
It allows to link any open file.

Requested by: trasz
Tested by: pho, trasz
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D29111
lib/libc/sys/access.2
lib/libc/sys/chflags.2
lib/libc/sys/chmod.2
lib/libc/sys/chown.2
lib/libc/sys/link.2
lib/libc/sys/stat.2
lib/libc/sys/utimensat.2
sys/kern/vfs_lookup.c
sys/kern/vfs_syscalls.c
sys/sys/fcntl.h
sys/sys/namei.h