Darrick J. Wong eba0549bc7 xfs: don't generate selinux audit messages for capability testing
There are a few places where we test the current process' capability set
to decide if we're going to be more or less generous with resource
acquisition for a system call.  If the process doesn't have the
capability, we can continue the call, albeit in a degraded mode.

These are /not/ the actual security decisions, so it's not proper to use
capable(), which (in certain selinux setups) causes audit messages to
get logged.  Switch them to has_capability_noaudit.

Fixes: 7317a03df703f ("xfs: refactor inode ownership change transaction/inode/quota allocation idiom")
Fixes: ea9a46e1c4925 ("xfs: only return detailed fsmap info if the caller has CAP_SYS_ADMIN")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Cc: Dave Chinner <david@fromorbit.com>
Reviewed-by: Ondrej Mosnacek <omosnace@redhat.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
2022-03-09 10:32:06 -08:00
..
2022-01-15 16:30:29 +02:00
2021-10-22 16:00:31 -07:00
2021-09-02 09:21:27 -07:00
2021-06-21 10:05:51 -07:00
2022-01-22 11:04:27 +02:00
2022-01-11 14:26:55 -08:00
2021-12-04 08:58:53 -08:00
2021-12-03 18:50:17 +01:00
2021-10-14 09:19:33 -07:00
2021-10-22 16:04:20 -07:00
2022-02-26 09:53:19 -08:00
2021-06-21 10:05:46 -07:00
2022-01-11 15:01:50 -08:00
2021-08-19 10:07:14 -07:00