uname and gname weren't overwritten, so the
disk restore would use those to lookup the
original uid/gid again. Clearing the uname
and gname prevents this.
Reported by: swell.k
MFC after: 7 days
Also, change the existing -vi behavior to send the filenames to
stderr rather than stdout, as GNU cpio does.
PR: bin/141175
Submitted by: Philip Kizer
MFC after: 14 days
were pointed out by Brooks Davis and Alexey Dokuchaev:
* It now tries to lookup arguments as names first, then tries
to parse them as numbers. In particular, this makes the
behavior consistent with POSIX conventions when usernames
consist entirely of digits.
* It now uses strtoul() for the numeric parsing.
Finally, I've included an update to the test harness
to exercise the new numeric cases for -R.
Approved by: re (kib)
user or group Ids as well as user or group names.
In particular, this fixes freesbie2, which uses
-R 0:0 to copy a bunch of files so that the result
will be owned by root.
Also fixes a related bug that mixed-up the uid
and gid specified by -R when in passthrough mode.
Thanks to Dominique Goncalves for reporting this
regression.
Approved by: re (kib)
* Lots of new tests.
* New -n / --numeric-uid-gid option
* More sanity-checking of arguments
* Various Windows portability improvements
* Sync up version number to 2.7.0
A new implementation of cpio that uses libarchive as it's back-end
archiving/dearchiving infrastructure. Includes test harness;
"make check" in the bsdcpio directory to build and run the test
harness.