Skip to contentSkip to conversation

fanotify: Document FAN_AUDIT flag

PATCH In review Jan Kara 4 participants 6 messages Dec 2, 2020 – Jan 4, 2021 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

PATCH 1/1 fanotify: Document FAN_AUDIT flag

Document FAN_AUDIT and related FAN_ENABLE_AUDIT flags.

---
 man2/fanotify_init.2 | 7 +++++++
 man7/fanotify.7      | 9 ++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

OK, here's my attempt to document the FAN_AUDIT flag. It would be nice if Steve glanced over it from the audit side to check things are sane.

man2/fanotify_init.2 +7 -0
index ca03b11dc98a..6becc7a680db 100644
@@ -155,6 +155,13 @@ supplied to
 (see
 .BR fanotify (7)).
 .TP
+.BR FAN_ENABLE_AUDIT " (since Linux 4.15)"
+.\" commit de8cd83e91bc3ee212b3e6ec6e4283af9e4ab269
+Enable generation of audit log records about access mediation performed by
+permission events. The permission event response has to be marked with
+.B FAN_AUDIT
+flag for audit log record to be generated.
+.TP
 .BR FAN_REPORT_FID " (since Linux 5.1)"
 .\" commit a8b13aa20afb69161b5123b4f1acc7ea0a03d360
 This value allows the receipt of events which contain additional information
man7/fanotify.7 +8 -1
index 5804a1f30d6c..b5f096304cf4 100644
@@ -588,7 +588,14 @@ to deny the file operation.
 .PP
 If access is denied, the requesting application call will receive an
 .BR EPERM
-error.
+error. Additionally, if the notification group has been created with
+.B FAN_ENABLE_AUDIT
+flag,
+.B FAN_AUDIT
+flag can be set in the
+.I response
+field. In that case audit subsystem will log information about the access
+decision to the audit logs.
 .\"
 .SS Closing the fanotify file descriptor
 When all file descriptors referring to the fanotify notification group are
Signature · 1 line
2.16.4
#1 lore raw

Hi Jan,

Please break lines at significant points, instead of just when it wraps at the right margin; as I did in this little paragraph.

See man-pages(7)::STYLE GUIDE::Use semantic newlines

Thanks,

Alex

Quoted 50 lines · Jan Kara

Document FAN_AUDIT and related FAN_ENABLE_AUDIT flags.

---
 man2/fanotify_init.2 | 7 +++++++
 man7/fanotify.7      | 9 ++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

OK, here's my attempt to document the FAN_AUDIT flag. It would be nice if Steve glanced over it from the audit side to check things are sane.

man2/fanotify_init.2 +7 -0
index ca03b11dc98a..6becc7a680db 100644
@@ -155,6 +155,13 @@ supplied to
 (see
 .BR fanotify (7)).
 .TP
+.BR FAN_ENABLE_AUDIT " (since Linux 4.15)"
+.\" commit de8cd83e91bc3ee212b3e6ec6e4283af9e4ab269
+Enable generation of audit log records about access mediation performed by
+permission events. The permission event response has to be marked with
+.B FAN_AUDIT
+flag for audit log record to be generated.
+.TP
 .BR FAN_REPORT_FID " (since Linux 5.1)"
 .\" commit a8b13aa20afb69161b5123b4f1acc7ea0a03d360
 This value allows the receipt of events which contain additional information
man7/fanotify.7 +8 -1
index 5804a1f30d6c..b5f096304cf4 100644
@@ -588,7 +588,14 @@ to deny the file operation.
 .PP
 If access is denied, the requesting application call will receive an
 .BR EPERM
-error.
+error. Additionally, if the notification group has been created with
+.B FAN_ENABLE_AUDIT
+flag,
+.B FAN_AUDIT
+flag can be set in the
+.I response
+field. In that case audit subsystem will log information about the access
+decision to the audit logs.
 .\"
 .SS Closing the fanotify file descriptor
 When all file descriptors referring to the fanotify notification group are
author
#2 lore raw

Hi!

Quoted 5 lines · Alejandro Colomar (man-pages)

