From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: fsetxattr() fails on a writable descriptor? Date: Tue, 8 Sep 2009 14:40:49 -0400 Message-ID: <20090908184049.GA22050@infradead.org> References: <1251987642.3855.36.camel@dhcp-lab-219.englab.brq.redhat.com> <4AA1A3E6.2020606@draigBrady.com> <87k50den1e.fsf@meyering.net> <1252309787.3852.8.camel@dhcp-lab-219.englab.brq.redhat.com> <4AA4C950.3080303@draigBrady.com> <1252318482.3852.18.camel@dhcp-lab-219.englab.brq.redhat.com> <4AA6402D.8040209@draigBrady.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: xfs@oss.sgi.com, CoreutilsBugs , linux-fsdevel@vger.kernel.org To: P??draig Brady Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:45614 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752164AbZIHSkv (ORCPT ); Tue, 8 Sep 2009 14:40:51 -0400 Content-Disposition: inline In-Reply-To: <4AA6402D.8040209@draigBrady.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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.