1# Process this file with autom4te to create testsuite. -*- Autotest -*- 2 3# Test suite for GNU tar. 4# Copyright (C) 2006 Free Software Foundation, Inc. 5 6# This program is free software; you can redistribute it and/or modify 7# it under the terms of the GNU General Public License as published by 8# the Free Software Foundation; either version 2, or (at your option) 9# any later version. 10 11# This program is distributed in the hope that it will be useful, 12# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# GNU General Public License for more details. 15 16# You should have received a copy of the GNU General Public License 17# along with this program; if not, write to the Free Software 18# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19# 02110-1301, USA. 20 21# Description: The size field of a volume header was ignored when listing, 22# but taken into account when extracting. Thus it was possible to hide 23# some files within the archive, placing them after a volume header and 24# manually modifying its size field. Test tarball kindly provided by Tomas. 25# Reported by: Thomas <metaf4@users.askja.de> 26# References: <4462E13A.3080008@users.askja.de>, 27# <44639C4C.5050401@users.askja.de> 28 29AT_SETUP([volume header size]) 30AT_KEYWORDS([volume volsize]) 31 32AT_TAR_CHECK([ 33AT_SORT_PREREQ 34AT_TARBALL_PREREQ([abc.tar],[540f196ceddcad9e7bd2f2d7533d0474]) 35 36echo Short Listing 37tar tf $TEST_DATA_DIR/abc.tar 38echo Verbose Listing 39tar tfv $TEST_DATA_DIR/abc.tar 40echo Extracted directory 41tar xf $TEST_DATA_DIR/abc.tar 42find abc|sort 43], 44[0], 45[Short Listing 46abc/not-a-file.gif 47abc/CCC 48Verbose Listing 49V--------- 0/0 1536 2006-05-09 01:07 abc/not-a-file.gif--Volume Header-- 50-rw-r--r-- tom/users 0 2006-04-22 22:52 abc/CCC 51Extracted directory 52abc 53abc/CCC 54]) 55 56AT_CLEANUP 57 58# End of volsize.at 59 60 61