Please break lines at significant points, instead of just when it wraps at the right margin; as I did in this little paragraph.

See man-pages(7)::STYLE GUIDE::Use semantic newlines

OK, I'll do that for the submission of the next patch version.

Honza

Quoted 51 lines · Jan Kara
Quoted 50 lines

Document FAN_AUDIT and related FAN_ENABLE_AUDIT flags.

---
 man2/fanotify_init.2 | 7 +++++++
 man7/fanotify.7      | 9 ++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

OK, here's my attempt to document the FAN_AUDIT flag. It would be nice if Steve glanced over it from the audit side to check things are sane.

man2/fanotify_init.2 +7 -0
index ca03b11dc98a..6becc7a680db 100644
@@ -155,6 +155,13 @@ supplied to
 (see
 .BR fanotify (7)).
 .TP
+.BR FAN_ENABLE_AUDIT " (since Linux 4.15)"
+.\" commit de8cd83e91bc3ee212b3e6ec6e4283af9e4ab269
+Enable generation of audit log records about access mediation performed by
+permission events. The permission event response has to be marked with
+.B FAN_AUDIT
+flag for audit log record to be generated.
+.TP
 .BR FAN_REPORT_FID " (since Linux 5.1)"
 .\" commit a8b13aa20afb69161b5123b4f1acc7ea0a03d360
 This value allows the receipt of events which contain additional information
man7/fanotify.7 +8 -1
index 5804a1f30d6c..b5f096304cf4 100644
@@ -588,7 +588,14 @@ to deny the file operation.
 .PP
 If access is denied, the requesting application call will receive an
 .BR EPERM
-error.
+error. Additionally, if the notification group has been created with
+.B FAN_ENABLE_AUDIT
+flag,
+.B FAN_AUDIT
+flag can be set in the
+.I response
+field. In that case audit subsystem will log information about the access
+decision to the audit logs.
 .\"
 .SS Closing the fanotify file descriptor
 When all file descriptors referring to the fanotify notification group are
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#3 lore raw

Ping: [PATCH] fanotify: Document FAN_AUDIT flag

Hi Honza,

Linux 5.10 has been recently released.
Do you have any updates for this patch?

Thanks,

Alex

Quoted 64 lines · Jan Kara

Hi!

Quoted 5 lines · Alejandro Colomar (man-pages)

Please break lines at significant points, instead of just when it wraps at the right margin; as I did in this little paragraph.

See man-pages(7)::STYLE GUIDE::Use semantic newlines

OK, I'll do that for the submission of the next patch version.

Honza

Quoted 51 lines · Jan Kara
Quoted 50 lines

Document FAN_AUDIT and related FAN_ENABLE_AUDIT flags.

---
 man2/fanotify_init.2 | 7 +++++++
 man7/fanotify.7      | 9 ++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

OK, here's my attempt to document the FAN_AUDIT flag. It would be nice if Steve glanced over it from the audit side to check things are sane.

man2/fanotify_init.2 +7 -0
index ca03b11dc98a..6becc7a680db 100644
@@ -155,6 +155,13 @@ supplied to
 (see
 .BR fanotify (7)).
 .TP
+.BR FAN_ENABLE_AUDIT " (since Linux 4.15)"
+.\" commit de8cd83e91bc3ee212b3e6ec6e4283af9e4ab269
+Enable generation of audit log records about access mediation performed by
+permission events. The permission event response has to be marked with
+.B FAN_AUDIT
+flag for audit log record to be generated.
+.TP
 .BR FAN_REPORT_FID " (since Linux 5.1)"
 .\" commit a8b13aa20afb69161b5123b4f1acc7ea0a03d360
 This value allows the receipt of events which contain additional information
man7/fanotify.7 +8 -1
index 5804a1f30d6c..b5f096304cf4 100644
@@ -588,7 +588,14 @@ to deny the file operation.
 .PP
 If access is denied, the requesting application call will receive an
 .BR EPERM
