diff options
| author | Tim Kientzle <kientzle@FreeBSD.org> | 2008-07-06 16:39:18 +0000 |
|---|---|---|
| committer | Tim Kientzle <kientzle@FreeBSD.org> | 2008-07-06 16:39:18 +0000 |
| commit | af03c60c06bd574fec91c96414d6eeade1961f7a (patch) | |
| tree | ad855a312c378c902ae8696e6fe9871cc374a6a4 /usr.bin | |
| parent | ded24715287cf6569945c99993cb7c6ce26b9a18 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/cpio/cpio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/cpio/cpio.c b/usr.bin/cpio/cpio.c index f2c49bac8557..77c09ccfca3f 100644 --- a/usr.bin/cpio/cpio.c +++ b/usr.bin/cpio/cpio.c @@ -111,7 +111,8 @@ main(int argc, char *argv[]) cpio->extract_flags |= ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER; cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_SYMLINKS; cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_NODOTDOT; - /* TODO: If run by root, set owner as well. */ + if (geteuid() == 0) + cpio->extract_flags |= ARCHIVE_EXTRACT_OWNER; cpio->bytes_per_block = 512; cpio->filename = NULL; |
