xfs
[Top] [All Lists]

Re: fsetxattr() fails on a writable descriptor?

To: P??draig Brady <P@xxxxxxxxxxxxxx>
Subject: Re: fsetxattr() fails on a writable descriptor?
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 8 Sep 2009 14:40:49 -0400
Cc: xfs@xxxxxxxxxxx, CoreutilsBugs <bug-coreutils@xxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx
In-reply-to: <4AA6402D.8040209@xxxxxxxxxxxxxx>
References: <1251987642.3855.36.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4AA1A3E6.2020606@xxxxxxxxxxxxxx> <87k50den1e.fsf@xxxxxxxxxxxx> <1252309787.3852.8.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4AA4C950.3080303@xxxxxxxxxxxxxx> <1252318482.3852.18.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4AA6402D.8040209@xxxxxxxxxxxxxx>
User-agent: Mutt/1.5.19 (2009-01-05)
On Tue, Sep 08, 2009 at 12:29:49PM +0100, P??draig Brady wrote:
> fsetxattr() is failing for me when the permissions are readonly
> but the descriptor is writable as demonstrated by the program below.
> I've tried this on ext3 and ext4 with libattr-2.4.43-3.fc11.i586
> and linux-2.6.30.5-43.fc11.i586

That's not XFS specifci behaviour.  For all xattr operations, fd-based
or not we always do the full permission checks, and have done so since
day one.  Check the routined xattr_permission in fs/xattr.c of the
kernel tree.  It seems a bit unusual, but I'm not sure changing it now
is a good idea - the xattr support has been around for a long time.

<Prev in Thread] Current Thread [Next in Thread>