* Re: fsetxattr() fails on a writable descriptor? [not found] ` <4AA6402D.8040209@draigBrady.com> @ 2009-09-08 18:40 ` Christoph Hellwig 2009-09-09 21:23 ` Pádraig Brady 0 siblings, 1 reply; 2+ messages in thread From: Christoph Hellwig @ 2009-09-08 18:40 UTC (permalink / raw) To: P??draig Brady; +Cc: xfs, CoreutilsBugs, linux-fsdevel 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. ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: fsetxattr() fails on a writable descriptor? 2009-09-08 18:40 ` fsetxattr() fails on a writable descriptor? Christoph Hellwig @ 2009-09-09 21:23 ` Pádraig Brady 0 siblings, 0 replies; 2+ messages in thread From: Pádraig Brady @ 2009-09-09 21:23 UTC (permalink / raw) To: Christoph Hellwig; +Cc: linux-fsdevel, CoreutilsBugs, xfs 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. ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-09 21:23 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1251987642.3855.36.camel@dhcp-lab-219.englab.brq.redhat.com> [not found] ` <4AA1A3E6.2020606@draigBrady.com> [not found] ` <87k50den1e.fsf@meyering.net> [not found] ` <1252309787.3852.8.camel@dhcp-lab-219.englab.brq.redhat.com> [not found] ` <4AA4C950.3080303@draigBrady.com> [not found] ` <1252318482.3852.18.camel@dhcp-lab-219.englab.brq.redhat.com> [not found] ` <4AA6402D.8040209@draigBrady.com> 2009-09-08 18:40 ` fsetxattr() fails on a writable descriptor? Christoph Hellwig 2009-09-09 21:23 ` Pádraig Brady
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).