xfs
[Top] [All Lists]

Re: Inconsistencies with trusted.SGI_ACL_{FILE,DEFAULT}

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: Inconsistencies with trusted.SGI_ACL_{FILE,DEFAULT}
From: Andreas Gruenbacher <agruenba@xxxxxxxxxx>
Date: Tue, 27 Oct 2015 11:56:46 +0100
Cc: Brian Foster <bfoster@xxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat_com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=uqCKxTcTRId9qkexPHgK1CoH4W4/xymTV8vTyQ9hQiY=; b=r3Qxm5b8ihOOvzMU6HBtc8l9hRz5gIjpTFqqdIaJFZ7By9IesadWzcY4hsY+SRs/DF xz9tUfv871IgD6E60bwRwBkSD0qY6xg7ZaoD3mJ8a9WCwxE9pkFTQNKerAnSX/zT2NeF jAoCk/PRpvA419f8TkbA3QRgdf5FAMHuzlF8Kfbj6hZkn0tqn/pFPZEZG0/9nbje2hnk E4UYpIURcpLNskKY5a2Rcft9+EJf6Hphjp83IHcCD86mfFLUaJZwxzsXUoMZmp63PZMc Qfbf7XJz7x082cSLvCaD5E/+R+66/L6ZDmPMfV1FD7ZIz+FTC1QZThK5Q9eZ57HQj4ib +ThQ==
In-reply-to: <20151027053045.GL8773@dastard>
References: <CAHc6FU5gS4BA+iTRHo1oHJMVHkLs4aa0eYd5T1ftLC9biRaxrg@xxxxxxxxxxxxxx> <20151024125659.GA8095@xxxxxxxxxxxxxxx> <CAHc6FU6eVn=KpKvhD2N8hvAgdFQVdBHHS9tUgaVQJf5wnipY=g@xxxxxxxxxxxxxx> <20151024152254.GA22232@xxxxxxxxxxxxxxx> <20151026213228.GI8773@dastard> <CAHc6FU68MYTGWKM5S14_dQBqXeebd2GwQcKj4RztLvPWL2eksA@xxxxxxxxxxxxxx> <20151027053045.GL8773@dastard>
On Tue, Oct 27, 2015 at 6:30 AM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
> On Tue, Oct 27, 2015 at 12:52:10AM +0100, Andreas Gruenbacher wrote:
>> On Mon, Oct 26, 2015 at 10:32 PM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
>> > Really, I'm struggling to understand what the problem is with XFS
>> > doing translation to it's own special xattr names for ACLs
>> > underneath the posix layer.
>>
>> Right now, setting one of the SGI_ACL attributes leads to stale i_acl
>> / i_default_acl fields and in the case of SGI_ACL_FILE, possibly to
>> outdated permissions in i_mode. You would get different information
>> from getfacl than what's stored on disk.
>
> That's because we're not marking the cached acl as stale when
> setting the acl directly...
>
>> > Yes, there's a caching issue when someone directly manipulates
>> > the underlying xattr,
>>
>> "Directly manipulating" could be doing a setxattr of an attribute that
>> was previously retrieved by getxattr, like restoring a backup.
>
> Sure, that's what xfsdump/restore effectively does.
>
>> > but you need root to shoot yourself in the foot that way, and that is 
>> > easily
>> > solveable.
>>
>> What do you mean, it's easily solvable?
>
> forget_all_cached_acls()

Brian has already suggested that in this thread. Still leaves the
i_mode permission bits stale and is broken wrt. uid/gid namespaces.

Andreas

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