diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:41:07 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:41:07 +0000 |
commit | 3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 (patch) | |
tree | 3ee7a3ec64525911fa865bb984c86d997d855527 /man2/fanotify_mark.2 | |
parent | Adding debian version 6.05.01-1. (diff) | |
download | manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.tar.xz manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.zip |
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man2/fanotify_mark.2')
-rw-r--r-- | man2/fanotify_mark.2 | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/man2/fanotify_mark.2 b/man2/fanotify_mark.2 index d1f7eec..c942b0b 100644 --- a/man2/fanotify_mark.2 +++ b/man2/fanotify_mark.2 @@ -1,7 +1,7 @@ .\" Copyright (C) 2013, Heinrich Schuchardt <xypron.glpk@gmx.de> .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft -.TH fanotify_mark 2 2023-03-30 "Linux man-pages 6.05.01" +.TH fanotify_mark 2 2023-10-31 "Linux man-pages 6.7" .SH NAME fanotify_mark \- add, remove, or modify an fanotify mark on a filesystem object @@ -11,7 +11,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/fanotify.h> -.PP +.P .BI "int fanotify_mark(int " fanotify_fd ", unsigned int " flags , .BI " uint64_t " mask ", int " dirfd , .BI " const char *_Nullable " pathname ); @@ -19,17 +19,17 @@ Standard C library .SH DESCRIPTION For an overview of the fanotify API, see .BR fanotify (7). -.PP +.P .BR fanotify_mark () adds, removes, or modifies an fanotify mark on a filesystem object. The caller must have read permission on the filesystem object that is to be marked. -.PP +.P The .I fanotify_fd argument is a file descriptor returned by .BR fanotify_init (2). -.PP +.P .I flags is a bit mask describing the modification to perform. It must include exactly one of the following values: @@ -74,11 +74,11 @@ can be used in conjunction with .BR FAN_MARK_FLUSH . .I mask is ignored. -.PP +.P If none of the values above is specified, or more than one is specified, the call fails with the error .BR EINVAL . -.PP +.P In addition, zero or more of the following values may be ORed into .IR flags : @@ -311,7 +311,7 @@ and if it is not, the listener sets a mark with an ignore mask on the directory. Evictable inode marks allow using this method for a large number of directories without the concern of pinning all inodes and exhausting the system's memory. -.PP +.P .I mask defines which events shall be listened for (or which shall be ignored). It is a bit mask composed of the following values: @@ -486,7 +486,7 @@ and are not generated for children of marked directories. To monitor complete directory trees it is necessary to mark the relevant mount or filesystem. -.PP +.P The following composed values are defined: .TP .B FAN_CLOSE @@ -496,7 +496,7 @@ A file is closed .B FAN_MOVE A file or directory has been moved .RB ( FAN_MOVED_FROM | FAN_MOVED_TO ). -.PP +.P The filesystem object to be marked is determined by the file descriptor .I dirfd and the pathname specified in @@ -743,10 +743,17 @@ do not specify a directory. .B EOPNOTSUPP The object indicated by .I pathname -is associated with a filesystem that does not support the encoding of file -handles. +is associated with a filesystem +that does not support the encoding of file handles. This error can be returned only with an fanotify group that identifies filesystem objects by file handles. +Calling +.BR name_to_handle_at (2) +with the flag +.BR AT_HANDLE_FID " (since Linux 6.5)" +.\" commit 96b2b072ee62be8ae68c8ecf14854c4d0505a8f8 +can be used as a test +to check if a filesystem supports reporting events with file handles. .TP .B EPERM The operation is not permitted because the caller lacks a required capability. @@ -784,28 +791,28 @@ or .BR uselib (2). Events of these types will not be raised in the situation where an interpreter is passed (or reads) a file for interpretation. -.PP +.P Additionally, if a mark has also been placed on the Linux dynamic linker, a user should also expect to receive an event for it when an ELF object has been successfully opened using .BR execve (2) or .BR execveat (2). -.PP +.P For example, if the following ELF binary were to be invoked and a .B FAN_OPEN_EXEC mark has been placed on /: -.PP +.P .in +4n .EX $ /bin/echo foo .EE .in -.PP +.P The listening application in this case would receive .B FAN_OPEN_EXEC events for both the ELF binary and interpreter, respectively: -.PP +.P .in +4n .EX /bin/echo |