[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fsetxattr() fails on a writable descriptor?
From: |
Pádraig Brady |
Subject: |
Re: fsetxattr() fails on a writable descriptor? |
Date: |
Wed, 09 Sep 2009 22:23:39 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
Christoph Hellwig wrote:
> 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.
Sorry if you get this twice. Resending using another server...
Thanks for this info Christoph.
http://lxr.linux.no/#linux+v2.6.30.5/fs/xattr.c
The specific issue we have is that `cp --preserve=xattr` gets an
error when copying xattrs from a read only file. Since this has been
an xattr issue since the start, we'll have to work around it.
We'll probably temporarily set u+w on the new file to apply xattrs.
cheers,
Pádraig.
- Re: [PATCH] cp, mv: do preserve extended attributes even for read-only source files, (continued)
- Re: [PATCH] cp, mv: do preserve extended attributes even for read-only source files, Ondřej Vašík, 2009/09/14
- Re: [PATCH] cp, mv: do preserve extended attributes even for read-only source files, Pádraig Brady, 2009/09/14
- Re: [PATCH] cp, mv: do preserve extended attributes even for read-only source files, Jim Meyering, 2009/09/14
- Re: [PATCH] cp, mv: do preserve extended attributes even for read-only source files, Ondřej Vašík, 2009/09/15
- Re: [PATCH] cp, mv: do preserve extended attributes even for read-only source files, Jim Meyering, 2009/09/15
- Re: [PATCH] cp, mv: do preserve extended attributes even for read-only source files, Ondřej Vašík, 2009/09/15
- Re: [PATCH] cp, mv: do preserve extended attributes even for read-only source files, Jim Meyering, 2009/09/15
- Re: [PATCH] cp, mv: do preserve extended attributes even for read-only source files, Pádraig Brady, 2009/09/15
- fsetxattr() fails on a writable descriptor?, Pádraig Brady, 2009/09/08
- Re: fsetxattr() fails on a writable descriptor?, Christoph Hellwig, 2009/09/08
- Re: fsetxattr() fails on a writable descriptor?,
Pádraig Brady <=
- Re: [PATCH] cp, mv: do preserve extended attributes even for read-only source files, Jim Meyering, 2009/09/07