forked from josch/mmdebstrap
coverage.sh: check that xattrs are set in the original tarball
This commit is contained in:
parent
7ec0e1b4e1
commit
8c467584f6
1 changed files with 9 additions and 0 deletions
|
@ -530,6 +530,15 @@ sysctl -w kernel.unprivileged_userns_clone=1
|
|||
# identical to a round trip through "taridshift X" and "taridshift -X"
|
||||
runuser -u user -- $CMD --mode=unshare --variant=apt --include=iputils-ping $DEFAULT_DIST - $mirror \
|
||||
| ./taridshift 0 > /tmp/debian-chroot.tar
|
||||
# make sure that xattrs are set in the original tarball
|
||||
mkdir /tmp/debian-chroot
|
||||
tar --xattrs --xattrs-include='*' --directory /tmp/debian-chroot -xf /tmp/debian-chroot.tar ./bin/ping
|
||||
echo "/tmp/debian-chroot/bin/ping cap_net_raw=ep" > expected
|
||||
getcap /tmp/debian-chroot/bin/ping | diff -u expected -
|
||||
rm /tmp/debian-chroot/bin/ping
|
||||
rmdir /tmp/debian-chroot/bin
|
||||
rmdir /tmp/debian-chroot
|
||||
# shift the uid/gid forward by 100000 and backward by 100000
|
||||
./taridshift 100000 < /tmp/debian-chroot.tar > /tmp/debian-chroot-shifted.tar
|
||||
./taridshift -100000 < /tmp/debian-chroot-shifted.tar > /tmp/debian-chroot-shiftedback.tar
|
||||
# the tarball before and after the roundtrip through taridshift should be bit
|
||||
|
|
Loading…
Reference in a new issue