--- tar-1.15.1/src/extract.c.orig 2006-11-28 15:40:10 +0000 +++ tar-1.15.1/src/extract.c 2006-11-28 16:10:57 +0000 @@ -1101,7 +1101,14 @@ extract_archive (void) break; case GNUTYPE_NAMES: - extract_mangle (); + if (allow_name_mangling_option) + extract_mangle (); + else { + ERROR ((0, 0, "%s", _("GNUTYPE_NAMES mangling ignored"))); + skip_member (); + if (backup_option) + undo_last_backup (); + } break; case GNUTYPE_MULTIVOL: --- tar-1.15.1/src/tar.c.orig 2006-11-28 15:40:12 +0000 +++ tar-1.15.1/src/tar.c 2006-11-28 16:19:52 +0000 @@ -181,6 +181,7 @@ assert_format(unsigned fmt_mask) enum { ANCHORED_OPTION = CHAR_MAX + 1, + ALLOW_NAME_MANGLING_OPTION, ATIME_PRESERVE_OPTION, BACKUP_OPTION, CHECKPOINT_OPTION, @@ -528,6 +529,8 @@ static struct argp_option options[] = { {NULL, 'o', 0, 0, N_("when creating, same as --old-archive. When extracting, same as --no-same-owner"), 91 }, + {"allow-name-mangling", ALLOW_NAME_MANGLING_OPTION, 0, 0, + N_("when creating, allow GNUTYPE_NAMES mangling -- considered dangerous"), 91 }, {NULL, 0, NULL, 0, N_("Other options:"), 100 }, @@ -909,6 +912,10 @@ parse_opt(int key, char *arg, struct arg set_use_compress_program_option ("compress"); break; + case ALLOW_NAME_MANGLING_OPTION: + allow_name_mangling_option = true; + break; + case ANCHORED_OPTION: args->exclude_options |= EXCLUDE_ANCHORED; break; --- tar-1.15.1/src/common.h.orig 2006-11-28 15:40:10 +0000 +++ tar-1.15.1/src/common.h 2006-11-28 15:40:12 +0000 @@ -124,6 +124,9 @@ GLOBAL size_t record_size; GLOBAL bool absolute_names_option; +/* Allow GNUTYPE_NAMES type? */ +GLOBAL bool allow_name_mangling_option; + /* Display file times in UTC */ GLOBAL bool utc_option;