diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2021-03-07 14:29:09 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2021-04-23 11:14:10 +0000 |
commit | 73a642c479550ea46b56d1f25cc32a99f917b891 (patch) | |
tree | 92212e2106b56153116b3eb479fcfb5b5deb4e6d /lib/libc | |
parent | b82fb18ee28f1e23c5fa6ebb3a420b2d43f0fa42 (diff) | |
download | src-73a642c479550ea46b56d1f25cc32a99f917b891.tar.gz src-73a642c479550ea46b56d1f25cc32a99f917b891.zip |
Add AT_EMPTY_PATH for several *at(2) syscalls
(cherry picked from commit 509124b62616f73dcdc42263ee109392dafafd99)
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/access.2 | 13 | ||||
-rw-r--r-- | lib/libc/sys/chflags.2 | 13 | ||||
-rw-r--r-- | lib/libc/sys/chmod.2 | 13 | ||||
-rw-r--r-- | lib/libc/sys/chown.2 | 13 | ||||
-rw-r--r-- | lib/libc/sys/link.2 | 11 | ||||
-rw-r--r-- | lib/libc/sys/stat.2 | 13 | ||||
-rw-r--r-- | lib/libc/sys/utimensat.2 | 13 |
7 files changed, 82 insertions, 7 deletions
diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2 index 13bfd7e5a88a..12af63385780 100644 --- a/lib/libc/sys/access.2 +++ b/lib/libc/sys/access.2 @@ -28,7 +28,7 @@ .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" $FreeBSD$ .\" -.Dd February 23, 2021 +.Dd March 30, 2021 .Dt ACCESS 2 .Os .Sh NAME @@ -129,6 +129,17 @@ See the description of the flag in the .Xr open 2 manual page. +.It Dv AT_EMPTY_PATH +If the +.Fa path +argument is an empty string, operate on the file or directory +referenced by the descriptor +.Fa fd . +If +.Fa fd +is equal to +.Dv AT_FDCWD , +operate on the current working directory. .El .Pp Even if a process's real or effective user has appropriate privileges diff --git a/lib/libc/sys/chflags.2 b/lib/libc/sys/chflags.2 index a44713904599..f8dfd59c39d3 100644 --- a/lib/libc/sys/chflags.2 +++ b/lib/libc/sys/chflags.2 @@ -28,7 +28,7 @@ .\" @(#)chflags.2 8.3 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd February 23, 2021 +.Dd March 30, 2021 .Dt CHFLAGS 2 .Os .Sh NAME @@ -103,6 +103,17 @@ See the description of the flag in the .Xr open 2 manual page. +.It Dv AT_EMPTY_PATH +If the +.Fa path +argument is an empty string, operate on the file or directory +referenced by the descriptor +.Fa fd . +If +.Fa fd +is equal to +.Dv AT_FDCWD , +operate on the current working directory. .El .Pp If diff --git a/lib/libc/sys/chmod.2 b/lib/libc/sys/chmod.2 index 0127a5b629e4..44a1b18718f1 100644 --- a/lib/libc/sys/chmod.2 +++ b/lib/libc/sys/chmod.2 @@ -28,7 +28,7 @@ .\" @(#)chmod.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd February 23, 2021 +.Dd March 30, 2021 .Dt CHMOD 2 .Os .Sh NAME @@ -110,6 +110,17 @@ See the description of the flag in the .Xr open 2 manual page. +.It Dv AT_EMPTY_PATH +If the +.Fa path +argument is an empty string, operate on the file or directory +referenced by the descriptor +.Fa fd . +If +.Fa fd +is equal to +.Dv AT_FDCWD , +operate on the current working directory. .El .Pp If diff --git a/lib/libc/sys/chown.2 b/lib/libc/sys/chown.2 index 4c45ce9174bb..467ff8a87e55 100644 --- a/lib/libc/sys/chown.2 +++ b/lib/libc/sys/chown.2 @@ -28,7 +28,7 @@ .\" @(#)chown.2 8.4 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd February 23, 2021 +.Dd March 30, 2021 .Dt CHOWN 2 .Os .Sh NAME @@ -127,6 +127,17 @@ See the description of the flag in the .Xr open 2 manual page. +.It Dv AT_EMPTY_PATH +If the +.Fa path +argument is an empty string, operate on the file or directory +referenced by the descriptor +.Fa fd . +If +.Fa fd +is equal to +.Dv AT_FDCWD , +operate on the current working directory. .El .Pp If diff --git a/lib/libc/sys/link.2 b/lib/libc/sys/link.2 index bcf03f17f3bb..37225f9571d0 100644 --- a/lib/libc/sys/link.2 +++ b/lib/libc/sys/link.2 @@ -28,7 +28,7 @@ .\" @(#)link.2 8.3 (Berkeley) 1/12/94 .\" $FreeBSD$ .\" -.Dd February 23, 2021 +.Dd March 30, 2021 .Dt LINK 2 .Os .Sh NAME @@ -124,6 +124,15 @@ See the description of the flag in the .Xr open 2 manual page. +.It Dv AT_EMPTY_PATH +If the +.Fa path2 +argument is an empty string, link the file referenced by the descriptor +.Fa fd2 . +The operation requires that the calling process has the +.Dv PRIV_VFS_FHOPEN +privilege, effectively being executed with effective user +.Dv root . .El .Pp If diff --git a/lib/libc/sys/stat.2 b/lib/libc/sys/stat.2 index 0ed70620af63..55221d05a60e 100644 --- a/lib/libc/sys/stat.2 +++ b/lib/libc/sys/stat.2 @@ -28,7 +28,7 @@ .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd February 23, 2021 +.Dd March 30, 2021 .Dt STAT 2 .Os .Sh NAME @@ -111,6 +111,17 @@ See the description of the flag in the .Xr open 2 manual page. +.It Dv AT_EMPTY_PATH +If the +.Fa path +argument is an empty string, operate on the file or directory +referenced by the descriptor +.Fa fd . +If +.Fa fd +is equal to +.Dv AT_FDCWD , +operate on the current working directory. .El .Pp If diff --git a/lib/libc/sys/utimensat.2 b/lib/libc/sys/utimensat.2 index d31ee1f1515a..2af452898c9d 100644 --- a/lib/libc/sys/utimensat.2 +++ b/lib/libc/sys/utimensat.2 @@ -31,7 +31,7 @@ .\" @(#)utimes.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd February 23, 2021 +.Dd March 30, 2021 .Dt UTIMENSAT 2 .Os .Sh NAME @@ -155,6 +155,17 @@ See the description of the flag in the .Xr open 2 manual page. +.It Dv AT_EMPTY_PATH +If the +.Fa path +argument is an empty string, operate on the file or directory +referenced by the descriptor +.Fa fd . +If +.Fa fd +is equal to +.Dv AT_FDCWD , +operate on the current working directory. .El .Sh RETURN VALUES .Rv -std |