GNU bug report logs - #33644
[PATCH] cp --preserve=xattr: preserve NFSv4 ACL extended attributes

Previous Next

Package: coreutils;

Reported by: Kamil Dudka <kdudka <at> redhat.com>

Date: Thu, 6 Dec 2018 13:09:02 UTC

Severity: normal

Tags: notabug, patch

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kamil Dudka <kdudka <at> redhat.com>
To: Pádraig Brady <P <at> draigbrady.com>
Cc: 33644 <at> debbugs.gnu.org
Subject: bug#33644: [PATCH] cp --preserve=xattr: preserve NFSv4 ACL extended attributes
Date: Tue, 12 Feb 2019 13:03:34 +0100
On Monday, February 11, 2019 7:30:42 PM CET Pádraig Brady wrote:
> On 11/02/19 03:50, Kamil Dudka wrote:
> > I think that the information in xattr.conf is correct.  system.nfs4_acl is
> > really an attribute one wants to copy when trying to preserve permissions.
> 
> Right. What I was getting at was attr_copy_file() from libattr seems
> to skip all entries in xattr.conf by default. I need to dig in to
> see what's preserving system.posix_acl_access (these might be
> implicitly generated upon attr reading for example).

I do not know the reasoning behind the default behavior of attr_copy_file().
There is a comment before the function definition but it does not talk about
NFSv4 ACLs:

http://git.savannah.nongnu.org/cgit/attr.git/tree/libattr/attr_copy_file.c?id=cb4786f1#n54

> My question was why does coreutils need to explicitly handle
> the nfs4 acls if it doesn't need to handle the posix ones.

I think the answer is obvious.  cp is able preserve POSIX ACLs at a higher
level (using gnulib's acl module, which uses libacl internally on Linux).
There is, unfortunately, no such module (neither library) for NFSv4 ACLs.
So copying the value of the low-level attribute is currently the only way
to make cp preserve NFSv4 ACLs.

Kamil






This bug report was last modified 6 years and 159 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.