summaryrefslogtreecommitdiffstats
path: root/man2/access.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/access.2')
-rw-r--r--man2/access.244
1 files changed, 22 insertions, 22 deletions
diff --git a/man2/access.2 b/man2/access.2
index 2b3e70e34..e71f59621 100644
--- a/man2/access.2
+++ b/man2/access.2
@@ -50,7 +50,7 @@ mode ", int " flags );
.P
.RS -4
Feature Test Macro Requirements for glibc (see
-.BR feature_test_macros (7)):
+.MR feature_test_macros 7 ):
.RE
.P
.BR faccessat ():
@@ -86,7 +86,7 @@ The check is done using the calling process's
.I real
UID and GID, rather than the effective IDs as is done when
actually attempting an operation (e.g.,
-.BR open (2))
+.MR open 2 )
on the file.
Similarly, for the root user, the check uses the set of
permitted capabilities rather than the set of effective
@@ -161,7 +161,7 @@ If
is an empty string, operate on the file referred to by
.I dirfd
(which may have been obtained using the
-.BR open (2)
+.MR open 2
.B O_PATH
flag).
In this case,
@@ -183,7 +183,7 @@ is a symbolic link, do not dereference it:
instead return information about the link itself.
.P
See
-.BR openat (2)
+.MR openat 2
for an explanation of the need for
.BR faccessat ().
.\"
@@ -228,7 +228,7 @@ The requested access would be denied to the file, or search permission
is denied for one of the directories in the path prefix of
.IR pathname .
(See also
-.BR path_resolution (7).)
+.MR path_resolution 7 .)
.TP
.B EBADF
.RB ( faccessat ())
@@ -287,7 +287,7 @@ is a file descriptor referring to a file other than a directory.
.B EPERM
Write permission was requested to a file that has the immutable flag set.
See also
-.BR ioctl_iflags (2).
+.MR ioctl_iflags 2 .
.TP
.B EROFS
Write permission was requested for a file on a read-only filesystem.
@@ -314,7 +314,7 @@ and
flags are actually implemented within the glibc wrapper function for
.BR faccessat ().
If either of these flags is specified, then the wrapper function employs
-.BR fstatat (2)
+.MR fstatat 2
to determine access permissions, but see BUGS.
.\"
.SS glibc notes
@@ -359,14 +359,14 @@ Linux 5.8.
.BR Warning :
Using these calls to check if a user is authorized to, for example,
open a file before actually doing so using
-.BR open (2)
+.MR open 2
creates a security hole, because the user might exploit the short time
interval between checking and opening the file to manipulate it.
.BR "For this reason, the use of this system call should be avoided" .
(In the example just described,
a safer alternative would be to temporarily switch the process's
effective user ID to the real ID and then call
-.BR open (2).)
+.MR open 2 .)
.P
.BR access ()
always dereferences symbolic links.
@@ -394,7 +394,7 @@ Therefore, if a directory is found to be writable,
it probably means that files can be created in the directory,
and not that the directory can be written as a file.
Similarly, a DOS file may be reported as executable, but the
-.BR execve (2)
+.MR execve 2
call will still fail.
.P
These calls
@@ -416,7 +416,7 @@ emulates the required functionality using
a combination of the
.BR faccessat ()
system call and
-.BR fstatat (2).
+.MR fstatat 2 .
However, this emulation does not take ACLs into account.
Starting with glibc 2.33, the wrapper function avoids this bug
by making use of the
@@ -450,19 +450,19 @@ Before Linux 2.6.20,
these calls ignored the effect of the
.B MS_NOEXEC
flag if it was used to
-.BR mount (2)
+.MR mount 2
the underlying filesystem.
Since Linux 2.6.20, the
.B MS_NOEXEC
flag is honored.
.SH SEE ALSO
-.BR chmod (2),
-.BR chown (2),
-.BR open (2),
-.BR setgid (2),
-.BR setuid (2),
-.BR stat (2),
-.BR euidaccess (3),
-.BR credentials (7),
-.BR path_resolution (7),
-.BR symlink (7)
+.MR chmod 2 ,
+.MR chown 2 ,
+.MR open 2 ,
+.MR setgid 2 ,
+.MR setuid 2 ,
+.MR stat 2 ,
+.MR euidaccess 3 ,
+.MR credentials 7 ,
+.MR path_resolution 7 ,
+.MR symlink 7