[PATCH] afs: Fix afs_listxattr() to not list afs ACL special xattrs
Gaja Sophie Peters
gaja.peters at math.uni-hamburg.de
Wed Mar 10 08:28:17 GMT 2021
Am 09.03.21 um 22:42 schrieb David Howells:
> Gaja Sophie Peters <gaja.peters at math.uni-hamburg.de> wrote:
>
>>> Fix afs_listxattr() so that it doesn't list any of the AFS ACL xattrs. It
>>> does mean, however, that getfattr won't list them, though they can still be
>>> accessed with getxattr() and setxattr().
>> This seems by far the cleanest and most simple solution. I tested it now
>> and it works for me in all four (six) cases correctly with getxattr and
>> listxattr.
>
> Can I put that down as a Tested-by?
Yes, I guess so - it wasn't a particularly formal or scripted test, but
everything worked now that wasn't working for me before, and I couldn't
think of anything to not make it work.
The "test-environment" was Kernel 5.11.3 (from kernel.org) with patches
from both
http://lists.infradead.org/pipermail/linux-afs/2021-March/003501.html
http://lists.infradead.org/pipermail/linux-afs/2021-March/003524.html
(no other patches)
[Offtopic]
>> P.S. I found possibly also why adding the line "afs.* skip" to the file
>> "/etc/xattr.conf" didn't change anything a few days ago: when looking
>> with strace at the above cp command, it looks for "/usr/etc/xattr.conf",
>> but that file doesn't exist of course. Once I copy /etc/xattr.conf to
>> /usr/etc/xattr.conf, cp --preseve=xattr doesn't give any error-messages
>> any more. Bug in cp? or in some library? anyways, it's not kafs.
>
> You're using Ubuntu, right? It may put the file in a different place. Fedora
> has:
>
> [root at andromeda ~]# rpm -ql libattr
> /etc/xattr.conf
> ...
Same in Ubuntu (20.04).
$ dpkg -L libattr1
/etc/xattr.conf
...
It's not the xattr.conf that's in the wrong place, it was cp *looking*
for it in the wrong place. (which isn't a bug in cp/coreutils, but in
libattr, or the way Ubuntu makes the packages from it)
Some random "greps" in the Ubuntu-source-code for "attr":
debian/rules: --prefix=/usr \
debian/libattr1.install:usr/etc/xattr.conf etc
configure:ac_default_prefix=/usr
sysconfdir='${prefix}/etc'
-DSYSCONFDIR=\"$(sysconfdir)\"
#define ATTR_CONF SYSCONFDIR "/xattr.conf"
All that combined means the file is placed in /etc/xattr.conf, but the
rest of the source-code expects it in /usr/etc/xattr.conf
> Also what version of libattr do you have installed? I have 2.4.48.
2.4.48-5
> That said, the change that you can see here:
>
> https://git.savannah.nongnu.org/cgit/attr.git/log/
>
> with subject "xattr.conf: Indicate afs metadata xattrs should be skipped when
> copying" hasn't been released yet. I'll ask Andreas about that.
I know, I added the line manually.
Greetings,
Gaja
--
+----------
| IT-Gruppe, Systemadministration
| Universität Hamburg, Fachbereich Mathematik
| Bundesstr. 55 (Geomatikum)
| Raum 212; Tel. 42838-5175
+----------
More information about the linux-afs
mailing list