-error.
+error. Additionally, if the notification group has been created with
+.B FAN_ENABLE_AUDIT
+flag,
+.B FAN_AUDIT
+flag can be set in the
+.I response
+field. In that case audit subsystem will log information about the access
+decision to the audit logs.
 .\"
 .SS Closing the fanotify file descriptor
 When all file descriptors referring to the fanotify notification group are
Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
Acked-by on v1 1/1
#4 lore raw
In reply to Jan Kara
Quoted 3 lines · EST Jan Kara

Document FAN_AUDIT and related FAN_ENABLE_AUDIT flags.

Looks good. Sorry about the delay.

Quoted 46 lines
---
 man2/fanotify_init.2 | 7 +++++++
 man7/fanotify.7      | 9 ++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

OK, here's my attempt to document the FAN_AUDIT flag. It would be nice if Steve glanced over it from the audit side to check things are sane.

man2/fanotify_init.2 +7 -0
index ca03b11dc98a..6becc7a680db 100644
@@ -155,6 +155,13 @@ supplied to
 (see
 .BR fanotify (7)).
 .TP
+.BR FAN_ENABLE_AUDIT " (since Linux 4.15)"
+.\" commit de8cd83e91bc3ee212b3e6ec6e4283af9e4ab269
+Enable generation of audit log records about access mediation performed by
+permission events. The permission event response has to be marked with
+.B FAN_AUDIT
+flag for audit log record to be generated.
+.TP
 .BR FAN_REPORT_FID " (since Linux 5.1)"
 .\" commit a8b13aa20afb69161b5123b4f1acc7ea0a03d360
 This value allows the receipt of events which contain additional

information diff --git a/man7/fanotify.7 b/man7/fanotify.7 index 5804a1f30d6c..b5f096304cf4 100644

man7/fanotify.7 +8 -1
@@ -588,7 +588,14 @@ to deny the file operation.
 .PP
 If access is denied, the requesting application call will receive an
 .BR EPERM
-error.
+error. Additionally, if the notification group has been created with
+.B FAN_ENABLE_AUDIT
+flag,
+.B FAN_AUDIT
+flag can be set in the
+.I response
+field. In that case audit subsystem will log information about the access
+decision to the audit logs.
 .\"
 .SS Closing the fanotify file descriptor
 When all file descriptors referring to the fanotify notification group are
#5 lore raw
In reply to Jan Kara
Quoted 3 lines · Jan Kara

Document FAN_AUDIT and related FAN_ENABLE_AUDIT flags.

Thanks, Jan. Applied with Steve's Acked-by

Cheers,

Michael

Quoted 47 lines
---
 man2/fanotify_init.2 | 7 +++++++
 man7/fanotify.7      | 9 ++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

OK, here's my attempt to document the FAN_AUDIT flag. It would be nice if Steve glanced over it from the audit side to check things are sane.

man2/fanotify_init.2 +7 -0
index ca03b11dc98a..6becc7a680db 100644
@@ -155,6 +155,13 @@ supplied to
 (see
 .BR fanotify (7)).
 .TP
+.BR FAN_ENABLE_AUDIT " (since Linux 4.15)"
+.\" commit de8cd83e91bc3ee212b3e6ec6e4283af9e4ab269
+Enable generation of audit log records about access mediation performed by
+permission events. The permission event response has to be marked with
+.B FAN_AUDIT
+flag for audit log record to be generated.
+.TP
 .BR FAN_REPORT_FID " (since Linux 5.1)"
 .\" commit a8b13aa20afb69161b5123b4f1acc7ea0a03d360
 This value allows the receipt of events which contain additional information
man7/fanotify.7 +8 -1
index 5804a1f30d6c..b5f096304cf4 100644
@@ -588,7 +588,14 @@ to deny the file operation.
 .PP
 If access is denied, the requesting application call will receive an
 .BR EPERM
-error.
+error. Additionally, if the notification group has been created with
+.B FAN_ENABLE_AUDIT
+flag,
+.B FAN_AUDIT
+flag can be set in the
+.I response
+field. In that case audit subsystem will log information about the access
+decision to the audit logs.
 .\"
 .SS Closing the fanotify file descriptor
 When all file descriptors referring to the fanotify notification group are
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/