Paul Eggert [Mon, 2 May 2005 08:03:02 +0000 (08:03 +0000)]
* src/incremen.c (hash_directory): Likewise.
* src/names.c (hash_string_hasher): Likewise.
* src/tar.c (parse_opt): Set it, and adjust to new modechange API.
Paul Eggert [Mon, 18 Apr 2005 18:21:50 +0000 (18:21 +0000)]
* src/buffer.c (reading_from_pipe): Remove. All uses removed.
(short_read): Don't warn about short reads; they're normal.
* tests/shortrec.at: New file.
* tests/testsuite.at: Include it.
(diff_init): Read directory file if in listed
incremental. This prevents spurious 'Contents differ' diagnostics.
(diff_archive): Minor fixes to text messages
(diff_file,diff_dumpdir,diff_multivol): Assign orig_file_name
to save_name uniformly over the program. This fixes matching
directory names at the start of an archive volume.
(flush_write): Warn when the name of the archive
straddling volume boundary is longer than 100 characters. Earlier
behavior was to issue a fatal error.
(struct zip_magic): Reverted part of changes from 2005-04-04.
They make the maintenance too costly. Removing `unsigned'
qualifier from `magic' member should be enough.
Minor fixes to text messages. Proposed by Benno Schulenberg.
(extract_file): Assign orig_file_name
to save_name uniformly over the program. This fixes matching
directory names at the start of an archive volume.
Paul Eggert [Mon, 4 Apr 2005 18:21:55 +0000 (18:21 +0000)]
(struct zip_magic): Use char arrays, not pointers.
The unsigned char * pointer ran afoul of pedantic C compilers, and
we didn't need pointers anyway. Put the size field before the
data to avoid unnecessary padding. All uses changed.
(magic) Make it const, since it doesn't change. All uses changed.
Paul Eggert [Sat, 2 Apr 2005 06:39:19 +0000 (06:39 +0000)]
(decode_record): Don't dump core when given
a corrupted extended header. Problem reported by Jim Meyering.
Also, check for other ways that the header might be invalid,
e.g., missing newline at end. Do not allow keys with nulls.
Allow blanks before and after length, as POSIX requires.
Do not allow leading "-" in length. Check for length overflow.
(xheader_decode, xheader_decode_global): Let decode_record
check for exhaustion of record.
(xheader_read): Null-terminate the extended record;
decode_record relies on this.
Paul Eggert [Mon, 21 Mar 2005 21:56:02 +0000 (21:56 +0000)]
* bootstrap (TP_URL): Change from
<http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
<http://www.iro.umontreal.ca/translation/maint/tar/> to avoid
some redirection glitches.
Use "trap - 0" rather than "trap 0" to fix a POSIX-conformance bug.
* doc/.cvsignore: Change "tar.info" to "tar.info*". Sort.
(print_header): Print UID/GID in case of
empty user/group name. This could occur when dumping
files belonging to non-existing users and when listing
broken archives.
Reported by Igor Lautar.
(extract_file): Handle to_command_option
Fix error recovery: decrease `size' by `written', not
by `count', otherwise tar misses the next header
Do not diagnose write errror if to_command_option
is set, since the command may have exited prematurely.
It would be better to check for sigpipe, though.
(prepare_to_extract): Handle to_command_option
Paul Eggert [Fri, 4 Feb 2005 01:52:20 +0000 (01:52 +0000)]
(from_header): New arg OCTAL_ONLY, normally false.
All uses changed. Fix typo that sometimes suppressed all "Archive
contains obsolescent base-64 headers" warnings, not just the first
one.
(tar_checksum): Accept only octal checksums, since they aren't
supposed to overflow into weird formats.