]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Reading an mtree file is supposed to provide
authorTim Kientzle <kientzle@FreeBSD.org>
Sun, 26 Apr 2009 18:57:50 +0000 (18:57 +0000)
committerTim Kientzle <kientzle@FreeBSD.org>
Sun, 26 Apr 2009 18:57:50 +0000 (18:57 +0000)
commitd21d99e07e35684154111e261505a45c8ecfc71c
treeb4a7f93e145d7ca36b772083b91b87cceb8cbfd1
parent9a4ac3e81e5e9d3564868a233e3e7d866523d3c8
Reading an mtree file is supposed to provide
access to the file data (if the file exists on
disk).  This was broken for the first regular
file; fix it and add a test so it won't break again.

In particular, this fixes the following idiom for creating
a tar archive in which every file is owned by root:

tar cf - --format=mtree .  \
    | sed -e 's/uname=[a-z]*/uname=root/' -e 's/uid=[0-9]*/uid=0/' \
    | tar cf - @-
lib/libarchive/archive_read_support_format_mtree.c
lib/libarchive/test/test_read_format_mtree.c