diff options
author | Connor Behan <connor.behan@gmail.com> | 2014-01-27 14:42:09 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-01-27 14:42:09 +0200 |
commit | 2af87fa2776c8125a587a9b0c2c4fae3bf921ff7 (patch) | |
tree | bf40d41788020b4ba5696fb8edb733c439940c69 /NEWS | |
parent | 95a51b93d0d22d3a037cd6f303cca68a2d6c66dd (diff) | |
download | tar-2af87fa2776c8125a587a9b0c2c4fae3bf921ff7.tar.gz |
Detect tarbombs while extracting
* src/common.h (one_top_level_option): New global.
(one_top_level): New global.
* src/extract.c (extr_init): If one_top_level_option is set, determine
the name one_top_level that might have to be prepended.
(extract_archive): If one_top_level_option is set, prepend one_top_level
to all names that don't already start with it.
* src/tar.c (ONE_TOP_LEVEL_OPTION): New contant.
(options): New option --one-top-level.
(parse_opt): Handle this option.
(decode_options): Make it conflict with --absolute-names.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -42,6 +42,14 @@ version 1.27.1 - Sergey Poznyakoff, 2013-11-17 * Fix extracting sparse members from star archives. +* The --one-top-level option. + +This new command line option tells tar that the working directory +(or the one passed to -C) should not be populated with more than one +name directly under it. Instead, a newly created subdirectory is +used whose name is equal to the archive name without the extension. +For example, foo.tar.gz would be extracted to foo. + version 1.27 - Sergey Poznyakoff, 2013-10-05 |