]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Merge-from-Googlecode r419
authorkientzle <kientzle@FreeBSD.org>
Wed, 21 Jan 2009 06:55:27 +0000 (06:55 +0000)
committerkientzle <kientzle@FreeBSD.org>
Wed, 21 Jan 2009 06:55:27 +0000 (06:55 +0000)
commit6db44bd9b7e133965f4557d4403d0dc6d8b370ad
tree5fbd6525820818c1402933c6a27ebfeb25e66dd6
parent50e14c608efac2da56f8271a909fc7bc5396f053
Merge-from-Googlecode r419

In archive_write_disk:  If archive_write_header() fails to create
the file, that's a failure and should return ARCHIVE_FAILED.
Metadata restore failures still return ARCHIVE_WARN, because
that's non-critical.  Fix test_write_disk_secure test to
verify the correct return code in one case; add test_write_disk_failures
to do another very simple test of restore failure.

This should fix cpio coredumping when it tries to restore to
a write-protected directory.

Thanks to: Giorgos Keramidas
MFC after: 30 days
lib/libarchive/archive_write_disk.c
lib/libarchive/test/Makefile
lib/libarchive/test/test_write_disk_failures.c [new file with mode: 0644]
lib/libarchive/test/test_write_disk_secure.c