]> git.ipfire.org Git - thirdparty/tar.git/commitdiff
xattrs: fix capabilities root test
authorPavel Raiskup <praiskup@redhat.com>
Mon, 8 Feb 2021 15:50:31 +0000 (17:50 +0200)
committerSergey Poznyakoff <gray@gnu.org>
Mon, 8 Feb 2021 15:50:31 +0000 (17:50 +0200)
Related discussion in the Fedora pull-request:
https://src.fedoraproject.org/rpms/tar/pull-request/8

* tests/capabs_raw01.at: Newer systems (currently e.g. Fedora 34)
print getcap output in format CAP=VAL, not CAP+VAL.

tests/capabs_raw01.at

index f9b9773663cf7a22779c70dc15b1847766bbcf1f..a1d941166565b19b2cb85727aba5e957bf963925 100644 (file)
@@ -44,10 +44,11 @@ rm -rf dir
 # restore _all_ xattrs (not just the user.* domain)
 tar --xattrs --xattrs-include='*' -xf archive.tar
 
-getcap dir/file
+# Newer systems print = instead of + here
+getcap dir/file | sed 's/+/=/'
 ],
 [0],
-[dir/file = cap_chown+ei
+[dir/file = cap_chown=ei
 ])
 
 AT_CLEANUP