aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFiles
2014-12-01Fix memory overrun on reading improperly created link records.Sergey Poznyakoff1
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.
2014-12-01New options to create device and inode-independent archives.Sergey Poznyakoff4
* 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.
2014-01-30Update copyright years.Sergey Poznyakoff24
2014-01-30Treat UID/GID as numeric if prefixed by + (-R option)Sergey Poznyakoff1
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.
2014-01-30Use exit codes consistenly.Sergey Poznyakoff4
2014-01-30Improve documentation.Sergey Poznyakoff2
* .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.
2014-01-28Distribute rmt.8; update build systemSergey Poznyakoff1
* 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.
2012-02-20Always use 32 bit CRCSergey Poznyakoff5
* 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.
2011-09-19Fix error handling in disk_empty_output_buffer and sparse_writeSergey Poznyakoff4
* 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.
2011-09-19Minor fixes.Sergey Poznyakoff2
* 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.
2010-08-09Bugfixes.Sergey Poznyakoff1
* gnulib.modules: Add getline, required by rmt. * src/mt.c (fatal_exit): Change exit code to MT_EXIT_FAILURE.
2010-07-23Housekeeping.Sergey Poznyakoff2
* .gitignore: Sort. * src/cpiohdr.h: Fix indentation of preprocessor statements. * src/filetypes.h: Likewise.
2010-07-23Improve handling of -D in copy-pass mode.Sergey Poznyakoff1
* gnulib.modules: Add xgetcwd. * src/copypass.c (process_copy_pass): Convert directory_name to absolute if -D option was given.
2010-07-22Minor fix.Sergey Poznyakoff1
* src/filetypes.h: Remove declarations of stat and lstat.
2010-07-22Minor fixes.Sergey Poznyakoff2
* 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.
2010-07-22Minor changesSergey Poznyakoff1
* .gitignore: Update. * am/.gitignore: New file. * src/.gitignore: Add .gdbinit. * tests/symlink-to-stdout.at: Fix keywords.
2010-07-22Provide a tar-like --directory (-D) option.Sergey Poznyakoff7
* src/copyin.c (process_copy_in): Call change_dir. * src/copyout.c (process_copy_out): Likewise. * src/copypass.c (process_copy_pass): Likewise. * src/extern.h (change_directory_option): New extern. (change_dir): New proto. * src/global.c (change_directory_option): New global. * src/main.c (options): New option --directory. (parse_opt): Handle the --directory option. * src/util.c (change_dir): New proto. * doc/cpio.texi: Document the --directory option.
2010-07-22Fix --to-stdout option supportDmitry V. Levin1
* src/copyin.c (copyin_link): Skip an appropriate number of bytes when to_stdout_option flag is set. * tests/symlink-to-stdout.at: New test case. * tests/Makefile.am (TESTSUITE_AT): Add symlink-to-stdout.at. * tests/testsuite.at: Include symlink-to-stdout.at.
2010-03-10Bugfixes.Sergey Poznyakoff2
* src/main.c (cpio_options): Remove unused options. * src/util.c (cpio_create_dir): Fix conditional. * NEWS: Update.
2010-02-12Use same code when creating directories in copy-in and copy-pass modes.Sergey Poznyakoff4
* src/copyin.c (copyin_mkdir): Remove. (copyin_directory): Remove. (copyin_file): Use cpio_create_dir instead of copyin_directory. * src/copypass.c (process_copy_pass): Use cpio_create_dir to create directories. * src/extern.h (delay_cpio_set_stat): New proto. * src/util.c (delay_cpio_set_stat): New function. (delay_set_stat): Rewrite as a wrapper to the above. (cpio_create_dir): New function. * tests/setstat01.at: Fix testcase. * tests/setstat02.at: Likewise. * tests/setstat03.at: New testcase. * tests/setstat04.at: New testcase. * tests/setstat05.at: New testcase. * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Likewise.
2010-02-11Fix inode number typing.Sergey Poznyakoff5
* src/copyin.c (create_defered_links): Use ino_t for inode numbers. (create_defered_links_to_skipped): Likewise. (process_copy_in): Add typecast to inode fprintf argument. * src/copyout.c (count_defered_links_to_dev_ino) (writeout_other_defers): Use ino_t for inode numbers. * src/copypass.c (link_to_maj_min_ino): Likewise. * src/util.c (struct inode_val): Likewise. (find_inode_file, add_inode): Likewise. * src/extern.h (link_to_maj_min_ino) (find_inode_file, add_inode): Change signature.
2010-02-11Update copyright years.Sergey Poznyakoff24
2009-07-31Delay setting directory attributes until end of run, if they do not permit ↵Sergey Poznyakoff3
writing. Fix debian bug #458079. * src/copyin.c (copyin_mkdir): New function. (copyin_directory): Use copyin_mkdir to create directory. Call set_perms only when safe, otherwise use repair_delayed_set_stat. * src/extern.h (cpio_to_stat): New prototype. (repair_delayed_set_stat): Change prototype. * src/util.c (cpio_to_stat): New function. (repair_delayed_set_stat): New function. * tests/setstat01.at: New test case. * tests/setstat02.at: New test case. * tests/Makefile.am (TESTSUITE_AT): Add setstat01.at and setstat02.at * tests/testsuite.at: Include setstat01.at and setstat02.at. * NEWS: Update.
2009-07-31Minor compatibility fixSergey Poznyakoff1
* src/cpiohdr.h (struct old_cpio_header): c_dev and c_rdev are unsigned short.
2009-07-31Fix mt and make sure it is always build during distcheck.Sergey Poznyakoff7
Minor fixes in cpio. * Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): New variable. Ensure that distcheck builds mt. * bootstrap: Patch Makefile.in to honor AM_DISTCHECK_CONFIGURE_FLAGS. * gnulib.modules: add argp-version-etc and progname. * src/Makefile.am: Remove useless dependency. * src/copyin.c (long_format): Fix printf arguments. * src/copyout.c (read_for_checksum): Return unsigned long. (process_copy_out): Remove unused variable. * src/extern.h (crc): Change type to unsigned long. (program_name): Remove. * src/global.c: Likewise. * src/main.c: Include argp-version-etc.h and progname.h (argp_program_version): Remove. (program_authors): New global. (options): Remove the 'Informative options' group. These are handled automatically by argp. (parse_opt): Likewise. (licence): Remove. This info is output by --version. (process_args): Remove useless test. (main): Use set_program_name and argp_version_setup. * src/mt.c: Remove superfluous includes. Include argp-version-etc.h and progname.h Use argp to parse arguments. Supply the fatal_exit function. * tests/version.at: Update for the new --version output. * THANKS: Add Peter Breitenlohner. * AUTHORS: Update Sergey's email.
2009-06-19Make sure the structs used for I/O mapping are not padded.Sergey Poznyakoff1
* am/flushleft.m4, am/pack.m4: New files. * Makefile.am (ACLOCAL_AMFLAGS): Add -I am. * bootstrap: Fix arguments to aclocal. * configure.ac: Call CPIO_PACKED_STRUCTS. * src/cpiohdr.h: Ensure old_cpio_header, old_ascii_header and new_ascii_header are packed.
2009-06-19Housekeeping changesSergey Poznyakoff2
* lib/Makefile.am: New file * src/Makefile.am (INCLUDES): add lib * src/main.c: Include configmake.h (needed for LOCALEDIR). * tests/Makefile.am (check-local, installcheck-local): Honor TESTSUITEFLAGS.
2009-03-07Refelect changes to paxutilsSergey Poznyakoff2
2009-02-14Fix exit codesSergey Poznyakoff1
2009-02-14Switch to GitSergey Poznyakoff3
2008-02-09* NEWS, configure.ac: Raise the patchlevel number.Sergey Poznyakoff3
* THANKS: Update * doc/cpio.texi: Fix a typo. * src/extern.h (warn_if_file_changed): Fix type of the 2nd argument. * src/tar.c (write_out_tar_header): Stylistic change. * src/util.c (copy_files_disk_to_disk): Fix types of automatic variables. (warn_if_file_changed): Fix type of the 2nd argument. Patches supplied by Ladislav Michnovic.
2008-02-08UpdateSergey Poznyakoff3
2008-02-08Fix mingw build. Thanks to Robert Millan.Sergey Poznyakoff3
* NEWS, THANKS: Update. * bootstrap: Create lib/system.c, m4/sysdep.m4, update lib/system.h. * mingw.m4, sysdep.m4: New files. * configure.ac: Raise version number to 2.9.90. Call CPIO_SYSDEP. Remove the call to gl_USE_SYSTEM_EXTENSIONS. (AC_CHECK_HEADERS): Add process.h sys/ioctl.h * lib/Makefile.am (libcpio_a_SOURCES): Add system.c * src/idcache.c: Include system.h * src/userspec.c: Remove alloca stuff (already handled by gnulib). Include alloca.h. Remove useless declarations of get.* functions. * src/util.c: Include sys/ioctl.h conditionally.
2007-09-28Fix passing improper argument to swab_array.Sergey Poznyakoff1
2007-06-28(apply_delayed_set_stat): Use inverted permissions from data->stat.Sergey Poznyakoff1
2007-06-28(make_path): Remove mode argument. All callers updated.Sergey Poznyakoff2
2007-06-28(create_all_directories): Update call to make_pathSergey Poznyakoff1
(delay_set_stat,repair_delayed_set_stat) (apply_delayed_set_stat): New functions
2007-06-28Rewrite using delayed set_stat functionsSergey Poznyakoff1
2007-06-28New warning control option -W interdirSergey Poznyakoff1
2007-06-28Include xalloc.hSergey Poznyakoff1
2007-06-28(newdir_umask): New globalSergey Poznyakoff1
2007-06-28(newdir_umask): New globalSergey Poznyakoff1
(delay_set_stat,repair_delayed_set_stat) (apply_delayed_set_stat): New functions
2007-06-28Save current umask before processing and call apply_delayed_set_stat afterwardsSergey Poznyakoff2
2007-06-28Use size_t for buffer sizes and off_t for total I/O bytes.Sergey Poznyakoff2
2007-06-28Number of blocks is size_t.Sergey Poznyakoff3
2007-06-27Relicense under GPLv3Sergey Poznyakoff23
2007-06-08Version number 2.8Sergey Poznyakoff1
2007-06-07Remove useless includesSergey Poznyakoff1
2007-06-07Update calls to set_perms.Sergey Poznyakoff3
2007-06-07(set_perms): Take file descriptor as the first argument and use ↵Sergey Poznyakoff1
fchmod/fchown if available. Fixes CAN-2005-1111.

Return to:

Send suggestions and report system problems to the System administrator.