Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/sys/access.2
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)access.2 8.2 (Berkeley) 4/1/94 | .\" @(#)access.2 8.2 (Berkeley) 4/1/94 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd September 23, 2020 | .Dd February 23, 2021 | ||||
.Dt ACCESS 2 | .Dt ACCESS 2 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm access , | .Nm access , | ||||
.Nm eaccess , | .Nm eaccess , | ||||
.Nm faccessat | .Nm faccessat | ||||
.Nd check accessibility of a file | .Nd check accessibility of a file | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | |||||
are constructed by a bitwise-inclusive OR of flags from the following | are constructed by a bitwise-inclusive OR of flags from the following | ||||
list, defined in | list, defined in | ||||
.In fcntl.h : | .In fcntl.h : | ||||
.Bl -tag -width indent | .Bl -tag -width indent | ||||
.It Dv AT_EACCESS | .It Dv AT_EACCESS | ||||
The checks for accessibility are performed using the effective user and group | The checks for accessibility are performed using the effective user and group | ||||
IDs instead of the real user and group ID as required in a call to | IDs instead of the real user and group ID as required in a call to | ||||
.Fn access . | .Fn access . | ||||
.It Dv AT_BENEATH | |||||
Only operate on files and directories below the topping directory. | |||||
See the description of the | |||||
.Dv O_BENEATH | |||||
flag in the | |||||
.Xr open 2 | |||||
manual page. | |||||
.It Dv AT_RESOLVE_BENEATH | .It Dv AT_RESOLVE_BENEATH | ||||
Only walks paths below the topping directory. | Only walks paths below the directory specified by the | ||||
markj: While here, it should be "walk" instead of "walks", same as "only operate" in the deleted text. | |||||
.Ar fd | |||||
descriptor. | |||||
See the description of the | See the description of the | ||||
.Dv O_RESOLVE_BENEATH | .Dv O_RESOLVE_BENEATH | ||||
flag in the | flag in the | ||||
.Xr open 2 | .Xr open 2 | ||||
manual page. | manual page. | ||||
.El | .El | ||||
.Pp | .Pp | ||||
Even if a process's real or effective user has appropriate privileges | Even if a process's real or effective user has appropriate privileges | ||||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | |||||
nor a file descriptor associated with a directory. | nor a file descriptor associated with a directory. | ||||
.It Bq Er ENOTCAPABLE | .It Bq Er ENOTCAPABLE | ||||
.Fa path | .Fa path | ||||
is an absolute path, | is an absolute path, | ||||
or contained a ".." component leading to a | or contained a ".." component leading to a | ||||
directory outside of the directory hierarchy specified by | directory outside of the directory hierarchy specified by | ||||
.Fa fd , | .Fa fd , | ||||
and the process is in capability mode. | and the process is in capability mode. | ||||
.It Bq Er ENOTCAPABLE | |||||
The | |||||
.Dv AT_BENEATH | |||||
flag was provided to | |||||
.Fn faccessat , | |||||
and the absolute | |||||
.Fa path | |||||
does not have its tail fully contained under the topping directory, | |||||
or the relative | |||||
.Fa path | |||||
escapes it. | |||||
.El | .El | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr chmod 2 , | .Xr chmod 2 , | ||||
.Xr intro 2 , | .Xr intro 2 , | ||||
.Xr stat 2 | .Xr stat 2 | ||||
.Sh STANDARDS | .Sh STANDARDS | ||||
The | The | ||||
.Fn access | .Fn access | ||||
Show All 38 Lines |
While here, it should be "walk" instead of "walks", same as "only operate" in the deleted text. This applies to the other man pages as well.