volsize.at 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2006-2009, 2013-2014, 2016-2017 Free Software Foundation,
  4. # Inc.
  5. # This file is part of GNU tar.
  6. # GNU tar 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 3 of the License, or
  9. # (at your option) any later version.
  10. # GNU tar is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. # Description: The size field of a volume header was ignored when listing,
  17. # but taken into account when extracting. Thus it was possible to hide
  18. # some files within the archive, placing them after a volume header and
  19. # manually modifying its size field. Test tarball kindly provided by Tomas.
  20. # Reported by: Thomas <[email protected]>
  21. # References: <[email protected]>,
  22. # <[email protected]>
  23. AT_SETUP([volume header size])
  24. AT_KEYWORDS([volume volsize])
  25. AT_TAR_CHECK([
  26. AT_SORT_PREREQ
  27. AT_TARBALL_PREREQ([abc.tar],[540f196ceddcad9e7bd2f2d7533d0474])
  28. echo Short Listing
  29. tar tf $TEST_DATA_DIR/abc.tar
  30. echo Verbose Listing
  31. tar --utc -tvf $TEST_DATA_DIR/abc.tar
  32. echo Extracted directory
  33. tar xf $TEST_DATA_DIR/abc.tar
  34. find abc|sort
  35. ],
  36. [0],
  37. [Short Listing
  38. abc/not-a-file.gif
  39. abc/CCC
  40. Verbose Listing
  41. V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
  42. -rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC
  43. Extracted directory
  44. abc
  45. abc/CCC
  46. ],
  47. [])
  48. AT_CLEANUP
  49. # End of volsize.at