diff options
author | kientzle <kientzle@FreeBSD.org> | 2009-07-03 17:54:33 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2009-07-03 17:54:33 +0000 |
commit | 49230574bc3ffa0492adf89dfd2c3acca620b5a6 (patch) | |
tree | 612c1e7e7f2222f2d4a36a9df0148424d38236f9 /usr.bin/cpio/cpio.c | |
parent | 7ce4ab7ff8542c3c45b1203177f667e0ee30a088 (diff) | |
download | FreeBSD-src-49230574bc3ffa0492adf89dfd2c3acca620b5a6.zip FreeBSD-src-49230574bc3ffa0492adf89dfd2c3acca620b5a6.tar.gz |
This fixes bsdcpio's -R option to accept numeric
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)
Diffstat (limited to 'usr.bin/cpio/cpio.c')
-rw-r--r-- | usr.bin/cpio/cpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/cpio/cpio.c b/usr.bin/cpio/cpio.c index 73c6656..3b626f7 100644 --- a/usr.bin/cpio/cpio.c +++ b/usr.bin/cpio/cpio.c @@ -575,7 +575,7 @@ file_to_archive(struct cpio *cpio, const char *srcpath) if (cpio->uid_override >= 0) st.st_uid = cpio->uid_override; if (cpio->gid_override >= 0) - st.st_gid = cpio->uid_override; + st.st_gid = cpio->gid_override; archive_entry_copy_stat(entry, &st); #if !defined(_WIN32) || defined(__CYGWIN__) |