Commit 66052a7
fanotify: call fanotify_events_supported() before path_permission() and security_path_notify()
The latter trigger LSM (e.g. SELinux) checks, which will log a denial
when permission is denied, so it's better to do them after validity
checks to avoid logging a denial when the operation would fail anyway.
Fixes: 0b3b094 ("fanotify: Disallow permission events for proc filesystem")
Signed-off-by: Ondrej Mosnacek <[email protected]>
Reviewed-by: Amir Goldstein <[email protected]>
Reviewed-by: Paul Moore <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jan Kara <[email protected]>1 parent 0d5ee33 commit 66052a7
1 file changed
Lines changed: 10 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1210 | 1210 | | |
1211 | 1211 | | |
1212 | 1212 | | |
| 1213 | + | |
1213 | 1214 | | |
1214 | 1215 | | |
1215 | 1216 | | |
| |||
1219 | 1220 | | |
1220 | 1221 | | |
1221 | 1222 | | |
1222 | | - | |
1223 | | - | |
1224 | 1223 | | |
1225 | | - | |
1226 | | - | |
1227 | | - | |
1228 | | - | |
1229 | | - | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
1235 | | - | |
1236 | | - | |
1237 | | - | |
1238 | 1224 | | |
1239 | 1225 | | |
1240 | 1226 | | |
| |||
2058 | 2044 | | |
2059 | 2045 | | |
2060 | 2046 | | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
2061 | 2056 | | |
2062 | 2057 | | |
2063 | 2058 | | |
| |||
0 commit comments