[PATCH v3 1/5] xfs: fix capability check in xfs
Christoph Hellwig
hch at lst.de
Thu Jul 2 11:24:38 UTC 2026
On Thu, Jul 02, 2026 at 01:17:29PM +0200, Carlos Maiolino wrote:
> On Thu, Jul 02, 2026 at 12:30:52PM +0200, Christoph Hellwig wrote:
> > On Thu, Jul 02, 2026 at 11:33:17AM +0200, cem at kernel.org wrote:
> > > index 6339f4956ecb..205fe2dae732 100644
> > > --- a/fs/xfs/xfs_iops.c
> > > +++ b/fs/xfs/xfs_iops.c
> > > @@ -835,7 +835,8 @@ xfs_setattr_nonsize(
> > > }
> > >
> > > error = xfs_trans_alloc_ichange(ip, udqp, gdqp, NULL,
> > > - has_capability_noaudit(current, CAP_FOWNER), &tp);
> > > + ns_capable_noaudit(&init_user_ns, CAP_FOWNER),
> >
>
> Thanks, I tried to keep the parameters aligned, but I can bring it one
> tab back. Do you mind if I fix it at commit time if -unlikely- no other
> change is required?
>
> This is what it will look like:
>
> error = xfs_trans_alloc_ichange(ip, udqp, gdqp, NULL,
> - has_capability_noaudit(current, CAP_FOWNER), &tp);
> + ns_capable_noaudit(&init_user_ns, CAP_FOWNER),
> + &tp);
This still adds an extra tab. Like much (but not all) of the kernel
we use two-tabs by default, which is also in the other two hinks. This
now adds a third. Just keep it as it was:
error = xfs_trans_alloc_ichange(ip, udqp, gdqp, NULL,
ns_capable_noaudit(&init_user_ns, CAP_FOWNER), &tp);
More information about the Linux-security-module-archive
mailing list