Age | Commit message (Collapse) | Author | Files |
|
* NEWS: Describe new version.
* configure.ac: version 2.13
* src/copyin.c: Fix strict aliasing violation.
* tests/CVE-2019-14866.at: New file.
* tests/Makefile.am: Add new test.
* tests/testsuite.at: Add new test,
|
|
* doc/cpio.texi: Document URLs of the mailing list archive and
subscription interface.
* src/copyin.c (try_existing_file): Change type of the last argument.
(copyin_file): Initialize existing_dir.
* src/dstring.c: Include xalloc.h
* src/filemode.c (mode_string): mode is unsigned int.
|
|
|
|
* src/main.c (process_args): Don't specify the "Try cpio --help"
message explicitly. It is added automatically by the USAGE_ERROR
macro.
|
|
* src/copyout.c (to_ascii): Additional argument nul controls whether
to add the terminating nul character.
(field_width_error): Improve diagnostics: print the actual and the
maximum allowed field value.
* src/extern.h (to_ascii, field_width_error): New prototypes.
* src/tar.c (to_oct): Remove.
(to_oct_or_error): New function.
(TO_OCT): New macro.
(write_out_tar_header): Use TO_OCT and to_ascii. Return 0 on
success, 1 on error.
|
|
* src/copyin.c (copyin_link): Force safer name suffix for symbolic links.
* tests/CVE-2015-1197.at: New file.
* tests/Makefile.am: Add new test case.
* tests/testsuite.at: Likewise.
|
|
* src/copyin.c (long_format): Mark unchangeable argument as const.
(read_name_from_file): Use cpio_realloc_c_name.
(process_copy_in): Use CPIO_FILE_STAT_INITIALIZER.
Call cpio_file_stat_free before return.
* src/copyout.c (process_copy_out): Likewise.
* src/copypass.c (link_to_name): Mark unchangeable argument as const.
* src/cpiohdr.h (cpio_file_stat) <c_name_buflen>: New member,
<c_tar_linkname>: Mark as const.
(CPIO_FILE_STAT_INITIALIZER): New define.
(cpio_file_stat_init,cpio_file_stat_free)
(cpio_realloc_c_name): New protos.
* src/extern.h: Fix prototypes.
* src/makepath.c (make_path): Mark unchangeable argument as const.
* src/util.c (create_all_directories): Mark unchangeable argument
as const.
(cpio_realloc_c_name): New function.
(cpio_set_c_name): Use cpio_realloc_c_name.
(cpio_file_stat_init,cpio_file_stat_free): New functions.
|
|
|
|
* tests/symlink-long.at: Use m4 to create dirname, instead of
using bash-specific syntax.
|
|
* src/copyin.c: Remove unused variable.
* src/util.c: Cast arguments to printf.
|
|
Bug reported by Ross Burton. See
<http://lists.gnu.org/archive/html/bug-cpio/2018-11/msg00000.html>
* src/util.c: Keep static copy of the buffer pointer; always
assign it to file_hdr->c_name. Use x2realloc for memory management.
|
|
|
|
Ensure that cpio_safer_name_suffix always works with dynamically
allocated buffer, and that it has size of at least 32 bytes.
Then, any call to cpio_safer_name_suffix is safe (it requires at
least 2 bytes in the buffer).
Also ensure that c_namesize is always correctly initialized (by
cpio_set_c_name) to avoid undefined behavior when reading
file_hdr.c_namesize (previously happened for tar archives).
References:
http://www.mail-archive.com/bug-cpio@gnu.org/msg00545.html
* src/copyin.c (query_rename): Drop the hack, as we now work with
dynamically allocated buffer. Use cpio_set_c_name.
(create_defered_links_to_skipped): Use cpio_set_c_name rather than
manual assignment.
(read_name_from_file): New function to avoid C&P.
(read_in_old_ascii, read_in_new_ascii, read_in_binary): Use
read_name_from_file.
(process_copy_in): Initialize file_hdr.c_namesize.
* src/copyout.c (process_copy_out): Use cpio_set_c_name.
* src/cpiohdr.h (cpio_set_c_name): New prototype.
* src/tar.c (read_in_tar_header): Use cpio_set_c_name.
* src/util.c (cpio_set_c_name): New function to set
file_hdr->c_name and c_namesize from arbitrary string.
(cpio_safer_name_suffix): Some docs fixes.
* tests/inout.at: Also test copy-in, and try various formats.
|
|
Complements: 3945f9db44c935608caa5f0
* src/util.c (find_inode_val): Drop unused variable.
(get_inode_and_dev): Function doesn't return any value, drop the
return value in definition.
|
|
|
|
* am/quoting.m4: New file.
* configure.ac: Set default quoting style.
* src/copyin.c (long_format): Use quotearg.
(print_name_with_quoting): Remove.
* src/extern.h (print_name_with_quoting): Remove proto.
|
|
* doc/cpio.texi: Prominently mention, that --absolute-file-names is
the default.
* doc/cpio.1: Likewise.
|
|
In the default case, the build_mt flag is not set. This leads to an
error at configure time like:
./configure: line 26866: test: =: unary operator expected
Change to use the variable name autoconf creates for us and quote it
so we never get weird expansion errors.
|
|
|
|
|
|
|
|
* src/copyin.c (process_copy_in): Skip records with zero filename length.
|
|
* bootstrap.conf: Reintroduce changes added by
c7e60954dc7945635194 and removed by cleanup in
0396591026410f9.
* lib/Makefile.am: Honor the ^pax prefix.
* po/POTFILES.in: Likewise.
|
|
|
|
|
|
* doc/Makefile.am: Change 'manual' goal.
* doc/gendocs.sh: New file.
* doc/gendocs_template: ps output is not built.
|
|
* headers/Makefile.am: Remove.
* headers/fnmatch.h: Remove.
* Makefile.am: Update.
* configure.ac: Update.
|
|
* gnulib: New submodule.
* paxutils: New submodule.
* .gitignore: Updage
* .gitmodules: Update
* README-hacking: Update.
* bootstrap: Install slightly modified version from the gnulib repo.
* bootstrap.conf: Add paxutils-related stuff.
* po/.gitignore: Update.
* tests/symlink-bad-length.at: Fix expected output.
* src/copyin.c: Tiny change.
* src/util.c: Likewise.
|
|
* src/util.c: Return non-zero exit code if EOF is hit prematurely.
* tests/symlink-bad-length.at: Revert to original archive: there's
no use testing for recovery, because that depends on the host
architecture. Don't test for exit code as well (same reason).
Account for eventual warning messages.
|
|
* src/copyin.c (copyin_link): Fix null dereference.
(read_in_header): Fix error recovery (bug introduced by
27e0ae55).
* tests/symlink-bad-length.at: Test error recovery.
Catch various architecture-dependent error messages (suggested
by Pavel Raiskup).
|
|
|
|
* src/copyin.c (get_link_name): Fix range checking.
* tests/symlink-bad-length.at: Change expected error message.
|
|
See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
* src/copyin.c (get_link_name): New function.
(list_file, copyin_link): use get_link_name
* tests/symlink-bad-length.at: New file.
* tests/symlink-long.at: New file.
* tests/Makefile.am: Add new files.
* tests/testsuite.at: Likewise.
|
|
* src/util.c (inode_val): New member trans_inode
(find_inode_val): New function.
(find_inode_file): Rewrite using the above.
(add_inode): Initialize the trans_inode member
depending on the value of renumber_inodes_option.
(get_inode_and_dev): New function.
(stat_to_cpio): Use get_inode_and_dev.
(arf_stores_inode_p): New function.
* src/extern.h (renumber_inodes_option)
(ignore_devno_option): New externs.
* src/global.c (renumber_inodes_option)
(ignore_devno_option): New variables.
* src/main.c: Add new options.
* NEWS: Document changes.
* doc/cpio.1: Document new options.
* doc/cpio.texi: Likewise.
|
|
The script logic failed if AC_INIT was split among two lines. Reported
by Pavel.
* bootstrap (extract_package_name): Rewrite as m4 script to allow
for multiline AC_INIT.
|
|
|
|
The IDs supplied with the -R option are treated as numeric (without
looking them up in the system database), when prefixed with +. This
allows to force using numeric value if a user (group) with a numeric
name exists in the database.
Reported by Joshua Briefman <sirgatez@gmail.com>.
* src/userspec.c (parse_user_spec): Use + as an indicator of
a numeric UID/GID.
* doc/cpio.1: Document changes.
* doc/cpio.texi: Likewise.
|
|
|
|
* .gitignore: Update.
* NEWS: Update.
* doc/cpio.1: Rewrite.
* doc/cpio.texi: Major revamp.
* src/main.c (options): Fix sectioning of the help output.
(parse_opt):
* src/util.c: Use PAXEXIT_FAILURE to indicate an error.
|
|
* NEWS: Update.
* bootstrap (gnulib_extra_files): Remove "missing"
* configure.ac: Do not distribute shar archive.
Define CPIO_MT_COND
* doc/Makefile.am: Always install manpages (mt.1 and rmt.8 --
depending on whether the corresponding programs are built).
* doc/cpio.1: Update.
* doc/mt.1: Update.
* lib/Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
* src/Makefile.am: Likewise.
* tests/Makefile.am: Likewise.
|
|
* src/cpiohdr.h (cpio_file_stat) <c_chksum>: Change type to
uint32_t.
* src/extern.h (crc): Change type to uint32_t.
* src/global.c: Likewise.
* src/copyout.c (read_for_checksum): Return uint32_t.
* src/copyin.c: Fix printf formats.
|
|
* src/extern.h (delayed_seek_count): Remove.
(disk_empty_output_buffer): Change signature.
* src/util.c (disk_empty_output_buffer): Take two arguments.
Correctly handle partial writes (errno is not meaningful).
(delayed_seek_count): Remove variable.
(sparse_write): Change return type and signature. Rewrite.
Return number actual number of bytes written or -1 on error.
Check returns from lseek and write.
* src/copyin.c (copyin_regular_file): Call disk_empty_output_buffer
with flush=true before closing the file.
* src/copypass.c (process_copy_pass): Likewise.
|
|
* configure.ac: Use gettext 0.18
* doc/.gitignore: Add parse-datetime.texi.
* lib/Makefile.am (libpax_a_SOURCES): Add exit-status.c
* src/copyin.c (read_pattern_file): Use open_fatal if opening
pattern file failed.
* src/util.c (set_file_times): Use fdutimens.
|
|
* gnulib.modules: Add getline, required by rmt.
* src/mt.c (fatal_exit): Change exit code to
MT_EXIT_FAILURE.
|
|
* tests/setstat01.at: Set write permission on the directory
before attempting to rename it.
* tests/setstat02.at: Likewise.
|
|
* .gitignore: Sort.
* src/cpiohdr.h: Fix indentation of preprocessor statements.
* src/filetypes.h: Likewise.
|
|
* gnulib.modules: Add xgetcwd.
* src/copypass.c (process_copy_pass): Convert directory_name
to absolute if -D option was given.
|
|
* bootstrap (symlink_to_dir): Fix symlink calculation.
|
|
* src/filetypes.h: Remove declarations of stat and lstat.
|
|
* src/copyout.c (count_defered_links_to_dev_ino): Return size_t.
(last_link): Do not use superfluous local variable.
* src/util.c (copy_files_disk_to_tape)
(copy_files_disk_to_disk): Shut down gcc warnings.
|