From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 31 08:52:25 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A6BE106564A; Sun, 31 Jul 2011 08:52:25 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49C208FC08; Sun, 31 Jul 2011 08:52:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p6V8qPG9037312; Sun, 31 Jul 2011 08:52:25 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p6V8qPRZ037310; Sun, 31 Jul 2011 08:52:25 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201107310852.p6V8qPRZ037310@svn.freebsd.org> From: Dmitry Morozovsky Date: Sun, 31 Jul 2011 08:52:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224543 - stable/8/sys/compat/freebsd32 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2011 08:52:25 -0000 Author: marck (doc committer) Date: Sun Jul 31 08:52:24 2011 New Revision: 224543 URL: http://svn.freebsd.org/changeset/base/224543 Log: MFC r224140: Correct small typo in a do{}while(0) Approved by: kib Modified: stable/8/sys/compat/freebsd32/freebsd32.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/compat/freebsd32/freebsd32.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32.h Sun Jul 31 08:13:25 2011 (r224542) +++ stable/8/sys/compat/freebsd32/freebsd32.h Sun Jul 31 08:52:24 2011 (r224543) @@ -58,7 +58,7 @@ struct timespec32 { #define TS_CP(src,dst,fld) do { \ CP((src).fld,(dst).fld,tv_sec); \ CP((src).fld,(dst).fld,tv_nsec); \ -} while (0); +} while (0) struct rusage32 { struct timeval32 ru_utime; From owner-svn-src-stable-8@FreeBSD.ORG Sun Jul 31 23:09:12 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 156C8106564A; Sun, 31 Jul 2011 23:09:12 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04B7D8FC12; Sun, 31 Jul 2011 23:09:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p6VN9BWo067064; Sun, 31 Jul 2011 23:09:11 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p6VN9Bc9067062; Sun, 31 Jul 2011 23:09:11 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201107312309.p6VN9Bc9067062@svn.freebsd.org> From: Doug Barton Date: Sun, 31 Jul 2011 23:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224556 - stable/8/lib/bind X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2011 23:09:12 -0000 Author: dougb Date: Sun Jul 31 23:09:11 2011 New Revision: 224556 URL: http://svn.freebsd.org/changeset/base/224556 Log: MFC r224076: Handle the MK_BIND_XML option more intelligently MFC r224129: Fixes for WITH_BIND_LIBS Modified: stable/8/lib/bind/config.mk Directory Properties: stable/8/lib/bind/ (props changed) Modified: stable/8/lib/bind/config.mk ============================================================================== --- stable/8/lib/bind/config.mk Sun Jul 31 21:04:47 2011 (r224555) +++ stable/8/lib/bind/config.mk Sun Jul 31 23:09:11 2011 (r224556) @@ -77,11 +77,6 @@ CFLAGS+= -D_LARGEFILE_SOURCE -D_FILE_OFF .if ${MK_BIND_SIGCHASE} == "yes" CFLAGS+= -DDIG_SIGCHASE .endif -.if ${MK_BIND_XML} == "yes" -CFLAGS+= -DHAVE_LIBXML2 -CFLAGS+= -I/usr/local/include -I/usr/local/include/libxml2 -CFLAGS+= -L/usr/local/lib -lxml2 -lz -liconv -lm -.endif # Link against BIND libraries .if ${MK_BIND_LIBS} == "no" @@ -109,6 +104,13 @@ BIND_DPADD= ${LIBBIND9} ${LIBDNS} ${LIBI ${LIBISC} ${LIBLWRES} .if ${MK_BIND_LIBS} != "no" BIND_LDADD= -lbind9 -ldns -lisccc -lisccfg -lisc -llwres +CFLAGS+= -I${BIND_DIR}/lib/isc/include +CFLAGS+= -I${BIND_DIR}/lib/isc/unix/include +CFLAGS+= -I${BIND_DIR}/lib/isc/pthreads/include +CFLAGS+= -I${.CURDIR}/../dns +CFLAGS+= -I${BIND_DIR}/lib/dns/include +CFLAGS+= -I${BIND_DIR}/lib/isccfg/include +CFLAGS+= -I${.CURDIR}/../isc .else BIND_LDADD= ${BIND_DPADD} .endif @@ -119,6 +121,16 @@ CRYPTO_DPADD= ${LIBCRYPTO} CRYPTO_LDADD= -lcrypto .endif +.if ${MK_BIND_XML} == "yes" +CFLAGS+= -DHAVE_LIBXML2 +CFLAGS+= -I/usr/local/include -I/usr/local/include/libxml2 +.if ${MK_BIND_LIBS} != "no" +BIND_LDADD+= -L/usr/local/lib -lxml2 -lz -liconv -lm +.else +BIND_DPADD+= /usr/local/lib/libxml2.a ${LIBZ} +BIND_DPADD+= /usr/local/lib/libiconv.a ${LIBM} +.endif +.endif + PTHREAD_DPADD= ${LIBPTHREAD} PTHREAD_LDADD= -lpthread - From owner-svn-src-stable-8@FreeBSD.ORG Mon Aug 1 04:29:05 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 664751065677; Mon, 1 Aug 2011 04:29:05 +0000 (UTC) (envelope-from art@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 54D588FC14; Mon, 1 Aug 2011 04:29:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p714T59M076985; Mon, 1 Aug 2011 04:29:05 GMT (envelope-from art@svn.freebsd.org) Received: (from art@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p714T5O3076983; Mon, 1 Aug 2011 04:29:05 GMT (envelope-from art@svn.freebsd.org) Message-Id: <201108010429.p714T5O3076983@svn.freebsd.org> From: Artem Belevich Date: Mon, 1 Aug 2011 04:29:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224560 - stable/8/sys/modules/dtrace/dtraceall X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 04:29:05 -0000 Author: art Date: Mon Aug 1 04:29:04 2011 New Revision: 224560 URL: http://svn.freebsd.org/changeset/base/224560 Log: Create dummy opt_compat.h for i386 build to fix buildworld breakage when MODULES_WITH_WORLD is set. PR: 157529 Submitted by: Eugene Grosbein Approved by: avg (mentor) Modified: stable/8/sys/modules/dtrace/dtraceall/Makefile Modified: stable/8/sys/modules/dtrace/dtraceall/Makefile ============================================================================== --- stable/8/sys/modules/dtrace/dtraceall/Makefile Mon Aug 1 02:57:46 2011 (r224559) +++ stable/8/sys/modules/dtrace/dtraceall/Makefile Mon Aug 1 04:29:04 2011 (r224560) @@ -9,6 +9,8 @@ CFLAGS+= -I${.CURDIR}/../../.. opt_compat.h: .if ${MACHINE_ARCH} == "amd64" echo "#define COMPAT_FREEBSD32 1" >> ${.TARGET} +.else + echo -n >> ${.TARGET} .endif .endif From owner-svn-src-stable-8@FreeBSD.ORG Mon Aug 1 07:59:03 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5417C106566B; Mon, 1 Aug 2011 07:59:03 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41B2F8FC17; Mon, 1 Aug 2011 07:59:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p717x3E7083639; Mon, 1 Aug 2011 07:59:03 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p717x30G083625; Mon, 1 Aug 2011 07:59:03 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201108010759.p717x30G083625@svn.freebsd.org> From: Martin Matuska Date: Mon, 1 Aug 2011 07:59:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224561 - in stable/8/lib/libarchive: . libarchive_fe test X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 07:59:03 -0000 Author: mm Date: Mon Aug 1 07:59:02 2011 New Revision: 224561 URL: http://svn.freebsd.org/changeset/base/224561 Log: Sync libarchive with 9-CURRENT: MFC on lib/libarchive: 196961,200351,201077,201079-201097,201099-201112,201155-201157, 201159-201163,201165,201167-201171,201246-201250,201253,202868-202869, 202871-202873,203952,208027,208169,208184,208263,208291,210825,213573, 214822,214867,214905,216258,221472,224152 MFC 196961 (kientzle): Update tests to match r195873, which corrected how hardlinked files on iso9660 images were returned. While I'm poking around, update some comments around this area to try to clarify what's going on and what still remains to be improved. MFC 200351 (kientzle): Merge two cpio fixes from libarchive.googlecode.com: 1) Avoid an infinite loop in the header resync for certain malformed archives. 2) Don't try to match hardlinks if the nlinks count is < 2. This reduces the likelihood of a false hardlink match due to ino truncation. MFC 201077 (kientzle): Update format manpages for libarchive. MFC 201079 (kientzle): Update the hard-coded configuration for libarchive. MFC 201080 (kientzle): Remove some unused variables and dead assignments. MFC 201081 (kientzle): Remove a dead assignment. MFC 201082 (kientzle): Catch certain gzip failures at close time. MFC 201083 (kientzle): Compatibility fix for some older systems with non-POSIX getgrnam_r/getpwnam_r and a minor style fix for the hash function. MFC 201084 (kientzle): Sync with googlecode some changes that have no impact on FreeBSD. MFC 201085 (kientzle): Compatibility: I found some more compilers that don't like 'inline' keyword. Protection: Discourage people from using this header outside libarchive. MFC 201086 (kientzle): Discourage people from using this header outside of libarchive. MFC 201087 (kientzle): Enforce this as an internal-only header. MFC 201088 (kientzle): Allow more formats to be active at a time; discourage outside use. MFC 201089 (kientzle): Portability: terminate abnormally via abort() instead of segfault, watch the return value from write(), and avoid signed arithmetic on unsigned values. MFC 201091 (kientzle): Remove dead assignment. MFC 201092 (kientzle): Discourage outside use of this internal header. MFC 201093 (kientzle): Portability: Set the file descriptor to binary mode on Win32 MFC 201094 (kientzle): Eliminate an unused assignment. MFC 201095 (kientzle): Remove an unused variable and an unnecessary increment. MFC 201096 (kientzle): Various portability fixes, plus: * New "ino64" field. * New UTF8 interfaces for hardlink/symlink updates MFC 201097 (kientzle): Portability fixes. MFC 201099 (kientzle): Use new ino64 interface. MFC 201110 (kientzle): Clarify an example so Linux folks won't keep getting confused by this point. MFC 201111 (kientzle): Remove some dead assignments, fix some declarations. MFC 201112 (kientzle): Portability. MFC 201155 (kientzle): 64-bit ino support and discourage bad use of this header. MFC 201156 (kientzle): Various style and portability fixes, including: * Enforce option interface can only be used before the archive is opened * Correctly handle large skips on platforms with 32-bit off_t * Use int64_t instead of off_t MFC 201157 (kientzle): Catch decompression failures earlier. In particular, this gives immediate feedback if we fail to fork an external decompression program. MFC 201159 (kientzle): Various fixes when creating objects on disk: * Write xattrs last instead of first (required on platforms that use system xattrs for security attributes) * Better handling of chdir() failures * Don't bother trying to shorten files via seek()/write() * Fix build on systems that lack link()/symlink()/mknod() * Prefer futimens()/utimensat() when they're present MFC 201160 (kientzle): Various style fixes to the 'newc' cpio writer: * Warn about truncation of ino * Use a macro to hide the somewhat obscure pad-to-multiple-of-4 calculation * Eliminate some unused variables MFC 201161 (kientzle): Style fixes to tar reader: For portability, prefer int64_t to off_t. Improve numeric overflow handling when parsing. Fix some variable types. Eliminate some unused results. MFC 201162 (kientzle): Style and portability fixes for pax writer. Mostly very routine, except for: * Use ino64 where appropriate * Don't pass atime or nsec to ustar formatter MFC 201163 (kientzle): Be a little more skeptical of dev/ino matches when reading cpio files. This eliminates some false-positives in the hardlink detection logic. MFC 201165 (kientzle): Minor style fixes plus a fix for an obscure crash on certain malformed mtree files. MFC 201167 (kientzle): If we're linking against liblzma, allow the decompressor to use up to 1<<30 bytes of memory, which is required for some streams. Also, try to make the taster more discriminating about raw lzma streams. The detection here is still really weak, though; please use xz instead of lzma. MFC 201168 (kientzle): Zip write support for libarchive. The initial implementation was developed by Anselm Strauss as part of Google Summer of Code 2008, then completed by Joerg Sonnenberger. MFC 201169 (kientzle): Clear extraneous error messages. MFC 201170 (kientzle): Essentially eliminate problems with false hardlinks in POSIX cpio archives by generating synthetic ino values and mapping values from disk into the new values. MFC 201171 (kientzle): Rationalize the support for cryptographic hashes. MFC 201246 (kientzle): Merge Michihiro NAKAJIMA's significant work on the ISO9660 reader from googlecode: * Support for zisofs compressed entries * Support for relocated deep directories * Direct calculation of link counts for accurate nlink values even on images that lack Rockridge extensions * Faster handling of the internal file lists. * Better detection of ISO variants MFC 201247 (kientzle): A raft of test changes and improvements from the Googlecode repository. In particular, this includes tests for the new features I've merged over the last few days. MFC 201248 (kientzle): UU decoder. Now that libarchive can recursively taste input streams, you can do things like this: tar xvf archive.tar.gz.uu MFC 201249 (kientzle): Libarchive in FreeBSD is now synced up with 2.7.901a from libarchive.googlecode.com MFC 201250 (kientzle): Reserve constants for RPM unwrapper and XAR reader. MFC 201253 (kientzle): Remove some test files that are no longer used. MFC 202868 (kientzle): Fix a memory leak when a filter fails to initialize. MFC 202869 (kientzle): Initialize the allocated 'struct zip'. MFC 202871 (kientzle): If we can't stat a file, return the correct ARCHIVE_FAILED (this entry can't be processed any further) and a suitable error string. In particular, this improves the error-reporting when cpio -o is given a nonexistent filename. MFC 202872 (kientzle): Use a simpler memory-management strategy for the file objects. Instead of trying to reference-count them and free them as soon as they are no longer needed, we now just keep them around and free them all when we release the archive object. This fixes a number of minor memory leaks, especially when reading damaged archives. MFC 202873 (kientzle): Don't try to hardlink block or character device nodes that come out of cpio archives. MFC 203952 (uqs): Add missing newline in last line of file. Uncovered via: fromcvs vs. svn MFC 208027 (uqs): mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the bottom of the manpages and order them consistently. GNU groff doesn't care about the ordering, and doesn't even mention CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put them. Found by: mdocml lint run MFC 208169 (kientzle): Reorganize slightly in preparation for making lzma and bz2 support conditional. MFC 208184 (delphij): Fix build. MFC 208263 (kientzle): Retry reads that fail with EINTR. This fixes a problem with bsdtar failing on SIGINT. MFC 208291 (uqs): mdoc: consistently spell our email addresses MFC 210825 (joel): Fix typo. MFC 213573 (uqs): mdoc: drop redundant .Pp and .LP calls They have no effect when coming in pairs, or before .Bl/.Bd MFC 214822 (kientzle): Clarify the naming: Methods that free an object should be called "free". Retain the old "finish" names to preserve source compatibility for now. MFC 214867 (uqs): Fix manpage markup. MFC 214905 (kientzle): If the Zip reader doesn't see a PK signature block because there's inter-entry garbage, just scan forward to find the next one. This allows us to handle a lot of Zip archives that have been modified in-place. Thanks to: Gleb Kurtsou for sending me a sample archive MFC 216258 (kientzle): Don't write data into an empty "file." In particular, this check avoids a warning when extracting directory entries from certain GNU tar archives that store directory contents. MFC 221472 (obrien): libarchive is mixing libmd and libcrypto -- correct to use one or the other. [mixing the two can be quite bad -- they define the same context structures, but with differing structure members (and sizes)] MFC 224152 (mm): - Update libarchive to 2.8.4 - Add support for extracting xar and rpm archives - Add libarchive_fe subdir (common code for tar and cpio) Added: stable/8/lib/libarchive/archive_crc32.h - copied unchanged from r201112, head/lib/libarchive/archive_crc32.h stable/8/lib/libarchive/archive_entry_xattr.c - copied unchanged from r201097, head/lib/libarchive/archive_entry_xattr.c stable/8/lib/libarchive/archive_hash.h - copied, changed from r201171, head/lib/libarchive/archive_hash.h stable/8/lib/libarchive/archive_read_support_compression_rpm.c - copied unchanged from r224152, head/lib/libarchive/archive_read_support_compression_rpm.c stable/8/lib/libarchive/archive_read_support_compression_uu.c - copied, changed from r201250, head/lib/libarchive/archive_read_support_compression_uu.c stable/8/lib/libarchive/archive_read_support_format_xar.c - copied unchanged from r224152, head/lib/libarchive/archive_read_support_format_xar.c stable/8/lib/libarchive/archive_write_set_format_zip.c - copied, changed from r201171, head/lib/libarchive/archive_write_set_format_zip.c stable/8/lib/libarchive/libarchive_fe/ - copied from r224152, head/lib/libarchive/libarchive_fe/ stable/8/lib/libarchive/test/test_compat_cpio.c - copied unchanged from r201250, head/lib/libarchive/test/test_compat_cpio.c stable/8/lib/libarchive/test/test_compat_cpio_1.cpio.uu - copied unchanged from r201250, head/lib/libarchive/test/test_compat_cpio_1.cpio.uu stable/8/lib/libarchive/test/test_compat_lzma.c - copied unchanged from r201250, head/lib/libarchive/test/test_compat_lzma.c stable/8/lib/libarchive/test/test_compat_lzma_1.tlz.uu - copied unchanged from r201250, head/lib/libarchive/test/test_compat_lzma_1.tlz.uu stable/8/lib/libarchive/test/test_compat_lzma_2.tlz.uu - copied unchanged from r201250, head/lib/libarchive/test/test_compat_lzma_2.tlz.uu stable/8/lib/libarchive/test/test_compat_lzma_3.tlz.uu - copied unchanged from r201250, head/lib/libarchive/test/test_compat_lzma_3.tlz.uu stable/8/lib/libarchive/test/test_compat_zip_2.zip.uu - copied unchanged from r214905, head/lib/libarchive/test/test_compat_zip_2.zip.uu stable/8/lib/libarchive/test/test_fuzz_1.iso.Z.uu - copied unchanged from r201250, head/lib/libarchive/test/test_fuzz_1.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_ar.ar.uu - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_ar.ar.uu stable/8/lib/libarchive/test/test_read_format_cpio_bin_lzma.c - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_cpio_bin_lzma.c stable/8/lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c - copied unchanged from r224152, head/lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c stable/8/lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu - copied unchanged from r224152, head/lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu stable/8/lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c - copied unchanged from r224152, head/lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c stable/8/lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu - copied unchanged from r224152, head/lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu stable/8/lib/libarchive/test/test_read_format_iso.iso.Z.uu - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_iso.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_joliet.iso.Z.uu - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_iso_joliet.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_multi_extent.c - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_iso_multi_extent.c stable/8/lib/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu stable/8/lib/libarchive/test/test_read_format_isojoliet_long.c - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_isojoliet_long.c stable/8/lib/libarchive/test/test_read_format_isojoliet_rr.c - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_isojoliet_rr.c stable/8/lib/libarchive/test/test_read_format_isorr_ce.c - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_isorr_ce.c stable/8/lib/libarchive/test/test_read_format_isorr_new_bz2.c - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_isorr_new_bz2.c stable/8/lib/libarchive/test/test_read_format_isorr_rr_moved.c - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_isorr_rr_moved.c stable/8/lib/libarchive/test/test_read_format_isozisofs_bz2.c - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_isozisofs_bz2.c stable/8/lib/libarchive/test/test_read_format_mtree.mtree.uu - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_mtree.mtree.uu stable/8/lib/libarchive/test/test_read_format_tlz.c - copied unchanged from r201250, head/lib/libarchive/test/test_read_format_tlz.c stable/8/lib/libarchive/test/test_read_format_xar.c - copied unchanged from r224152, head/lib/libarchive/test/test_read_format_xar.c stable/8/lib/libarchive/test/test_read_uu.c - copied unchanged from r201250, head/lib/libarchive/test/test_read_uu.c stable/8/lib/libarchive/test/test_write_disk_symlink.c - copied unchanged from r201250, head/lib/libarchive/test/test_write_disk_symlink.c stable/8/lib/libarchive/test/test_write_format_zip.c - copied unchanged from r201250, head/lib/libarchive/test/test_write_format_zip.c stable/8/lib/libarchive/test/test_write_format_zip_empty.c - copied unchanged from r201250, head/lib/libarchive/test/test_write_format_zip_empty.c stable/8/lib/libarchive/test/test_write_format_zip_no_compression.c - copied unchanged from r201250, head/lib/libarchive/test/test_write_format_zip_no_compression.c Deleted: stable/8/lib/libarchive/test/test_fuzz_1.iso.uu stable/8/lib/libarchive/test/test_read_format_iso_gz.iso.gz.uu stable/8/lib/libarchive/test/test_read_format_isojoliet_bz2.iso.bz2.uu stable/8/lib/libarchive/test/test_read_format_isojolietrr_bz2.iso.bz2.uu stable/8/lib/libarchive/test/test_read_format_isorr_bz2.iso.bz2.uu Modified: stable/8/lib/libarchive/Makefile stable/8/lib/libarchive/README stable/8/lib/libarchive/archive.h stable/8/lib/libarchive/archive_check_magic.c stable/8/lib/libarchive/archive_endian.h stable/8/lib/libarchive/archive_entry.c stable/8/lib/libarchive/archive_entry.h stable/8/lib/libarchive/archive_entry_link_resolver.c stable/8/lib/libarchive/archive_entry_private.h stable/8/lib/libarchive/archive_entry_stat.c stable/8/lib/libarchive/archive_platform.h stable/8/lib/libarchive/archive_private.h stable/8/lib/libarchive/archive_read.3 stable/8/lib/libarchive/archive_read.c stable/8/lib/libarchive/archive_read_disk.3 stable/8/lib/libarchive/archive_read_disk.c stable/8/lib/libarchive/archive_read_disk_entry_from_file.c stable/8/lib/libarchive/archive_read_disk_private.h stable/8/lib/libarchive/archive_read_disk_set_standard_lookup.c stable/8/lib/libarchive/archive_read_extract.c stable/8/lib/libarchive/archive_read_open_fd.c stable/8/lib/libarchive/archive_read_open_file.c stable/8/lib/libarchive/archive_read_open_filename.c stable/8/lib/libarchive/archive_read_private.h stable/8/lib/libarchive/archive_read_support_compression_all.c stable/8/lib/libarchive/archive_read_support_compression_bzip2.c stable/8/lib/libarchive/archive_read_support_compression_compress.c stable/8/lib/libarchive/archive_read_support_compression_gzip.c stable/8/lib/libarchive/archive_read_support_compression_program.c stable/8/lib/libarchive/archive_read_support_compression_xz.c stable/8/lib/libarchive/archive_read_support_format_all.c stable/8/lib/libarchive/archive_read_support_format_ar.c stable/8/lib/libarchive/archive_read_support_format_cpio.c stable/8/lib/libarchive/archive_read_support_format_iso9660.c stable/8/lib/libarchive/archive_read_support_format_mtree.c stable/8/lib/libarchive/archive_read_support_format_raw.c stable/8/lib/libarchive/archive_read_support_format_tar.c stable/8/lib/libarchive/archive_read_support_format_zip.c stable/8/lib/libarchive/archive_string.c stable/8/lib/libarchive/archive_string.h stable/8/lib/libarchive/archive_virtual.c stable/8/lib/libarchive/archive_write.3 stable/8/lib/libarchive/archive_write.c stable/8/lib/libarchive/archive_write_disk.3 stable/8/lib/libarchive/archive_write_disk.c stable/8/lib/libarchive/archive_write_disk_private.h stable/8/lib/libarchive/archive_write_disk_set_standard_lookup.c stable/8/lib/libarchive/archive_write_open_fd.c stable/8/lib/libarchive/archive_write_private.h stable/8/lib/libarchive/archive_write_set_compression_bzip2.c stable/8/lib/libarchive/archive_write_set_compression_compress.c stable/8/lib/libarchive/archive_write_set_compression_gzip.c stable/8/lib/libarchive/archive_write_set_compression_none.c stable/8/lib/libarchive/archive_write_set_compression_program.c stable/8/lib/libarchive/archive_write_set_compression_xz.c stable/8/lib/libarchive/archive_write_set_format.c stable/8/lib/libarchive/archive_write_set_format_ar.c stable/8/lib/libarchive/archive_write_set_format_by_name.c stable/8/lib/libarchive/archive_write_set_format_cpio.c stable/8/lib/libarchive/archive_write_set_format_cpio_newc.c stable/8/lib/libarchive/archive_write_set_format_mtree.c stable/8/lib/libarchive/archive_write_set_format_pax.c stable/8/lib/libarchive/config_freebsd.h stable/8/lib/libarchive/cpio.5 stable/8/lib/libarchive/filter_fork.c stable/8/lib/libarchive/filter_fork.h stable/8/lib/libarchive/libarchive-formats.5 stable/8/lib/libarchive/libarchive.3 stable/8/lib/libarchive/libarchive_internals.3 stable/8/lib/libarchive/tar.5 stable/8/lib/libarchive/test/Makefile stable/8/lib/libarchive/test/main.c stable/8/lib/libarchive/test/read_open_memory.c stable/8/lib/libarchive/test/test.h stable/8/lib/libarchive/test/test_acl_freebsd.c stable/8/lib/libarchive/test/test_acl_pax.c stable/8/lib/libarchive/test/test_compat_bzip2.c stable/8/lib/libarchive/test/test_compat_solaris_tar_acl.c stable/8/lib/libarchive/test/test_compat_zip.c stable/8/lib/libarchive/test/test_entry.c stable/8/lib/libarchive/test/test_entry_strmode.c stable/8/lib/libarchive/test/test_extattr_freebsd.c stable/8/lib/libarchive/test/test_fuzz.c stable/8/lib/libarchive/test/test_open_fd.c stable/8/lib/libarchive/test/test_open_file.c stable/8/lib/libarchive/test/test_pax_filename_encoding.c stable/8/lib/libarchive/test/test_read_compress_program.c stable/8/lib/libarchive/test/test_read_data_large.c stable/8/lib/libarchive/test/test_read_disk.c stable/8/lib/libarchive/test/test_read_disk_entry_from_file.c stable/8/lib/libarchive/test/test_read_extract.c stable/8/lib/libarchive/test/test_read_format_ar.c stable/8/lib/libarchive/test/test_read_format_cpio_bin_bz2.c stable/8/lib/libarchive/test/test_read_format_iso_gz.c stable/8/lib/libarchive/test/test_read_format_isojoliet_bz2.c stable/8/lib/libarchive/test/test_read_format_isorr_bz2.c stable/8/lib/libarchive/test/test_read_format_mtree.c stable/8/lib/libarchive/test/test_read_format_pax_bz2.c stable/8/lib/libarchive/test/test_read_format_tar.c stable/8/lib/libarchive/test/test_read_format_tbz.c stable/8/lib/libarchive/test/test_read_large.c stable/8/lib/libarchive/test/test_read_truncated.c stable/8/lib/libarchive/test/test_tar_large.c stable/8/lib/libarchive/test/test_ustar_filenames.c stable/8/lib/libarchive/test/test_write_compress_program.c stable/8/lib/libarchive/test/test_write_disk.c stable/8/lib/libarchive/test/test_write_disk_failures.c stable/8/lib/libarchive/test/test_write_disk_hardlink.c stable/8/lib/libarchive/test/test_write_disk_perms.c stable/8/lib/libarchive/test/test_write_disk_secure.c stable/8/lib/libarchive/test/test_write_disk_sparse.c stable/8/lib/libarchive/test/test_write_disk_times.c stable/8/lib/libarchive/test/test_write_format_cpio.c stable/8/lib/libarchive/test/test_write_format_cpio_empty.c stable/8/lib/libarchive/test/test_write_format_cpio_newc.c stable/8/lib/libarchive/test/test_write_format_cpio_odc.c stable/8/lib/libarchive/test/test_write_format_tar_ustar.c Directory Properties: stable/8/lib/libarchive/ (props changed) Modified: stable/8/lib/libarchive/Makefile ============================================================================== --- stable/8/lib/libarchive/Makefile Mon Aug 1 04:29:04 2011 (r224560) +++ stable/8/lib/libarchive/Makefile Mon Aug 1 07:59:02 2011 (r224561) @@ -2,8 +2,8 @@ .include LIB= archive -DPADD= ${LIBZ} ${LIBMD} -LDADD= -lz -lmd +DPADD= ${LIBZ} +LDADD= -lz DPADD+= ${LIBBZ2} LDADD+= -lbz2 @@ -13,6 +13,9 @@ DPADD+= ${LIBLZMA} LDADD+= -llzma CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 +DPADD+= ${LIBBSDXML} +LDADD+= -lbsdxml + # FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system. # It has no real relation to the libarchive version number. SHLIB_MAJOR= 5 @@ -24,6 +27,9 @@ CFLAGS+= -I${.OBJDIR} CFLAGS+= -DWITH_OPENSSL DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto +.else +DPADD+= ${LIBMD} +LDADD+= -lmd .endif WARNS?= 6 @@ -38,6 +44,7 @@ SRCS= archive_check_magic.c \ archive_entry_stat.c \ archive_entry_strmode.c \ archive_entry_link_resolver.c \ + archive_entry_xattr.c \ archive_read.c \ archive_read_data_into_fd.c \ archive_read_disk.c \ @@ -54,6 +61,8 @@ SRCS= archive_check_magic.c \ archive_read_support_compression_gzip.c \ archive_read_support_compression_none.c \ archive_read_support_compression_program.c \ + archive_read_support_compression_rpm.c \ + archive_read_support_compression_uu.c \ archive_read_support_compression_xz.c \ archive_read_support_format_all.c \ archive_read_support_format_ar.c \ @@ -63,6 +72,7 @@ SRCS= archive_check_magic.c \ archive_read_support_format_mtree.c \ archive_read_support_format_raw.c \ archive_read_support_format_tar.c \ + archive_read_support_format_xar.c \ archive_read_support_format_zip.c \ archive_string.c \ archive_string_sprintf.c \ @@ -90,6 +100,7 @@ SRCS= archive_check_magic.c \ archive_write_set_format_pax.c \ archive_write_set_format_shar.c \ archive_write_set_format_ustar.c \ + archive_write_set_format_zip.c \ filter_fork.c # Man pages to be installed. Modified: stable/8/lib/libarchive/README ============================================================================== --- stable/8/lib/libarchive/README Mon Aug 1 04:29:04 2011 (r224560) +++ stable/8/lib/libarchive/README Mon Aug 1 07:59:02 2011 (r224561) @@ -21,6 +21,7 @@ Currently, the library automatically det * gzip compression * bzip2 compression * compress/LZW compression + * lzma and xz compression * GNU tar format (including GNU long filenames, long link names, and sparse files) * Solaris 9 extended tar format (including ACLs) @@ -30,18 +31,26 @@ Currently, the library automatically det * POSIX octet-oriented cpio * SVR4 ASCII cpio * Binary cpio (big-endian or little-endian) - * ISO9660 CD-ROM images (with optional Rockridge extensions) + * ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions) * ZIP archives (with uncompressed or "deflate" compressed entries) + * GNU and BSD 'ar' archives + * 'mtree' format The library can write: * gzip compression * bzip2 compression + * compress/LZW compression + * lzma and xz compression * POSIX ustar * POSIX pax interchange format * "restricted" pax format, which will create ustar archives except for entries that require pax extensions (for long filenames, ACLs, etc). * POSIX octet-oriented cpio + * SVR4 "newc" cpio * shar archives + * ZIP archives (with uncompressed or "deflate" compressed entries) + * GNU and BSD 'ar' archives + * 'mtree' format Notes: * This is a heavily stream-oriented system. There is no direct Modified: stable/8/lib/libarchive/archive.h ============================================================================== --- stable/8/lib/libarchive/archive.h Mon Aug 1 04:29:04 2011 (r224560) +++ stable/8/lib/libarchive/archive.h Mon Aug 1 07:59:02 2011 (r224561) @@ -35,12 +35,16 @@ * this header! If you must conditionalize, use predefined compiler and/or * platform macros. */ +#if defined(__BORLANDC__) && __BORLANDC__ >= 0x560 +# define __LA_STDINT_H +#elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__) +# define __LA_STDINT_H +#endif #include #include /* Linux requires this for off_t */ -#if !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) -/* Header unavailable on Watcom C or MS Visual C++ or SFU. */ -#include /* int64_t, etc. */ +#ifdef __LA_STDINT_H +# include __LA_STDINT_H /* int64_t, etc. */ #endif #include /* For FILE * */ @@ -48,13 +52,20 @@ /* These should match the types used in 'struct stat' */ #if defined(_WIN32) && !defined(__CYGWIN__) #define __LA_INT64_T __int64 -# if defined(_WIN64) +# if defined(_SSIZE_T_DEFINED) +# define __LA_SSIZE_T ssize_t +# elif defined(_WIN64) # define __LA_SSIZE_T __int64 # else # define __LA_SSIZE_T long # endif -#define __LA_UID_T unsigned int -#define __LA_GID_T unsigned int +# if defined(__BORLANDC__) +# define __LA_UID_T uid_t +# define __LA_GID_T gid_t +# else +# define __LA_UID_T short +# define __LA_GID_T short +# endif #else #include /* ssize_t, uid_t, and gid_t */ #define __LA_INT64_T int64_t @@ -118,13 +129,13 @@ extern "C" { * (ARCHIVE_API_VERSION * 1000000 + ARCHIVE_API_FEATURE * 1000) * #endif */ -#define ARCHIVE_VERSION_NUMBER 2007000 +#define ARCHIVE_VERSION_NUMBER 2008004 __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_STRING "libarchive 2.7.0" +#define ARCHIVE_VERSION_STRING "libarchive 2.8.4" __LA_DECL const char * archive_version_string(void); #if ARCHIVE_VERSION_NUMBER < 3000000 @@ -232,6 +243,8 @@ typedef int archive_close_callback(struc #define ARCHIVE_COMPRESSION_PROGRAM 4 #define ARCHIVE_COMPRESSION_LZMA 5 #define ARCHIVE_COMPRESSION_XZ 6 +#define ARCHIVE_COMPRESSION_UU 7 +#define ARCHIVE_COMPRESSION_RPM 8 /* * Codes returned by archive_format. @@ -273,6 +286,7 @@ typedef int archive_close_callback(struc #define ARCHIVE_FORMAT_AR_BSD (ARCHIVE_FORMAT_AR | 2) #define ARCHIVE_FORMAT_MTREE 0x80000 #define ARCHIVE_FORMAT_RAW 0x90000 +#define ARCHIVE_FORMAT_XAR 0xA0000 /*- * Basic outline for reading an archive: @@ -307,6 +321,8 @@ __LA_DECL int archive_read_support_com (struct archive *, const char *, const void * /* match */, size_t); +__LA_DECL int archive_read_support_compression_rpm(struct archive *); +__LA_DECL int archive_read_support_compression_uu(struct archive *); __LA_DECL int archive_read_support_compression_xz(struct archive *); __LA_DECL int archive_read_support_format_all(struct archive *); @@ -318,6 +334,7 @@ __LA_DECL int archive_read_support_for __LA_DECL int archive_read_support_format_mtree(struct archive *); __LA_DECL int archive_read_support_format_raw(struct archive *); __LA_DECL int archive_read_support_format_tar(struct archive *); +__LA_DECL int archive_read_support_format_xar(struct archive *); __LA_DECL int archive_read_support_format_zip(struct archive *); @@ -469,11 +486,10 @@ __LA_DECL void archive_read_extract_set /* Close the file and release most resources. */ __LA_DECL int archive_read_close(struct archive *); /* Release all resources and destroy the object. */ -/* Note that archive_read_finish will call archive_read_close for you. */ -#if ARCHIVE_VERSION_NUMBER < 2000000 -/* Erroneously declared to return void in libarchive 1.x */ -__LA_DECL void archive_read_finish(struct archive *); -#else +/* Note that archive_read_free will call archive_read_close for you. */ +__LA_DECL int archive_read_free(struct archive *); +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* Synonym for archive_read_free() for backwards compatibility. */ __LA_DECL int archive_read_finish(struct archive *); #endif @@ -490,7 +506,7 @@ __LA_DECL int archive_read_finish(stru * - archive_write_header to write the header * - archive_write_data to write the entry data * 5) archive_write_close to close the output - * 6) archive_write_finish to cleanup the writer and release resources + * 6) archive_write_free to cleanup the writer and release resources */ __LA_DECL struct archive *archive_write_new(void); __LA_DECL int archive_write_set_bytes_per_block(struct archive *, @@ -529,6 +545,7 @@ __LA_DECL int archive_write_set_format __LA_DECL int archive_write_set_format_shar(struct archive *); __LA_DECL int archive_write_set_format_shar_dump(struct archive *); __LA_DECL int archive_write_set_format_ustar(struct archive *); +__LA_DECL int archive_write_set_format_zip(struct archive *); __LA_DECL int archive_write_open(struct archive *, void *, archive_open_callback *, archive_write_callback *, archive_close_callback *); @@ -570,13 +587,12 @@ __LA_DECL __LA_SSIZE_T archive_write_da #endif __LA_DECL int archive_write_finish_entry(struct archive *); __LA_DECL int archive_write_close(struct archive *); -#if ARCHIVE_VERSION_NUMBER < 2000000 -/* Return value was incorrect in libarchive 1.x. */ -__LA_DECL void archive_write_finish(struct archive *); -#else -/* Libarchive 2.x and later returns an error if this fails. */ -/* It can fail if the archive wasn't already closed, in which case - * archive_write_finish() will implicitly call archive_write_close(). */ + +/* This can fail if the archive wasn't already closed, in which case + * archive_write_free() will implicitly call archive_write_close(). */ +__LA_DECL int archive_write_free(struct archive *); +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* Synonym for archive_write_free() for backwards compatibility. */ __LA_DECL int archive_write_finish(struct archive *); #endif @@ -605,7 +621,7 @@ __LA_DECL int archive_write_set_options * - construct an appropriate struct archive_entry structure * - archive_write_header to create the file/dir/etc on disk * - archive_write_data to write the entry data - * 4) archive_write_finish to cleanup the writer and release resources + * 4) archive_write_free to cleanup the writer and release resources * * In particular, you can use this in conjunction with archive_read() * to pull entries out of an archive and create them on disk. Modified: stable/8/lib/libarchive/archive_check_magic.c ============================================================================== --- stable/8/lib/libarchive/archive_check_magic.c Mon Aug 1 04:29:04 2011 (r224560) +++ stable/8/lib/libarchive/archive_check_magic.c Mon Aug 1 07:59:02 2011 (r224561) @@ -50,7 +50,16 @@ __FBSDID("$FreeBSD$"); static void errmsg(const char *m) { - write(2, m, strlen(m)); + size_t s = strlen(m); + ssize_t written; + + while (s > 0) { + written = write(2, m, strlen(m)); + if (written <= 0) + return; + m += written; + s -= written; + } } static void @@ -60,8 +69,7 @@ diediedie(void) /* Cause a breakpoint exception */ DebugBreak(); #endif - *(char *)0 = 1; /* Deliberately segfault and force a coredump. */ - _exit(1); /* If that didn't work, just exit with an error. */ + abort(); /* Terminate the program abnormally. */ } static const char * @@ -85,7 +93,7 @@ write_all_states(unsigned int states) unsigned int lowbit; /* A trick for computing the lowest set bit. */ - while ((lowbit = states & (-states)) != 0) { + while ((lowbit = states & (1 + ~states)) != 0) { states &= ~lowbit; /* Clear the low bit. */ errmsg(state_name(lowbit)); if (states != 0) Copied: stable/8/lib/libarchive/archive_crc32.h (from r201112, head/lib/libarchive/archive_crc32.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/libarchive/archive_crc32.h Mon Aug 1 07:59:02 2011 (r224561, copy of r201112, head/lib/libarchive/archive_crc32.h) @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 2009 Joerg Sonnenberger + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif + +/* + * When zlib is unavailable, we should still be able to validate + * uncompressed zip archives. That requires us to be able to compute + * the CRC32 check value. This is a drop-in compatible replacement + * for crc32() from zlib. It's slower than the zlib implementation, + * but still pretty fast: This runs about 300MB/s on my 3GHz P4 + * compared to about 800MB/s for the zlib implementation. + */ +static unsigned long +crc32(unsigned long crc, const void *_p, size_t len) +{ + unsigned long crc2, b, i; + const unsigned char *p = _p; + static volatile int crc_tbl_inited = 0; + static unsigned long crc_tbl[256]; + + if (!crc_tbl_inited) { + for (b = 0; b < 256; ++b) { + crc2 = b; + for (i = 8; i > 0; --i) { + if (crc2 & 1) + crc2 = (crc2 >> 1) ^ 0xedb88320UL; + else + crc2 = (crc2 >> 1); + } + crc_tbl[b] = crc2; + } + crc_tbl_inited = 1; + } + + crc = crc ^ 0xffffffffUL; + while (len--) + crc = crc_tbl[(crc ^ *p++) & 0xff] ^ (crc >> 8); + return (crc ^ 0xffffffffUL); +} Modified: stable/8/lib/libarchive/archive_endian.h ============================================================================== --- stable/8/lib/libarchive/archive_endian.h Mon Aug 1 04:29:04 2011 (r224560) +++ stable/8/lib/libarchive/archive_endian.h Mon Aug 1 07:59:02 2011 (r224561) @@ -28,6 +28,10 @@ * Borrowed from FreeBSD's */ +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif + /* Note: This is a purely internal header! */ /* Do not use this outside of libarchive internal code! */ @@ -41,7 +45,7 @@ * - SGI MIPSpro * - Microsoft Visual C++ 6.0 (supposedly newer versions too) */ -#if defined(__WATCOMC__) || defined(__sgi) +#if defined(__WATCOMC__) || defined(__sgi) || defined(__hpux) || defined(__BORLANDC__) #define inline #elif defined(_MSC_VER) #define inline __inline Modified: stable/8/lib/libarchive/archive_entry.c ============================================================================== --- stable/8/lib/libarchive/archive_entry.c Mon Aug 1 04:29:04 2011 (r224560) +++ stable/8/lib/libarchive/archive_entry.c Mon Aug 1 07:59:02 2011 (r224561) @@ -32,12 +32,12 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_TYPES_H #include #endif -#ifdef MAJOR_IN_MKDEV +#if MAJOR_IN_MKDEV #include -#else -#ifdef MAJOR_IN_SYSMACROS +#define HAVE_MAJOR +#elif MAJOR_IN_SYSMACROS #include -#endif +#define HAVE_MAJOR #endif #ifdef HAVE_LIMITS_H #include @@ -75,6 +75,13 @@ __FBSDID("$FreeBSD$"); #undef max #define max(a, b) ((a)>(b)?(a):(b)) +#if !defined(HAVE_MAJOR) && !defined(major) +/* Replacement for major/minor/makedev. */ +#define major(x) ((int)(0x00ff & ((x) >> 8))) +#define minor(x) ((int)(0xffff00ff & (x))) +#define makedev(maj,min) ((0xff00 & ((maj)<<8)) | (0xffff00ff & (min))) +#endif + /* Play games to come up with a suitable makedev() definition. */ #ifdef __QNXNTO__ /* QNX. */ @@ -215,7 +222,7 @@ static const wchar_t * aes_get_wcs(struct aes *aes) { wchar_t *w; - int r; + size_t r; /* Return WCS form if we already have it. */ if (aes->aes_set & AES_SET_WCS) @@ -233,7 +240,7 @@ aes_get_wcs(struct aes *aes) if (w == NULL) __archive_errx(1, "No memory for aes_get_wcs()"); r = mbstowcs(w, aes->aes_mbs.s, wcs_length); - if (r > 0) { + if (r != (size_t)-1 && r != 0) { w[r] = 0; aes->aes_set |= AES_SET_WCS; return (aes->aes_wcs = w); @@ -618,6 +625,12 @@ archive_entry_ino(struct archive_entry * return (entry->ae_stat.aest_ino); } +int64_t +archive_entry_ino64(struct archive_entry *entry) +{ + return (entry->ae_stat.aest_ino); +} + mode_t archive_entry_mode(struct archive_entry *entry) { @@ -818,6 +831,13 @@ archive_entry_set_ino(struct archive_ent } void +archive_entry_set_ino64(struct archive_entry *entry, int64_t ino) +{ + entry->stat_valid = 0; + entry->ae_stat.aest_ino = ino; +} + +void archive_entry_set_hardlink(struct archive_entry *entry, const char *target) { aes_set_mbs(&entry->ae_hardlink, target); @@ -847,6 +867,16 @@ archive_entry_copy_hardlink_w(struct arc entry->ae_set &= ~AE_SET_HARDLINK; } +int +archive_entry_update_hardlink_utf8(struct archive_entry *entry, const char *target) +{ + if (target != NULL) + entry->ae_set |= AE_SET_HARDLINK; + else + entry->ae_set &= ~AE_SET_HARDLINK; + return (aes_update_utf8(&entry->ae_hardlink, target)); +} + void archive_entry_set_atime(struct archive_entry *entry, time_t t, long ns) { @@ -1095,6 +1125,16 @@ archive_entry_copy_symlink_w(struct arch entry->ae_set &= ~AE_SET_SYMLINK; } +int +archive_entry_update_symlink_utf8(struct archive_entry *entry, const char *linkname) +{ + if (linkname != NULL) + entry->ae_set |= AE_SET_SYMLINK; + else + entry->ae_set &= ~AE_SET_SYMLINK; + return (aes_update_utf8(&entry->ae_symlink, linkname)); +} + void archive_entry_set_uid(struct archive_entry *entry, uid_t u) { @@ -1186,7 +1226,7 @@ archive_entry_acl_add_entry_w(struct arc archive_entry_acl_add_entry_w_len(entry, type, permset, tag, id, name, wcslen(name)); } -void +static void archive_entry_acl_add_entry_w_len(struct archive_entry *entry, int type, int permset, int tag, int id, const wchar_t *name, size_t len) { @@ -1595,7 +1635,7 @@ __archive_entry_acl_parse_w(struct archi const wchar_t *end; } field[4], name; - int fields; + int fields, n; int type, tag, permset, id; wchar_t sep; @@ -1615,6 +1655,10 @@ __archive_entry_acl_parse_w(struct archi ++fields; } while (sep == L':'); + /* Set remaining fields to blank. */ + for (n = fields; n < 4; ++n) + field[n].start = field[n].end = NULL; + /* Check for a numeric ID in field 1 or 3. */ id = -1; isint_w(field[1].start, field[1].end, &id); @@ -1626,7 +1670,7 @@ __archive_entry_acl_parse_w(struct archi * Solaris extension: "defaultuser::rwx" is the * default ACL corresponding to "user::rwx", etc. */ - if (field[0].end-field[0].start > 7 + if (field[0].end - field[0].start > 7 && wmemcmp(field[0].start, L"default", 7) == 0) { type = ARCHIVE_ENTRY_ACL_TYPE_DEFAULT; field[0].start += 7; @@ -1653,7 +1697,7 @@ __archive_entry_acl_parse_w(struct archi } else if (prefix_w(field[0].start, field[0].end, L"other")) { if (fields == 2 && field[1].start < field[1].end - && ismode_w(field[1].start, field[2].end, &permset)) { + && ismode_w(field[1].start, field[1].end, &permset)) { /* This is Solaris-style "other:rwx" */ } else if (fields == 3 && field[1].start == field[1].end @@ -1687,98 +1731,6 @@ __archive_entry_acl_parse_w(struct archi } /* - * extended attribute handling - */ - -void -archive_entry_xattr_clear(struct archive_entry *entry) -{ - struct ae_xattr *xp; - - while (entry->xattr_head != NULL) { - xp = entry->xattr_head->next; - free(entry->xattr_head->name); - free(entry->xattr_head->value); - free(entry->xattr_head); - entry->xattr_head = xp; - } - - entry->xattr_head = NULL; -} - -void -archive_entry_xattr_add_entry(struct archive_entry *entry, - const char *name, const void *value, size_t size) -{ - struct ae_xattr *xp; - - for (xp = entry->xattr_head; xp != NULL; xp = xp->next) - ; - - if ((xp = (struct ae_xattr *)malloc(sizeof(struct ae_xattr))) == NULL) - /* XXX Error XXX */ - return; - - xp->name = strdup(name); - if ((xp->value = malloc(size)) != NULL) { - memcpy(xp->value, value, size); - xp->size = size; - } else - xp->size = 0; - - xp->next = entry->xattr_head; - entry->xattr_head = xp; -} - - -/* - * returns number of the extended attribute entries - */ -int -archive_entry_xattr_count(struct archive_entry *entry) -{ - struct ae_xattr *xp; - int count = 0; - - for (xp = entry->xattr_head; xp != NULL; xp = xp->next) - count++; - - return count; -} - -int -archive_entry_xattr_reset(struct archive_entry * entry) -{ - entry->xattr_p = entry->xattr_head; - - return archive_entry_xattr_count(entry); -} - -int -archive_entry_xattr_next(struct archive_entry * entry, - const char **name, const void **value, size_t *size) -{ - if (entry->xattr_p) { - *name = entry->xattr_p->name; - *value = entry->xattr_p->value; - *size = entry->xattr_p->size; - - entry->xattr_p = entry->xattr_p->next; - - return (ARCHIVE_OK); - } else { - *name = NULL; - *value = NULL; - *size = (size_t)0; - return (ARCHIVE_WARN); - } -} - -/* - * end of xattr handling - */ - -/* * Parse a string to a positive decimal integer. Returns true if * the string is non-empty and consists only of decimal digits, * false otherwise. @@ -1814,6 +1766,8 @@ ismode_w(const wchar_t *start, const wch { const wchar_t *p; + if (start >= end) + return (0); p = start; *permset = 0; while (p < end) { @@ -1988,6 +1942,18 @@ static struct flag { { "nouunlnk", L"nouunlnk", UF_NOUNLINK, 0 }, { "nouunlink", L"nouunlink", UF_NOUNLINK, 0 }, #endif +#ifdef EXT2_UNRM_FL + { "nouunlink", L"nouunlink", EXT2_UNRM_FL, 0}, +#endif + +#ifdef EXT2_BTREE_FL + { "nobtree", L"nobtree", EXT2_BTREE_FL, 0 }, +#endif + +#ifdef EXT2_ECOMPR_FL + { "nocomperr", L"nocomperr", EXT2_ECOMPR_FL, 0 }, +#endif + #ifdef EXT2_COMPR_FL /* 'c' */ { "nocompress", L"nocompress", EXT2_COMPR_FL, 0 }, #endif @@ -1995,6 +1961,46 @@ static struct flag { #ifdef EXT2_NOATIME_FL /* 'A' */ { "noatime", L"noatime", 0, EXT2_NOATIME_FL}, #endif + +#ifdef EXT2_DIRTY_FL + { "nocompdirty",L"nocompdirty", EXT2_DIRTY_FL, 0}, +#endif + +#ifdef EXT2_COMPRBLK_FL +#ifdef EXT2_NOCOMPR_FL + { "nocomprblk", L"nocomprblk", EXT2_COMPRBLK_FL, EXT2_NOCOMPR_FL}, +#else + { "nocomprblk", L"nocomprblk", EXT2_COMPRBLK_FL, 0}, +#endif +#endif +#ifdef EXT2_DIRSYNC_FL + { "nodirsync", L"nodirsync", EXT2_DIRSYNC_FL, 0}, +#endif +#ifdef EXT2_INDEX_FL + { "nohashidx", L"nohashidx", EXT2_INDEX_FL, 0}, +#endif +#ifdef EXT2_IMAGIC_FL + { "noimagic", L"noimagic", EXT2_IMAGIC_FL, 0}, +#endif +#ifdef EXT3_JOURNAL_DATA_FL + { "nojournal", L"nojournal", EXT3_JOURNAL_DATA_FL, 0}, +#endif +#ifdef EXT2_SECRM_FL + { "nosecuredeletion",L"nosecuredeletion",EXT2_SECRM_FL, 0}, +#endif +#ifdef EXT2_SYNC_FL + { "nosync", L"nosync", EXT2_SYNC_FL, 0}, +#endif +#ifdef EXT2_NOTAIL_FL + { "notail", L"notail", 0, EXT2_NOTAIL_FL}, +#endif +#ifdef EXT2_TOPDIR_FL + { "notopdir", L"notopdir", EXT2_TOPDIR_FL, 0}, +#endif +#ifdef EXT2_RESERVED_FL + { "noreserved", L"noreserved", EXT2_RESERVED_FL, 0}, +#endif + { NULL, NULL, 0, 0 } }; Modified: stable/8/lib/libarchive/archive_entry.h ============================================================================== --- stable/8/lib/libarchive/archive_entry.h Mon Aug 1 04:29:04 2011 (r224560) +++ stable/8/lib/libarchive/archive_entry.h Mon Aug 1 07:59:02 2011 (r224561) @@ -40,14 +40,25 @@ #include /* for wchar_t */ #include +#if defined(_WIN32) && !defined(__CYGWIN__) +#include +#endif + /* Get appropriate definitions of standard POSIX-style types. */ /* These should match the types used in 'struct stat' */ #if defined(_WIN32) && !defined(__CYGWIN__) #define __LA_INT64_T __int64 -#define __LA_UID_T unsigned int -#define __LA_GID_T unsigned int -#define __LA_DEV_T unsigned int -#define __LA_MODE_T unsigned short +# if defined(__BORLANDC__) +# define __LA_UID_T uid_t +# define __LA_GID_T gid_t +# define __LA_DEV_T dev_t +# define __LA_MODE_T mode_t +# else +# define __LA_UID_T short +# define __LA_GID_T short +# define __LA_DEV_T unsigned int +# define __LA_MODE_T unsigned short +# endif #else #include #define __LA_INT64_T int64_t @@ -194,6 +205,7 @@ __LA_DECL const wchar_t *archive_entry_g __LA_DECL const char *archive_entry_hardlink(struct archive_entry *); __LA_DECL const wchar_t *archive_entry_hardlink_w(struct archive_entry *); __LA_DECL __LA_INO_T archive_entry_ino(struct archive_entry *); +__LA_DECL __LA_INT64_T archive_entry_ino64(struct archive_entry *); __LA_DECL __LA_MODE_T archive_entry_mode(struct archive_entry *); __LA_DECL time_t archive_entry_mtime(struct archive_entry *); __LA_DECL long archive_entry_mtime_nsec(struct archive_entry *); @@ -227,6 +239,10 @@ __LA_DECL const wchar_t *archive_entry_u __LA_DECL void archive_entry_set_atime(struct archive_entry *, time_t, long); __LA_DECL void archive_entry_unset_atime(struct archive_entry *); +#if defined(_WIN32) && !defined(__CYGWIN__) +__LA_DECL void archive_entry_copy_bhfi(struct archive_entry *, + BY_HANDLE_FILE_INFORMATION *); +#endif __LA_DECL void archive_entry_set_birthtime(struct archive_entry *, time_t, long); __LA_DECL void archive_entry_unset_birthtime(struct archive_entry *); __LA_DECL void archive_entry_set_ctime(struct archive_entry *, time_t, long); @@ -251,7 +267,14 @@ __LA_DECL int archive_entry_update_gname __LA_DECL void archive_entry_set_hardlink(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_hardlink(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_hardlink_w(struct archive_entry *, const wchar_t *); +__LA_DECL int archive_entry_update_hardlink_utf8(struct archive_entry *, const char *); +#if ARCHIVE_VERSION_NUMBER >= 3000000 +/* Starting with libarchive 3.0, this will be synonym for ino64. */ +__LA_DECL void archive_entry_set_ino(struct archive_entry *, __LA_INT64_T); +#else __LA_DECL void archive_entry_set_ino(struct archive_entry *, unsigned long); +#endif +__LA_DECL void archive_entry_set_ino64(struct archive_entry *, __LA_INT64_T); __LA_DECL void archive_entry_set_link(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_link(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_link_w(struct archive_entry *, const wchar_t *); @@ -274,6 +297,7 @@ __LA_DECL void archive_entry_copy_source __LA_DECL void archive_entry_set_symlink(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_symlink(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_symlink_w(struct archive_entry *, const wchar_t *); +__LA_DECL int archive_entry_update_symlink_utf8(struct archive_entry *, const char *); __LA_DECL void archive_entry_set_uid(struct archive_entry *, __LA_UID_T); __LA_DECL void archive_entry_set_uname(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_uname(struct archive_entry *, const char *); Modified: stable/8/lib/libarchive/archive_entry_link_resolver.c ============================================================================== --- stable/8/lib/libarchive/archive_entry_link_resolver.c Mon Aug 1 04:29:04 2011 (r224560) +++ stable/8/lib/libarchive/archive_entry_link_resolver.c Mon Aug 1 07:59:02 2011 (r224561) @@ -181,8 +181,10 @@ archive_entry_linkify(struct archive_ent /* If it has only one link, then we're done. */ if (archive_entry_nlink(*e) == 1) return; - /* Directories never have hardlinks. */ - if (archive_entry_filetype(*e) == AE_IFDIR) + /* Directories, devices never have hardlinks. */ + if (archive_entry_filetype(*e) == AE_IFDIR + || archive_entry_filetype(*e) == AE_IFBLK + || archive_entry_filetype(*e) == AE_IFCHR) return; switch (res->strategy) { @@ -249,7 +251,7 @@ find_entry(struct archive_entry_linkreso struct links_entry *le; int hash, bucket; dev_t dev; - ino_t ino; + int64_t ino; /* Free a held entry. */ if (res->spare != NULL) { @@ -264,15 +266,15 @@ find_entry(struct archive_entry_linkreso return (NULL); dev = archive_entry_dev(entry); - ino = archive_entry_ino(entry); - hash = dev ^ ino; + ino = archive_entry_ino64(entry); + hash = (int)(dev ^ ino); /* Try to locate this entry in the links cache. */ bucket = hash % res->number_buckets; for (le = res->buckets[bucket]; le != NULL; le = le->next) { if (le->hash == hash && dev == archive_entry_dev(le->canonical) - && ino == archive_entry_ino(le->canonical)) { + && ino == archive_entry_ino64(le->canonical)) { /* * Decrement link count each time and release * the entry if it hits zero. This saves @@ -350,7 +352,7 @@ insert_entry(struct archive_entry_linkre if (res->number_entries > res->number_buckets * 2) grow_hash(res); - hash = archive_entry_dev(entry) ^ archive_entry_ino(entry); + hash = archive_entry_dev(entry) ^ archive_entry_ino64(entry); bucket = hash % res->number_buckets; /* If we could allocate the entry, record it. */ Modified: stable/8/lib/libarchive/archive_entry_private.h ============================================================================== --- stable/8/lib/libarchive/archive_entry_private.h Mon Aug 1 04:29:04 2011 (r224560) +++ stable/8/lib/libarchive/archive_entry_private.h Mon Aug 1 07:59:02 2011 (r224561) @@ -25,6 +25,10 @@ * $FreeBSD$ */ +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif + #ifndef ARCHIVE_ENTRY_PRIVATE_H_INCLUDED #define ARCHIVE_ENTRY_PRIVATE_H_INCLUDED @@ -115,7 +119,7 @@ struct archive_entry { int64_t aest_birthtime; uint32_t aest_birthtime_nsec; gid_t aest_gid; - ino_t aest_ino; + int64_t aest_ino; mode_t aest_mode; uint32_t aest_nlink; uint64_t aest_size; Modified: stable/8/lib/libarchive/archive_entry_stat.c ============================================================================== --- stable/8/lib/libarchive/archive_entry_stat.c Mon Aug 1 04:29:04 2011 (r224560) +++ stable/8/lib/libarchive/archive_entry_stat.c Mon Aug 1 07:59:02 2011 (r224561) @@ -72,7 +72,7 @@ archive_entry_stat(struct archive_entry st->st_dev = archive_entry_dev(entry); st->st_gid = archive_entry_gid(entry); st->st_uid = archive_entry_uid(entry); - st->st_ino = archive_entry_ino(entry); + st->st_ino = archive_entry_ino64(entry); st->st_nlink = archive_entry_nlink(entry); st->st_rdev = archive_entry_rdev(entry); st->st_size = archive_entry_size(entry); Copied: stable/8/lib/libarchive/archive_entry_xattr.c (from r201097, head/lib/libarchive/archive_entry_xattr.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/libarchive/archive_entry_xattr.c Mon Aug 1 07:59:02 2011 (r224561, copy of r201097, head/lib/libarchive/archive_entry_xattr.c) @@ -0,0 +1,158 @@ +/*- + * Copyright (c) 2003-2007 Tim Kientzle + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "archive_platform.h" +__FBSDID("$FreeBSD$"); + +#ifdef HAVE_SYS_STAT_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_LIMITS_H +#include +#endif +#ifdef HAVE_LINUX_FS_H +#include /* for Linux file flags */ +#endif +/* + * Some Linux distributions have both linux/ext2_fs.h and ext2fs/ext2_fs.h. + * As the include guards don't agree, the order of include is important. + */ +#ifdef HAVE_LINUX_EXT2_FS_H +#include /* for Linux file flags */ +#endif +#if defined(HAVE_EXT2FS_EXT2_FS_H) && !defined(__CYGWIN__) +#include /* for Linux file flags */ +#endif +#include +#include +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_WCHAR_H +#include +#endif + +#include "archive.h" +#include "archive_entry.h" +#include "archive_private.h" +#include "archive_entry_private.h" + +/* + * extended attribute handling + */ + +void +archive_entry_xattr_clear(struct archive_entry *entry) +{ + struct ae_xattr *xp; + + while (entry->xattr_head != NULL) { + xp = entry->xattr_head->next; + free(entry->xattr_head->name); + free(entry->xattr_head->value); + free(entry->xattr_head); + entry->xattr_head = xp; + } + + entry->xattr_head = NULL; +} + +void +archive_entry_xattr_add_entry(struct archive_entry *entry, + const char *name, const void *value, size_t size) +{ + struct ae_xattr *xp; + + for (xp = entry->xattr_head; xp != NULL; xp = xp->next) + ; + + if ((xp = (struct ae_xattr *)malloc(sizeof(struct ae_xattr))) == NULL) + /* XXX Error XXX */ + return; + + xp->name = strdup(name); + if ((xp->value = malloc(size)) != NULL) { + memcpy(xp->value, value, size); + xp->size = size; + } else + xp->size = 0; + + xp->next = entry->xattr_head; + entry->xattr_head = xp; +} + + +/* *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Mon Aug 1 07:59:54 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C552C1065677; Mon, 1 Aug 2011 07:59:54 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B338F8FC15; Mon, 1 Aug 2011 07:59:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p717xsMd083702; Mon, 1 Aug 2011 07:59:54 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p717xssi083695; Mon, 1 Aug 2011 07:59:54 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201108010759.p717xssi083695@svn.freebsd.org> From: Martin Matuska Date: Mon, 1 Aug 2011 07:59:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224562 - in stable/8/usr.bin/cpio: . test X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 07:59:54 -0000 Author: mm Date: Mon Aug 1 07:59:54 2011 New Revision: 224562 URL: http://svn.freebsd.org/changeset/base/224562 Log: Sync bsdcpio with 9-CURRENT: MFC on usr.bin/cpio: 203183,204329,207792,211054,211397,212263,224154-224155 MFC 203183 (kientzle): Support -V option to print a dot for each file processed. 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 204329 (ru): Fixed dependencies (make checkdpadd). MFC 207792 (kientzle): bsdcpio 2.8.3 MFC 211054 (kientzle): Fix -R when used with -p. Previously, the 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 211397 (joel): Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while translating these manual pages. Minor corrections by me. Submitted by: Nobuyuki Koganemaru MFC 212263 (gjb): Fix typo in bsdcpio manual: s/libarchive_formats/libarchive-formats MFC 224154 (mm): Update bsdcpio to 2.8.4 Use common code from lib/libarchive/libarchive_fe MFC 224155 (mm): Append to CPIO_SRCS instead of using TAR_SRCS, the variable name is misleading Added: stable/8/usr.bin/cpio/test/test_cmdline.c - copied unchanged from r224154, head/usr.bin/cpio/test/test_cmdline.c stable/8/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.bin.uu - copied unchanged from r224154, head/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.bin.uu stable/8/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.crc.uu - copied unchanged from r224154, head/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.crc.uu stable/8/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.newc.uu - copied unchanged from r224154, head/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.newc.uu stable/8/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu - copied unchanged from r224154, head/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu stable/8/usr.bin/cpio/test/test_option_B_upper.c - copied unchanged from r224154, head/usr.bin/cpio/test/test_option_B_upper.c stable/8/usr.bin/cpio/test/test_option_C_upper.c - copied unchanged from r224154, head/usr.bin/cpio/test/test_option_C_upper.c stable/8/usr.bin/cpio/test/test_option_J_upper.c - copied unchanged from r224154, head/usr.bin/cpio/test/test_option_J_upper.c stable/8/usr.bin/cpio/test/test_option_L_upper.c - copied unchanged from r224154, head/usr.bin/cpio/test/test_option_L_upper.c stable/8/usr.bin/cpio/test/test_option_Z_upper.c - copied unchanged from r224154, head/usr.bin/cpio/test/test_option_Z_upper.c stable/8/usr.bin/cpio/test/test_option_l.c - copied unchanged from r224154, head/usr.bin/cpio/test/test_option_l.c stable/8/usr.bin/cpio/test/test_option_lzma.c - copied unchanged from r224154, head/usr.bin/cpio/test/test_option_lzma.c Deleted: stable/8/usr.bin/cpio/err.c stable/8/usr.bin/cpio/matching.c stable/8/usr.bin/cpio/matching.h stable/8/usr.bin/cpio/pathmatch.c stable/8/usr.bin/cpio/pathmatch.h stable/8/usr.bin/cpio/test/test_option_B.c stable/8/usr.bin/cpio/test/test_option_L.c stable/8/usr.bin/cpio/test/test_option_ell.c Modified: stable/8/usr.bin/cpio/Makefile stable/8/usr.bin/cpio/bsdcpio.1 stable/8/usr.bin/cpio/cmdline.c stable/8/usr.bin/cpio/config_freebsd.h stable/8/usr.bin/cpio/cpio.c stable/8/usr.bin/cpio/cpio.h stable/8/usr.bin/cpio/cpio_platform.h stable/8/usr.bin/cpio/test/Makefile stable/8/usr.bin/cpio/test/main.c stable/8/usr.bin/cpio/test/test.h stable/8/usr.bin/cpio/test/test_0.c stable/8/usr.bin/cpio/test/test_basic.c stable/8/usr.bin/cpio/test/test_format_newc.c stable/8/usr.bin/cpio/test/test_gcpio_compat.c stable/8/usr.bin/cpio/test/test_option_a.c stable/8/usr.bin/cpio/test/test_option_c.c stable/8/usr.bin/cpio/test/test_option_d.c stable/8/usr.bin/cpio/test/test_option_f.c stable/8/usr.bin/cpio/test/test_option_help.c stable/8/usr.bin/cpio/test/test_option_m.c stable/8/usr.bin/cpio/test/test_option_t.c stable/8/usr.bin/cpio/test/test_option_u.c stable/8/usr.bin/cpio/test/test_option_version.c stable/8/usr.bin/cpio/test/test_option_y.c stable/8/usr.bin/cpio/test/test_option_z.c stable/8/usr.bin/cpio/test/test_owner_parse.c stable/8/usr.bin/cpio/test/test_passthrough_dotdot.c stable/8/usr.bin/cpio/test/test_passthrough_reverse.c stable/8/usr.bin/cpio/test/test_pathmatch.c Directory Properties: stable/8/usr.bin/cpio/ (props changed) Modified: stable/8/usr.bin/cpio/Makefile ============================================================================== --- stable/8/usr.bin/cpio/Makefile Mon Aug 1 07:59:02 2011 (r224561) +++ stable/8/usr.bin/cpio/Makefile Mon Aug 1 07:59:54 2011 (r224562) @@ -3,19 +3,28 @@ .include PROG= bsdcpio -BSDCPIO_VERSION_STRING=2.7.0 -SRCS= cpio.c cmdline.c err.c matching.c pathmatch.c +BSDCPIO_VERSION_STRING=2.8.4 + +SRCS= cpio.c cmdline.c + +.PATH: ${.CURDIR}/../../lib/libarchive/libarchive_fe +SRCS+= err.c line_reader.c matching.c pathmatch.c + WARNS?= 6 DPADD= ${LIBARCHIVE} ${LIBZ} ${LIBBZ2} CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\" CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" +CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../lib/libarchive/libarchive_fe + .ifdef RELEASE_CRUNCH # FreeBSD's installer uses cpio in crunched binaries that are # statically linked, cannot use -lcrypto, and are size sensitive. CFLAGS+= -DSMALLER .endif -LDADD+= -larchive -lz -lbz2 -lmd +DPADD= ${LIBARCHIVE} ${LIBZ} ${LIBBZ2} ${LIBMD} ${LIBLZMA} ${LIBBSDXML} +LDADD= -larchive -lz -lbz2 -lmd -llzma -lbsdxml .if ${MK_OPENSSL} != "no" +DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto .endif Modified: stable/8/usr.bin/cpio/bsdcpio.1 ============================================================================== --- stable/8/usr.bin/cpio/bsdcpio.1 Mon Aug 1 07:59:02 2011 (r224561) +++ stable/8/usr.bin/cpio/bsdcpio.1 Mon Aug 1 07:59:54 2011 (r224562) @@ -80,6 +80,9 @@ specified directory. Unless specifically stated otherwise, options are applicable in all operating modes. .Bl -tag -width indent +.It Fl 0 +Read filenames separated by NUL characters instead of newlines. +This is necessary if any of the filenames being read might contain newlines. .It Fl A (o mode only) Append to the specified archive. @@ -142,6 +145,11 @@ for more complete information about the formats currently supported by the underlying .Xr libarchive 3 library. +.It Fl H Ar format +Synonym for +.Fl -format . +.It Fl h , Fl -help +Print usage information. .It Fl I Ar file Read archive from .Ar file . @@ -154,6 +162,14 @@ Disable security checks during extractio This allows extraction via symbolic links and path names containing .Sq .. in the name. +.It Fl J +(o mode only) +Compress the file with xz-compatible compression before writing it. +In input mode, this option is ignored; xz compression is recognized +automatically on input. +.It Fl j +Synonym for +.Fl y . .It Fl L (o and p modes) All symbolic links will be followed. @@ -163,6 +179,11 @@ With this option, the target of the link (p mode only) Create links from the target directory to the original files, instead of copying. +.It Fl lzma +(o mode only) +Compress the file with lzma-compatible compression before writing it. +In input mode, this option is ignored; lzma compression is recognized +automatically on input. .It Fl m (i and p modes) Set file modification time on created files to match @@ -176,6 +197,10 @@ By default, displays the user and group names when they are provided in the archive, or looks up the user and group names in the system password database. +.It Fl no-preserve-owner +(i mode only) +Do not attempt to restore file ownership. +This is the default when run by non-root users. .It Fl O Ar file Write archive to .Ar file . @@ -185,6 +210,10 @@ See above for description. .It Fl p Pass-through mode. See above for description. +.It Fl preserve-owner +(i mode only) +Restore file ownership. +This is the default when run by the root user. .It Fl -quiet Suppress unnecessary messages. .It Fl R Oo user Oc Ns Oo : Oc Ns Oo group Oc Modified: stable/8/usr.bin/cpio/cmdline.c ============================================================================== --- stable/8/usr.bin/cpio/cmdline.c Mon Aug 1 07:59:02 2011 (r224561) +++ stable/8/usr.bin/cpio/cmdline.c Mon Aug 1 07:59:54 2011 (r224562) @@ -46,11 +46,12 @@ __FBSDID("$FreeBSD$"); #endif #include "cpio.h" +#include "err.h" /* * Short options for cpio. Please keep this sorted. */ -static const char *short_options = "0AaBC:F:O:cdE:f:H:hijLlmnopR:rtuvW:yZz"; +static const char *short_options = "0AaBC:cdE:F:f:H:hI:iJjLlmnO:opR:rtuvW:yZz"; /* * Long options for cpio. Please keep this sorted. @@ -68,6 +69,7 @@ static const struct option { { "insecure", 0, OPTION_INSECURE }, { "link", 0, 'l' }, { "list", 0, 't' }, + { "lzma", 0, OPTION_LZMA }, { "make-directories", 0, 'd' }, { "no-preserve-owner", 0, OPTION_NO_PRESERVE_OWNER }, { "null", 0, '0' }, @@ -75,10 +77,12 @@ static const struct option { { "owner", 1, 'R' }, { "pass-through", 0, 'p' }, { "preserve-modification-time", 0, 'm' }, + { "preserve-owner", 0, OPTION_PRESERVE_OWNER }, { "quiet", 0, OPTION_QUIET }, { "unconditional", 0, 'u' }, { "verbose", 0, 'v' }, { "version", 0, OPTION_VERSION }, + { "xz", 0, 'J' }, { NULL, 0, 0 } }; @@ -171,7 +175,7 @@ cpio_getopt(struct cpio *cpio) /* Otherwise, pick up the next word. */ opt_word = *cpio->argv; if (opt_word == NULL) { - cpio_warnc(0, + lafe_warnc(0, "Option -%c requires an argument", opt); return ('?'); @@ -222,13 +226,13 @@ cpio_getopt(struct cpio *cpio) /* Fail if there wasn't a unique match. */ if (match == NULL) { - cpio_warnc(0, + lafe_warnc(0, "Option %s%s is not supported", long_prefix, opt_word); return ('?'); } if (match2 != NULL) { - cpio_warnc(0, + lafe_warnc(0, "Ambiguous option %s%s (matches --%s and --%s)", long_prefix, opt_word, match->name, match2->name); return ('?'); @@ -240,7 +244,7 @@ cpio_getopt(struct cpio *cpio) if (cpio->optarg == NULL) { cpio->optarg = *cpio->argv; if (cpio->optarg == NULL) { - cpio_warnc(0, + lafe_warnc(0, "Option %s%s requires an argument", long_prefix, match->name); return ('?'); @@ -251,7 +255,7 @@ cpio_getopt(struct cpio *cpio) } else { /* Argument forbidden: fail if there is one. */ if (cpio->optarg != NULL) { - cpio_warnc(0, + lafe_warnc(0, "Option %s%s does not allow an argument", long_prefix, match->name); return ('?'); @@ -281,18 +285,23 @@ cpio_getopt(struct cpio *cpio) * A period can be used instead of the colon. * * Sets uid/gid return as appropriate, -1 indicates uid/gid not specified. + * TODO: If the spec uses uname/gname, then return those to the caller + * as well. If the spec provides uid/gid, just return names as NULL. + * + * Returns NULL if no error, otherwise returns error string for display. * */ -int +const char * owner_parse(const char *spec, int *uid, int *gid) { + static char errbuff[128]; const char *u, *ue, *g; *uid = -1; *gid = -1; if (spec[0] == '\0') - return (1); + return ("Invalid empty user/group spec"); /* * Split spec into [user][:.][group] @@ -320,10 +329,8 @@ owner_parse(const char *spec, int *uid, struct passwd *pwent; user = (char *)malloc(ue - u + 1); - if (user == NULL) { - cpio_warnc(errno, "Couldn't allocate memory"); - return (1); - } + if (user == NULL) + return ("Couldn't allocate memory"); memcpy(user, u, ue - u); user[ue - u] = '\0'; if ((pwent = getpwnam(user)) != NULL) { @@ -335,9 +342,10 @@ owner_parse(const char *spec, int *uid, errno = 0; *uid = strtoul(user, &end, 10); if (errno || *end != '\0') { - cpio_warnc(errno, + snprintf(errbuff, sizeof(errbuff), "Couldn't lookup user ``%s''", user); - return (1); + errbuff[sizeof(errbuff) - 1] = '\0'; + return (errbuff); } } free(user); @@ -352,11 +360,12 @@ owner_parse(const char *spec, int *uid, errno = 0; *gid = strtoul(g, &end, 10); if (errno || *end != '\0') { - cpio_warnc(errno, + snprintf(errbuff, sizeof(errbuff), "Couldn't lookup group ``%s''", g); - return (1); + errbuff[sizeof(errbuff) - 1] = '\0'; + return (errbuff); } } } - return (0); + return (NULL); } Modified: stable/8/usr.bin/cpio/config_freebsd.h ============================================================================== --- stable/8/usr.bin/cpio/config_freebsd.h Mon Aug 1 07:59:02 2011 (r224561) +++ stable/8/usr.bin/cpio/config_freebsd.h Mon Aug 1 07:59:54 2011 (r224562) @@ -25,83 +25,33 @@ * $FreeBSD$ */ -/* A default configuration for FreeBSD, used if there is no config.h. */ +/* A hand-tooled configuration for FreeBSD. */ #include /* __FreeBSD_version */ -#if __FreeBSD__ > 4 -#define HAVE_ACL_GET_PERM 0 -#define HAVE_ACL_GET_PERM_NP 1 -#define HAVE_ACL_PERMSET_T 1 -#define HAVE_ACL_USER 1 -#endif -#undef HAVE_ATTR_XATTR_H -#define HAVE_BZLIB_H 1 -#define HAVE_CHFLAGS 1 -#define HAVE_DECL_OPTARG 1 -#define HAVE_DECL_OPTIND 1 -#define HAVE_DIRENT_D_NAMLEN 1 #define HAVE_DIRENT_H 1 -#define HAVE_D_MD_ORDER 1 #define HAVE_ERRNO_H 1 -#undef HAVE_EXT2FS_EXT2_FS_H -#define HAVE_FCHDIR 1 #define HAVE_FCNTL_H 1 -#define HAVE_FNMATCH 1 -#define HAVE_FNMATCH_H 1 -#define HAVE_FNM_LEADING_DIR 1 -#define HAVE_FTRUNCATE 1 #define HAVE_FUTIMES 1 -#undef HAVE_GETXATTR #define HAVE_GRP_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_LANGINFO_H 1 -#undef HAVE_LGETXATTR -#undef HAVE_LIBACL #define HAVE_LIBARCHIVE 1 -#define HAVE_LIBBZ2 1 -#define HAVE_LIBZ 1 -#define HAVE_LIMITS_H 1 -#undef HAVE_LINUX_EXT2_FS_H -#undef HAVE_LINUX_FS_H -#undef HAVE_LISTXATTR -#undef HAVE_LLISTXATTR -#define HAVE_LOCALE_H 1 +#define HAVE_LINK 1 +#define HAVE_LSTAT 1 #define HAVE_LUTIMES 1 -#define HAVE_MALLOC 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMORY_H 1 -#define HAVE_MEMSET 1 -#if __FreeBSD_version >= 450002 /* nl_langinfo introduced */ -#define HAVE_NL_LANGINFO 1 -#endif -#define HAVE_PATHS_H 1 #define HAVE_PWD_H 1 -#define HAVE_SETLOCALE 1 +#define HAVE_READLINK 1 #define HAVE_STDARG_H 1 -#define HAVE_STDINT_H 1 #define HAVE_STDLIB_H 1 -#define HAVE_STRCHR 1 -#define HAVE_STRDUP 1 -#define HAVE_STRERROR 1 -#define HAVE_STRFTIME 1 -#define HAVE_STRINGS_H 1 #define HAVE_STRING_H 1 -#define HAVE_STRRCHR 1 -#undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC -#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 -#define HAVE_SYS_ACL_H 1 -#define HAVE_SYS_IOCTL_H 1 -#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYMLINK 1 +#define HAVE_SYS_CDEFS_H 1 #define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIME_H 1 #define HAVE_TIME_H 1 -#define HAVE_SYS_TYPES_H 1 #define HAVE_UINTMAX_T 1 #define HAVE_UNISTD_H 1 #define HAVE_UNSIGNED_LONG_LONG 1 +#define HAVE_UTIME_H 1 #define HAVE_UTIMES 1 -#define HAVE_VPRINTF 1 -#define HAVE_ZLIB_H 1 -#undef MAJOR_IN_MKDEV -#define STDC_HEADERS 1 +#define HAVE_WCSCMP 1 Modified: stable/8/usr.bin/cpio/cpio.c ============================================================================== --- stable/8/usr.bin/cpio/cpio.c Mon Aug 1 07:59:02 2011 (r224561) +++ stable/8/usr.bin/cpio/cpio.c Mon Aug 1 07:59:54 2011 (r224562) @@ -56,6 +56,9 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_STDARG_H #include #endif +#ifdef HAVE_STDINT_H +#include +#endif #include #ifdef HAVE_STDLIB_H #include @@ -74,11 +77,17 @@ __FBSDID("$FreeBSD$"); #endif #include "cpio.h" +#include "err.h" +#include "line_reader.h" #include "matching.h" /* Fixed size of uname/gname caches. */ #define name_cache_size 101 +#ifndef O_BINARY +#define O_BINARY 0 +#endif + struct name_cache { int probes; int hits; @@ -89,7 +98,8 @@ struct name_cache { } cache[name_cache_size]; }; -static int copy_data(struct archive *, struct archive *); +static int extract_data(struct archive *, struct archive *); +const char * cpio_i64toa(int64_t); static const char *cpio_rename(const char *name); static int entry_to_archive(struct cpio *, struct archive_entry *); static int file_to_archive(struct cpio *, const char *); @@ -117,6 +127,7 @@ main(int argc, char *argv[]) static char buff[16384]; struct cpio _cpio; /* Allocated on stack. */ struct cpio *cpio; + const char *errmsg; int uid, gid; int opt; @@ -124,33 +135,26 @@ main(int argc, char *argv[]) memset(cpio, 0, sizeof(*cpio)); cpio->buff = buff; cpio->buff_size = sizeof(buff); -#if defined(_WIN32) && !defined(__CYGWIN__) - /* Make sure open() function will be used with a binary mode. */ - /* on cygwin, we need something similar, but instead link against */ - /* a special startup object, binmode.o */ - _set_fmode(_O_BINARY); -#endif - /* Need cpio_progname before calling cpio_warnc. */ + /* Need lafe_progname before calling lafe_warnc. */ if (*argv == NULL) - cpio_progname = "bsdcpio"; + lafe_progname = "bsdcpio"; else { #if defined(_WIN32) && !defined(__CYGWIN__) - cpio_progname = strrchr(*argv, '\\'); + lafe_progname = strrchr(*argv, '\\'); #else - cpio_progname = strrchr(*argv, '/'); + lafe_progname = strrchr(*argv, '/'); #endif - if (cpio_progname != NULL) - cpio_progname++; + if (lafe_progname != NULL) + lafe_progname++; else - cpio_progname = *argv; + lafe_progname = *argv; } cpio->uid_override = -1; cpio->gid_override = -1; cpio->argv = argv; cpio->argc = argc; - cpio->line_separator = '\n'; cpio->mode = '\0'; cpio->verbose = 0; cpio->compress = '\0'; @@ -161,19 +165,17 @@ main(int argc, char *argv[]) cpio->extract_flags |= ARCHIVE_EXTRACT_PERM; cpio->extract_flags |= ARCHIVE_EXTRACT_FFLAGS; cpio->extract_flags |= ARCHIVE_EXTRACT_ACL; -#if defined(_WIN32) || defined(__CYGWIN__) - if (bsdcpio_is_privileged()) -#else +#if !defined(_WIN32) && !defined(__CYGWIN__) if (geteuid() == 0) -#endif cpio->extract_flags |= ARCHIVE_EXTRACT_OWNER; +#endif cpio->bytes_per_block = 512; cpio->filename = NULL; while ((opt = cpio_getopt(cpio)) != -1) { switch (opt) { case '0': /* GNU convention: --null, -0 */ - cpio->line_separator = '\0'; + cpio->option_null = 1; break; case 'A': /* NetBSD/OpenBSD */ cpio->option_append = 1; @@ -187,7 +189,7 @@ main(int argc, char *argv[]) case 'C': /* NetBSD/OpenBSD */ cpio->bytes_per_block = atoi(cpio->optarg); if (cpio->bytes_per_block <= 0) - cpio_errc(1, 0, "Invalid blocksize %s", cpio->optarg); + lafe_errc(1, 0, "Invalid blocksize %s", cpio->optarg); break; case 'c': /* POSIX 1997 */ cpio->format = "odc"; @@ -196,13 +198,14 @@ main(int argc, char *argv[]) cpio->extract_flags &= ~ARCHIVE_EXTRACT_NO_AUTODIR; break; case 'E': /* NetBSD/OpenBSD */ - include_from_file(cpio, cpio->optarg); + lafe_include_from_file(&cpio->matching, + cpio->optarg, cpio->option_null); break; case 'F': /* NetBSD/OpenBSD/GNU cpio */ cpio->filename = cpio->optarg; break; case 'f': /* POSIX 1997 */ - exclude(cpio, cpio->optarg); + lafe_exclude(&cpio->matching, cpio->optarg); break; case 'H': /* GNU cpio (also --format) */ cpio->format = cpio->optarg; @@ -215,10 +218,16 @@ main(int argc, char *argv[]) break; case 'i': /* POSIX 1997 */ if (cpio->mode != '\0') - cpio_errc(1, 0, + lafe_errc(1, 0, "Cannot use both -i and -%c", cpio->mode); cpio->mode = opt; break; + case 'J': /* GNU tar, others */ + cpio->compress = opt; + break; + case 'j': /* GNU tar, others */ + cpio->compress = opt; + break; case OPTION_INSECURE: cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_SYMLINKS; cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NODOTDOT; @@ -229,6 +238,9 @@ main(int argc, char *argv[]) case 'l': /* POSIX 1997 */ cpio->option_link = 1; break; + case OPTION_LZMA: /* GNU tar, others */ + cpio->compress = opt; + break; case 'm': /* POSIX 1997 */ cpio->extract_flags |= ARCHIVE_EXTRACT_TIME; break; @@ -243,27 +255,39 @@ main(int argc, char *argv[]) break; case 'o': /* POSIX 1997 */ if (cpio->mode != '\0') - cpio_errc(1, 0, + lafe_errc(1, 0, "Cannot use both -o and -%c", cpio->mode); cpio->mode = opt; break; case 'p': /* POSIX 1997 */ if (cpio->mode != '\0') - cpio_errc(1, 0, + lafe_errc(1, 0, "Cannot use both -p and -%c", cpio->mode); cpio->mode = opt; cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NODOTDOT; break; + case OPTION_PRESERVE_OWNER: + cpio->extract_flags |= ARCHIVE_EXTRACT_OWNER; + break; case OPTION_QUIET: /* GNU cpio */ cpio->quiet = 1; break; case 'R': /* GNU cpio, also --owner */ - if (owner_parse(cpio->optarg, &uid, &gid)) + /* TODO: owner_parse should return uname/gname + * also; use that to set [ug]name_override. */ + errmsg = owner_parse(cpio->optarg, &uid, &gid); + if (errmsg) { + lafe_warnc(-1, "%s", errmsg); usage(); - if (uid != -1) + } + if (uid != -1) { cpio->uid_override = uid; - if (gid != -1) + cpio->uname_override = NULL; + } + if (gid != -1) { cpio->gid_override = gid; + cpio->gname_override = NULL; + } break; case 'r': /* POSIX 1997 */ cpio->option_rename = 1; @@ -290,23 +314,13 @@ main(int argc, char *argv[]) break; #endif case 'y': /* tar convention */ -#if HAVE_LIBBZ2 cpio->compress = opt; -#else - cpio_warnc(0, "bzip2 compression not supported by " - "this version of bsdcpio"); -#endif break; case 'Z': /* tar convention */ cpio->compress = opt; break; case 'z': /* tar convention */ -#if HAVE_LIBZ cpio->compress = opt; -#else - cpio_warnc(0, "gzip compression not supported by " - "this version of bsdcpio"); -#endif break; default: usage(); @@ -321,16 +335,16 @@ main(int argc, char *argv[]) cpio->mode = 'i'; /* -t requires -i */ if (cpio->option_list && cpio->mode != 'i') - cpio_errc(1, 0, "Option -t requires -i", cpio->mode); + lafe_errc(1, 0, "Option -t requires -i"); /* -n requires -it */ if (cpio->option_numeric_uid_gid && !cpio->option_list) - cpio_errc(1, 0, "Option -n requires -it"); + lafe_errc(1, 0, "Option -n requires -it"); /* Can only specify format when writing */ if (cpio->format != NULL && cpio->mode != 'o') - cpio_errc(1, 0, "Option --format requires -o"); + lafe_errc(1, 0, "Option --format requires -o"); /* -l requires -p */ if (cpio->option_link && cpio->mode != 'p') - cpio_errc(1, 0, "Option -l requires -p"); + lafe_errc(1, 0, "Option -l requires -p"); /* TODO: Flag other nonsensical combinations. */ switch (cpio->mode) { @@ -344,7 +358,7 @@ main(int argc, char *argv[]) break; case 'i': while (*cpio->argv != NULL) { - include(cpio, *cpio->argv); + lafe_include(&cpio->matching, *cpio->argv); --cpio->argc; ++cpio->argv; } @@ -355,26 +369,26 @@ main(int argc, char *argv[]) break; case 'p': if (*cpio->argv == NULL || **cpio->argv == '\0') - cpio_errc(1, 0, + lafe_errc(1, 0, "-p mode requires a target directory"); mode_pass(cpio, *cpio->argv); break; default: - cpio_errc(1, 0, + lafe_errc(1, 0, "Must specify at least one of -i, -o, or -p"); } free_cache(cpio->gname_cache); free_cache(cpio->uname_cache); - return (0); + return (cpio->return_value); } -void +static void usage(void) { const char *p; - p = cpio_progname; + p = lafe_progname; fprintf(stderr, "Brief Usage:\n"); fprintf(stderr, " List: %s -it < archive\n", p); @@ -390,12 +404,7 @@ static const char *long_help_msg = "Common Options:\n" " -v Verbose\n" "Create: %p -o [options] < [list of files] > [archive]\n" -#ifdef HAVE_BZLIB_H - " -y Compress archive with bzip2\n" -#endif -#ifdef HAVE_ZLIB_H - " -z Compress archive with gzip\n" -#endif + " -J,-y,-z,--lzma Compress archive with xz/bzip2/gzip/lzma\n" " --format {odc|newc|ustar} Select archive format\n" "List: %p -it < [archive]\n" "Extract: %p -i [options] < [archive]\n"; @@ -417,7 +426,7 @@ long_help(void) const char *prog; const char *p; - prog = cpio_progname; + prog = lafe_progname; fflush(stderr); @@ -449,19 +458,33 @@ version(void) static void mode_out(struct cpio *cpio) { - unsigned long blocks; struct archive_entry *entry, *spare; - struct line_reader *lr; + struct lafe_line_reader *lr; const char *p; int r; if (cpio->option_append) - cpio_errc(1, 0, "Append mode not yet supported."); + lafe_errc(1, 0, "Append mode not yet supported."); + + cpio->archive_read_disk = archive_read_disk_new(); + if (cpio->archive_read_disk == NULL) + lafe_errc(1, 0, "Failed to allocate archive object"); + if (cpio->option_follow_links) + archive_read_disk_set_symlink_logical(cpio->archive_read_disk); + else + archive_read_disk_set_symlink_physical(cpio->archive_read_disk); + archive_read_disk_set_standard_lookup(cpio->archive_read_disk); + cpio->archive = archive_write_new(); if (cpio->archive == NULL) - cpio_errc(1, 0, "Failed to allocate archive object"); + lafe_errc(1, 0, "Failed to allocate archive object"); switch (cpio->compress) { -#ifndef SMALLER + case 'J': + r = archive_write_set_compression_xz(cpio->archive); + break; + case OPTION_LZMA: + r = archive_write_set_compression_lzma(cpio->archive); + break; case 'j': case 'y': r = archive_write_set_compression_bzip2(cpio->archive); break; @@ -471,41 +494,30 @@ mode_out(struct cpio *cpio) case 'Z': r = archive_write_set_compression_compress(cpio->archive); break; -#endif - case '\0': + default: r = archive_write_set_compression_none(cpio->archive); break; - default: - cpio_errc(1, 0, "Unrecognized compression option"); } - if (r != ARCHIVE_OK) - cpio_errc(1, 0, "Unsupported compression format"); -#ifdef SMALLER - if (strcmp(cpio->format, "cpio")) - r = archive_write_set_format_cpio(cpio->archive); - else if (strcmp(cpio->format, "odc")) - r = archive_write_set_format_cpio(cpio->archive); - else if (strcmp(cpio->format, "newc")) - r = archive_write_set_format_cpio(cpio->archive); - else if (strcmp(cpio->format, "ustar")) - r = archive_write_set_format_cpio(cpio->archive); -#else + if (r < ARCHIVE_WARN) + lafe_errc(1, 0, "Requested compression not available"); r = archive_write_set_format_by_name(cpio->archive, cpio->format); -#endif if (r != ARCHIVE_OK) - cpio_errc(1, 0, archive_error_string(cpio->archive)); + lafe_errc(1, 0, "%s", archive_error_string(cpio->archive)); archive_write_set_bytes_per_block(cpio->archive, cpio->bytes_per_block); cpio->linkresolver = archive_entry_linkresolver_new(); archive_entry_linkresolver_set_strategy(cpio->linkresolver, archive_format(cpio->archive)); + /* + * The main loop: Copy each file into the output archive. + */ r = archive_write_open_file(cpio->archive, cpio->filename); if (r != ARCHIVE_OK) - cpio_errc(1, 0, archive_error_string(cpio->archive)); - lr = process_lines_init("-", cpio->line_separator); - while ((p = process_lines_next(lr)) != NULL) + lafe_errc(1, 0, "%s", archive_error_string(cpio->archive)); + lr = lafe_line_reader("-", cpio->option_null); + while ((p = lafe_line_reader_next(lr)) != NULL) file_to_archive(cpio, p); - process_lines_free(lr); + lafe_line_reader_free(lr); /* * The hardlink detection may have queued up a couple of entries @@ -522,12 +534,13 @@ mode_out(struct cpio *cpio) r = archive_write_close(cpio->archive); if (r != ARCHIVE_OK) - cpio_errc(1, 0, archive_error_string(cpio->archive)); + lafe_errc(1, 0, "%s", archive_error_string(cpio->archive)); if (!cpio->quiet) { - blocks = (archive_position_uncompressed(cpio->archive) + 511) - / 512; - fprintf(stderr, "%lu %s\n", blocks, + int64_t blocks = + (archive_position_uncompressed(cpio->archive) + 511) + / 512; + fprintf(stderr, "%lu %s\n", (unsigned long)blocks, blocks == 1 ? "block" : "blocks"); } archive_write_finish(cpio->archive); @@ -541,58 +554,42 @@ mode_out(struct cpio *cpio) static int file_to_archive(struct cpio *cpio, const char *srcpath) { - struct stat st; const char *destpath; struct archive_entry *entry, *spare; size_t len; const char *p; -#if !defined(_WIN32) || defined(__CYGWIN__) - int lnklen; -#endif int r; /* * Create an archive_entry describing the source file. * - * XXX TODO: rework to use archive_read_disk_entry_from_file() */ entry = archive_entry_new(); if (entry == NULL) - cpio_errc(1, 0, "Couldn't allocate entry"); + lafe_errc(1, 0, "Couldn't allocate entry"); archive_entry_copy_sourcepath(entry, srcpath); - - /* Get stat information. */ - if (cpio->option_follow_links) - r = stat(srcpath, &st); - else - r = lstat(srcpath, &st); - if (r != 0) { - cpio_warnc(errno, "Couldn't stat \"%s\"", srcpath); - archive_entry_free(entry); - return (0); + r = archive_read_disk_entry_from_file(cpio->archive_read_disk, + entry, -1, NULL); + if (r < ARCHIVE_FAILED) + lafe_errc(1, 0, "%s", + archive_error_string(cpio->archive_read_disk)); + if (r < ARCHIVE_OK) + lafe_warnc(0, "%s", + archive_error_string(cpio->archive_read_disk)); + if (r <= ARCHIVE_FAILED) { + cpio->return_value = 1; + return (r); + } + + if (cpio->uid_override >= 0) { + archive_entry_set_uid(entry, cpio->uid_override); + archive_entry_set_uname(entry, cpio->uname_override); + } + if (cpio->gid_override >= 0) { + archive_entry_set_gid(entry, cpio->gid_override); + archive_entry_set_gname(entry, cpio->gname_override); } - if (cpio->uid_override >= 0) - st.st_uid = cpio->uid_override; - if (cpio->gid_override >= 0) - st.st_gid = cpio->gid_override; - archive_entry_copy_stat(entry, &st); - -#if !defined(_WIN32) || defined(__CYGWIN__) - /* If its a symlink, pull the target. */ - if (S_ISLNK(st.st_mode)) { - lnklen = readlink(srcpath, cpio->buff, cpio->buff_size); - if (lnklen < 0) { - cpio_warnc(errno, - "%s: Couldn't read symbolic link", srcpath); - archive_entry_free(entry); - return (0); - } - cpio->buff[lnklen] = 0; - archive_entry_set_symlink(entry, cpio->buff); - } -#endif - /* * Generate a destination path for this entry. * "destination path" is the name to which it will be copied in @@ -610,7 +607,7 @@ file_to_archive(struct cpio *cpio, const free(cpio->pass_destpath); cpio->pass_destpath = malloc(cpio->pass_destpath_alloc); if (cpio->pass_destpath == NULL) - cpio_errc(1, ENOMEM, + lafe_errc(1, ENOMEM, "Can't allocate path buffer"); } strcpy(cpio->pass_destpath, cpio->destdir); @@ -631,18 +628,18 @@ file_to_archive(struct cpio *cpio, const */ spare = NULL; if (cpio->linkresolver != NULL - && !S_ISDIR(st.st_mode)) { + && archive_entry_filetype(entry) != AE_IFDIR) { archive_entry_linkify(cpio->linkresolver, &entry, &spare); } if (entry != NULL) { r = entry_to_archive(cpio, entry); archive_entry_free(entry); - } - if (spare != NULL) { - if (r == 0) - r = entry_to_archive(cpio, spare); - archive_entry_free(spare); + if (spare != NULL) { + if (r == 0) + r = entry_to_archive(cpio, spare); + archive_entry_free(spare); + } } return (r); } @@ -676,7 +673,7 @@ entry_to_archive(struct cpio *cpio, stru /* Save the original entry in case we need it later. */ t = archive_entry_clone(entry); if (t == NULL) - cpio_errc(1, ENOMEM, "Can't create link"); + lafe_errc(1, ENOMEM, "Can't create link"); /* Note: link(2) doesn't create parent directories, * so we use archive_write_header() instead as a * convenience. */ @@ -686,15 +683,15 @@ entry_to_archive(struct cpio *cpio, stru r = archive_write_header(cpio->archive, t); archive_entry_free(t); if (r != ARCHIVE_OK) - cpio_warnc(archive_errno(cpio->archive), - archive_error_string(cpio->archive)); + lafe_warnc(archive_errno(cpio->archive), + "%s", archive_error_string(cpio->archive)); if (r == ARCHIVE_FATAL) exit(1); #ifdef EXDEV if (r != ARCHIVE_OK && archive_errno(cpio->archive) == EXDEV) { /* Cross-device link: Just fall through and use * the original entry to copy the file over. */ - cpio_warnc(0, "Copying file instead"); + lafe_warnc(0, "Copying file instead"); } else #endif return (0); @@ -706,9 +703,9 @@ entry_to_archive(struct cpio *cpio, stru */ if (archive_entry_filetype(entry) == AE_IFREG) { if (archive_entry_size(entry) > 0) { - fd = open(srcpath, O_RDONLY); + fd = open(srcpath, O_RDONLY | O_BINARY); if (fd < 0) { - cpio_warnc(errno, + lafe_warnc(errno, "%s: could not open file", srcpath); goto cleanup; } @@ -720,7 +717,7 @@ entry_to_archive(struct cpio *cpio, stru r = archive_write_header(cpio->archive, entry); if (r != ARCHIVE_OK) - cpio_warnc(archive_errno(cpio->archive), + lafe_warnc(archive_errno(cpio->archive), "%s: %s", srcpath, archive_error_string(cpio->archive)); @@ -734,10 +731,10 @@ entry_to_archive(struct cpio *cpio, stru r = archive_write_data(cpio->archive, cpio->buff, bytes_read); if (r < 0) - cpio_errc(1, archive_errno(cpio->archive), - archive_error_string(cpio->archive)); + lafe_errc(1, archive_errno(cpio->archive), + "%s", archive_error_string(cpio->archive)); if (r < bytes_read) { - cpio_warnc(0, + lafe_warnc(0, "Truncated write; file may have grown while being archived."); } bytes_read = read(fd, cpio->buff, cpio->buff_size); @@ -766,7 +763,7 @@ restore_time(struct cpio *cpio, struct a (void)name; /* UNUSED */ if (!warned) - cpio_warnc(0, "Can't restore access times on this platform"); + lafe_warnc(0, "Can't restore access times on this platform"); warned = 1; return (fd); #else @@ -785,7 +782,7 @@ restore_time(struct cpio *cpio, struct a times[0].tv_sec = archive_entry_atime(entry); times[0].tv_usec = archive_entry_atime_nsec(entry) / 1000; -#ifdef HAVE_FUTIMES +#if defined(HAVE_FUTIMES) && !defined(__CYGWIN__) if (fd >= 0 && futimes(fd, times) == 0) return (fd); #endif @@ -801,9 +798,10 @@ restore_time(struct cpio *cpio, struct a #ifdef HAVE_LUTIMES if (lutimes(name, times) != 0) #else - if (!S_ISLNK(archive_entry_mode(entry)) && utimes(name, times) != 0) + if ((AE_IFLNK != archive_entry_filetype(entry)) + && utimes(name, times) != 0) #endif - cpio_warnc(errno, "Can't update time for %s", name); + lafe_warnc(errno, "Can't update time for %s", name); #endif return (fd); } @@ -816,38 +814,32 @@ mode_in(struct cpio *cpio) struct archive_entry *entry; struct archive *ext; const char *destpath; - unsigned long blocks; int r; ext = archive_write_disk_new(); if (ext == NULL) - cpio_errc(1, 0, "Couldn't allocate restore object"); + lafe_errc(1, 0, "Couldn't allocate restore object"); r = archive_write_disk_set_options(ext, cpio->extract_flags); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Mon Aug 1 08:00:46 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF85C106566B; Mon, 1 Aug 2011 08:00:46 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDBA48FC28; Mon, 1 Aug 2011 08:00:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p7180k38083800; Mon, 1 Aug 2011 08:00:46 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7180ksB083795; Mon, 1 Aug 2011 08:00:46 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201108010800.p7180ksB083795@svn.freebsd.org> From: Martin Matuska Date: Mon, 1 Aug 2011 08:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224563 - in stable/8/usr.bin/tar: . test X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 08:00:47 -0000 Author: mm Date: Mon Aug 1 08:00:46 2011 New Revision: 224563 URL: http://svn.freebsd.org/changeset/base/224563 Log: Sync bsdtar with 9-CURRENT: MFC on usr.bin/bsdtar: 203569,203571,203586-203590,203593-203594,204329,205076,206463-206466, 206484-206485,206487,207786,207790-207791,208028,209152,210720,213469, 223541,223573,224153,224158 MFC 203569 (kientzle): bsdtar doesn't actually know what compression is supported by libarchive and it should not pretend that it does. It should just pass along the user's request and handle an error if it's not supported. MFC 203571 (kientzle): Fill in some missing error handling, be a little more careful about error reporting, prefer int64_t to off_t. MFC 203586 (kientzle): Trim out some unused configuration variables, remove some unused headers, etc. MFC 203587 (kientzle): Minor code rework. MFC 203588 (kientzle): Restructure the logic that determines when we're crossing a mount point. In particular, this carves out a place for detecting and excluding synthetic or network filesystems. MFC 203589 (kientzle): Various portability workarounds for non-FreeBSD platforms. MFC 203590 (kientzle): Style & Portability: Use archive_entry methods to examine file information, change some functions to static, remove some unused headers. MFC 203593 (kientzle): Merge a bunch of refactoring from Joerg Sonnenberger to isolate common code used by tar and cpio (and useful to other libarchive clients). The functions here are prefixed with "lafe" (libarchive front-end) to indicate their use. MFC 203594 (kientzle): Simplify, remove unnecessary code. MFC 204329 (ru) Fixed dependencies (make checkdpadd). MFC 205076 (uqs): Fix several typos in macros or macro misusage. Found by: make manlint MFC 206463 (kientzle): Correct the markup for the -s option, document the iso9660:rockridge and mtree:indent options MFC 206464 (kientzle): Remove an unnecessary include and conditionalize some code. MFC 206465 (kientzle): Consistently specify O_BINARY when opening files. MFC 206466 (kientzle): Fix -X. MFC 206484 (kientzle): Diff reduction against bsdtar 2.8.3 MFC 206485 (kientzle): Diff reduction against bsdtar 2.8.3 MFC 206487 (kientzle): If a file is specifically both included and excluded, then: * It is not extracted (because it is excluded) * If it's not present in the archive, then an error is reported (because the file was requested and not found) * If it is present in the archive, no error is reported. Previously, this would always report an error because the exclusion prevented the entry from matching the inclusion. Also, tar is now more reluctant to report unmatched inclusions. Previously, "tar x file1 'file*'" against an archive that contained a single entry "file1" would match file1 and then report an error for the second pattern because it wasn't matched. It now considers both inclusions to be matched and reports no error. MFC 207786 (kientzle): Various manpage updates, including many long-option synonyms that were previously undocumented. MFC 207790 (kientzle): Config updates. MFC 207791 (kientzle) FreeBSD is now using bsdtar 2.8.3. MFC 208028 (uqs): mdoc: move remaining sections into consistent order This pertains mostly to FILES, HISTORY, EXIT STATUS and AUTHORS sections. Found by: mdocml lint run MFC 209152 (kientzle): If the compressed data is larger than the uncompressed, report the compression ratio as 0% instead of displaying nonsense triggered by numeric overflow. This is common when dealing with uncompressed files when the I/O blocking causes there to be small transient differences in the accounting. Thanks to: Boris Samorodov MFC 210720 (joel): Fix typos. MFC 213469 (kientzle): Recognize both ! and ^ as markers for negated character classes. Submitted by: Mykola Dzham MFC 223541 (kientzle): If there is a read error reading Y/N confirmation from the keyboard, exit immediately with an error. If there is an error opening or reading a file to put into the archive, set the return value for a deferred error exit. MFC 223573 (kientzle): The --newer-than test should descend into old directories to look for new files. MFC 224153 (mm): Update bsdtar to 2.8.4 Use common code from lib/libarchive/libarchive_fe MFC 224158 (mm): Fix accidential commit part: Include "bsdtar_platform.h" instead of "lafe_platform.h" Added: stable/8/usr.bin/tar/test/test_empty_mtree.c - copied unchanged from r224153, head/usr.bin/tar/test/test_empty_mtree.c stable/8/usr.bin/tar/test/test_option_T_upper.c - copied unchanged from r224153, head/usr.bin/tar/test/test_option_T_upper.c stable/8/usr.bin/tar/test/test_option_r.c - copied unchanged from r224153, head/usr.bin/tar/test/test_option_r.c Deleted: stable/8/usr.bin/tar/err.c stable/8/usr.bin/tar/err.h stable/8/usr.bin/tar/matching.c stable/8/usr.bin/tar/test/test_option_T.c Modified: stable/8/usr.bin/tar/Makefile stable/8/usr.bin/tar/bsdtar.1 stable/8/usr.bin/tar/bsdtar.c stable/8/usr.bin/tar/bsdtar.h stable/8/usr.bin/tar/bsdtar_platform.h stable/8/usr.bin/tar/cmdline.c stable/8/usr.bin/tar/config_freebsd.h stable/8/usr.bin/tar/getdate.c stable/8/usr.bin/tar/read.c stable/8/usr.bin/tar/subst.c stable/8/usr.bin/tar/test/Makefile stable/8/usr.bin/tar/test/main.c stable/8/usr.bin/tar/test/test.h stable/8/usr.bin/tar/test/test_0.c stable/8/usr.bin/tar/test/test_basic.c stable/8/usr.bin/tar/test/test_copy.c stable/8/usr.bin/tar/test/test_help.c stable/8/usr.bin/tar/test/test_option_q.c stable/8/usr.bin/tar/test/test_option_s.c stable/8/usr.bin/tar/test/test_patterns.c stable/8/usr.bin/tar/test/test_patterns_2.tar.uu stable/8/usr.bin/tar/test/test_patterns_3.tar.uu stable/8/usr.bin/tar/test/test_patterns_4.tar.uu stable/8/usr.bin/tar/test/test_stdio.c stable/8/usr.bin/tar/test/test_strip_components.c stable/8/usr.bin/tar/test/test_symlink_dir.c stable/8/usr.bin/tar/test/test_version.c stable/8/usr.bin/tar/tree.h stable/8/usr.bin/tar/util.c stable/8/usr.bin/tar/write.c Directory Properties: stable/8/usr.bin/tar/ (props changed) Modified: stable/8/usr.bin/tar/Makefile ============================================================================== --- stable/8/usr.bin/tar/Makefile Mon Aug 1 07:59:54 2011 (r224562) +++ stable/8/usr.bin/tar/Makefile Mon Aug 1 08:00:46 2011 (r224563) @@ -2,25 +2,33 @@ .include PROG= bsdtar -BSDTAR_VERSION_STRING=2.7.0 +BSDTAR_VERSION_STRING=2.8.4 SRCS= bsdtar.c \ cmdline.c \ - err.c \ getdate.c \ - matching.c \ read.c \ subst.c \ tree.c \ util.c \ write.c -DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA} -LDADD= -larchive -lbz2 -lz -lmd -llzma + +.PATH: ${.CURDIR}/../../lib/libarchive/libarchive_fe +SRCS+= err.c \ + line_reader.c \ + matching.c \ + pathmatch.c + +WARNS?= 6 +DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBLZMA} ${LIBBSDXML} +LDADD= -larchive -lbz2 -lz -lmd -llzma -lbsdxml .if ${MK_OPENSSL} != "no" +DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto .endif CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\" CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../lib/libarchive +CFLAGS+= -I${.CURDIR}/../../lib/libarchive/libarchive_fe SYMLINKS= bsdtar ${BINDIR}/tar MLINKS= bsdtar.1 tar.1 DEBUG_FLAGS=-g Modified: stable/8/usr.bin/tar/bsdtar.1 ============================================================================== --- stable/8/usr.bin/tar/bsdtar.1 Mon Aug 1 07:59:54 2011 (r224562) +++ stable/8/usr.bin/tar/bsdtar.1 Mon Aug 1 08:00:46 2011 (r224563) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 25, 2009 +.Dd Oct 12, 2009 .Dt BSDTAR 1 .Os .Sh NAME @@ -50,8 +50,8 @@ .Sh DESCRIPTION .Nm creates and manipulates streaming archive files. -This implementation can extract from tar, pax, cpio, zip, jar, ar, -and ISO 9660 cdrom images and can create tar, pax, cpio, ar, +This implementation can extract from tar, pax, cpio, zip, jar, ar, xar, +rpm and ISO 9660 cdrom images and can create tar, pax, cpio, ar, zip, and shar archives. .Pp The first synopsis form shows a @@ -67,6 +67,8 @@ is a mode indicator from the following l .Bl -tag -compact -width indent .It Fl c Create a new archive containing the specified items. +The long option form is +.Fl Fl create . .It Fl r Like .Fl c , @@ -75,8 +77,12 @@ Note that this only works on uncompresse The .Fl f option is required. +The long option form is +.Fl Fl append . .It Fl t List archive contents to stdout. +The long option form is +.Fl Fl list . .It Fl u Like .Fl r , @@ -86,11 +92,15 @@ Note that this only works on uncompresse The .Fl f option is required. +The long form is +.Fl Fl update . .It Fl x Extract to disk from the archive. If a file with the same name appears more than once in the archive, each copy will be extracted, with later copies overwriting (replacing) earlier copies. +The long option form is +.Fl Fl extract . .El .Pp In @@ -127,14 +137,18 @@ In contrast, .Dl Nm Fl c Fl f Pa - Pa newfile Pa original.tar creates a new archive with only two entries. Similarly, -.Dl Nm Fl czf Pa - Fl -format Cm pax Cm @ Ns Pa - +.Dl Nm Fl czf Pa - Fl Fl format Cm pax Cm @ Ns Pa - reads an archive from standard input (whose format will be determined automatically) and converts it into a gzip-compressed pax-format archive on stdout. In this way, .Nm can be used to convert archives from one format to another. -.It Fl b Ar blocksize +.It Fl B , Fl Fl read-full-blocks +Ignored for compatibility with other +.Xr tar 1 +implementations. +.It Fl b Ar blocksize , Fl Fl block-size Ar blocksize Specify the block size, in 512-byte records, for tape drive I/O. As a rule, this argument is only needed when reading from or writing to tape drives, and usually not even then as the default block size of @@ -144,21 +158,22 @@ In c and r mode, this changes the direct the following files. In x mode, change directories after opening the archive but before extracting entries from the archive. -.It Fl -check-links -(c and r modes only) -Issue a warning message unless all links to each file are archived. -.It Fl -chroot +.It Fl Fl chroot (x mode only) .Fn chroot to the current directory after processing any .Fl C options and before extracting any files. -.It Fl -exclude Ar pattern +.It Fl Fl disable-copyfile +Mac OS X specific. +Disable the use of +.Xr copyfile 3 . +.It Fl Fl exclude Ar pattern Do not process files or directories that match the specified pattern. Note that exclusions take precedence over patterns or filenames specified on the command line. -.It Fl -format Ar format +.It Fl Fl format Ar format (c, r, u mode only) Use the specified format for the created archive. Supported formats include @@ -172,16 +187,39 @@ Other formats may also be supported; see for more information about currently-supported formats. In r and u modes, when extending an existing archive, the format specified here must be compatible with the format of the existing archive on disk. -.It Fl f Ar file +.It Fl f Ar file , Fl Fl file Ar file Read the archive from or write the archive to the specified file. The filename can be .Pa - for standard input or standard output. -If not specified, the default tape device will be used. -(On +The default varies by system; +on .Fx , -the default tape device is -.Pa /dev/sa0 . ) +the default is +.Pa /dev/sa0 ; +on Linux, the default is +.Pa /dev/st0 . +.It Fl Fl gid Ar id +Use the provided group id number. +On extract, this overrides the group id in the archive; +the group name in the archive will be ignored. +On create, this overrides the group id read from disk; +if +.Fl Fl gname +is not also specified, the group name will be set to +match the group id. +.It Fl Fl gname Ar name +Use the provided group name. +On extract, this overrides the group name in the archive; +if the provided group name does not exist on the system, +the group id +(from the archive or from the +.Fl Fl gid +option) +will be used instead. +On create, this sets the group name that will be stored +in the archive; +the name will not be verified against the system group database. .It Fl H (c and r mode only) Symbolic links named on the command line will be followed; the @@ -193,25 +231,36 @@ Synonym for .It Fl I Synonym for .Fl T . -.It Fl -include Ar pattern +.It Fl Fl help +Show usage. +.It Fl Fl include Ar pattern Process only files or directories that match the specified pattern. Note that exclusions specified with -.Fl -exclude +.Fl Fl exclude take precedence over inclusions. If no inclusions are explicitly specified, all entries are processed by default. The -.Fl -include +.Fl Fl include option is especially useful when filtering archives. For example, the command -.Dl Nm Fl c Fl f Pa new.tar Fl -include='*foo*' Cm @ Ns Pa old.tgz +.Dl Nm Fl c Fl f Pa new.tar Fl Fl include='*foo*' Cm @ Ns Pa old.tgz creates a new archive .Pa new.tar containing only the entries from .Pa old.tgz containing the string .Sq foo . -.It Fl j +.It Fl J , Fl Fl xz +(c mode only) +Compress the resulting archive with +.Xr xz 1 . +In extract or list modes, this option is ignored. +Note that, unlike other +.Nm tar +implementations, this implementation recognizes XZ compression +automatically when reading archives. +.It Fl j , Fl Fl bzip , Fl Fl bzip2 , Fl Fl bunzip2 (c mode only) Compress the resulting archive with .Xr bzip2 1 . @@ -220,69 +269,99 @@ Note that, unlike other .Nm tar implementations, this implementation recognizes bzip2 compression automatically when reading archives. -.It Fl k +.It Fl k , Fl Fl keep-old-files (x mode only) Do not overwrite existing files. In particular, if a file appears more than once in an archive, later copies will not overwrite earlier copies. -.It Fl -keep-newer-files +.It Fl Fl keep-newer-files (x mode only) Do not overwrite existing files that are newer than the versions appearing in the archive being extracted. -.It Fl L +.It Fl L , Fl Fl dereference (c and r mode only) All symbolic links will be followed. Normally, symbolic links are archived as such. With this option, the target of the link will be archived instead. -.It Fl l -This is a synonym for the -.Fl -check-links -option. -.It Fl m +.It Fl l , Fl Fl check-links +(c and r modes only) +Issue a warning message unless all links to each file are archived. +.It Fl Fl lzma +(c mode only) Compress the resulting archive with the original LZMA algorithm. +Use of this option is discouraged and new archives should be created with +.Fl Fl xz +instead. +Note that, unlike other +.Nm tar +implementations, this implementation recognizes LZMA compression +automatically when reading archives. +.It Fl m , Fl Fl modification-time (x mode only) Do not extract modification time. By default, the modification time is set to the time stored in the archive. -.It Fl n +.It Fl n , Fl Fl norecurse , Fl Fl no-recursion (c, r, u modes only) Do not recursively archive the contents of directories. -.It Fl -newer Ar date +.It Fl Fl newer Ar date (c, r, u modes only) Only include files and directories newer than the specified date. This compares ctime entries. -.It Fl -newer-mtime Ar date +.It Fl Fl newer-mtime Ar date (c, r, u modes only) Like -.Fl -newer , +.Fl Fl newer , except it compares mtime entries instead of ctime entries. -.It Fl -newer-than Pa file +.It Fl Fl newer-than Pa file (c, r, u modes only) Only include files and directories newer than the specified file. This compares ctime entries. -.It Fl -newer-mtime-than Pa file +.It Fl Fl newer-mtime-than Pa file (c, r, u modes only) Like -.Fl -newer-than , +.Fl Fl newer-than , except it compares mtime entries instead of ctime entries. -.It Fl -nodump +.It Fl Fl nodump (c and r modes only) Honor the nodump file flag by skipping this file. -.It Fl -null +.It Fl Fl null (use with -.Fl I , -.Fl T , +.Fl I or -.Fl X ) +.Fl T ) Filenames or patterns are separated by null characters, not by newlines. This is often used to read filenames output by the .Fl print0 option to .Xr find 1 . -.It Fl -numeric-owner +.It Fl Fl no-same-owner +(x mode only) +Do not extract owner and group IDs. +This is the reverse of +.Fl Fl same-owner +and the default behavior if +.Nm +is run as non-root. +.It Fl Fl no-same-permissions (x mode only) -Ignore symbolic user and group names when restoring archives to disk, -only numeric uid and gid values will be obeyed. -.It Fl O +Do not extract full permissions (SGID, SUID, sticky bit, ACLs, +extended attributes or extended file flags). +This is the reverse of +.Fl p +and the default behavior if +.Nm +is run as non-root. +.It Fl Fl numeric-owner +This is equivalent to +.Fl Fl uname +.Qq +.Fl Fl gname +.Qq . +On extract, it causes user and group names in the archive +to be ignored in favor of the numeric user and group ids. +On create, it causes user and group names to not be stored +in the archive. +.It Fl O , Fl Fl to-stdout (x, t modes only) In extract (-x) mode, files will be written to standard out rather than being extracted to disk. @@ -301,11 +380,11 @@ the archive will be discarded. .It Fl o (c, r, u mode) A synonym for -.Fl -format Ar ustar -.It Fl -one-file-system +.Fl Fl format Ar ustar +.It Fl Fl one-file-system (c, r, and u modes) Do not cross mount points. -.It Fl -options Ar options +.It Fl Fl options Ar options Select optional behaviors for particular modules. The argument is a text string containing comma-separated keywords and values. @@ -336,6 +415,13 @@ This is enabled by default, use or .Cm iso9660:!joliet to disable. +.It Cm iso9660:rockridge +Support Rock Ridge extensions. +This is enabled by default, use +.Cm !rockridge +or +.Cm iso9660:!rockridge +to disable. .It Cm gzip:compression-level A decimal integer from 0 to 9 specifying the gzip compression level. .It Cm xz:compression-level @@ -359,11 +445,17 @@ Enable generation of .Cm /set lines in the output. .It Cm mtree:indent -XXX need explanation XXX +Produce human-readable output by indenting options and splitting lines +to fit into 80 columns. +.It Cm zip:compression Ns = Ns Ar type +Use +.Ar type +as compression method. +Supported values are store (uncompressed) and deflate (gzip algorithm). .El If a provided option is not supported by any module, that is a fatal error. -.It Fl P +.It Fl P , Fl Fl absolute-paths Preserve pathnames. By default, absolute pathnames (those that begin with a / character) have the leading slash removed both when creating archives @@ -374,21 +466,22 @@ will refuse to extract archive entries w .Pa .. or whose target directory would be altered by a symlink. This option suppresses these behaviors. -.It Fl p +.It Fl p , Fl Fl insecure , Fl Fl preserve-permissions (x mode only) Preserve file permissions. Attempt to restore the full permissions, including owner, file modes, file flags and ACLs, if available, for each item extracted from the archive. -By default, newly-created files are owned by the user running -.Nm , -the file mode is restored for newly-created regular files, and -all other types of entries receive default permissions. -If +This is the default, if .Nm -is being run by root, the default is to restore the owner unless the -.Fl o -option is also specified. -.It Fl q ( Fl -fast-read ) +is being run by root and can be overriden by also specifying +.Fl Fl no-same-owner +and +.Fl Fl no-same-permissions . +.It Fl Fl posix +(c, r, u mode only) +Synonym for +.Fl Fl format Ar pax +.It Fl q , Fl Fl fast-read (x and t mode only) Extract or list only the first archive entry that matches each pattern or filename operand. @@ -402,8 +495,16 @@ This option is provided as a performance Extract files as sparse files. For every block on disk, check first if it contains only NULL bytes and seek over it otherwise. -This works similiar to the conv=sparse option of dd. -.It Fl -strip-components Ar count +This works similar to the conv=sparse option of dd. +.It Fl Fl same-owner +(x mode only) +Extract owner and group IDs. +This is the reverse of +.Fl Fl no-same-owner +and the default behavior if +.Nm +is run as root. +.It Fl Fl strip-components Ar count (x mode only) Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped. @@ -412,11 +513,21 @@ but before security checks. .It Fl s Ar pattern Modify file or archive member names according to .Pa pattern . -The pattern has the format /old/new/[gps]. -old is a basic regular expression. -If it doesn't apply, the pattern is skipped. -new is the replacement string of the matched part. -~ is substituted with the match, \1 to \9 with the content of +The pattern has the format +.Ar /old/new/ Ns Op gps +where +.Ar old +is a basic regular expression, +.Ar new +is the replacement string of the matched part, +and the optional trailing letters modify +how the replacement is handled. +If +.Ar old +is not matched, the pattern is skipped. +Within +.Ar new , +~ is substituted with the match, \e1 to \e9 with the content of the corresponding captured group. The optional trailing g specifies that matching should continue after the matched part and stopped on the first unmatched pattern. @@ -425,7 +536,7 @@ of symbolic links. The optional trailing p specifies that after a successful substitution the original path name and the new path name should be printed to standard error. -.It Fl T Ar filename +.It Fl T Ar filename , Fl Fl files-from Ar filename In x or t mode, .Nm will read the list of names to be extracted from @@ -439,25 +550,50 @@ The special name on a line by itself will cause the current directory to be changed to the directory specified on the following line. Names are terminated by newlines unless -.Fl -null +.Fl Fl null is specified. Note that -.Fl -null +.Fl Fl null also disables the special handling of lines containing .Dq -C . -.It Fl U +.It Fl Fl totals +(c, r, u mode only) +After archiving all files, print a summary to stderr. +.It Fl U , Fl Fl unlink , Fl Fl unlink-first (x mode only) Unlink files before creating them. -Without this option, -.Nm -overwrites existing files, which preserves existing hardlinks. -With this option, existing hardlinks will be broken, as will any -symlink that would affect the location of an extracted file. -.It Fl -use-compress-program Ar program +This can be a minor performance optimization if most files +already exist, but can make things slower if most files +do not already exist. +This flag also causes +.Nm +to remove intervening directory symlinks instead of +reporting an error. +See the SECURITY section below for more details. +.It Fl Fl uid Ar id +Use the provided user id number and ignore the user +name from the archive. +On create, if +.Fl Fl uname +is not also specified, the user name will be set to +match the user id. +.It Fl Fl uname Ar name +Use the provided user name. +On extract, this overrides the user name in the archive; +if the provided user name does not exist on the system, +it will be ignored and the user id +(from the archive or from the +.Fl Fl uid +option) +will be used instead. +On create, this sets the user name that will be stored +in the archive; +the name is not verified against the system user database. +.It Fl Fl use-compress-program Ar program Pipe the input (in x or t mode) or the output (in c mode) through .Pa program instead of using the builtin compression support. -.It Fl v +.It Fl v , Fl Fl verbose Produce verbose output. In create and extract modes, .Nm @@ -470,18 +606,18 @@ will produce output similar to that of Additional .Fl v options will provide additional detail. -.It Fl -version +.It Fl Fl version Print version of .Nm and .Nm libarchive , and exit. -.It Fl w +.It Fl w , Fl Fl confirmation , Fl Fl interactive Ask for confirmation for every action. -.It Fl X Ar filename +.It Fl X Ar filename , Fl Fl exclude-from Ar filename Read a list of exclusion patterns from the specified file. See -.Fl -exclude +.Fl Fl exclude for more information about the handling of exclusions. .It Fl y (c mode only) @@ -492,23 +628,23 @@ Note that, unlike other .Nm tar implementations, this implementation recognizes bzip2 compression automatically when reading archives. -.It Fl z +.It Fl Z , Fl Fl compress , Fl Fl uncompress (c mode only) Compress the resulting archive with -.Xr gzip 1 . +.Xr compress 1 . In extract or list modes, this option is ignored. Note that, unlike other .Nm tar -implementations, this implementation recognizes gzip compression +implementations, this implementation recognizes compress compression automatically when reading archives. -.It Fl Z +.It Fl z , Fl Fl gunzip , Fl Fl gzip (c mode only) Compress the resulting archive with -.Xr compress 1 . +.Xr gzip 1 . In extract or list modes, this option is ignored. Note that, unlike other .Nm tar -implementations, this implementation recognizes compress compression +implementations, this implementation recognizes gzip compression automatically when reading archives. .El .Sh ENVIRONMENT @@ -521,25 +657,19 @@ See .Xr environ 7 for more information. .It Ev TAPE -The default tape device. +The default device. The .Fl f option overrides this. +Please see the description of the +.Fl f +option above for more details. .It Ev TZ The timezone to use when displaying dates. See .Xr environ 7 for more information. .El -.Sh FILES -.Bl -tag -width ".Ev BLOCKSIZE" -.It Pa /dev/sa0 -The default tape device, if not overridden by the -.Ev TAPE -environment variable or the -.Fl f -option. -.El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES @@ -604,9 +734,9 @@ permissions, or names that differ from e .Dl $ tar -cvf output.tar @input.mtree .Pp The -.Fl -newer +.Fl Fl newer and -.Fl -newer-mtime +.Fl Fl newer-mtime switches accept a variety of common date and time specifications, including .Dq 12 Mar 2005 7:14:29pm , .Dq 2005-03-12 19:14 , @@ -615,7 +745,7 @@ and .Dq 19:14 PST May 1 . .Pp The -.Fl -options +.Fl Fl options argument can be used to control various details of archive generation or reading. For example, you can generate mtree output which only contains @@ -623,9 +753,9 @@ For example, you can generate mtree outp and .Cm uid keywords: -.Dl Nm Fl cf Pa file.tar Fl -format=mtree Fl -options='!all,type,time,uid' Pa dir +.Dl Nm Fl cf Pa file.tar Fl Fl format=mtree Fl Fl options='!all,type,time,uid' Pa dir or you can set the compression level used by gzip or xz compression: -.Dl Nm Fl czf Pa file.tar Fl -options='compression-level=9' . +.Dl Nm Fl czf Pa file.tar Fl Fl options='compression-level=9' . For more details, see the explanation of the .Fn archive_read_set_options and @@ -771,6 +901,7 @@ components, or symlinks to other directo .Xr mt 1 , .Xr pax 1 , .Xr shar 1 , +.Xr xz 1 , .Xr libarchive 3 , .Xr libarchive-formats 5 , .Xr tar 5 @@ -780,7 +911,7 @@ in .St -p1003.1-96 but was dropped from .St -p1003.1-2001 . -The options used by this implementation were developed by surveying a +The options supported by this implementation were developed by surveying a number of existing tar implementations as well as the old POSIX specification for tar and the current POSIX specification for pax. .Pp @@ -806,6 +937,9 @@ beginning with This is a complete re-implementation based on the .Xr libarchive 3 library. +It was first released with +.Fx 5.4 +in May, 2005. .Sh BUGS This program follows .St -p1003.1-96 @@ -815,7 +949,7 @@ option. Note that GNU tar prior to version 1.15 treated .Fl l as a synonym for the -.Fl -one-file-system +.Fl Fl one-file-system option. .Pp The @@ -893,6 +1027,3 @@ Converting between dissimilar archive fo convention can cause hard link information to be lost. (This is a consequence of the incompatible ways that different archive formats store hardlink information.) -.Pp -There are alternative long options for many of the short options that -are deliberately not documented. Modified: stable/8/usr.bin/tar/bsdtar.c ============================================================================== --- stable/8/usr.bin/tar/bsdtar.c Mon Aug 1 07:59:54 2011 (r224562) +++ stable/8/usr.bin/tar/bsdtar.c Mon Aug 1 08:00:46 2011 (r224563) @@ -85,6 +85,12 @@ __FBSDID("$FreeBSD$"); #define _PATH_DEFTAPE "/dev/tape" #endif +#ifdef __MINGW32__ +int _CRT_glob = 0; /* Disable broken CRT globbing. */ +#endif + +static struct bsdtar *_bsdtar; + #if defined(HAVE_SIGACTION) && (defined(SIGINFO) || defined(SIGUSR1)) static volatile int siginfo_occurred; @@ -138,7 +144,7 @@ main(int argc, char **argv) * Use a pointer for consistency, but stack-allocated storage * for ease of cleanup. */ - bsdtar = &bsdtar_storage; + _bsdtar = bsdtar = &bsdtar_storage; memset(bsdtar, 0, sizeof(*bsdtar)); bsdtar->fd = -1; /* Mark as "unused" */ option_o = 0; @@ -151,35 +157,37 @@ main(int argc, char **argv) sa.sa_flags = 0; #ifdef SIGINFO if (sigaction(SIGINFO, &sa, NULL)) - bsdtar_errc(1, errno, "sigaction(SIGINFO) failed"); + lafe_errc(1, errno, "sigaction(SIGINFO) failed"); #endif #ifdef SIGUSR1 /* ... and treat SIGUSR1 the same way as SIGINFO. */ if (sigaction(SIGUSR1, &sa, NULL)) - bsdtar_errc(1, errno, "sigaction(SIGUSR1) failed"); + lafe_errc(1, errno, "sigaction(SIGUSR1) failed"); #endif } #endif - /* Need bsdtar_progname before calling bsdtar_warnc. */ + /* Need lafe_progname before calling lafe_warnc. */ if (*argv == NULL) - bsdtar_progname = "bsdtar"; + lafe_progname = "bsdtar"; else { #if defined(_WIN32) && !defined(__CYGWIN__) - bsdtar_progname = strrchr(*argv, '\\'); + lafe_progname = strrchr(*argv, '\\'); #else - bsdtar_progname = strrchr(*argv, '/'); + lafe_progname = strrchr(*argv, '/'); #endif - if (bsdtar_progname != NULL) - bsdtar_progname++; + if (lafe_progname != NULL) + lafe_progname++; else - bsdtar_progname = *argv; + lafe_progname = *argv; } time(&now); +#if HAVE_SETLOCALE if (setlocale(LC_ALL, "") == NULL) - bsdtar_warnc(0, "Failed to set default locale"); + lafe_warnc(0, "Failed to set default locale"); +#endif #if defined(HAVE_NL_LANGINFO) && defined(HAVE_D_MD_ORDER) bsdtar->day_first = (*nl_langinfo(D_MD_ORDER) == 'd'); #endif @@ -230,7 +238,7 @@ main(int argc, char **argv) case 'b': /* SUSv2 */ t = atoi(bsdtar->optarg); if (t <= 0 || t > 8192) - bsdtar_errc(1, 0, + lafe_errc(1, 0, "Argument to -b is out of range (1..8192)"); bsdtar->bytes_per_block = 512 * t; break; @@ -247,8 +255,8 @@ main(int argc, char **argv) bsdtar->option_chroot = 1; break; case OPTION_EXCLUDE: /* GNU tar */ - if (exclude(bsdtar, bsdtar->optarg)) - bsdtar_errc(1, 0, + if (lafe_exclude(&bsdtar->matching, bsdtar->optarg)) + lafe_errc(1, 0, "Couldn't exclude %s\n", bsdtar->optarg); break; case OPTION_FORMAT: /* GNU tar, others */ @@ -293,36 +301,24 @@ main(int argc, char **argv) * noone else needs this to filter entries * when transforming archives. */ - if (include(bsdtar, bsdtar->optarg)) - bsdtar_errc(1, 0, + if (lafe_include(&bsdtar->matching, bsdtar->optarg)) + lafe_errc(1, 0, "Failed to add %s to inclusion list", bsdtar->optarg); break; case 'j': /* GNU tar */ -#if HAVE_LIBBZ2 if (bsdtar->create_compression != '\0') - bsdtar_errc(1, 0, + lafe_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; -#else - bsdtar_warnc(0, - "bzip2 compression not supported by this version of bsdtar"); - usage(); -#endif break; case 'J': /* GNU tar 1.21 and later */ -#if HAVE_LIBLZMA if (bsdtar->create_compression != '\0') - bsdtar_errc(1, 0, + lafe_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; -#else - bsdtar_warnc(0, - "xz compression not supported by this version of bsdtar"); - usage(); -#endif break; case 'k': /* GNU tar */ bsdtar->extract_flags |= ARCHIVE_EXTRACT_NO_OVERWRITE; @@ -338,17 +334,11 @@ main(int argc, char **argv) bsdtar->option_warn_links = 1; break; case OPTION_LZMA: -#if HAVE_LIBLZMA if (bsdtar->create_compression != '\0') - bsdtar_errc(1, 0, + lafe_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; -#else - bsdtar_warnc(0, - "lzma compression not supported by this version of bsdtar"); - usage(); -#endif break; case 'm': /* SUSv2 */ bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_TIME; @@ -370,7 +360,7 @@ main(int argc, char **argv) { struct stat st; if (stat(bsdtar->optarg, &st) != 0) - bsdtar_errc(1, 0, + lafe_errc(1, 0, "Can't open file %s", bsdtar->optarg); bsdtar->newer_ctime_sec = st.st_ctime; bsdtar->newer_ctime_nsec = @@ -384,7 +374,7 @@ main(int argc, char **argv) { struct stat st; if (stat(bsdtar->optarg, &st) != 0) - bsdtar_errc(1, 0, + lafe_errc(1, 0, "Can't open file %s", bsdtar->optarg); bsdtar->newer_mtime_sec = st.st_mtime; bsdtar->newer_mtime_nsec = @@ -455,7 +445,7 @@ main(int argc, char **argv) #if HAVE_REGEX_H add_substitution(bsdtar, bsdtar->optarg); #else - bsdtar_warnc(0, + lafe_warnc(0, "-s is not supported by this version of bsdtar"); usage(); #endif @@ -501,8 +491,8 @@ main(int argc, char **argv) bsdtar->option_interactive = 1; break; case 'X': /* GNU tar */ - if (exclude_from_file(bsdtar, bsdtar->optarg)) - bsdtar_errc(1, 0, + if (lafe_exclude_from_file(&bsdtar->matching, bsdtar->optarg)) + lafe_errc(1, 0, "failed to process exclusions from file %s", bsdtar->optarg); break; @@ -510,37 +500,25 @@ main(int argc, char **argv) set_mode(bsdtar, opt); break; case 'y': /* FreeBSD version of GNU tar */ -#if HAVE_LIBBZ2 if (bsdtar->create_compression != '\0') - bsdtar_errc(1, 0, + lafe_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; -#else - bsdtar_warnc(0, - "bzip2 compression not supported by this version of bsdtar"); - usage(); -#endif break; case 'Z': /* GNU tar */ if (bsdtar->create_compression != '\0') - bsdtar_errc(1, 0, + lafe_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; break; case 'z': /* GNU tar, star, many others */ -#if HAVE_LIBZ if (bsdtar->create_compression != '\0') - bsdtar_errc(1, 0, + lafe_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->create_compression); bsdtar->create_compression = opt; -#else - bsdtar_warnc(0, - "gzip compression not supported by this version of bsdtar"); - usage(); -#endif break; case OPTION_USE_COMPRESS_PROGRAM: bsdtar->compress_program = bsdtar->optarg; @@ -562,7 +540,7 @@ main(int argc, char **argv) /* Otherwise, a mode is required. */ if (bsdtar->mode == '\0') - bsdtar_errc(1, 0, + lafe_errc(1, 0, "Must specify one of -c, -r, -t, -u, -x"); /* Check boolean options only permitted in certain modes. */ @@ -636,13 +614,13 @@ main(int argc, char **argv) break; } - cleanup_exclusions(bsdtar); + lafe_cleanup_exclusions(&bsdtar->matching); #if HAVE_REGEX_H cleanup_substitution(bsdtar); #endif if (bsdtar->return_value != 0) - bsdtar_warnc(0, + lafe_warnc(0, "Error exit delayed from previous errors."); return (bsdtar->return_value); } @@ -651,7 +629,7 @@ static void set_mode(struct bsdtar *bsdtar, char opt) { if (bsdtar->mode != '\0' && bsdtar->mode != opt) - bsdtar_errc(1, 0, + lafe_errc(1, 0, "Can't specify both -%c and -%c", opt, bsdtar->mode); bsdtar->mode = opt; } @@ -663,7 +641,7 @@ static void only_mode(struct bsdtar *bsdtar, const char *opt, const char *valid_modes) { if (strchr(valid_modes, bsdtar->mode) == NULL) - bsdtar_errc(1, 0, + lafe_errc(1, 0, "Option %s is not permitted in mode -%c", opt, bsdtar->mode); } @@ -674,7 +652,7 @@ usage(void) { const char *p; - p = bsdtar_progname; + p = lafe_progname; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Mon Aug 1 08:14:16 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEC07106566C; Mon, 1 Aug 2011 08:14:16 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA4F48FC0A; Mon, 1 Aug 2011 08:14:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p718EGpH084256; Mon, 1 Aug 2011 08:14:16 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p718EGhW084245; Mon, 1 Aug 2011 08:14:16 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201108010814.p718EGhW084245@svn.freebsd.org> From: Martin Matuska Date: Mon, 1 Aug 2011 08:14:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224564 - in stable/8: cddl/contrib/opensolaris/cmd/zfs sys/cddl/contrib/opensolaris/common/acl sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sy... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 08:14:17 -0000 Author: mm Date: Mon Aug 1 08:14:16 2011 New Revision: 224564 URL: http://svn.freebsd.org/changeset/base/224564 Log: MFC 224174: Resurrect the ZFS "aclmode" property Change default of "aclmode" to "discard". Illumos-gate changeset: 13370:8c04143bd318 Obtained from: Illumos (Feature #742) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/8/sys/cddl/contrib/opensolaris/common/acl/acl_common.c stable/8/sys/cddl/contrib/opensolaris/common/acl/acl_common.h stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Aug 1 08:00:46 2011 (r224563) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Aug 1 08:14:16 2011 (r224564) @@ -6,6 +6,7 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.\" Copyright 2011 Nexenta Systems, Inc. All rights reserved. .\" Copyright 2011 by Delphix. All rights reserved. .TH zfs 1M "24 Sep 2009" "SunOS 5.11" "System Administration Commands" .SH NAME @@ -642,7 +643,7 @@ When the property value is set to \fBpas .ad .sp .6 .RS 4n -Controls how an \fBACL\fR is modified during \fBchmod\fR(2). A file system with an \fBaclmode\fR property of \fBdiscard\fR deletes all \fBACL\fR entries that do not represent the mode of the file. An \fBaclmode\fR property of \fBgroupmask\fR (the default) reduces user or group permissions. The permissions are reduced, such that they are no greater than the group permission bits, unless it is a user entry that has the same \fBUID\fR as the owner of the file or directory. In this case, the \fBACL\fR permissions are reduced so that they are no greater than owner permission bits. A file system with an \fBaclmode\fR property of \fBpassthrough\fR indicates that no changes are made to the \fBACL\fR other than generating the necessary \fBACL\fR entries to represent the new mode of the file or directory. +Controls how an \fBACL\fR is modified during \fBchmod\fR(2). A file system with an \fBaclmode\fR property of \fBdiscard\fR (the default) deletes all \fBACL\fR entries that do not represent the mode of the file. An \fBaclmode\fR property of \fBgroupmask\fR reduces permissions granted in all \fBALLOW\fR entries found in the \fBACL\fR such that they are no greater than the group permissions specified by \fBchmod\fR. A file system with an \fBaclmode\fR property of \fBpassthrough\fR indicates that no changes are made to the \fBACL\fR other than creating or updating the necessary \fBACL\fR entries to represent the new mode of the file or directory. .RE .sp @@ -2697,7 +2698,7 @@ pool/home/bob setuid on pool/home/bob readonly off default pool/home/bob zoned off default pool/home/bob snapdir hidden default -pool/home/bob aclmode groupmask default +pool/home/bob aclmode discard default pool/home/bob aclinherit restricted default pool/home/bob canmount on default pool/home/bob shareiscsi off default Modified: stable/8/sys/cddl/contrib/opensolaris/common/acl/acl_common.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/common/acl/acl_common.c Mon Aug 1 08:00:46 2011 (r224563) +++ stable/8/sys/cddl/contrib/opensolaris/common/acl/acl_common.c Mon Aug 1 08:14:16 2011 (r224564) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. */ #include @@ -376,7 +377,7 @@ access_mask_set(int haswriteperm, int ha * by nfsace, assuming aclent_t -> nfsace semantics. */ static uint32_t -mode_to_ace_access(mode_t mode, int isdir, int isowner, int isallow) +mode_to_ace_access(mode_t mode, boolean_t isdir, int isowner, int isallow) { uint32_t access = 0; int haswriteperm = 0; @@ -419,7 +420,7 @@ mode_to_ace_access(mode_t mode, int isdi access |= ACE_DELETE_CHILD; } /* exec */ - if (mode & 01) { + if (mode & S_IXOTH) { access |= ACE_EXECUTE; } @@ -670,7 +671,7 @@ out: } static int -convert_aent_to_ace(aclent_t *aclentp, int aclcnt, int isdir, +convert_aent_to_ace(aclent_t *aclentp, int aclcnt, boolean_t isdir, ace_t **retacep, int *retacecnt) { ace_t *acep; @@ -696,7 +697,7 @@ convert_aent_to_ace(aclent_t *aclentp, i dfaclcnt = aclcnt - i; } - if (dfaclcnt && isdir == 0) { + if (dfaclcnt && !isdir) { return (EINVAL); } @@ -734,7 +735,7 @@ convert_aent_to_ace(aclent_t *aclentp, i } static int -ace_mask_to_mode(uint32_t mask, o_mode_t *modep, int isdir) +ace_mask_to_mode(uint32_t mask, o_mode_t *modep, boolean_t isdir) { int error = 0; o_mode_t mode = 0; @@ -1031,7 +1032,7 @@ out: } static int -ace_allow_to_mode(uint32_t mask, o_mode_t *modep, int isdir) +ace_allow_to_mode(uint32_t mask, o_mode_t *modep, boolean_t isdir) { /* ACE_READ_ACL and ACE_READ_ATTRIBUTES must both be set */ if ((mask & (ACE_READ_ACL | ACE_READ_ATTRIBUTES)) != @@ -1044,7 +1045,7 @@ ace_allow_to_mode(uint32_t mask, o_mode_ static int acevals_to_aent(acevals_t *vals, aclent_t *dest, ace_list_t *list, - uid_t owner, gid_t group, int isdir) + uid_t owner, gid_t group, boolean_t isdir) { int error; uint32_t flips = ACE_POSIX_SUPPORTED_BITS; @@ -1084,7 +1085,7 @@ out: static int ace_list_to_aent(ace_list_t *list, aclent_t **aclentp, int *aclcnt, - uid_t owner, gid_t group, int isdir) + uid_t owner, gid_t group, boolean_t isdir) { int error = 0; aclent_t *aent, *result = NULL; @@ -1264,7 +1265,7 @@ acevals_compare(const void *va, const vo static int ln_ace_to_aent(ace_t *ace, int n, uid_t owner, gid_t group, aclent_t **aclentp, int *aclcnt, aclent_t **dfaclentp, int *dfaclcnt, - int isdir) + boolean_t isdir) { int error = 0; ace_t *acep; @@ -1459,7 +1460,7 @@ out: } static int -convert_ace_to_aent(ace_t *acebufp, int acecnt, int isdir, +convert_ace_to_aent(ace_t *acebufp, int acecnt, boolean_t isdir, uid_t owner, gid_t group, aclent_t **retaclentp, int *retaclcnt) { int error = 0; @@ -1501,7 +1502,7 @@ convert_ace_to_aent(ace_t *acebufp, int int -acl_translate(acl_t *aclp, int target_flavor, int isdir, uid_t owner, +acl_translate(acl_t *aclp, int target_flavor, boolean_t isdir, uid_t owner, gid_t group) { int aclcnt; @@ -1573,101 +1574,105 @@ out: } void -acl_trivial_access_masks(mode_t mode, uint32_t *allow0, uint32_t *deny1, - uint32_t *deny2, uint32_t *owner, uint32_t *group, uint32_t *everyone) +acl_trivial_access_masks(mode_t mode, boolean_t isdir, trivial_acl_t *masks) { - *deny1 = *deny2 = *allow0 = *group = 0; + uint32_t read_mask = ACE_READ_DATA; + uint32_t write_mask = ACE_WRITE_DATA|ACE_APPEND_DATA; + uint32_t execute_mask = ACE_EXECUTE; + (void) isdir; /* will need this later */ + + masks->deny1 = 0; if (!(mode & S_IRUSR) && (mode & (S_IRGRP|S_IROTH))) - *deny1 |= ACE_READ_DATA; + masks->deny1 |= read_mask; if (!(mode & S_IWUSR) && (mode & (S_IWGRP|S_IWOTH))) - *deny1 |= ACE_WRITE_DATA|ACE_APPEND_DATA; + masks->deny1 |= write_mask; if (!(mode & S_IXUSR) && (mode & (S_IXGRP|S_IXOTH))) - *deny1 |= ACE_EXECUTE; + masks->deny1 |= execute_mask; + masks->deny2 = 0; if (!(mode & S_IRGRP) && (mode & S_IROTH)) - *deny2 = ACE_READ_DATA; + masks->deny2 |= read_mask; if (!(mode & S_IWGRP) && (mode & S_IWOTH)) - *deny2 |= ACE_WRITE_DATA|ACE_APPEND_DATA; + masks->deny2 |= write_mask; if (!(mode & S_IXGRP) && (mode & S_IXOTH)) - *deny2 |= ACE_EXECUTE; + masks->deny2 |= execute_mask; + masks->allow0 = 0; if ((mode & S_IRUSR) && (!(mode & S_IRGRP) && (mode & S_IROTH))) - *allow0 |= ACE_READ_DATA; + masks->allow0 |= read_mask; if ((mode & S_IWUSR) && (!(mode & S_IWGRP) && (mode & S_IWOTH))) - *allow0 |= ACE_WRITE_DATA|ACE_APPEND_DATA; + masks->allow0 |= write_mask; if ((mode & S_IXUSR) && (!(mode & S_IXGRP) && (mode & S_IXOTH))) - *allow0 |= ACE_EXECUTE; + masks->allow0 |= execute_mask; - *owner = ACE_WRITE_ATTRIBUTES|ACE_WRITE_OWNER|ACE_WRITE_ACL| + masks->owner = ACE_WRITE_ATTRIBUTES|ACE_WRITE_OWNER|ACE_WRITE_ACL| ACE_WRITE_NAMED_ATTRS|ACE_READ_ACL|ACE_READ_ATTRIBUTES| ACE_READ_NAMED_ATTRS|ACE_SYNCHRONIZE; if (mode & S_IRUSR) - *owner |= ACE_READ_DATA; + masks->owner |= read_mask; if (mode & S_IWUSR) - *owner |= ACE_WRITE_DATA|ACE_APPEND_DATA; + masks->owner |= write_mask; if (mode & S_IXUSR) - *owner |= ACE_EXECUTE; + masks->owner |= execute_mask; - *group = ACE_READ_ACL|ACE_READ_ATTRIBUTES| ACE_READ_NAMED_ATTRS| + masks->group = ACE_READ_ACL|ACE_READ_ATTRIBUTES|ACE_READ_NAMED_ATTRS| ACE_SYNCHRONIZE; if (mode & S_IRGRP) - *group |= ACE_READ_DATA; + masks->group |= read_mask; if (mode & S_IWGRP) - *group |= ACE_WRITE_DATA|ACE_APPEND_DATA; + masks->group |= write_mask; if (mode & S_IXGRP) - *group |= ACE_EXECUTE; + masks->group |= execute_mask; - *everyone = ACE_READ_ACL|ACE_READ_ATTRIBUTES| ACE_READ_NAMED_ATTRS| + masks->everyone = ACE_READ_ACL|ACE_READ_ATTRIBUTES|ACE_READ_NAMED_ATTRS| ACE_SYNCHRONIZE; if (mode & S_IROTH) - *everyone |= ACE_READ_DATA; + masks->everyone |= read_mask; if (mode & S_IWOTH) - *everyone |= ACE_WRITE_DATA|ACE_APPEND_DATA; + masks->everyone |= write_mask; if (mode & S_IXOTH) - *everyone |= ACE_EXECUTE; + masks->everyone |= execute_mask; } int -acl_trivial_create(mode_t mode, ace_t **acl, int *count) +acl_trivial_create(mode_t mode, boolean_t isdir, ace_t **acl, int *count) { - uint32_t deny1, deny2; - uint32_t allow0; - uint32_t owner, group, everyone; - int index = 0; + int index = 0; int error; + trivial_acl_t masks; *count = 3; - acl_trivial_access_masks(mode, &allow0, &deny1, &deny2, &owner, &group, - &everyone); + acl_trivial_access_masks(mode, isdir, &masks); - if (allow0) + if (masks.allow0) (*count)++; - if (deny1) + if (masks.deny1) (*count)++; - if (deny2) + if (masks.deny2) (*count)++; if ((error = cacl_malloc((void **)acl, *count * sizeof (ace_t))) != 0) return (error); - if (allow0) { - SET_ACE(acl, index, -1, allow0, ACE_ACCESS_ALLOWED_ACE_TYPE, - ACE_OWNER); - } - if (deny1) { - SET_ACE(acl, index, -1, deny1, ACE_ACCESS_DENIED_ACE_TYPE, - ACE_OWNER); - } - if (deny2) { - SET_ACE(acl, index, -1, deny2, ACE_ACCESS_DENIED_ACE_TYPE, - ACE_GROUP|ACE_IDENTIFIER_GROUP); - } - - SET_ACE(acl, index, -1, owner, ACE_ACCESS_ALLOWED_ACE_TYPE, ACE_OWNER); - SET_ACE(acl, index, -1, group, ACE_ACCESS_ALLOWED_ACE_TYPE, + if (masks.allow0) { + SET_ACE(acl, index, -1, masks.allow0, + ACE_ACCESS_ALLOWED_ACE_TYPE, ACE_OWNER); + } + if (masks.deny1) { + SET_ACE(acl, index, -1, masks.deny1, + ACE_ACCESS_DENIED_ACE_TYPE, ACE_OWNER); + } + if (masks.deny2) { + SET_ACE(acl, index, -1, masks.deny2, + ACE_ACCESS_DENIED_ACE_TYPE, ACE_GROUP|ACE_IDENTIFIER_GROUP); + } + + SET_ACE(acl, index, -1, masks.owner, ACE_ACCESS_ALLOWED_ACE_TYPE, + ACE_OWNER); + SET_ACE(acl, index, -1, masks.group, ACE_ACCESS_ALLOWED_ACE_TYPE, ACE_IDENTIFIER_GROUP|ACE_GROUP); - SET_ACE(acl, index, -1, everyone, ACE_ACCESS_ALLOWED_ACE_TYPE, + SET_ACE(acl, index, -1, masks.everyone, ACE_ACCESS_ALLOWED_ACE_TYPE, ACE_EVERYONE); return (0); Modified: stable/8/sys/cddl/contrib/opensolaris/common/acl/acl_common.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/common/acl/acl_common.h Mon Aug 1 08:00:46 2011 (r224563) +++ stable/8/sys/cddl/contrib/opensolaris/common/acl/acl_common.h Mon Aug 1 08:14:16 2011 (r224564) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. */ #ifndef _ACL_COMMON_H @@ -33,7 +34,14 @@ extern "C" { #endif -extern ace_t trivial_acl[6]; +typedef struct trivial_acl { + uint32_t allow0; /* allow mask for bits only in owner */ + uint32_t deny1; /* deny mask for bits not in owner */ + uint32_t deny2; /* deny mask for bits not in group */ + uint32_t owner; /* allow mask matching mode */ + uint32_t group; /* allow mask matching mode */ + uint32_t everyone; /* allow mask matching mode */ +} trivial_acl_t; extern int acltrivial(const char *); extern void adjust_ace_pair(ace_t *pair, mode_t mode); @@ -45,14 +53,14 @@ extern int ace_trivial_common(void *, in #if !defined(_KERNEL) extern acl_t *acl_alloc(acl_type_t); extern void acl_free(acl_t *aclp); -extern int acl_translate(acl_t *aclp, int target_flavor, - int isdir, uid_t owner, gid_t group); +extern int acl_translate(acl_t *aclp, int target_flavor, boolean_t isdir, + uid_t owner, gid_t group); #endif /* !_KERNEL */ void ksort(caddr_t v, int n, int s, int (*f)()); int cmp2acls(void *a, void *b); -int acl_trivial_create(mode_t mode, ace_t **acl, int *count); -void acl_trivial_access_masks(mode_t mode, uint32_t *allow0, uint32_t *deny1, - uint32_t *deny2, uint32_t *owner, uint32_t *group, uint32_t *everyone); +int acl_trivial_create(mode_t mode, boolean_t isdir, ace_t **acl, int *count); +void acl_trivial_access_masks(mode_t mode, boolean_t isdir, + trivial_acl_t *masks); #ifdef __cplusplus } Modified: stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Mon Aug 1 08:00:46 2011 (r224563) +++ stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Mon Aug 1 08:14:16 2011 (r224564) @@ -105,6 +105,13 @@ zfs_prop_init(void) { NULL } }; + static zprop_index_t acl_mode_table[] = { + { "discard", ZFS_ACL_DISCARD }, + { "groupmask", ZFS_ACL_GROUPMASK }, + { "passthrough", ZFS_ACL_PASSTHROUGH }, + { NULL } + }; + static zprop_index_t acl_inherit_table[] = { { "discard", ZFS_ACL_DISCARD }, { "noallow", ZFS_ACL_NOALLOW }, @@ -208,6 +215,9 @@ zfs_prop_init(void) zprop_register_index(ZFS_PROP_SNAPDIR, "snapdir", ZFS_SNAPDIR_HIDDEN, PROP_INHERIT, ZFS_TYPE_FILESYSTEM, "hidden | visible", "SNAPDIR", snapdir_table); + zprop_register_index(ZFS_PROP_ACLMODE, "aclmode", ZFS_ACL_DISCARD, + PROP_INHERIT, ZFS_TYPE_FILESYSTEM, + "discard | groupmask | passthrough", "ACLMODE", acl_mode_table); zprop_register_index(ZFS_PROP_ACLINHERIT, "aclinherit", ZFS_ACL_RESTRICTED, PROP_INHERIT, ZFS_TYPE_FILESYSTEM, "discard | noallow | restricted | passthrough | passthrough-x", @@ -374,13 +384,6 @@ zfs_prop_init(void) zprop_register_hidden(ZFS_PROP_OBJSETID, "objsetid", PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "OBJSETID"); - /* - * Property to be removed once libbe is integrated - */ - zprop_register_hidden(ZFS_PROP_PRIVATE, "priv_prop", - PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_FILESYSTEM, - "PRIV_PROP"); - /* oddball properties */ zprop_register_impl(ZFS_PROP_CREATION, "creation", PROP_TYPE_NUMBER, 0, NULL, PROP_READONLY, ZFS_TYPE_DATASET, Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h Mon Aug 1 08:00:46 2011 (r224563) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h Mon Aug 1 08:14:16 2011 (r224564) @@ -217,7 +217,7 @@ int zfs_fastaccesschk_execute(struct zno extern int zfs_zaccess_rwx(struct znode *, mode_t, int, cred_t *); extern int zfs_zaccess_unix(struct znode *, mode_t, cred_t *); extern int zfs_acl_access(struct znode *, int, cred_t *); -void zfs_acl_chmod_setattr(struct znode *, zfs_acl_t **, uint64_t); +int zfs_acl_chmod_setattr(struct znode *, zfs_acl_t **, uint64_t); int zfs_zaccess_delete(struct znode *, struct znode *, cred_t *); int zfs_zaccess_rename(struct znode *, struct znode *, struct znode *, struct znode *, cred_t *cr); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Mon Aug 1 08:00:46 2011 (r224563) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Mon Aug 1 08:14:16 2011 (r224564) @@ -55,6 +55,7 @@ struct zfsvfs { boolean_t z_fuid_dirty; /* need to sync fuid table ? */ struct zfs_fuid_info *z_fuid_replay; /* fuid info for replay */ zilog_t *z_log; /* intent log pointer */ + uint_t z_acl_mode; /* acl chmod/mode behavior */ uint_t z_acl_inherit; /* acl inheritance behavior */ zfs_case_t z_case; /* case-sense */ boolean_t z_utf8; /* utf8-only */ Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Mon Aug 1 08:00:46 2011 (r224563) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Mon Aug 1 08:14:16 2011 (r224564) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. */ #include @@ -1327,75 +1328,8 @@ zfs_aclset_common(znode_t *zp, zfs_acl_t return (sa_bulk_update(zp->z_sa_hdl, bulk, count, tx)); } -/* - * Update access mask for prepended ACE - * - * This applies the "groupmask" value for aclmode property. - */ static void -zfs_acl_prepend_fixup(zfs_acl_t *aclp, void *acep, void *origacep, - mode_t mode, uint64_t owner) -{ - int rmask, wmask, xmask; - int user_ace; - uint16_t aceflags; - uint32_t origmask, acepmask; - uint64_t fuid; - - aceflags = aclp->z_ops.ace_flags_get(acep); - fuid = aclp->z_ops.ace_who_get(acep); - origmask = aclp->z_ops.ace_mask_get(origacep); - acepmask = aclp->z_ops.ace_mask_get(acep); - - user_ace = (!(aceflags & - (ACE_OWNER|ACE_GROUP|ACE_IDENTIFIER_GROUP))); - - if (user_ace && (fuid == owner)) { - rmask = S_IRUSR; - wmask = S_IWUSR; - xmask = S_IXUSR; - } else { - rmask = S_IRGRP; - wmask = S_IWGRP; - xmask = S_IXGRP; - } - - if (origmask & ACE_READ_DATA) { - if (mode & rmask) { - acepmask &= ~ACE_READ_DATA; - } else { - acepmask |= ACE_READ_DATA; - } - } - - if (origmask & ACE_WRITE_DATA) { - if (mode & wmask) { - acepmask &= ~ACE_WRITE_DATA; - } else { - acepmask |= ACE_WRITE_DATA; - } - } - - if (origmask & ACE_APPEND_DATA) { - if (mode & wmask) { - acepmask &= ~ACE_APPEND_DATA; - } else { - acepmask |= ACE_APPEND_DATA; - } - } - - if (origmask & ACE_EXECUTE) { - if (mode & xmask) { - acepmask &= ~ACE_EXECUTE; - } else { - acepmask |= ACE_EXECUTE; - } - } - aclp->z_ops.ace_mask_set(acep, acepmask); -} - -static void -zfs_acl_chmod(zfsvfs_t *zfsvfs, uint64_t mode, zfs_acl_t *aclp) +zfs_acl_chmod(vtype_t vtype, uint64_t mode, boolean_t trim, zfs_acl_t *aclp) { void *acep = NULL; uint64_t who; @@ -1407,30 +1341,31 @@ zfs_acl_chmod(zfsvfs_t *zfsvfs, uint64_t zfs_acl_node_t *newnode; size_t abstract_size = aclp->z_ops.ace_abstract_size(); void *zacep; - uint32_t owner, group, everyone; - uint32_t deny1, deny2, allow0; + boolean_t isdir; + trivial_acl_t masks; new_count = new_bytes = 0; - acl_trivial_access_masks((mode_t)mode, &allow0, &deny1, &deny2, - &owner, &group, &everyone); + isdir = (vtype == VDIR); + + acl_trivial_access_masks((mode_t)mode, isdir, &masks); newnode = zfs_acl_node_alloc((abstract_size * 6) + aclp->z_acl_bytes); zacep = newnode->z_acldata; - if (allow0) { - zfs_set_ace(aclp, zacep, allow0, ALLOW, -1, ACE_OWNER); + if (masks.allow0) { + zfs_set_ace(aclp, zacep, masks.allow0, ALLOW, -1, ACE_OWNER); zacep = (void *)((uintptr_t)zacep + abstract_size); new_count++; new_bytes += abstract_size; - } if (deny1) { - zfs_set_ace(aclp, zacep, deny1, DENY, -1, ACE_OWNER); + } if (masks.deny1) { + zfs_set_ace(aclp, zacep, masks.deny1, DENY, -1, ACE_OWNER); zacep = (void *)((uintptr_t)zacep + abstract_size); new_count++; new_bytes += abstract_size; } - if (deny2) { - zfs_set_ace(aclp, zacep, deny2, DENY, -1, OWNING_GROUP); + if (masks.deny2) { + zfs_set_ace(aclp, zacep, masks.deny2, DENY, -1, OWNING_GROUP); zacep = (void *)((uintptr_t)zacep + abstract_size); new_count++; new_bytes += abstract_size; @@ -1449,10 +1384,17 @@ zfs_acl_chmod(zfsvfs_t *zfsvfs, uint64_t continue; } + /* + * If this ACL has any inheritable ACEs, mark that in + * the hints (which are later masked into the pflags) + * so create knows to do inheritance. + */ + if (isdir && (inherit_flags & + (ACE_FILE_INHERIT_ACE|ACE_DIRECTORY_INHERIT_ACE))) + aclp->z_hints |= ZFS_INHERIT_ACE; + if ((type != ALLOW && type != DENY) || (inherit_flags & ACE_INHERIT_ONLY_ACE)) { - if (inherit_flags) - aclp->z_hints |= ZFS_INHERIT_ACE; switch (type) { case ACE_ACCESS_ALLOWED_OBJECT_ACE_TYPE: case ACE_ACCESS_DENIED_OBJECT_ACE_TYPE: @@ -1465,20 +1407,13 @@ zfs_acl_chmod(zfsvfs_t *zfsvfs, uint64_t /* * Limit permissions to be no greater than - * group permissions + * group permissions. + * The "aclinherit" and "aclmode" properties + * affect policy for create and chmod(2), + * respectively. */ - if (type == ALLOW && zfsvfs->z_acl_inherit == ZFS_ACL_RESTRICTED) { - if (!(mode & S_IRGRP)) - access_mask &= ~ACE_READ_DATA; - if (!(mode & S_IWGRP)) - access_mask &= - ~(ACE_WRITE_DATA|ACE_APPEND_DATA); - if (!(mode & S_IXGRP)) - access_mask &= ~ACE_EXECUTE; - access_mask &= - ~(ACE_WRITE_OWNER|ACE_WRITE_ACL| - ACE_WRITE_ATTRIBUTES|ACE_WRITE_NAMED_ATTRS); - } + if ((type == ALLOW) && trim) + access_mask &= masks.group; } zfs_set_ace(aclp, zacep, access_mask, type, who, iflags); ace_size = aclp->z_ops.ace_size(acep); @@ -1486,11 +1421,11 @@ zfs_acl_chmod(zfsvfs_t *zfsvfs, uint64_t new_count++; new_bytes += ace_size; } - zfs_set_ace(aclp, zacep, owner, 0, -1, ACE_OWNER); + zfs_set_ace(aclp, zacep, masks.owner, 0, -1, ACE_OWNER); zacep = (void *)((uintptr_t)zacep + abstract_size); - zfs_set_ace(aclp, zacep, group, 0, -1, OWNING_GROUP); + zfs_set_ace(aclp, zacep, masks.group, 0, -1, OWNING_GROUP); zacep = (void *)((uintptr_t)zacep + abstract_size); - zfs_set_ace(aclp, zacep, everyone, 0, -1, ACE_EVERYONE); + zfs_set_ace(aclp, zacep, masks.everyone, 0, -1, ACE_EVERYONE); new_count += 3; new_bytes += abstract_size * 3; @@ -1502,17 +1437,27 @@ zfs_acl_chmod(zfsvfs_t *zfsvfs, uint64_t list_insert_tail(&aclp->z_acl, newnode); } -void +int zfs_acl_chmod_setattr(znode_t *zp, zfs_acl_t **aclp, uint64_t mode) { + int error = 0; + mutex_enter(&zp->z_acl_lock); mutex_enter(&zp->z_lock); - *aclp = zfs_acl_alloc(zfs_acl_version_zp(zp)); - (*aclp)->z_hints = zp->z_pflags & V4_ACL_WIDE_FLAGS; - zfs_acl_chmod(zp->z_zfsvfs, mode, *aclp); + if (zp->z_zfsvfs->z_acl_mode == ZFS_ACL_DISCARD) + *aclp = zfs_acl_alloc(zfs_acl_version_zp(zp)); + else + error = zfs_acl_node_read(zp, B_TRUE, aclp, B_TRUE); + + if (error == 0) { + (*aclp)->z_hints = zp->z_pflags & V4_ACL_WIDE_FLAGS; + zfs_acl_chmod(ZTOV(zp)->v_type, mode, + (zp->z_zfsvfs->z_acl_mode == ZFS_ACL_GROUPMASK), *aclp); + } mutex_exit(&zp->z_lock); mutex_exit(&zp->z_acl_lock); - ASSERT(*aclp); + + return (error); } /* @@ -1764,8 +1709,8 @@ zfs_acl_ids_create(znode_t *dzp, int fla if (acl_ids->z_aclp == NULL) { mutex_enter(&dzp->z_acl_lock); mutex_enter(&dzp->z_lock); - if (!(flag & IS_ROOT_NODE) && (ZTOV(dzp)->v_type == VDIR && - (dzp->z_pflags & ZFS_INHERIT_ACE)) && + if (!(flag & IS_ROOT_NODE) && + (dzp->z_pflags & ZFS_INHERIT_ACE) && !(dzp->z_pflags & ZFS_XATTR)) { VERIFY(0 == zfs_acl_node_read(dzp, B_TRUE, &paclp, B_FALSE)); @@ -1782,7 +1727,9 @@ zfs_acl_ids_create(znode_t *dzp, int fla if (need_chmod) { acl_ids->z_aclp->z_hints |= (vap->va_type == VDIR) ? ZFS_ACL_AUTO_INHERIT : 0; - zfs_acl_chmod(zfsvfs, acl_ids->z_mode, acl_ids->z_aclp); + zfs_acl_chmod(vap->va_type, acl_ids->z_mode, + (zfsvfs->z_acl_inherit == ZFS_ACL_RESTRICTED), + acl_ids->z_aclp); } } Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Aug 1 08:00:46 2011 (r224563) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Aug 1 08:14:16 2011 (r224564) @@ -364,6 +364,14 @@ vscan_changed_cb(void *arg, uint64_t new } static void +acl_mode_changed_cb(void *arg, uint64_t newval) +{ + zfsvfs_t *zfsvfs = arg; + + zfsvfs->z_acl_mode = newval; +} + +static void acl_inherit_changed_cb(void *arg, uint64_t newval) { zfsvfs_t *zfsvfs = arg; @@ -488,6 +496,8 @@ zfs_register_callbacks(vfs_t *vfsp) error = error ? error : dsl_prop_register(ds, "snapdir", snapdir_changed_cb, zfsvfs); error = error ? error : dsl_prop_register(ds, + "aclmode", acl_mode_changed_cb, zfsvfs); + error = error ? error : dsl_prop_register(ds, "aclinherit", acl_inherit_changed_cb, zfsvfs); error = error ? error : dsl_prop_register(ds, "vscan", vscan_changed_cb, zfsvfs); @@ -525,6 +535,7 @@ unregister: (void) dsl_prop_unregister(ds, "setuid", setuid_changed_cb, zfsvfs); (void) dsl_prop_unregister(ds, "exec", exec_changed_cb, zfsvfs); (void) dsl_prop_unregister(ds, "snapdir", snapdir_changed_cb, zfsvfs); + (void) dsl_prop_unregister(ds, "aclmode", acl_mode_changed_cb, zfsvfs); (void) dsl_prop_unregister(ds, "aclinherit", acl_inherit_changed_cb, zfsvfs); (void) dsl_prop_unregister(ds, "vscan", vscan_changed_cb, zfsvfs); @@ -1202,6 +1213,9 @@ zfs_unregister_callbacks(zfsvfs_t *zfsvf VERIFY(dsl_prop_unregister(ds, "snapdir", snapdir_changed_cb, zfsvfs) == 0); + VERIFY(dsl_prop_unregister(ds, "aclmode", acl_mode_changed_cb, + zfsvfs) == 0); + VERIFY(dsl_prop_unregister(ds, "aclinherit", acl_inherit_changed_cb, zfsvfs) == 0); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Aug 1 08:00:46 2011 (r224563) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Aug 1 08:14:16 2011 (r224564) @@ -3229,7 +3229,8 @@ top: uint64_t acl_obj; new_mode = (pmode & S_IFMT) | (vap->va_mode & ~S_IFMT); - zfs_acl_chmod_setattr(zp, &aclp, new_mode); + if (err = zfs_acl_chmod_setattr(zp, &aclp, new_mode)) + goto out; mutex_enter(&zp->z_lock); if (!zp->z_is_sa && ((acl_obj = zfs_external_acl(zp)) != 0)) { Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Mon Aug 1 08:00:46 2011 (r224563) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Mon Aug 1 08:14:16 2011 (r224564) @@ -90,7 +90,7 @@ typedef enum { ZFS_PROP_READONLY, ZFS_PROP_ZONED, ZFS_PROP_SNAPDIR, - ZFS_PROP_PRIVATE, /* not exposed to user, temporary */ + ZFS_PROP_ACLMODE, ZFS_PROP_ACLINHERIT, ZFS_PROP_CREATETXG, /* not exposed to the user */ ZFS_PROP_NAME, /* not exposed to the user */ From owner-svn-src-stable-8@FreeBSD.ORG Mon Aug 1 08:17:54 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEC1B106564A; Mon, 1 Aug 2011 08:17:54 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB5B08FC0A; Mon, 1 Aug 2011 08:17:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p718Hsa3084448; Mon, 1 Aug 2011 08:17:54 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p718Hs5I084439; Mon, 1 Aug 2011 08:17:54 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201108010817.p718Hs5I084439@svn.freebsd.org> From: Martin Matuska Date: Mon, 1 Aug 2011 08:17:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224565 - in stable/8: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 08:17:54 -0000 Author: mm Date: Mon Aug 1 08:17:54 2011 New Revision: 224565 URL: http://svn.freebsd.org/changeset/base/224565 Log: MFC 224177: ZFS tries to allocate blocks evenly across all devices. This means when devices are imbalanced zfs will lots of CPU searching for space on devices which tend to be pretty full. It should instead fail quickly on the full devices and move onto devices which have more availability. New loader tunable: vfs.zfs.mg_alloc_failures (min = 8) Illumos-gate changeset: 13379:4df42cc92254 Obtained from: Illumos (Bug #1051) Modified: stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c Mon Aug 1 08:14:16 2011 (r224564) +++ stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c Mon Aug 1 08:17:54 2011 (r224565) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ /* @@ -5137,6 +5138,7 @@ ztest_run(ztest_shared_t *zs) */ kernel_init(FREAD | FWRITE); VERIFY(spa_open(zs->zs_pool, &spa, FTAG) == 0); + spa->spa_debug = B_TRUE; zs->zs_spa = spa; spa->spa_dedup_ditto = 2 * ZIO_DEDUPDITTO_MIN; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Mon Aug 1 08:14:16 2011 (r224564) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Mon Aug 1 08:17:54 2011 (r224565) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ #include @@ -30,10 +31,35 @@ #include #include +/* + * Allow allocations to switch to gang blocks quickly. We do this to + * avoid having to load lots of space_maps in a given txg. There are, + * however, some cases where we want to avoid "fast" ganging and instead + * we want to do an exhaustive search of all metaslabs on this device. + * Currently we don't allow any gang or dump device related allocations + * to "fast" gang. + */ +#define CAN_FASTGANG(flags) \ + (!((flags) & (METASLAB_GANG_CHILD | METASLAB_GANG_HEADER | \ + METASLAB_GANG_AVOID))) + uint64_t metaslab_aliquot = 512ULL << 10; uint64_t metaslab_gang_bang = SPA_MAXBLOCKSIZE + 1; /* force gang blocks */ /* + * This value defines the number of allowed allocation failures per vdev. + * If a device reaches this threshold in a given txg then we consider skipping + * allocations on that device. + */ +int zfs_mg_alloc_failures = 0; + +SYSCTL_DECL(_vfs_zfs); +SYSCTL_INT(_vfs_zfs, OID_AUTO, mg_alloc_failures, CTLFLAG_RDTUN, + &zfs_mg_alloc_failures, 0, + "Number of allowed allocation failures per vdev"); +TUNABLE_INT("vfs.zfs.mg_alloc_failures", &zfs_mg_alloc_failures); + +/* * Metaslab debugging: when set, keeps all space maps in core to verify frees. */ static int metaslab_debug = 0; @@ -671,7 +697,7 @@ static space_map_ops_t metaslab_ndf_ops metaslab_ndf_fragmented }; -space_map_ops_t *zfs_metaslab_ops = &metaslab_ndf_ops; +space_map_ops_t *zfs_metaslab_ops = &metaslab_df_ops; /* * ========================================================================== @@ -844,7 +870,7 @@ metaslab_prefetch(metaslab_group_t *mg) } static int -metaslab_activate(metaslab_t *msp, uint64_t activation_weight, uint64_t size) +metaslab_activate(metaslab_t *msp, uint64_t activation_weight) { metaslab_group_t *mg = msp->ms_group; space_map_t *sm = &msp->ms_map; @@ -877,13 +903,6 @@ metaslab_activate(metaslab_t *msp, uint6 mutex_exit(&mg->mg_lock); } - /* - * If we were able to load the map then make sure - * that this map is still able to satisfy our request. - */ - if (msp->ms_weight < size) - return (ENOSPC); - metaslab_group_sort(msp->ms_group, msp, msp->ms_weight | activation_weight); } @@ -1099,6 +1118,7 @@ void metaslab_sync_reassess(metaslab_group_t *mg) { vdev_t *vd = mg->mg_vd; + int64_t failures = mg->mg_alloc_failures; /* * Re-evaluate all metaslabs which have lower offsets than the @@ -1115,6 +1135,8 @@ metaslab_sync_reassess(metaslab_group_t mutex_exit(&msp->ms_lock); } + atomic_add_64(&mg->mg_alloc_failures, -failures); + /* * Prefetch the next potential metaslabs */ @@ -1139,9 +1161,10 @@ metaslab_distance(metaslab_t *msp, dva_t } static uint64_t -metaslab_group_alloc(metaslab_group_t *mg, uint64_t size, uint64_t txg, - uint64_t min_distance, dva_t *dva, int d) +metaslab_group_alloc(metaslab_group_t *mg, uint64_t psize, uint64_t asize, + uint64_t txg, uint64_t min_distance, dva_t *dva, int d, int flags) { + spa_t *spa = mg->mg_vd->vdev_spa; metaslab_t *msp = NULL; uint64_t offset = -1ULL; avl_tree_t *t = &mg->mg_metaslab_tree; @@ -1162,11 +1185,17 @@ metaslab_group_alloc(metaslab_group_t *m mutex_enter(&mg->mg_lock); for (msp = avl_first(t); msp; msp = AVL_NEXT(t, msp)) { - if (msp->ms_weight < size) { + if (msp->ms_weight < asize) { + spa_dbgmsg(spa, "%s: failed to meet weight " + "requirement: vdev %llu, txg %llu, mg %p, " + "msp %p, psize %llu, asize %llu, " + "failures %llu, weight %llu", + spa_name(spa), mg->mg_vd->vdev_id, txg, + mg, msp, psize, asize, + mg->mg_alloc_failures, msp->ms_weight); mutex_exit(&mg->mg_lock); return (-1ULL); } - was_active = msp->ms_weight & METASLAB_ACTIVE_MASK; if (activation_weight == METASLAB_WEIGHT_PRIMARY) break; @@ -1185,6 +1214,25 @@ metaslab_group_alloc(metaslab_group_t *m if (msp == NULL) return (-1ULL); + /* + * If we've already reached the allowable number of failed + * allocation attempts on this metaslab group then we + * consider skipping it. We skip it only if we're allowed + * to "fast" gang, the physical size is larger than + * a gang block, and we're attempting to allocate from + * the primary metaslab. + */ + if (mg->mg_alloc_failures > zfs_mg_alloc_failures && + CAN_FASTGANG(flags) && psize > SPA_GANGBLOCKSIZE && + activation_weight == METASLAB_WEIGHT_PRIMARY) { + spa_dbgmsg(spa, "%s: skipping metaslab group: " + "vdev %llu, txg %llu, mg %p, psize %llu, " + "asize %llu, failures %llu", spa_name(spa), + mg->mg_vd->vdev_id, txg, mg, psize, asize, + mg->mg_alloc_failures); + return (-1ULL); + } + mutex_enter(&msp->ms_lock); /* @@ -1193,7 +1241,7 @@ metaslab_group_alloc(metaslab_group_t *m * another thread may have changed the weight while we * were blocked on the metaslab lock. */ - if (msp->ms_weight < size || (was_active && + if (msp->ms_weight < asize || (was_active && !(msp->ms_weight & METASLAB_ACTIVE_MASK) && activation_weight == METASLAB_WEIGHT_PRIMARY)) { mutex_exit(&msp->ms_lock); @@ -1208,14 +1256,16 @@ metaslab_group_alloc(metaslab_group_t *m continue; } - if (metaslab_activate(msp, activation_weight, size) != 0) { + if (metaslab_activate(msp, activation_weight) != 0) { mutex_exit(&msp->ms_lock); continue; } - if ((offset = space_map_alloc(&msp->ms_map, size)) != -1ULL) + if ((offset = space_map_alloc(&msp->ms_map, asize)) != -1ULL) break; + atomic_inc_64(&mg->mg_alloc_failures); + metaslab_passivate(msp, space_map_maxsize(&msp->ms_map)); mutex_exit(&msp->ms_lock); @@ -1224,7 +1274,7 @@ metaslab_group_alloc(metaslab_group_t *m if (msp->ms_allocmap[txg & TXG_MASK].sm_space == 0) vdev_dirty(mg->mg_vd, VDD_METASLAB, msp, txg); - space_map_add(&msp->ms_allocmap[txg & TXG_MASK], offset, size); + space_map_add(&msp->ms_allocmap[txg & TXG_MASK], offset, asize); mutex_exit(&msp->ms_lock); @@ -1351,7 +1401,8 @@ top: asize = vdev_psize_to_asize(vd, psize); ASSERT(P2PHASE(asize, 1ULL << vd->vdev_ashift) == 0); - offset = metaslab_group_alloc(mg, asize, txg, distance, dva, d); + offset = metaslab_group_alloc(mg, psize, asize, txg, distance, + dva, d, flags); if (offset != -1ULL) { /* * If we've just selected this metaslab group, @@ -1363,18 +1414,24 @@ top: vdev_stat_t *vs = &vd->vdev_stat; int64_t vu, cu; - /* - * Determine percent used in units of 0..1024. - * (This is just to avoid floating point.) - */ - vu = (vs->vs_alloc << 10) / (vs->vs_space + 1); - cu = (mc->mc_alloc << 10) / (mc->mc_space + 1); + vu = (vs->vs_alloc * 100) / (vs->vs_space + 1); + cu = (mc->mc_alloc * 100) / (mc->mc_space + 1); /* - * Bias by at most +/- 25% of the aliquot. + * Calculate how much more or less we should + * try to allocate from this device during + * this iteration around the rotor. + * For example, if a device is 80% full + * and the pool is 20% full then we should + * reduce allocations by 60% on this device. + * + * mg_bias = (20 - 80) * 512K / 100 = -307K + * + * This reduces allocations by 307K for this + * iteration. */ mg->mg_bias = ((cu - vu) * - (int64_t)mg->mg_aliquot) / (1024 * 4); + (int64_t)mg->mg_aliquot) / 100; } if (atomic_add_64_nv(&mc->mc_aliquot, asize) >= @@ -1488,7 +1545,7 @@ metaslab_claim_dva(spa_t *spa, const dva mutex_enter(&msp->ms_lock); if ((txg != 0 && spa_writeable(spa)) || !msp->ms_map.sm_loaded) - error = metaslab_activate(msp, METASLAB_WEIGHT_SECONDARY, 0); + error = metaslab_activate(msp, METASLAB_WEIGHT_SECONDARY); if (error == 0 && !space_map_contains(&msp->ms_map, offset, size)) error = ENOENT; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Mon Aug 1 08:14:16 2011 (r224564) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Mon Aug 1 08:17:54 2011 (r224565) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ #include @@ -1674,3 +1675,9 @@ spa_scan_get_stats(spa_t *spa, pool_scan return (0); } + +boolean_t +spa_debug_enabled(spa_t *spa) +{ + return (spa->spa_debug); +} Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h Mon Aug 1 08:14:16 2011 (r224564) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h Mon Aug 1 08:17:54 2011 (r224565) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ #ifndef _SYS_METASLAB_H @@ -47,6 +48,8 @@ extern void metaslab_sync_reassess(metas #define METASLAB_HINTBP_FAVOR 0x0 #define METASLAB_HINTBP_AVOID 0x1 #define METASLAB_GANG_HEADER 0x2 +#define METASLAB_GANG_CHILD 0x4 +#define METASLAB_GANG_AVOID 0x8 extern int metaslab_alloc(spa_t *spa, metaslab_class_t *mc, uint64_t psize, blkptr_t *bp, int ncopies, uint64_t txg, blkptr_t *hintbp, int flags); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h Mon Aug 1 08:14:16 2011 (r224564) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h Mon Aug 1 08:17:54 2011 (r224565) @@ -21,6 +21,7 @@ /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright (c) 2011 by Delphix. All rights reserved. */ #ifndef _SYS_METASLAB_IMPL_H @@ -52,6 +53,7 @@ struct metaslab_group { avl_tree_t mg_metaslab_tree; uint64_t mg_aliquot; uint64_t mg_bonus_area; + uint64_t mg_alloc_failures; int64_t mg_bias; int64_t mg_activation_count; metaslab_class_t *mg_class; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Mon Aug 1 08:14:16 2011 (r224564) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Mon Aug 1 08:17:54 2011 (r224565) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ #ifndef _SYS_SPA_H @@ -698,6 +699,13 @@ _NOTE(CONSTCOND) } while (0) #define dprintf_bp(bp, fmt, ...) #endif +extern boolean_t spa_debug_enabled(spa_t *spa); +#define spa_dbgmsg(spa, ...) \ +{ \ + if (spa_debug_enabled(spa)) \ + zfs_dbgmsg(__VA_ARGS__); \ +} + extern int spa_mode_global; /* mode, e.g. FREAD | FWRITE */ #ifdef __cplusplus Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Mon Aug 1 08:14:16 2011 (r224564) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Mon Aug 1 08:17:54 2011 (r224565) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ #ifndef _SYS_SPA_IMPL_H @@ -196,6 +197,7 @@ struct spa { kcondvar_t spa_suspend_cv; /* notification of resume */ uint8_t spa_suspended; /* pool is suspended */ uint8_t spa_claiming; /* pool is doing zil_claim() */ + boolean_t spa_debug; /* debug enabled? */ boolean_t spa_is_root; /* pool is root */ int spa_minref; /* num refs when first opened */ int spa_mode; /* FREAD | FWRITE */ Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Mon Aug 1 08:14:16 2011 (r224564) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Mon Aug 1 08:17:54 2011 (r224565) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ #include @@ -85,6 +86,7 @@ kmem_cache_t *zio_data_buf_cache[SPA_MAX #ifdef _KERNEL extern vmem_t *zio_alloc_arena; #endif +extern int zfs_mg_alloc_failures; /* * An allocating zio is one that either currently has the DVA allocate @@ -160,6 +162,15 @@ zio_init(void) zio_data_buf_cache[c - 1] = zio_data_buf_cache[c]; } + /* + * The zio write taskqs have 1 thread per cpu, allow 1/2 of the taskqs + * to fail 3 times per txg or 8 failures, whichever is greater. + */ + if (zfs_mg_alloc_failures == 0) + zfs_mg_alloc_failures = MAX((3 * max_ncpus / 2), 8); + else if (zfs_mg_alloc_failures < 8) + zfs_mg_alloc_failures = 8; + zio_inject_init(); } @@ -2135,6 +2146,7 @@ zio_dva_allocate(zio_t *zio) metaslab_class_t *mc = spa_normal_class(spa); blkptr_t *bp = zio->io_bp; int error; + int flags = 0; if (zio->io_gang_leader == NULL) { ASSERT(zio->io_child_type > ZIO_CHILD_GANG); @@ -2147,10 +2159,21 @@ zio_dva_allocate(zio_t *zio) ASSERT3U(zio->io_prop.zp_copies, <=, spa_max_replication(spa)); ASSERT3U(zio->io_size, ==, BP_GET_PSIZE(bp)); + /* + * The dump device does not support gang blocks so allocation on + * behalf of the dump device (i.e. ZIO_FLAG_NODATA) must avoid + * the "fast" gang feature. + */ + flags |= (zio->io_flags & ZIO_FLAG_NODATA) ? METASLAB_GANG_AVOID : 0; + flags |= (zio->io_flags & ZIO_FLAG_GANG_CHILD) ? + METASLAB_GANG_CHILD : 0; error = metaslab_alloc(spa, mc, zio->io_size, bp, - zio->io_prop.zp_copies, zio->io_txg, NULL, 0); + zio->io_prop.zp_copies, zio->io_txg, NULL, flags); if (error) { + spa_dbgmsg(spa, "%s: metaslab allocation failure: zio %p, " + "size %llu, error %d", spa_name(spa), zio, zio->io_size, + error); if (error == ENOSPC && zio->io_size > SPA_MINBLOCKSIZE) return (zio_write_gang_block(zio)); zio->io_error = error; From owner-svn-src-stable-8@FreeBSD.ORG Mon Aug 1 18:57:44 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8A93106564A for ; Mon, 1 Aug 2011 18:57:44 +0000 (UTC) (envelope-from cjr@cruwe.de) Received: from cruwe.de (cruwe.de [188.40.164.98]) by mx1.freebsd.org (Postfix) with ESMTP id 8C6058FC08 for ; Mon, 1 Aug 2011 18:57:44 +0000 (UTC) Received: from cruwe.de (unknown [127.0.0.4]) by cruwe.de (Postfix) with ESMTP id 5B42A20037 for ; Mon, 1 Aug 2011 20:40:07 +0200 (CEST) Received: by cruwe.de (Postfix, from userid 65534) id 3DE0B20035; Mon, 1 Aug 2011 20:40:07 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.cruwe.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=4.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.1 Received: from dijkstra (p5B37AB8E.dip.t-dialin.net [91.55.171.142]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by cruwe.de (Postfix) with ESMTPSA id 1F4D62002A for ; Mon, 1 Aug 2011 20:40:05 +0200 (CEST) Date: Mon, 1 Aug 2011 20:39:52 +0200 From: "Christopher J. Ruwe" To: svn-src-stable-8@freebsd.org Message-Id: <20110801203952.57aa180c.cjr@cruwe.de> In-Reply-To: <201108010814.p718EGhW084245@svn.freebsd.org> References: <201108010814.p718EGhW084245@svn.freebsd.org> X-Mailer: Sylpheed 3.1.1 (GTK+ 2.22.1; amd64-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Mon__1_Aug_2011_20_39_52_+0200_qQC93EvX4/WUXaXk" X-Virus-Scanned: ClamAV on mail.cruwe.de using ClamSMTP Subject: Re: svn commit: r224564 - in stable/8: cddl/contrib/opensolaris/cmd/zfs sys/cddl/contrib/opensolaris/common/acl sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sy... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 18:57:44 -0000 --Signature=_Mon__1_Aug_2011_20_39_52_+0200_qQC93EvX4/WUXaXk Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, 1 Aug 2011 08:14:16 +0000 (UTC) Martin Matuska wrote: > Author: mm > Date: Mon Aug 1 08:14:16 2011 > New Revision: 224564 > URL: http://svn.freebsd.org/changeset/base/224564 >=20 > Log: > MFC 224174: > Resurrect the ZFS "aclmode" property > Change default of "aclmode" to "discard". > =20 > Illumos-gate changeset: 13370:8c04143bd318 > =20 > [...] It is very nice to see that FreeBSD actively profits from the Illumos proje= ct. Taking that opportunity, thank you very much for your (plural ;-)) work. --=20 Christopher J. Ruwe --Signature=_Mon__1_Aug_2011_20_39_52_+0200_qQC93EvX4/WUXaXk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQIcBAEBAgAGBQJONvL4AAoJEJTIKW/o3iwUx1AQANFMQ2NAuC6JO2swf775+z+8 stYNgyrbCftc8aukh4m4FSAnRozHEHK0/ltWCxkZAWHE19wftFsw4no8osHrcfkl ceICAvCjUj0KgZGq3z3x/FNgDRfsV1cy8hT501wE/wUilTeiO4U7lclDNuWyfQ64 +IFHwyy1f51VMubGxIvFpwt/1+W/0WF8fZpLwmHfPbQ6VXDZ212DV5HCcZrArw0J 1tJ24gNPnkVvPfk7n6c4IEBCdxtGgVGXXnJ50ZQ/q+fZfxinFWPVtGLzfWp3A5q6 IjSOKQXT+eUSwzlq5b+8yC6dK/dJ2mo13YgbmCAuyrcAWPoptvcpZITN8Rgf29Ql VDgJJrpy6OLHNbVpKken+85wNMT8Y/l/078lE1i3SMV5TrbThqXqii+lSZRcKQWX Ss9B4AhETsohLB84WtlRNmyAU5lmxCNc8C4Q+nIQLdXRRnxQFFfNi5wpTyfrtCUW 4vKleuFxXvs1JWUjTIvv6EQ2l50dB5rvSz7EH3k1qbMgHa+zJWH5LerUbkkDDe8q tvRqbY0iCA6FLG+Oa6yUTXQX3N8Cr/h94FNw42KUzqohkFMAuGUjJ9S8vMNAXg4W Y0WZwqtVSrTVQI3Pt3i83SR82bOA4IgBEijViuMSTG/82vimwO+y9O+c6P/8/RCr O9pYpeRhPrsZpUGa1Pmn =kfIf -----END PGP SIGNATURE----- --Signature=_Mon__1_Aug_2011_20_39_52_+0200_qQC93EvX4/WUXaXk-- From owner-svn-src-stable-8@FreeBSD.ORG Tue Aug 2 05:45:14 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C06AE106566B; Tue, 2 Aug 2011 05:45:14 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74A258FC0A; Tue, 2 Aug 2011 05:45:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p725jEdG029020; Tue, 2 Aug 2011 05:45:14 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p725jEj9029016; Tue, 2 Aug 2011 05:45:14 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201108020545.p725jEj9029016@svn.freebsd.org> From: Doug Barton Date: Tue, 2 Aug 2011 05:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224592 - in stable/8/lib/bind: dns/dns lwres/lwres X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2011 05:45:14 -0000 Author: dougb Date: Tue Aug 2 05:45:14 2011 New Revision: 224592 URL: http://svn.freebsd.org/changeset/base/224592 Log: Non-functional changes related to version 9.6-ESV-R5 (format of time stamp in CVS $Id) Modified: stable/8/lib/bind/dns/dns/rdatastruct.h stable/8/lib/bind/lwres/lwres/netdb.h stable/8/lib/bind/lwres/lwres/platform.h Modified: stable/8/lib/bind/dns/dns/rdatastruct.h ============================================================================== --- stable/8/lib/bind/dns/dns/rdatastruct.h Tue Aug 2 05:19:43 2011 (r224591) +++ stable/8/lib/bind/dns/dns/rdatastruct.h Tue Aug 2 05:45:14 2011 (r224592) @@ -43,7 +43,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdatastructpre.h,v 1.16 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: rdatastructpre.h,v 1.16 2007-06-19 23:47:17 tbox Exp $ */ #ifndef DNS_RDATASTRUCT_H #define DNS_RDATASTRUCT_H 1 @@ -89,7 +89,7 @@ typedef struct dns_rdatacommon { #ifndef IN_1_A_1_H #define IN_1_A_1_H 1 -/* $Id: a_1.h,v 1.28 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: a_1.h,v 1.28 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_in_a { dns_rdatacommon_t common; @@ -113,7 +113,7 @@ typedef struct dns_rdata_in_a { * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: a_1.h,v 1.5 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: a_1.h,v 1.5 2007-06-19 23:47:17 tbox Exp $ */ /* by Bjorn.Victor@it.uu.se, 2005-05-07 */ /* Based on generic/mx_15.h */ @@ -152,7 +152,7 @@ typedef struct dns_rdata_ch_a { #ifndef HS_4_A_1_H #define HS_4_A_1_H 1 -/* $Id: a_1.h,v 1.12 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: a_1.h,v 1.12 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_hs_a { dns_rdatacommon_t common; @@ -181,7 +181,7 @@ typedef struct dns_rdata_hs_a { #ifndef GENERIC_NS_2_H #define GENERIC_NS_2_H 1 -/* $Id: ns_2.h,v 1.27 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: ns_2.h,v 1.27 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_ns { dns_rdatacommon_t common; @@ -212,7 +212,7 @@ typedef struct dns_rdata_ns { #ifndef GENERIC_MD_3_H #define GENERIC_MD_3_H 1 -/* $Id: md_3.h,v 1.28 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: md_3.h,v 1.28 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_md { dns_rdatacommon_t common; @@ -243,7 +243,7 @@ typedef struct dns_rdata_md { #ifndef GENERIC_MF_4_H #define GENERIC_MF_4_H 1 -/* $Id: mf_4.h,v 1.26 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: mf_4.h,v 1.26 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_mf { dns_rdatacommon_t common; @@ -269,7 +269,7 @@ typedef struct dns_rdata_mf { * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: cname_5.h,v 1.26 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: cname_5.h,v 1.26 2007-06-19 23:47:17 tbox Exp $ */ #ifndef GENERIC_CNAME_5_H #define GENERIC_CNAME_5_H 1 @@ -302,7 +302,7 @@ typedef struct dns_rdata_cname { #ifndef GENERIC_SOA_6_H #define GENERIC_SOA_6_H 1 -/* $Id: soa_6.h,v 1.32 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: soa_6.h,v 1.32 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_soa { dns_rdatacommon_t common; @@ -339,7 +339,7 @@ typedef struct dns_rdata_soa { #ifndef GENERIC_MB_7_H #define GENERIC_MB_7_H 1 -/* $Id: mb_7.h,v 1.27 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: mb_7.h,v 1.27 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_mb { dns_rdatacommon_t common; @@ -369,7 +369,7 @@ typedef struct dns_rdata_mb { #ifndef GENERIC_MG_8_H #define GENERIC_MG_8_H 1 -/* $Id: mg_8.h,v 1.26 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: mg_8.h,v 1.26 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_mg { dns_rdatacommon_t common; @@ -399,7 +399,7 @@ typedef struct dns_rdata_mg { #ifndef GENERIC_MR_9_H #define GENERIC_MR_9_H 1 -/* $Id: mr_9.h,v 1.26 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: mr_9.h,v 1.26 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_mr { dns_rdatacommon_t common; @@ -429,7 +429,7 @@ typedef struct dns_rdata_mr { #ifndef GENERIC_NULL_10_H #define GENERIC_NULL_10_H 1 -/* $Id: null_10.h,v 1.25 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: null_10.h,v 1.25 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_null { dns_rdatacommon_t common; @@ -460,7 +460,7 @@ typedef struct dns_rdata_null { #ifndef IN_1_WKS_11_H #define IN_1_WKS_11_H 1 -/* $Id: wks_11.h,v 1.22 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: wks_11.h,v 1.22 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_in_wks { dns_rdatacommon_t common; @@ -493,7 +493,7 @@ typedef struct dns_rdata_in_wks { #ifndef GENERIC_PTR_12_H #define GENERIC_PTR_12_H 1 -/* $Id: ptr_12.h,v 1.27 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: ptr_12.h,v 1.27 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_ptr { dns_rdatacommon_t common; @@ -522,7 +522,7 @@ typedef struct dns_rdata_ptr { #ifndef GENERIC_HINFO_13_H #define GENERIC_HINFO_13_H 1 -/* $Id: hinfo_13.h,v 1.25 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: hinfo_13.h,v 1.25 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_hinfo { dns_rdatacommon_t common; @@ -555,7 +555,7 @@ typedef struct dns_rdata_hinfo { #ifndef GENERIC_MINFO_14_H #define GENERIC_MINFO_14_H 1 -/* $Id: minfo_14.h,v 1.27 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: minfo_14.h,v 1.27 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_minfo { dns_rdatacommon_t common; @@ -586,7 +586,7 @@ typedef struct dns_rdata_minfo { #ifndef GENERIC_MX_15_H #define GENERIC_MX_15_H 1 -/* $Id: mx_15.h,v 1.29 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: mx_15.h,v 1.29 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_mx { dns_rdatacommon_t common; @@ -617,7 +617,7 @@ typedef struct dns_rdata_mx { #ifndef GENERIC_TXT_16_H #define GENERIC_TXT_16_H 1 -/* $Id: txt_16.h,v 1.28 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: txt_16.h,v 1.28 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_txt_string { isc_uint8_t length; @@ -668,7 +668,7 @@ dns_rdata_txt_current(dns_rdata_txt_t *, #ifndef GENERIC_RP_17_H #define GENERIC_RP_17_H 1 -/* $Id: rp_17.h,v 1.21 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: rp_17.h,v 1.21 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC1183 */ @@ -702,7 +702,7 @@ typedef struct dns_rdata_rp { #ifndef GENERIC_AFSDB_18_H #define GENERIC_AFSDB_18_H 1 -/* $Id: afsdb_18.h,v 1.20 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: afsdb_18.h,v 1.20 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC1183 */ @@ -736,7 +736,7 @@ typedef struct dns_rdata_afsdb { #ifndef GENERIC_X25_19_H #define GENERIC_X25_19_H 1 -/* $Id: x25_19.h,v 1.18 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: x25_19.h,v 1.18 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC1183 */ @@ -769,7 +769,7 @@ typedef struct dns_rdata_x25 { #ifndef GENERIC_ISDN_20_H #define GENERIC_ISDN_20_H 1 -/* $Id: isdn_20.h,v 1.18 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: isdn_20.h,v 1.18 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC1183 */ @@ -804,7 +804,7 @@ typedef struct dns_rdata_isdn { #ifndef GENERIC_RT_21_H #define GENERIC_RT_21_H 1 -/* $Id: rt_21.h,v 1.21 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: rt_21.h,v 1.21 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC1183 */ @@ -837,7 +837,7 @@ typedef struct dns_rdata_rt { #ifndef IN_1_NSAP_22_H #define IN_1_NSAP_22_H 1 -/* $Id: nsap_22.h,v 1.18 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: nsap_22.h,v 1.18 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC1706 */ @@ -870,7 +870,7 @@ typedef struct dns_rdata_in_nsap { #ifndef IN_1_NSAP_PTR_23_H #define IN_1_NSAP_PTR_23_H 1 -/* $Id: nsap-ptr_23.h,v 1.19 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: nsap-ptr_23.h,v 1.19 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC1348. Obsoleted in RFC 1706 - use PTR instead. */ @@ -902,7 +902,7 @@ typedef struct dns_rdata_in_nsap_ptr { #ifndef GENERIC_SIG_24_H #define GENERIC_SIG_24_H 1 -/* $Id: sig_24.h,v 1.26 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: sig_24.h,v 1.26 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC2535 */ @@ -944,7 +944,7 @@ typedef struct dns_rdata_sig_t { #ifndef GENERIC_KEY_25_H #define GENERIC_KEY_25_H 1 -/* $Id: key_25.h,v 1.19 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: key_25.h,v 1.19 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC2535 */ @@ -981,7 +981,7 @@ typedef struct dns_rdata_key_t { #ifndef IN_1_PX_26_H #define IN_1_PX_26_H 1 -/* $Id: px_26.h,v 1.19 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: px_26.h,v 1.19 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC2163 */ @@ -1015,7 +1015,7 @@ typedef struct dns_rdata_in_px { #ifndef GENERIC_GPOS_27_H #define GENERIC_GPOS_27_H 1 -/* $Id: gpos_27.h,v 1.17 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: gpos_27.h,v 1.17 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief per RFC1712 */ @@ -1052,7 +1052,7 @@ typedef struct dns_rdata_gpos { #ifndef IN_1_AAAA_28_H #define IN_1_AAAA_28_H 1 -/* $Id: aaaa_28.h,v 1.21 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: aaaa_28.h,v 1.21 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC1886 */ @@ -1083,7 +1083,7 @@ typedef struct dns_rdata_in_aaaa { #ifndef GENERIC_LOC_29_H #define GENERIC_LOC_29_H 1 -/* $Id: loc_29.h,v 1.19 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: loc_29.h,v 1.19 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC1876 */ @@ -1126,7 +1126,7 @@ typedef struct dns_rdata_loc { #ifndef GENERIC_NXT_30_H #define GENERIC_NXT_30_H 1 -/* $Id: nxt_30.h,v 1.25 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: nxt_30.h,v 1.25 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief RFC2535 */ @@ -1160,7 +1160,7 @@ typedef struct dns_rdata_nxt { #ifndef IN_1_SRV_33_H #define IN_1_SRV_33_H 1 -/* $Id: srv_33.h,v 1.19 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: srv_33.h,v 1.19 2007-06-19 23:47:17 tbox Exp $ */ /* Reviewed: Fri Mar 17 13:01:00 PST 2000 by bwelling */ @@ -1197,7 +1197,7 @@ typedef struct dns_rdata_in_srv { #ifndef IN_1_NAPTR_35_H #define IN_1_NAPTR_35_H 1 -/* $Id: naptr_35.h,v 1.23 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: naptr_35.h,v 1.23 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC2915 */ @@ -1237,7 +1237,7 @@ typedef struct dns_rdata_in_naptr { #ifndef IN_1_KX_36_H #define IN_1_KX_36_H 1 -/* $Id: kx_36.h,v 1.20 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: kx_36.h,v 1.20 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC2230 */ @@ -1267,7 +1267,7 @@ typedef struct dns_rdata_in_kx { * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: cert_37.h,v 1.20 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: cert_37.h,v 1.20 2007-06-19 23:47:17 tbox Exp $ */ #ifndef GENERIC_CERT_37_H #define GENERIC_CERT_37_H 1 @@ -1304,7 +1304,7 @@ typedef struct dns_rdata_cert { #ifndef IN_1_A6_38_H #define IN_1_A6_38_H 1 -/* $Id: a6_38.h,v 1.24 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: a6_38.h,v 1.24 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC2874 */ @@ -1338,7 +1338,7 @@ typedef struct dns_rdata_in_a6 { #ifndef GENERIC_DNAME_39_H #define GENERIC_DNAME_39_H 1 -/* $Id: dname_39.h,v 1.21 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: dname_39.h,v 1.21 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief per RFC2672 */ @@ -1370,7 +1370,7 @@ typedef struct dns_rdata_dname { #ifndef GENERIC_OPT_41_H #define GENERIC_OPT_41_H 1 -/* $Id: opt_41.h,v 1.18 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: opt_41.h,v 1.18 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC2671 */ @@ -1426,7 +1426,7 @@ dns_rdata_opt_current(dns_rdata_opt_t *, #ifndef IN_1_APL_42_H #define IN_1_APL_42_H 1 -/* $Id: apl_42.h,v 1.6 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: apl_42.h,v 1.6 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_apl_ent { isc_boolean_t negative; @@ -1478,7 +1478,7 @@ dns_rdata_apl_current(dns_rdata_in_apl_t * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ds_43.h,v 1.7 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: ds_43.h,v 1.7 2007-06-19 23:47:17 tbox Exp $ */ #ifndef GENERIC_DS_43_H #define GENERIC_DS_43_H 1 @@ -1513,7 +1513,7 @@ typedef struct dns_rdata_ds { * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sshfp_44.h,v 1.8 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: sshfp_44.h,v 1.8 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC 4255 */ @@ -1547,7 +1547,7 @@ typedef struct dns_rdata_sshfp { * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ipseckey_45.h,v 1.4 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: ipseckey_45.h,v 1.4 2007-06-19 23:47:17 tbox Exp $ */ #ifndef GENERIC_IPSECKEY_45_H #define GENERIC_IPSECKEY_45_H 1 @@ -1586,7 +1586,7 @@ typedef struct dns_rdata_ipseckey { #ifndef GENERIC_DNSSIG_46_H #define GENERIC_DNSSIG_46_H 1 -/* $Id: rrsig_46.h,v 1.7 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: rrsig_46.h,v 1.7 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per RFC2535 */ @@ -1627,7 +1627,7 @@ typedef struct dns_rdata_rrsig { #ifndef GENERIC_NSEC_47_H #define GENERIC_NSEC_47_H 1 -/* $Id: nsec_47.h,v 1.10 2008/07/15 23:47:21 tbox Exp $ */ +/* $Id: nsec_47.h,v 1.10 2008-07-15 23:47:21 tbox Exp $ */ /*! * \brief Per RFC 3845 */ @@ -1661,7 +1661,7 @@ typedef struct dns_rdata_nsec { #ifndef GENERIC_DNSKEY_48_H #define GENERIC_DNSKEY_48_H 1 -/* $Id: dnskey_48.h,v 1.7 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: dnskey_48.h,v 1.7 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief per RFC2535 */ @@ -1698,7 +1698,7 @@ typedef struct dns_rdata_dnskey { #ifndef IN_1_DHCID_49_H #define IN_1_DHCID_49_H 1 -/* $Id: dhcid_49.h,v 1.5 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: dhcid_49.h,v 1.5 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_in_dhcid { dns_rdatacommon_t common; @@ -1728,7 +1728,7 @@ typedef struct dns_rdata_in_dhcid { #ifndef GENERIC_NSEC3_50_H #define GENERIC_NSEC3_50_H 1 -/* $Id: nsec3_50.h,v 1.4 2008/09/25 04:02:39 tbox Exp $ */ +/* $Id: nsec3_50.h,v 1.4 2008-09-25 04:02:39 tbox Exp $ */ /*! * \brief Per RFC 5155 */ @@ -1821,7 +1821,7 @@ typedef struct dns_rdata_nsec3 { #ifndef GENERIC_NSEC3PARAM_51_H #define GENERIC_NSEC3PARAM_51_H 1 -/* $Id: nsec3param_51.h,v 1.4 2008/09/25 04:02:39 tbox Exp $ */ +/* $Id: nsec3param_51.h,v 1.4 2008-09-25 04:02:39 tbox Exp $ */ /*! * \brief Per RFC 5155 */ @@ -1859,7 +1859,7 @@ typedef struct dns_rdata_nsec3param { #ifndef GENERIC_SPF_99_H #define GENERIC_SPF_99_H 1 -/* $Id: spf_99.h,v 1.4 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: spf_99.h,v 1.4 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_spf_string { isc_uint8_t length; @@ -1911,7 +1911,7 @@ dns_rdata_spf_current(dns_rdata_spf_t *, #ifndef GENERIC_UNSPEC_103_H #define GENERIC_UNSPEC_103_H 1 -/* $Id: unspec_103.h,v 1.17 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: unspec_103.h,v 1.17 2007-06-19 23:47:17 tbox Exp $ */ typedef struct dns_rdata_unspec_t { dns_rdatacommon_t common; @@ -1941,7 +1941,7 @@ typedef struct dns_rdata_unspec_t { #ifndef GENERIC_TKEY_249_H #define GENERIC_TKEY_249_H 1 -/* $Id: tkey_249.h,v 1.24 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: tkey_249.h,v 1.24 2007-06-19 23:47:17 tbox Exp $ */ /*! * \brief Per draft-ietf-dnsind-tkey-00.txt */ @@ -1979,7 +1979,7 @@ typedef struct dns_rdata_tkey { * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: tsig_250.h,v 1.25 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: tsig_250.h,v 1.25 2007-06-19 23:47:17 tbox Exp $ */ #ifndef ANY_255_TSIG_250_H #define ANY_255_TSIG_250_H 1 @@ -2016,7 +2016,7 @@ typedef struct dns_rdata_any_tsig { * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dlv_32769.h,v 1.5 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: dlv_32769.h,v 1.5 2007-06-19 23:47:17 tbox Exp $ */ /* draft-ietf-dnsext-delegation-signer-05.txt */ #ifndef GENERIC_DLV_32769_H @@ -2050,7 +2050,7 @@ typedef struct dns_rdata_dlv { * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdatastructsuf.h,v 1.10 2007/06/19 23:47:17 tbox Exp $ */ +/* $Id: rdatastructsuf.h,v 1.10 2007-06-19 23:47:17 tbox Exp $ */ ISC_LANG_ENDDECLS Modified: stable/8/lib/bind/lwres/lwres/netdb.h ============================================================================== --- stable/8/lib/bind/lwres/lwres/netdb.h Tue Aug 2 05:19:43 2011 (r224591) +++ stable/8/lib/bind/lwres/lwres/netdb.h Tue Aug 2 05:45:14 2011 (r224592) @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: netdb.h.in,v 1.39.332.2 2009/01/18 23:47:41 tbox Exp $ */ +/* $Id: netdb.h.in,v 1.39.332.2 2009-01-18 23:47:41 tbox Exp $ */ /*! \file */ Modified: stable/8/lib/bind/lwres/lwres/platform.h ============================================================================== --- stable/8/lib/bind/lwres/lwres/platform.h Tue Aug 2 05:19:43 2011 (r224591) +++ stable/8/lib/bind/lwres/lwres/platform.h Tue Aug 2 05:45:14 2011 (r224592) @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: platform.h.in,v 1.21 2007/06/19 23:47:23 tbox Exp $ */ +/* $Id: platform.h.in,v 1.21 2007-06-19 23:47:23 tbox Exp $ */ /*! \file */ From owner-svn-src-stable-8@FreeBSD.ORG Tue Aug 2 08:08:00 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31DE91065672; Tue, 2 Aug 2011 08:08:00 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CB6A8FC18; Tue, 2 Aug 2011 08:08:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p72880aC035388; Tue, 2 Aug 2011 08:08:00 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7287x1E035382; Tue, 2 Aug 2011 08:07:59 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201108020807.p7287x1E035382@svn.freebsd.org> From: Doug Barton Date: Tue, 2 Aug 2011 08:07:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224596 - in stable/8/contrib/bind9: . bin/check bin/dig bin/dig/include/dig bin/dnssec bin/named bin/named/unix bin/nsupdate bin/rndc doc/arm lib/bind9 lib/dns lib/dns/include/dns lib/... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2011 08:08:00 -0000 Author: dougb Date: Tue Aug 2 08:07:59 2011 New Revision: 224596 URL: http://svn.freebsd.org/changeset/base/224596 Log: Update to version 9.6-ESV-R5 which contains various bug fixes and improvements: ftp://ftp.isc.org/isc/bind9/9.6-ESV-R5/RELEASE-NOTES-BIND-9.6-ESV.html Added: stable/8/contrib/bind9/RELEASE-NOTES-BIND-9.6-ESV.html - copied unchanged from r224591, vendor/bind9/dist-9.6/RELEASE-NOTES-BIND-9.6-ESV.html stable/8/contrib/bind9/RELEASE-NOTES-BIND-9.6-ESV.pdf - copied unchanged from r224591, vendor/bind9/dist-9.6/RELEASE-NOTES-BIND-9.6-ESV.pdf stable/8/contrib/bind9/RELEASE-NOTES-BIND-9.6-ESV.txt - copied unchanged from r224591, vendor/bind9/dist-9.6/RELEASE-NOTES-BIND-9.6-ESV.txt stable/8/contrib/bind9/release-notes.css - copied unchanged from r224591, vendor/bind9/dist-9.6/release-notes.css Modified: stable/8/contrib/bind9/CHANGES stable/8/contrib/bind9/COPYRIGHT stable/8/contrib/bind9/Makefile.in stable/8/contrib/bind9/README stable/8/contrib/bind9/bin/check/named-checkconf.c stable/8/contrib/bind9/bin/dig/dig.c stable/8/contrib/bind9/bin/dig/dighost.c stable/8/contrib/bind9/bin/dig/host.c stable/8/contrib/bind9/bin/dig/include/dig/dig.h stable/8/contrib/bind9/bin/dig/nslookup.c stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.c stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.c stable/8/contrib/bind9/bin/named/client.c stable/8/contrib/bind9/bin/named/controlconf.c stable/8/contrib/bind9/bin/named/interfacemgr.c stable/8/contrib/bind9/bin/named/logconf.c stable/8/contrib/bind9/bin/named/main.c stable/8/contrib/bind9/bin/named/query.c stable/8/contrib/bind9/bin/named/server.c stable/8/contrib/bind9/bin/named/statschannel.c stable/8/contrib/bind9/bin/named/unix/os.c stable/8/contrib/bind9/bin/named/update.c stable/8/contrib/bind9/bin/named/zoneconf.c stable/8/contrib/bind9/bin/nsupdate/nsupdate.c stable/8/contrib/bind9/bin/rndc/rndc.c stable/8/contrib/bind9/config.h.in stable/8/contrib/bind9/configure.in stable/8/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/8/contrib/bind9/doc/arm/Bv9ARM.ch01.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch02.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch03.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch05.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch10.html stable/8/contrib/bind9/doc/arm/Bv9ARM.html stable/8/contrib/bind9/doc/arm/Bv9ARM.pdf stable/8/contrib/bind9/doc/arm/man.dig.html stable/8/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html stable/8/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html stable/8/contrib/bind9/doc/arm/man.dnssec-keygen.html stable/8/contrib/bind9/doc/arm/man.dnssec-signzone.html stable/8/contrib/bind9/doc/arm/man.host.html stable/8/contrib/bind9/doc/arm/man.named-checkconf.html stable/8/contrib/bind9/doc/arm/man.named-checkzone.html stable/8/contrib/bind9/doc/arm/man.named.html stable/8/contrib/bind9/doc/arm/man.nsupdate.html stable/8/contrib/bind9/doc/arm/man.rndc-confgen.html stable/8/contrib/bind9/doc/arm/man.rndc.conf.html stable/8/contrib/bind9/doc/arm/man.rndc.html stable/8/contrib/bind9/lib/bind9/api stable/8/contrib/bind9/lib/bind9/check.c stable/8/contrib/bind9/lib/dns/Makefile.in stable/8/contrib/bind9/lib/dns/adb.c stable/8/contrib/bind9/lib/dns/cache.c stable/8/contrib/bind9/lib/dns/diff.c stable/8/contrib/bind9/lib/dns/dispatch.c stable/8/contrib/bind9/lib/dns/dst_openssl.h stable/8/contrib/bind9/lib/dns/gssapi_link.c stable/8/contrib/bind9/lib/dns/gssapictx.c stable/8/contrib/bind9/lib/dns/include/dns/cache.h stable/8/contrib/bind9/lib/dns/include/dns/masterdump.h stable/8/contrib/bind9/lib/dns/include/dns/rdataset.h stable/8/contrib/bind9/lib/dns/journal.c stable/8/contrib/bind9/lib/dns/master.c stable/8/contrib/bind9/lib/dns/masterdump.c stable/8/contrib/bind9/lib/dns/message.c stable/8/contrib/bind9/lib/dns/name.c stable/8/contrib/bind9/lib/dns/ncache.c stable/8/contrib/bind9/lib/dns/nsec.c stable/8/contrib/bind9/lib/dns/openssl_link.c stable/8/contrib/bind9/lib/dns/openssldsa_link.c stable/8/contrib/bind9/lib/dns/opensslrsa_link.c stable/8/contrib/bind9/lib/dns/rbt.c stable/8/contrib/bind9/lib/dns/rbtdb.c stable/8/contrib/bind9/lib/dns/rbtdb.h stable/8/contrib/bind9/lib/dns/rcode.c stable/8/contrib/bind9/lib/dns/rdata.c stable/8/contrib/bind9/lib/dns/rdatalist.c stable/8/contrib/bind9/lib/dns/rdataset.c stable/8/contrib/bind9/lib/dns/request.c stable/8/contrib/bind9/lib/dns/resolver.c stable/8/contrib/bind9/lib/dns/sdlz.c stable/8/contrib/bind9/lib/dns/spnego.c stable/8/contrib/bind9/lib/dns/time.c stable/8/contrib/bind9/lib/dns/tkey.c stable/8/contrib/bind9/lib/dns/ttl.c stable/8/contrib/bind9/lib/dns/validator.c stable/8/contrib/bind9/lib/dns/view.c stable/8/contrib/bind9/lib/dns/xfrin.c stable/8/contrib/bind9/lib/dns/zone.c stable/8/contrib/bind9/lib/isc/api stable/8/contrib/bind9/lib/isc/heap.c stable/8/contrib/bind9/lib/isc/httpd.c stable/8/contrib/bind9/lib/isc/include/isc/file.h stable/8/contrib/bind9/lib/isc/include/isc/util.h stable/8/contrib/bind9/lib/isc/log.c stable/8/contrib/bind9/lib/isc/netaddr.c stable/8/contrib/bind9/lib/isc/powerpc/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/radix.c stable/8/contrib/bind9/lib/isc/rwlock.c stable/8/contrib/bind9/lib/isc/sha1.c stable/8/contrib/bind9/lib/isc/sha2.c stable/8/contrib/bind9/lib/isc/sockaddr.c stable/8/contrib/bind9/lib/isc/string.c stable/8/contrib/bind9/lib/isc/timer.c stable/8/contrib/bind9/lib/isc/unix/dir.c stable/8/contrib/bind9/lib/isc/unix/file.c stable/8/contrib/bind9/lib/isc/unix/include/isc/stdtime.h stable/8/contrib/bind9/lib/isc/unix/socket.c stable/8/contrib/bind9/lib/isc/unix/stdio.c stable/8/contrib/bind9/lib/isc/unix/time.c stable/8/contrib/bind9/lib/isccc/Makefile.in stable/8/contrib/bind9/lib/isccfg/Makefile.in stable/8/contrib/bind9/lib/isccfg/api stable/8/contrib/bind9/lib/isccfg/namedconf.c stable/8/contrib/bind9/lib/isccfg/parser.c stable/8/contrib/bind9/lib/lwres/api stable/8/contrib/bind9/lib/lwres/assert_p.h stable/8/contrib/bind9/lib/lwres/herror.c stable/8/contrib/bind9/lib/lwres/lwconfig.c stable/8/contrib/bind9/lib/lwres/print.c stable/8/contrib/bind9/make/rules.in stable/8/contrib/bind9/version Directory Properties: stable/8/contrib/bind9/ (props changed) Modified: stable/8/contrib/bind9/CHANGES ============================================================================== --- stable/8/contrib/bind9/CHANGES Tue Aug 2 07:55:50 2011 (r224595) +++ stable/8/contrib/bind9/CHANGES Tue Aug 2 08:07:59 2011 (r224596) @@ -1,27 +1,208 @@ - --- 9.6-ESV-R4-P3 released --- + --- 9.6-ESV-R5 released --- + +3135. [port] FreeBSD: workaround broken IPV6_USE_MIN_MTU processing. + See http://www.freebsd.org/cgi/query-pr.cgi?pr=158307 + [RT #24950] + +3132. [bug] Workaround for excessive startup time with large + number of zones; allow setting of an environment + variable to tune the number of tasks, default is 8, + recommends 200 zones per task. If you have 200000 + zones set the BIND9_ZONE_TASKS_HINT environment + variable to 1000 before starting named: + + csh: setenv BIND9_ZONE_TASKS_HINT 1000 + sh: BIND9_ZONE_TASKS_HINT=1000; + export BIND9_ZONE_TASKS_HINT + + Applicable to 9.7, 9.6, auto-tuned in 9.8 and up. + [RT #25084] + + --- 9.6-ESV-R5rc1 released --- + +3124. [bug] Use an rdataset attribute flag to indicate 3124. [bug] Use an rdataset attribute flag to indicate negative-cache records rather than using rrtype 0; this will prevent problems when that rrtype is - used in actual DNS packets. [RT #24777] - - --- 9.6-ESV-R4-P2 released (withdrawn) --- + used in actual DNS packets. [RT #24777] 3123. [security] Change #2912 exposed a latent flaw in dns_rdataset_totext() that could cause named to crash with an assertion failure. [RT #24777] - --- 9.6-ESV-R4-P1 released --- - 3121. [security] An authoritative name server sending a negative response containing a very large RRset could trigger an off-by-one error in the ncache code and crash named. [RT #24650] -3120. [bug] Named could fail to validate zones listed in a DLV +3120. [bug] Named could fail to validate zones list in a DLV that validated insecure without using DLV and had DS records in the parent zone. [RT #24631] +3118. [bug] nsupdate could dump core on shutdown when using + SIG(0) keys. [RT #24604] + +3113. [doc] Document the relationship between serial-query-rate + and NOTIFY messages. + +3112. [doc] Add missing descriptions of the update policy name + types "ms-self", "ms-subdomain", "krb5-self" and + "krb5-subdomain", which allow machines to update + their own records, to the BIND 9 ARM. + +3110. [bug] dnssec-signzone: Wrong error message could appear + when attempting to sign with no KSK. [RT #24369] + +3104. [bug] Better support for cross-compiling. [RT #24367] + +3099. [test] "dlz" system test now runs but gives R:SKIPPED if + not compiled with --with-dlz-filesystem. [RT #24146] + +3097. [test] Add a tool to test handling of malformed packets. + [RT #24096] + + --- 9.6-ESV-R5b1 released --- + +3095. [bug] Handle isolated reserved ports in the port range. + [RT #23957] + +3088. [bug] Remove bin/tests/system/logfileconfig/ns1/named.conf + and add setup.sh in order to resolve changing + named.conf issue. [RT #23687] + +3083. [bug] NOTIFY messages were not being sent when generating + a NSEC3 chain incrementally. [RT #23702] + +3081. [bug] Failure of DNAME substitution did not return + YXDOMAIN. [RT #23591] + +3080. [cleanup] Replaced compile time constant by STDTIME_ON_32BITS. + [RT #23587] + +3079. [bug] Handle isc_event_allocate failures in t_tasks. + [RT #23572] + +3074. [bug] Make the adb cache read through for zone data and + glue learn for zone named is authoritative for. + [RT #22842] + +3071. [bug] has_nsec could be used unintialised in + update.c:next_active. [RT #20256] + +3069. [cleanup] Silence warnings messages from clang static analysis. + [RT #20256] + +3068. [bug] Named failed to build with a OpenSSL without engine + support. [RT #23473] + +3067. [bug] ixfr-from-differences {master|slave}; failed to + select the master/slave zones. [RT #23580] + +3065. [bug] RRSIG could have time stamps too far in the future. + [RT #23356] + +3064. [bug] powerpc: add sync instructions to the end of atomic + operations. [RT #23469] + +3063. [contrib] More verbose error reporting from DLZ LDAP. [RT #23402] + +3059. [test] Added a regression test for change #3023. + +3058. [bug] Cause named to terminate at startup or rndc reconfig/ + reload to fail, if a log file specified in the conf + file isn't a plain file. [RT #22771] + +3053. [bug] Under a sustained high query load with a finite + max-cache-size, it was possible for cache memory + to be exhausted and not recovered. [RT #23371] + +3051. [bug] NS records obsure DNAME records at the bottom of the + zone if both are present. [RT #23035] + +3046. [bug] Use RRSIG original TTL to compute validated RRset + and RRSIG TTL. [RT #23332] + +3044. [bug] Hold the socket manager lock while freeing the socket. + [RT #23333] + +3043. [test] Merged in the NetBSD ATF test framework (currently + version 0.12) for development of future unit tests. + Use configure --with-atf to build ATF internally + or configure --with-atf=prefix to use an external + copy. [RT #23209] + +3042. [bug] dig +trace could fail attempting to use IPv6 + addresses on systems with only IPv4 connectivity. + [RT #23297] + +3041. [bug] dnssec-signzone failed to generate new signatures on + ttl changes. [RT #23330] + +3040. [bug] Named failed to validate insecure zones where a node + with a CNAME existed between the trust anchor and the + top of the zone. [RT #23338] + +3037. [doc] Update COPYRIGHT to contain all the individual + copyright notices that cover various parts. + +3036. [bug] Check built-in zone arguments to see if the zone + is re-usable or not. [RT #21914] + +3035. [cleanup] Simplify by using strlcpy. [RT #22521] + +3034. [cleanup] nslookup: use strlcpy instead of safecopy. [RT #22521] + +3033. [cleanup] Add two INSIST(bucket != DNS_ADB_INVALIDBUCKET). + [RT #22521] + +3032. [bug] rdatalist.c: add missing REQUIREs. [RT #22521] + +3031. [bug] dns_rdataclass_format() handle a zero sized buffer. + [RT #22521] + +3030. [bug] dns_rdatatype_format() handle a zero sized buffer. + [RT #22521] + +3029. [bug] isc_netaddr_format() handle a zero sized buffer. + [RT #22521] + +3028. [bug] isc_sockaddr_format() handle a zero sized buffer. + [RT #22521] + +3027. [bug] Add documented REQUIREs to cfg_obj_asnetprefix() to + catch NULL pointer dereferences before they happen. + [RT #22521] + +3026. [bug] lib/isc/httpd.c: check that we have enough space + after calling grow_headerspace() and if not + re-call grow_headerspace() until we do. [RT #22521] + +3025. [bug] Fixed a possible deadlock due to zone resigning. + [RT #22964] + +3023. [bug] Named could be left in an inconsistent state when + receiving multiple AXFR response messages that were + not all TSIG-signed. [RT #23254] + +3019. [test] Test: check apex NSEC3 records after adding DNSKEY + record via UPDATE. [RT #23229] + +3018. [bug] Named failed to check for the "none;" acl when deciding + if a zone may need to be re-signed. [RT #23120] + +3016. [bug] rndc usage missing '-b'. [RT #22937] + +3015. [port] win32: fix IN6_IS_ADDR_LINKLOCAL and + IN6_IS_ADDR_SITELOCAL macros. [RT #22724] + +3014. [bug] Fix the zonechecks system test to match expected + behaviour for 9.6 and to fail on error. [RT #22905] + +3012. [bug] Remove DNSKEY TTL change pairs before generating + signing records for any remaining DNSKEY changes. + [RT #22590] + --- 9.6-ESV-R4 released --- --- 9.6.3 released --- @@ -72,7 +253,7 @@ 2976. [bug] named could die on exit after negotiating a GSS-TSIG key. [RT #22573] -2975. [bug] rbtdb.c:cleanup_dead_nodes_callback() aquired the +2975. [bug] rbtdb.c:cleanup_dead_nodes_callback() acquired the wrong lock which could lead to server deadlock. [RT #22614] @@ -172,7 +353,7 @@ 2905. [port] aix: set use_atomic=yes with native compiler. [RT #21402] -2904. [bug] When using DLV, sub-zones of the zones in the DLV, +2904. [bug] When using DLV, sub-zones of the zones in the DLV, could be incorrectly marked as insecure instead of secure leading to negative proofs failing. This was a unintended outcome from change 2890. [RT# 21392] @@ -420,7 +601,7 @@ 2790. [bug] Handle DS queries to stub zones. [RT #20440] -2789. [bug] Fixed an INSIST in dispatch.c [RT #20576] +2789. [bug] Fixed an INSIST in dispatch.c [RT #20576] 2786. [bug] Additional could be promoted to answer. [RT #20663] @@ -616,9 +797,9 @@ 2625. [bug] Missing UNLOCK in rbtdb.c. [RT #19865] -2623. [bug] Named started seaches for DS non-optimally. [RT #19915] +2623. [bug] Named started searches for DS non-optimally. [RT #19915] -2621. [doc] Made copyright boilterplate consistent. [RT #19833] +2621. [doc] Made copyright boilerplate consistent. [RT #19833] 2620. [bug] Delay thawing the zone until the reload of it has completed successfully. [RT #19750] @@ -848,13 +1029,13 @@ 2529. [cleanup] Upgrade libtool to silence complaints from recent version of autoconf. [RT #18657] -2528. [cleanup] Silence spurious configure warning about +2528. [cleanup] Silence spurious configure warning about --datarootdir [RT #19096] 2527. [bug] named could reuse cache on reload with enabling/disabling validation. [RT #19119] -2525. [experimental] New logging category "query-errors" to provide detailed +2525. [func] New logging category "query-errors" to provide detailed internal information about query failures, especially about server failures. [RT #19027] @@ -1111,13 +1292,13 @@ 2441. [bug] isc_radix_insert() could copy radix tree nodes incompletely. [RT #18573] -2440. [bug] named-checkconf used an incorrect test to determine +2440. [bug] named-checkconf used an incorrect test to determine if an ACL was set to none. -2439. [bug] Potential NULL dereference in dns_acl_isanyornone(). +2439. [bug] Potential NULL dereference in dns_acl_isanyornone(). [RT #18559] -2438. [bug] Timeouts could be logged incorrectly under win32. +2438. [bug] Timeouts could be logged incorrectly under win32. 2437. [bug] Sockets could be closed too early, leading to inconsistent states in the socket module. [RT #18298] @@ -1131,7 +1312,7 @@ 2433. [tuning] Set initial timeout to 800ms. -2432. [bug] More Windows socket handling improvements. Stop +2432. [bug] More Windows socket handling improvements. Stop using I/O events and use IO Completion Ports throughout. Rewrite the receive path logic to make it easier to support multiple simultaneous @@ -1166,7 +1347,7 @@ epoll and /dev/poll to be selected at compile time. [RT #18277] -2423. [security] Randomize server selection on queries, so as to +2423. [security] Randomize server selection on queries, so as to make forgery a little more difficult. Instead of always preferring the server with the lowest RTT, pick a server with RTT within the same 128 @@ -1180,7 +1361,7 @@ Use caution: this option may not work for some operating systems without rebuilding named. -2420. [bug] Windows socket handling cleanup. Let the io +2420. [bug] Windows socket handling cleanup. Let the io completion event send out canceled read/write done events, which keeps us from writing to memory we no longer have ownership of. Add debugging @@ -1502,7 +1683,7 @@ 2316. [port] Missing #include in lib/dns/gssapictx.c. [RT #17513] -2315. [bug] Used incorrect address family for mapped IPv4 +2315. [bug] Used incorrect address family for mapped IPv4 addresses in acl.c. [RT #17519] 2314. [bug] Uninitialized memory use on error path in @@ -1514,14 +1695,14 @@ 2312. [cleanup] Silence Coverity warning in lib/isc/unix/socket.c. [RT #17458] -2311. [bug] IPv6 addresses could match IPv4 ACL entries and +2311. [bug] IPv6 addresses could match IPv4 ACL entries and vice versa. [RT #17462] 2310. [bug] dig, host, nslookup: flush stdout before emitting debug/fatal messages. [RT #17501] -2309. [cleanup] Fix Coverity warnings in lib/dns/acl.c and iptable.c. - [RT #17455] +2309. [cleanup] Fix Coverity warnings in lib/dns/acl.c and iptable.c. + [RT #17455] 2308. [cleanup] Silence Coverity warning in bin/named/controlconf.c. [RT #17495] @@ -1573,7 +1754,7 @@ 2292. [bug] Log if the working directory is not writable. [RT #17312] -2291. [bug] PR_SET_DUMPABLE may be set too late. Also report +2291. [bug] PR_SET_DUMPABLE may be set too late. Also report failure to set PR_SET_DUMPABLE. [RT #17312] 2290. [bug] Let AD in the query signal that the client wants AD @@ -1611,7 +1792,7 @@ 2280. [func] Allow the experimental http server to be reached over IPv6 as well as IPv4. [RT #17332] -2279. [bug] Use setsockopt(SO_NOSIGPIPE), when available, +2279. [bug] Use setsockopt(SO_NOSIGPIPE), when available, to protect applications from receiving spurious SIGPIPE signals when using the resolver. @@ -1646,9 +1827,9 @@ --- 9.5.0b1 released --- -2267. [bug] Radix tree node_num value could be set incorrectly, - causing positive ACL matches to look like negative - ones. [RT #17311] +2267. [bug] Radix tree node_num value could be set incorrectly, + causing positive ACL matches to look like negative + ones. [RT #17311] 2266. [bug] client.c:get_clientmctx() returned the same mctx once the pool of mctx's was filled. [RT #17218] @@ -1664,7 +1845,7 @@ 2262. [bug] Error status from all but the last view could be lost. [RT #17292] -2261. [bug] Fix memory leak with "any" and "none" ACLs [RT #17272] +2261. [bug] Fix memory leak with "any" and "none" ACLs [RT #17272] 2260. [bug] Reported wrong clients-per-query when increasing the value. [RT #17236] Modified: stable/8/contrib/bind9/COPYRIGHT ============================================================================== --- stable/8/contrib/bind9/COPYRIGHT Tue Aug 2 07:55:50 2011 (r224595) +++ stable/8/contrib/bind9/COPYRIGHT Tue Aug 2 08:07:59 2011 (r224596) @@ -13,9 +13,15 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -$Id: COPYRIGHT,v 1.14.176.3 2011-01-04 23:45:42 tbox Exp $ +$Id: COPYRIGHT,v 1.14.176.4 2011-02-22 06:40:42 marka Exp $ -Portions Copyright (C) 1996-2001 Nominum, Inc. + Portions of this code release fall under one or more of the + following Copyright notices. Please see individual source + files for details. + + For binary releases also see: OpenSSL-LICENSE. + +Copyright (C) 1996-2001 Nominum, Inc. Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -28,3 +34,485 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ----------------------------------------------------------------------------- + +Copyright (C) 1995-2000 by Network Associates, Inc. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NETWORK ASSOCIATES DISCLAIMS +ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE +FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ----------------------------------------------------------------------------- + +Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET +DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. + +The development of Dynamically Loadable Zones (DLZ) for Bind 9 was +conceived and contributed by Rob Butler. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER +DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. + + ----------------------------------------------------------------------------- + +Copyright (c) 1987, 1990, 1993, 1994 + The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by the University of + California, Berkeley and its contributors. +4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + ----------------------------------------------------------------------------- + +Copyright (C) The Internet Society 2005. This version of +this module is part of RFC 4178; see the RFC itself for +full legal notices. + +(The above copyright notice is per RFC 3978 5.6 (a), q.v.) + + ----------------------------------------------------------------------------- + +Copyright (c) 2004 Masarykova universita +(Masaryk University, Brno, Czech Republic) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + ----------------------------------------------------------------------------- + +Copyright (c) 1997 - 2003 Kungliga Tekniska Högskolan +(Royal Institute of Technology, Stockholm, Sweden). +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the Institute nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + ----------------------------------------------------------------------------- + +Copyright (c) 1998 Doug Rabson +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + ----------------------------------------------------------------------------- + +Copyright ((c)) 2002, Rice University +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Rice University (RICE) nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + +This software is provided by RICE and the contributors on an "as is" +basis, without any representations or warranties of any kind, express +or implied including, but not limited to, representations or +warranties of non-infringement, merchantability or fitness for a +particular purpose. In no event shall RICE or contributors be liable +for any direct, indirect, incidental, special, exemplary, or +consequential damages (including, but not limited to, procurement of +substitute goods or services; loss of use, data, or profits; or +business interruption) however caused and on any theory of liability, +whether in contract, strict liability, or tort (including negligence +or otherwise) arising in any way out of the use of this software, even +if advised of the possibility of such damage. + + ----------------------------------------------------------------------------- + +Copyright (c) 1993 by Digital Equipment Corporation. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. + +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + ----------------------------------------------------------------------------- + +Copyright 2000 Aaron D. Gifford. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + ----------------------------------------------------------------------------- + +Copyright (c) 1998 Doug Rabson. +Copyright (c) 2001 Jake Burkholder. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + ----------------------------------------------------------------------------- + +Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the project nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + ----------------------------------------------------------------------------- + +Copyright (c) 1999-2000 by Nortel Networks Corporation + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND NORTEL NETWORKS DISCLAIMS +ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NORTEL NETWORKS +BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + ----------------------------------------------------------------------------- + +Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved. + +By using this file, you agree to the terms and conditions set forth bellow. + + LICENSE TERMS AND CONDITIONS + +The following License Terms and Conditions apply, unless a different +license is obtained from Japan Network Information Center ("JPNIC"), +a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +Chiyoda-ku, Tokyo 101-0047, Japan. + +1. Use, Modification and Redistribution (including distribution of any + modified or derived work) in source and/or binary forms is permitted + under this License Terms and Conditions. + +2. Redistribution of source code must retain the copyright notices as they + appear in each source code file, this License Terms and Conditions. + +3. Redistribution in binary form must reproduce the Copyright Notice, + this License Terms and Conditions, in the documentation and/or other + materials provided with the distribution. For the purposes of binary + distribution the "Copyright Notice" refers to the following language: + "Copyright (c) 2000-2002 Japan Network Information Center. All rights + reserved." + +4. The name of JPNIC may not be used to endorse or promote products + derived from this Software without specific prior written approval of + JPNIC. + +5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + ----------------------------------------------------------------------------- + +Copyright (C) 2004 Nominet, Ltd. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND NOMINET DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + ----------------------------------------------------------------------------- + +Portions Copyright RSA Security Inc. + +License to copy and use this software is granted provided that it is +identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface +(Cryptoki)" in all material mentioning or referencing this software. + +License is also granted to make and use derivative works provided that +such works are identified as "derived from the RSA Security Inc. PKCS #11 +Cryptographic Token Interface (Cryptoki)" in all material mentioning or +referencing the derived work. + +RSA Security Inc. makes no representations concerning either the +merchantability of this software or the suitability of this software for +any particular purpose. It is provided "as is" without express or implied +warranty of any kind. + + ----------------------------------------------------------------------------- + +Copyright (c) 1996, David Mazieres +Copyright (c) 2008, Damien Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +----------------------------------------------------------------------------- + +Copyright (c) 2000-2001 The OpenSSL Project. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + "This product includes software developed by the OpenSSL Project + for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" + +4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + licensing@OpenSSL.org. + +5. Products derived from this software may not be called "OpenSSL" + nor may "OpenSSL" appear in their names without prior written + permission of the OpenSSL Project. + +6. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes software developed by the OpenSSL Project + for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" + +THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY +EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR +ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + Modified: stable/8/contrib/bind9/Makefile.in ============================================================================== --- stable/8/contrib/bind9/Makefile.in Tue Aug 2 07:55:50 2011 (r224595) +++ stable/8/contrib/bind9/Makefile.in Tue Aug 2 08:07:59 2011 (r224596) @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004-2009, 2011 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 1998-2002 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.52.48.2 2009-02-20 23:47:23 tbox Exp $ +# $Id: Makefile.in,v 1.52.48.4 2011-02-28 01:18:39 tbox Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -21,7 +21,7 @@ top_srcdir = @top_srcdir@ @BIND9_VERSION@ -SUBDIRS = make lib bin doc +SUBDIRS = make unit lib bin doc TARGETS = MANPAGES = isc-config.sh.1 @@ -64,6 +64,7 @@ check: test test: (cd bin/tests && ${MAKE} ${MAKEDEFS} test) + (test -f unit/unittest.sh && $(SHELL) unit/unittest.sh) FAQ: FAQ.xml ${XSLTPROC} doc/xsl/isc-docbook-text.xsl FAQ.xml | \ Modified: stable/8/contrib/bind9/README ============================================================================== --- stable/8/contrib/bind9/README Tue Aug 2 07:55:50 2011 (r224595) +++ stable/8/contrib/bind9/README Tue Aug 2 08:07:59 2011 (r224596) @@ -42,9 +42,15 @@ BIND 9 Stichting NLnet - NLnet Foundation Nominum, Inc. -BIND 9.6.3 +BIND 9.6-ESV-R5 (Extended Support Version) - BIND 9.6.3 is a maintenance release, fixing bugs in 9.6.2. + BIND 9.4-ESV-R5 is a maintenance release, fixing bugs in BIND + 9.6-ESV-R4. + +BIND 9.6.3/BIND 9.6-ESV-R4 + + BIND 9.6.3/BIND 9.6-ESV-R4 is a maintenance release, fixing bugs + in 9.6.2. BIND 9.6.2 Copied: stable/8/contrib/bind9/RELEASE-NOTES-BIND-9.6-ESV.html (from r224591, vendor/bind9/dist-9.6/RELEASE-NOTES-BIND-9.6-ESV.html) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/contrib/bind9/RELEASE-NOTES-BIND-9.6-ESV.html Tue Aug 2 08:07:59 2011 (r224596, copy of r224591, vendor/bind9/dist-9.6/RELEASE-NOTES-BIND-9.6-ESV.html) @@ -0,0 +1,319 @@ + + + + + + +

+ +

Introduction

+ +

+ BIND 9.6-ESV-R5 is the current production release + of BIND 9.6. +

+

+ This document summarizes changes from BIND 9.6-ESV-R4 to BIND 9.6-ESV-R5. + Please see the CHANGES file in the source code release for a + complete list of all changes. +

+
+ +

Download

+ +

+ The latest release of BIND 9 software can always be found + on our web site at + http://www.isc.org/downloads/all. + There you will find additional information about each release, + source code, and some pre-compiled versions for certain operating + systems. +

+
+ +

Support

+ +

Product support information is available on + http://www.isc.org/services/support + for paid support options. Free support is provided by our user + community via a mailing list. Information on all public email *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Tue Aug 2 08:08:31 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3F871065674; Tue, 2 Aug 2011 08:08:31 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A36778FC12; Tue, 2 Aug 2011 08:08:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p7288V10035447; Tue, 2 Aug 2011 08:08:31 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7288VCC035445; Tue, 2 Aug 2011 08:08:31 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201108020808.p7288VCC035445@svn.freebsd.org> From: Doug Barton Date: Tue, 2 Aug 2011 08:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224597 - stable/8/lib/bind X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2011 08:08:31 -0000 Author: dougb Date: Tue Aug 2 08:08:31 2011 New Revision: 224597 URL: http://svn.freebsd.org/changeset/base/224597 Log: Update for version 9.6-ESV-R5 Modified: stable/8/lib/bind/config.h Modified: stable/8/lib/bind/config.h ============================================================================== --- stable/8/lib/bind/config.h Tue Aug 2 08:07:59 2011 (r224596) +++ stable/8/lib/bind/config.h Tue Aug 2 08:08:31 2011 (r224597) @@ -147,6 +147,9 @@ int sigwait(const unsigned int *set, int /* Define if threads need PTHREAD_SCOPE_SYSTEM */ /* #undef NEED_PTHREAD_SCOPE_SYSTEM */ +/* define if ATF unit tests are to be built. */ +/* #undef ATF_TEST */ + /* Define if recvmsg() does not meet all of the BSD socket API specifications. */ /* #undef BROKEN_RECVMSG */ @@ -187,6 +190,9 @@ int sigwait(const unsigned int *set, int /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `getenv' function. */ +#define HAVE_GETENV 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_GSSAPI_GSSAPI_H */ @@ -334,6 +340,9 @@ int sigwait(const unsigned int *set, int (O_NDELAY/O_NONBLOCK). */ #define PORT_NONBLOCK O_NONBLOCK +/* The size of `void *', as computed by sizeof. */ +#define SIZEOF_VOID_P 8 + /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 From owner-svn-src-stable-8@FreeBSD.ORG Tue Aug 2 08:09:12 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B39BB1065672; Tue, 2 Aug 2011 08:09:12 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A2F508FC1A; Tue, 2 Aug 2011 08:09:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p7289CIh035512; Tue, 2 Aug 2011 08:09:12 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7289Coe035510; Tue, 2 Aug 2011 08:09:12 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201108020809.p7289Coe035510@svn.freebsd.org> From: Doug Barton Date: Tue, 2 Aug 2011 08:09:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224598 - stable/8/share/doc/bind9 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2011 08:09:12 -0000 Author: dougb Date: Tue Aug 2 08:09:12 2011 New Revision: 224598 URL: http://svn.freebsd.org/changeset/base/224598 Log: Update for version 9.6-ESV-R5 Modified: stable/8/share/doc/bind9/Makefile Modified: stable/8/share/doc/bind9/Makefile ============================================================================== --- stable/8/share/doc/bind9/Makefile Tue Aug 2 08:08:31 2011 (r224597) +++ stable/8/share/doc/bind9/Makefile Tue Aug 2 08:09:12 2011 (r224598) @@ -9,6 +9,8 @@ NO_OBJ= FILESGROUPS= TOP ARM MISC TOP= CHANGES COPYRIGHT FAQ KNOWN-DEFECTS NSEC3-NOTES README \ + RELEASE-NOTES-BIND-9.6-ESV.pdf RELEASE-NOTES-BIND-9.6-ESV.txt \ + RELEASE-NOTES-BIND-9.6-ESV.html release-notes.css \ README.idnkit README.pkcs11 TOPDIR= ${DOCDIR}/bind9 ARM= Bv9ARM.ch01.html Bv9ARM.ch02.html Bv9ARM.ch03.html \ From owner-svn-src-stable-8@FreeBSD.ORG Tue Aug 2 09:06:04 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7D82106564A; Tue, 2 Aug 2011 09:06:04 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD2818FC0C; Tue, 2 Aug 2011 09:06:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p72964lC038194; Tue, 2 Aug 2011 09:06:04 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p729643w038189; Tue, 2 Aug 2011 09:06:04 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201108020906.p729643w038189@svn.freebsd.org> From: Ulrich Spoerlein Date: Tue, 2 Aug 2011 09:06:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224600 - stable/8/contrib/gcc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2011 09:06:05 -0000 Author: uqs Date: Tue Aug 2 09:06:04 2011 New Revision: 224600 URL: http://svn.freebsd.org/changeset/base/224600 Log: MFH r223715 - Fix typo in check_for_nested_with_variably_modified - Implement -Wvariable-decl. - Port -Wtrampolines support from gcc3. (all three also via OpenBSD) PR: gnu/127136, gnu/157019 Submitted by: Henning Petersen, Pedro Giffuni Modified: stable/8/contrib/gcc/c-decl.c stable/8/contrib/gcc/c.opt stable/8/contrib/gcc/common.opt stable/8/contrib/gcc/tree-nested.c Directory Properties: stable/8/contrib/gcc/ (props changed) Modified: stable/8/contrib/gcc/c-decl.c ============================================================================== --- stable/8/contrib/gcc/c-decl.c Tue Aug 2 08:31:23 2011 (r224599) +++ stable/8/contrib/gcc/c-decl.c Tue Aug 2 09:06:04 2011 (r224600) @@ -4340,6 +4340,8 @@ grokdeclarator (const struct c_declarato pedwarn ("ISO C90 forbids variable-size array %qs", name); } + if (warn_variable_decl) + warning (0, "variable-sized array %qs", name); } if (integer_zerop (size)) Modified: stable/8/contrib/gcc/c.opt ============================================================================== --- stable/8/contrib/gcc/c.opt Tue Aug 2 08:31:23 2011 (r224599) +++ stable/8/contrib/gcc/c.opt Tue Aug 2 09:06:04 2011 (r224600) @@ -404,6 +404,10 @@ Wtraditional C ObjC Var(warn_traditional) Warn about features not present in traditional C +Wtrampolines +Common Var(warn_trampolines) +Warn when trampolines are emitted + Wtrigraphs C ObjC C++ ObjC++ Warn if trigraphs are encountered that might affect the meaning of the program Modified: stable/8/contrib/gcc/common.opt ============================================================================== --- stable/8/contrib/gcc/common.opt Tue Aug 2 08:31:23 2011 (r224599) +++ stable/8/contrib/gcc/common.opt Tue Aug 2 09:06:04 2011 (r224600) @@ -189,6 +189,10 @@ Wunused-variable Common Var(warn_unused_variable) Warn when a variable is unused +Wvariable-decl +Common Var(warn_variable_decl) +Warn about variable-sized declarations. + Wvolatile-register-var Common Var(warn_register_var) Warn when a register variable is declared volatile Modified: stable/8/contrib/gcc/tree-nested.c ============================================================================== --- stable/8/contrib/gcc/tree-nested.c Tue Aug 2 08:31:23 2011 (r224599) +++ stable/8/contrib/gcc/tree-nested.c Tue Aug 2 09:06:04 2011 (r224600) @@ -750,7 +750,7 @@ check_for_nested_with_variably_modified for (cgn = cgn->nested; cgn ; cgn = cgn->next_nested) { for (arg = DECL_ARGUMENTS (cgn->decl); arg; arg = TREE_CHAIN (arg)) - if (variably_modified_type_p (TREE_TYPE (arg), 0), orig_fndecl) + if (variably_modified_type_p (TREE_TYPE (arg), orig_fndecl)) return true; if (check_for_nested_with_variably_modified (cgn->decl, orig_fndecl)) @@ -1621,6 +1621,10 @@ convert_tramp_reference (tree *tp, int * it doesn't need a trampoline. */ if (DECL_NO_STATIC_CHAIN (decl)) break; + if (warn_trampolines) + { + warning(0, "local function address taken needing trampoline generation"); + } /* Lookup the immediate parent of the callee, as that's where we need to insert the trampoline. */ From owner-svn-src-stable-8@FreeBSD.ORG Tue Aug 2 11:33:20 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 472E61065672; Tue, 2 Aug 2011 11:33:20 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36B7C8FC13; Tue, 2 Aug 2011 11:33:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p72BXK7j048478; Tue, 2 Aug 2011 11:33:20 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p72BXKE8048476; Tue, 2 Aug 2011 11:33:20 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201108021133.p72BXKE8048476@svn.freebsd.org> From: Martin Matuska Date: Tue, 2 Aug 2011 11:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224607 - stable/8/cddl/contrib/opensolaris/lib/libzfs/common X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2011 11:33:20 -0000 Author: mm Date: Tue Aug 2 11:33:19 2011 New Revision: 224607 URL: http://svn.freebsd.org/changeset/base/224607 Log: MFC r224525: Fix wrong initialization of "cmd" for calling the jail/unjail ioctl. Reviewed by: pjd@, delphij@ Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Aug 2 11:28:42 2011 (r224606) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Aug 2 11:33:19 2011 (r224607) @@ -4289,7 +4289,8 @@ zfs_jail(zfs_handle_t *zhp, int jailid, libzfs_handle_t *hdl = zhp->zfs_hdl; zfs_cmd_t zc = { 0 }; char errbuf[1024]; - int cmd, ret; + unsigned long cmd; + int ret; if (attach) { (void) snprintf(errbuf, sizeof (errbuf), From owner-svn-src-stable-8@FreeBSD.ORG Tue Aug 2 11:34:59 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8B9A1065676; Tue, 2 Aug 2011 11:34:59 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEEE18FC0C; Tue, 2 Aug 2011 11:34:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p72BYxtV048585; Tue, 2 Aug 2011 11:34:59 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p72BYxqQ048583; Tue, 2 Aug 2011 11:34:59 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201108021134.p72BYxqQ048583@svn.freebsd.org> From: Martin Matuska Date: Tue, 2 Aug 2011 11:34:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224608 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2011 11:35:00 -0000 Author: mm Date: Tue Aug 2 11:34:59 2011 New Revision: 224608 URL: http://svn.freebsd.org/changeset/base/224608 Log: MFC r224526: Fix serious bug in ZIL that can lead to pool corruption in the case of a held dataset during remount. Detailed description is available at: https://www.illumos.org/issues/883 illumos-gate revision: 13380:161b964a0e10 Reviewed by: pjd Obtained from: Illumos (Bug #883) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Tue Aug 2 11:33:19 2011 (r224607) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Tue Aug 2 11:34:59 2011 (r224608) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -567,7 +568,7 @@ zil_destroy(zilog_t *zilog, boolean_t ke if (!list_is_empty(&zilog->zl_lwb_list)) { ASSERT(zh->zh_claim_txg == 0); - ASSERT(!keep_first); + VERIFY(!keep_first); while ((lwb = list_head(&zilog->zl_lwb_list)) != NULL) { list_remove(&zilog->zl_lwb_list, lwb); if (lwb->lwb_buf != NULL) @@ -1668,20 +1669,9 @@ zil_alloc(objset_t *os, zil_header_t *zh void zil_free(zilog_t *zilog) { - lwb_t *head_lwb; - zilog->zl_stop_sync = 1; - /* - * After zil_close() there should only be one lwb with a buffer. - */ - head_lwb = list_head(&zilog->zl_lwb_list); - if (head_lwb) { - ASSERT(head_lwb == list_tail(&zilog->zl_lwb_list)); - list_remove(&zilog->zl_lwb_list, head_lwb); - zio_buf_free(head_lwb->lwb_buf, head_lwb->lwb_sz); - kmem_cache_free(zil_lwb_cache, head_lwb); - } + ASSERT(list_is_empty(&zilog->zl_lwb_list)); list_destroy(&zilog->zl_lwb_list); avl_destroy(&zilog->zl_vdev_tree); @@ -1721,6 +1711,10 @@ zil_open(objset_t *os, zil_get_data_t *g { zilog_t *zilog = dmu_objset_zil(os); + ASSERT(zilog->zl_clean_taskq == NULL); + ASSERT(zilog->zl_get_data == NULL); + ASSERT(list_is_empty(&zilog->zl_lwb_list)); + zilog->zl_get_data = get_data; zilog->zl_clean_taskq = taskq_create("zil_clean", 1, minclsyspri, 2, 2, TASKQ_PREPOPULATE); @@ -1734,7 +1728,7 @@ zil_open(objset_t *os, zil_get_data_t *g void zil_close(zilog_t *zilog) { - lwb_t *tail_lwb; + lwb_t *lwb; uint64_t txg = 0; zil_commit(zilog, 0); /* commit all itx */ @@ -1746,9 +1740,9 @@ zil_close(zilog_t *zilog) * destroy the zl_clean_taskq. */ mutex_enter(&zilog->zl_lock); - tail_lwb = list_tail(&zilog->zl_lwb_list); - if (tail_lwb != NULL) - txg = tail_lwb->lwb_max_txg; + lwb = list_tail(&zilog->zl_lwb_list); + if (lwb != NULL) + txg = lwb->lwb_max_txg; mutex_exit(&zilog->zl_lock); if (txg) txg_wait_synced(zilog->zl_dmu_pool, txg); @@ -1756,6 +1750,19 @@ zil_close(zilog_t *zilog) taskq_destroy(zilog->zl_clean_taskq); zilog->zl_clean_taskq = NULL; zilog->zl_get_data = NULL; + + /* + * We should have only one LWB left on the list; remove it now. + */ + mutex_enter(&zilog->zl_lock); + lwb = list_head(&zilog->zl_lwb_list); + if (lwb != NULL) { + ASSERT(lwb == list_tail(&zilog->zl_lwb_list)); + list_remove(&zilog->zl_lwb_list, lwb); + zio_buf_free(lwb->lwb_buf, lwb->lwb_sz); + kmem_cache_free(zil_lwb_cache, lwb); + } + mutex_exit(&zilog->zl_lock); } /* From owner-svn-src-stable-8@FreeBSD.ORG Tue Aug 2 12:43:40 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA420106566C; Tue, 2 Aug 2011 12:43:40 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA08F8FC0A; Tue, 2 Aug 2011 12:43:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p72CheLo051935; Tue, 2 Aug 2011 12:43:40 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p72ChetG051933; Tue, 2 Aug 2011 12:43:40 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201108021243.p72ChetG051933@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 2 Aug 2011 12:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224610 - stable/8/sbin/hastctl X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2011 12:43:41 -0000 Author: trociny Date: Tue Aug 2 12:43:40 2011 New Revision: 224610 URL: http://svn.freebsd.org/changeset/base/224610 Log: MFC r223976: When exiting with error because of an invalid command line argument use errx(3), not err(3), and the exit code from sysexits(3). Modified: stable/8/sbin/hastctl/hastctl.c Directory Properties: stable/8/sbin/hastctl/ (props changed) Modified: stable/8/sbin/hastctl/hastctl.c ============================================================================== --- stable/8/sbin/hastctl/hastctl.c Tue Aug 2 11:35:28 2011 (r224609) +++ stable/8/sbin/hastctl/hastctl.c Tue Aug 2 12:43:40 2011 (r224610) @@ -403,15 +403,15 @@ main(int argc, char *argv[]) break; case 'e': if (expand_number(optarg, &extentsize) < 0) - err(1, "Invalid extentsize"); + errx(EX_USAGE, "Invalid extentsize"); break; case 'k': if (expand_number(optarg, &keepdirty) < 0) - err(1, "Invalid keepdirty"); + errx(EX_USAGE, "Invalid keepdirty"); break; case 'm': if (expand_number(optarg, &mediasize) < 0) - err(1, "Invalid mediasize"); + errx(EX_USAGE, "Invalid mediasize"); break; case 'h': default: From owner-svn-src-stable-8@FreeBSD.ORG Wed Aug 3 04:27:47 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8921106566B; Wed, 3 Aug 2011 04:27:47 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 979608FC12; Wed, 3 Aug 2011 04:27:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p734RlBV085899; Wed, 3 Aug 2011 04:27:47 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p734Rlc2085897; Wed, 3 Aug 2011 04:27:47 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201108030427.p734Rlc2085897@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 3 Aug 2011 04:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224622 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2011 04:27:47 -0000 Author: ae Date: Wed Aug 3 04:27:47 2011 New Revision: 224622 URL: http://svn.freebsd.org/changeset/base/224622 Log: MFC r223753: ARP code reuses mbuf from ARP request to make a reply, but it does not reset rcvif to NULL. Since rcvif is not NULL, ipfw(4) supposes that ARP replies were received on specified interface. Reset rcvif to NULL for ARP replies to fix this issue. PR: kern/131817 Modified: stable/8/sys/netinet/if_ether.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/if_ether.c ============================================================================== --- stable/8/sys/netinet/if_ether.c Wed Aug 3 03:52:15 2011 (r224621) +++ stable/8/sys/netinet/if_ether.c Wed Aug 3 04:27:47 2011 (r224622) @@ -843,6 +843,7 @@ reply: ah->ar_pro = htons(ETHERTYPE_IP); /* let's be sure! */ m->m_len = sizeof(*ah) + (2 * ah->ar_pln) + (2 * ah->ar_hln); m->m_pkthdr.len = m->m_len; + m->m_pkthdr.rcvif = NULL; sa.sa_family = AF_ARP; sa.sa_len = 2; (*ifp->if_output)(ifp, m, &sa, NULL); From owner-svn-src-stable-8@FreeBSD.ORG Wed Aug 3 14:29:20 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A06FE106564A; Wed, 3 Aug 2011 14:29:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 764788FC12; Wed, 3 Aug 2011 14:29:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p73ETKHH017233; Wed, 3 Aug 2011 14:29:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p73ETK2X017231; Wed, 3 Aug 2011 14:29:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201108031429.p73ETK2X017231@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 3 Aug 2011 14:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224635 - stable/8/sys/fs/devfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2011 14:29:20 -0000 Author: kib Date: Wed Aug 3 14:29:20 2011 New Revision: 224635 URL: http://svn.freebsd.org/changeset/base/224635 Log: MFC r223988: While fixing the looping of a thread while devfs vnode is reclaimed, r179247 introduced a possibility of devfs_allocv() returning spurious ENOENT. If the vnode is selected by vnlru daemon for reclamation, then devfs_allocv() can get ENOENT from vget() due to devfs_close() dropping vnode lock around the call to cdevsw d_close method. Use LK_RETRY in the vget() call, and do some part of the devfs_reclaim() work in devfs_allocv(), clearing vp->v_data and de->de_vnode. Retry the allocation of the vnode, now with de->de_vnode == NULL. The check vp->v_data == NULL at the start of devfs_close() cannot be affected by the change, since vnode lock must be held while VI_DOOMED is set, and only dropped after the check. Modified: stable/8/sys/fs/devfs/devfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/8/sys/fs/devfs/devfs_vnops.c Wed Aug 3 13:39:11 2011 (r224634) +++ stable/8/sys/fs/devfs/devfs_vnops.c Wed Aug 3 14:29:20 2011 (r224635) @@ -346,6 +346,7 @@ devfs_allocv(struct devfs_dirent *de, st sx_xunlock(&dmp->dm_lock); return (ENOENT); } +loop: DEVFS_DE_HOLD(de); DEVFS_DMP_HOLD(dmp); mtx_lock(&devfs_de_interlock); @@ -354,16 +355,21 @@ devfs_allocv(struct devfs_dirent *de, st VI_LOCK(vp); mtx_unlock(&devfs_de_interlock); sx_xunlock(&dmp->dm_lock); - error = vget(vp, lockmode | LK_INTERLOCK, curthread); + vget(vp, lockmode | LK_INTERLOCK | LK_RETRY, curthread); sx_xlock(&dmp->dm_lock); if (devfs_allocv_drop_refs(0, dmp, de)) { - if (error == 0) - vput(vp); + vput(vp); return (ENOENT); } - else if (error) { - sx_xunlock(&dmp->dm_lock); - return (error); + else if ((vp->v_iflag & VI_DOOMED) != 0) { + mtx_lock(&devfs_de_interlock); + if (de->de_vnode == vp) { + de->de_vnode = NULL; + vp->v_data = NULL; + } + mtx_unlock(&devfs_de_interlock); + vput(vp); + goto loop; } sx_xunlock(&dmp->dm_lock); *vpp = vp; From owner-svn-src-stable-8@FreeBSD.ORG Wed Aug 3 18:11:54 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 517FF1065670; Wed, 3 Aug 2011 18:11:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3817C8FC17; Wed, 3 Aug 2011 18:11:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p73IBs9v023891; Wed, 3 Aug 2011 18:11:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p73IBsrW023888; Wed, 3 Aug 2011 18:11:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201108031811.p73IBsrW023888@svn.freebsd.org> From: Xin LI Date: Wed, 3 Aug 2011 18:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224636 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2011 18:11:54 -0000 Author: delphij Date: Wed Aug 3 18:11:53 2011 New Revision: 224636 URL: http://svn.freebsd.org/changeset/base/224636 Log: MFC r224231,224251-224252: Make ZFS work better with respect to device nodes. PR: kern/159010 Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Aug 3 14:29:20 2011 (r224635) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Aug 3 18:11:53 2011 (r224636) @@ -2648,11 +2648,11 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i uint32_t blksize; u_longlong_t nblocks; uint64_t links; - uint64_t mtime[2], ctime[2], crtime[2]; + uint64_t mtime[2], ctime[2], crtime[2], rdev; xvattr_t *xvap = (xvattr_t *)vap; /* vap may be an xvattr_t * */ xoptattr_t *xoap = NULL; boolean_t skipaclchk = (flags & ATTR_NOACLCHECK) ? B_TRUE : B_FALSE; - sa_bulk_attr_t bulk[3]; + sa_bulk_attr_t bulk[4]; int count = 0; ZFS_ENTER(zfsvfs); @@ -2663,6 +2663,9 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_MTIME(zfsvfs), NULL, &mtime, 16); SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL, &ctime, 16); SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL, &crtime, 16); + if (vp->v_type == VBLK || vp->v_type == VCHR) + SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_RDEV(zfsvfs), NULL, + &rdev, 8); if ((error = sa_bulk_lookup(zp->z_sa_hdl, bulk, count)) != 0) { ZFS_EXIT(zfsvfs); @@ -2691,7 +2694,11 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i mutex_enter(&zp->z_lock); vap->va_type = IFTOVT(zp->z_mode); vap->va_mode = zp->z_mode & ~S_IFMT; -// vap->va_fsid = zp->z_zfsvfs->z_vfs->vfs_dev; +#ifdef sun + vap->va_fsid = zp->z_zfsvfs->z_vfs->vfs_dev; +#else + vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; +#endif vap->va_nodeid = zp->z_id; if ((vp->v_flag & VROOT) && zfs_show_ctldir(zp)) links = zp->z_links + 1; @@ -2699,8 +2706,12 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i links = zp->z_links; vap->va_nlink = MIN(links, UINT32_MAX); /* nlink_t limit! */ vap->va_size = zp->z_size; - vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; -// vap->va_rdev = zfs_cmpldev(pzp->zp_rdev); +#ifdef sun + vap->va_rdev = vp->v_rdev; +#else + if (vp->v_type == VBLK || vp->v_type == VCHR) + vap->va_rdev = zfs_cmpldev(rdev); +#endif vap->va_seq = zp->z_seq; vap->va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */ Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Aug 3 14:29:20 2011 (r224635) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Aug 3 18:11:53 2011 (r224636) @@ -700,7 +700,23 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_bu case VDIR: zp->z_zn_prefetch = B_TRUE; /* z_prefetch default is enabled */ break; +#ifdef sun + case VBLK: + case VCHR: + { + uint64_t rdev; + VERIFY(sa_lookup(zp->z_sa_hdl, SA_ZPL_RDEV(zfsvfs), + &rdev, sizeof (rdev)) == 0); + + vp->v_rdev = zfs_cmpldev(rdev); + } + break; +#endif /* sun */ case VFIFO: +#ifdef sun + case VSOCK: + case VDOOR: +#endif /* sun */ vp->v_op = &zfs_fifoops; break; case VREG: @@ -709,6 +725,14 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_bu vp->v_op = &zfs_shareops; } break; +#ifdef sun + case VLNK: + vn_setops(vp, zfs_symvnodeops); + break; + default: + vn_setops(vp, zfs_evnodeops); + break; +#endif /* sun */ } if (vp->v_type != VFIFO) VN_LOCK_ASHARE(vp); From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 4 03:04:05 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF292106564A; Thu, 4 Aug 2011 03:04:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE66C8FC16; Thu, 4 Aug 2011 03:04:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p74345nB041626; Thu, 4 Aug 2011 03:04:05 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p74345XW041623; Thu, 4 Aug 2011 03:04:05 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201108040304.p74345XW041623@svn.freebsd.org> From: Xin LI Date: Thu, 4 Aug 2011 03:04:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224645 - in stable/8: share/man/man4 sys/dev/hptiop X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2011 03:04:05 -0000 Author: delphij Date: Thu Aug 4 03:04:05 2011 New Revision: 224645 URL: http://svn.freebsd.org/changeset/base/224645 Log: MFC r224583: Add PCI ID for RocketRAID 4321 and 4322. A FreeNAS user have tested the change on RocketRAID 4322. Sponsored by: iXsystems, Inc. Modified: stable/8/share/man/man4/hptiop.4 stable/8/sys/dev/hptiop/hptiop.c Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/share/man/man4/hptiop.4 ============================================================================== --- stable/8/share/man/man4/hptiop.4 Wed Aug 3 23:57:38 2011 (r224644) +++ stable/8/share/man/man4/hptiop.4 Thu Aug 4 03:04:05 2011 (r224645) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 12, 2007 +.Dd August 1, 2011 .Dt HPTIOP 4 .Os .Sh NAME @@ -60,6 +60,10 @@ driver supports the following SAS and SA .It HighPoint RocketRAID 4320 .It +HighPoint RocketRAID 4321 +.It +HighPoint RocketRAID 4322 +.It HighPoint RocketRAID 3220 .It HighPoint RocketRAID 3320 Modified: stable/8/sys/dev/hptiop/hptiop.c ============================================================================== --- stable/8/sys/dev/hptiop/hptiop.c Wed Aug 3 23:57:38 2011 (r224644) +++ stable/8/sys/dev/hptiop/hptiop.c Thu Aug 4 03:04:05 2011 (r224645) @@ -1269,6 +1269,8 @@ static int hptiop_probe(device_t dev) id = pci_get_device(dev); switch (id) { + case 0x4322: + case 0x4321: case 0x4320: sas = 1; case 0x3220: From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 4 07:29:09 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 190B5106566B; Thu, 4 Aug 2011 07:29:09 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E38118FC08; Thu, 4 Aug 2011 07:29:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p747T88L049646; Thu, 4 Aug 2011 07:29:08 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p747T8wU049643; Thu, 4 Aug 2011 07:29:08 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201108040729.p747T8wU049643@svn.freebsd.org> From: Martin Matuska Date: Thu, 4 Aug 2011 07:29:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224646 - in stable/8/usr.bin: cpio tar X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2011 07:29:09 -0000 Author: mm Date: Thu Aug 4 07:29:08 2011 New Revision: 224646 URL: http://svn.freebsd.org/changeset/base/224646 Log: MFC r224566: Correctly link bsdcpio and bsdtar against libmd and libcrpyto by applying the change from r221472 (libarchive). Reviewed by: kientzle Modified: stable/8/usr.bin/cpio/Makefile stable/8/usr.bin/tar/Makefile Directory Properties: stable/8/usr.bin/cpio/ (props changed) stable/8/usr.bin/tar/ (props changed) Modified: stable/8/usr.bin/cpio/Makefile ============================================================================== --- stable/8/usr.bin/cpio/Makefile Thu Aug 4 03:04:05 2011 (r224645) +++ stable/8/usr.bin/cpio/Makefile Thu Aug 4 07:29:08 2011 (r224646) @@ -21,11 +21,14 @@ CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../.. # statically linked, cannot use -lcrypto, and are size sensitive. CFLAGS+= -DSMALLER .endif -DPADD= ${LIBARCHIVE} ${LIBZ} ${LIBBZ2} ${LIBMD} ${LIBLZMA} ${LIBBSDXML} -LDADD= -larchive -lz -lbz2 -lmd -llzma -lbsdxml +DPADD= ${LIBARCHIVE} ${LIBZ} ${LIBBZ2} ${LIBLZMA} ${LIBBSDXML} +LDADD= -larchive -lz -lbz2 -llzma -lbsdxml .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto +.else +DPADD+= ${LIBMD} +LDADD+= -lmd .endif SYMLINKS=bsdcpio ${BINDIR}/cpio Modified: stable/8/usr.bin/tar/Makefile ============================================================================== --- stable/8/usr.bin/tar/Makefile Thu Aug 4 03:04:05 2011 (r224645) +++ stable/8/usr.bin/tar/Makefile Thu Aug 4 07:29:08 2011 (r224646) @@ -19,12 +19,16 @@ SRCS+= err.c \ pathmatch.c WARNS?= 6 -DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBLZMA} ${LIBBSDXML} -LDADD= -larchive -lbz2 -lz -lmd -llzma -lbsdxml +DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA} ${LIBBSDXML} +LDADD= -larchive -lbz2 -lz -llzma -lbsdxml .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto +.else +DPADD+= ${LIBMD} +LDADD+= -lmd .endif + CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\" CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../lib/libarchive From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 4 07:32:21 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEA52106566B; Thu, 4 Aug 2011 07:32:21 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE3238FC1A; Thu, 4 Aug 2011 07:32:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p747WLaM049792; Thu, 4 Aug 2011 07:32:21 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p747WL2Q049790; Thu, 4 Aug 2011 07:32:21 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201108040732.p747WL2Q049790@svn.freebsd.org> From: Martin Matuska Date: Thu, 4 Aug 2011 07:32:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224647 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2011 07:32:22 -0000 Author: mm Date: Thu Aug 4 07:32:21 2011 New Revision: 224647 URL: http://svn.freebsd.org/changeset/base/224647 Log: MFC r224579: Fix integer overflow in txg_delay() by initializing the variable "timeout" as clock_t. Filed as Illumos Bug #1313 Reviewed by: avg Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Thu Aug 4 07:29:08 2011 (r224646) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Thu Aug 4 07:32:21 2011 (r224647) @@ -488,7 +488,7 @@ void txg_delay(dsl_pool_t *dp, uint64_t txg, int ticks) { tx_state_t *tx = &dp->dp_tx; - int timeout = ddi_get_lbolt() + ticks; + clock_t timeout = ddi_get_lbolt() + ticks; /* don't delay if this txg could transition to quiesing immediately */ if (tx->tx_open_txg > txg || From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 4 10:37:12 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB1351065670; Thu, 4 Aug 2011 10:37:12 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B94148FC16; Thu, 4 Aug 2011 10:37:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p74AbClr057396; Thu, 4 Aug 2011 10:37:12 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p74AbCOl057387; Thu, 4 Aug 2011 10:37:12 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201108041037.p74AbCOl057387@svn.freebsd.org> From: Martin Matuska Date: Thu, 4 Aug 2011 10:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224649 - in stable/8/release: amd64 i386 ia64 pc98 picobsd/floppy.tree/sbin powerpc sparc64 sun4v X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2011 10:37:12 -0000 Author: mm Date: Thu Aug 4 10:37:12 2011 New Revision: 224649 URL: http://svn.freebsd.org/changeset/base/224649 Log: MFC r208545, r208577 (unbreak make release): MFC r208545 (delphij): libarchive now needs libcrypto and liblzma. MFC r208577 (delphij): Reorder to have -lcrypto after -larchive. Our linker doesn't seem to like the current ordering :( Reported by: olgeni Modified: stable/8/release/amd64/boot_crunch.conf stable/8/release/i386/boot_crunch.conf stable/8/release/ia64/boot_crunch.conf stable/8/release/pc98/boot_crunch.conf stable/8/release/powerpc/boot_crunch.conf stable/8/release/sparc64/boot_crunch.conf stable/8/release/sun4v/boot_crunch.conf Directory Properties: stable/8/release/ (props changed) stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) stable/8/release/picobsd/tinyware/login/ (props changed) stable/8/release/powerpc/ (props changed) Modified: stable/8/release/amd64/boot_crunch.conf ============================================================================== --- stable/8/release/amd64/boot_crunch.conf Thu Aug 4 08:50:33 2011 (r224648) +++ stable/8/release/amd64/boot_crunch.conf Thu Aug 4 10:37:12 2011 (r224649) @@ -41,4 +41,4 @@ progs usbconfig libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo -libs -lbsdxml -larchive -lbz2 -lusb -ljail +libs -lbsdxml -larchive -lcrypto -lbz2 -llzma -lusb -ljail Modified: stable/8/release/i386/boot_crunch.conf ============================================================================== --- stable/8/release/i386/boot_crunch.conf Thu Aug 4 08:50:33 2011 (r224648) +++ stable/8/release/i386/boot_crunch.conf Thu Aug 4 10:37:12 2011 (r224649) @@ -41,4 +41,4 @@ progs usbconfig libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo -libs -lbsdxml -larchive -lbz2 -lusb -ljail +libs -lbsdxml -larchive -lcrypto -lbz2 -llzma -lusb -ljail Modified: stable/8/release/ia64/boot_crunch.conf ============================================================================== --- stable/8/release/ia64/boot_crunch.conf Thu Aug 4 08:50:33 2011 (r224648) +++ stable/8/release/ia64/boot_crunch.conf Thu Aug 4 10:37:12 2011 (r224649) @@ -46,4 +46,4 @@ progs usbconfig libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lkiconv -lsbuf -lufs -ldevinfo -libs -lgeom -lbsdxml -larchive -lbz2 -lusb -ljail +libs -lgeom -lbsdxml -larchive -lcrypto -lbz2 -llzma -lusb -ljail Modified: stable/8/release/pc98/boot_crunch.conf ============================================================================== --- stable/8/release/pc98/boot_crunch.conf Thu Aug 4 08:50:33 2011 (r224648) +++ stable/8/release/pc98/boot_crunch.conf Thu Aug 4 10:37:12 2011 (r224649) @@ -40,4 +40,4 @@ progs sysinstall libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -lbsdxml -libs -larchive -lbz2 -ljail +libs -larchive -lcrypto -lbz2 -llzma -ljail Modified: stable/8/release/powerpc/boot_crunch.conf ============================================================================== --- stable/8/release/powerpc/boot_crunch.conf Thu Aug 4 08:50:33 2011 (r224648) +++ stable/8/release/powerpc/boot_crunch.conf Thu Aug 4 10:37:12 2011 (r224649) @@ -46,4 +46,4 @@ progs usbconfig libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lkiconv -lsbuf -lufs -libs -lgeom -lbsdxml -larchive -lbz2 -lusb -ljail +libs -lgeom -lbsdxml -larchive -lcrypto -lbz2 -llzma -lusb -ljail Modified: stable/8/release/sparc64/boot_crunch.conf ============================================================================== --- stable/8/release/sparc64/boot_crunch.conf Thu Aug 4 08:50:33 2011 (r224648) +++ stable/8/release/sparc64/boot_crunch.conf Thu Aug 4 10:37:12 2011 (r224649) @@ -44,4 +44,4 @@ progs usbconfig libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -lgeom -lbsdxml -libs -larchive -lbz2 -lusb -ljail +libs -larchive -lcrypto -lbz2 -llzma -lusb -ljail Modified: stable/8/release/sun4v/boot_crunch.conf ============================================================================== --- stable/8/release/sun4v/boot_crunch.conf Thu Aug 4 08:50:33 2011 (r224648) +++ stable/8/release/sun4v/boot_crunch.conf Thu Aug 4 10:37:12 2011 (r224649) @@ -41,4 +41,4 @@ progs usbconfig libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -lbsdxml -libs -larchive -lbz2 -lusb -ljail +libs -larchive -lcrypto -lbz2 -llzma -lusb -ljail From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 6 00:43:54 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEC581065670; Sat, 6 Aug 2011 00:43:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD2F88FC15; Sat, 6 Aug 2011 00:43:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p760hsmp027834; Sat, 6 Aug 2011 00:43:54 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p760hs8q027832; Sat, 6 Aug 2011 00:43:54 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201108060043.p760hs8q027832@svn.freebsd.org> From: Glen Barber Date: Sat, 6 Aug 2011 00:43:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224664 - stable/8/usr.sbin/faithd X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2011 00:43:55 -0000 Author: gjb (doc committer) Date: Sat Aug 6 00:43:54 2011 New Revision: 224664 URL: http://svn.freebsd.org/changeset/base/224664 Log: Provide a more user friendly URL to the IETF site Modified: stable/8/usr.sbin/faithd/faithd.8 Directory Properties: stable/8/usr.sbin/faithd/ (props changed) Modified: stable/8/usr.sbin/faithd/faithd.8 ============================================================================== --- stable/8/usr.sbin/faithd/faithd.8 Fri Aug 5 23:10:47 2011 (r224663) +++ stable/8/usr.sbin/faithd/faithd.8 Sat Aug 6 00:43:54 2011 (r224664) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 23, 2011 +.Dd August 2, 2011 .Dt FAITHD 8 .Os .Sh NAME @@ -368,7 +368,7 @@ setting. .%A Kazu Yamamoto .%T "An IPv6-to-IPv4 transport relay translator" .%B RFC3142 -.%U http://www.ietf.org/rfc/rfc3142.txt +.%U http://tools.ietf.org/html/rfc3142 .%D June 2001 .Re .\" From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 6 00:44:52 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCFA81065670; Sat, 6 Aug 2011 00:44:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB81E8FC22; Sat, 6 Aug 2011 00:44:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p760iqut027953; Sat, 6 Aug 2011 00:44:52 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p760iqAu027951; Sat, 6 Aug 2011 00:44:52 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201108060044.p760iqAu027951@svn.freebsd.org> From: Glen Barber Date: Sat, 6 Aug 2011 00:44:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224666 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2011 00:44:52 -0000 Author: gjb (doc committer) Date: Sat Aug 6 00:44:52 2011 New Revision: 224666 URL: http://svn.freebsd.org/changeset/base/224666 Log: Provide a more user friendly URL to the IETF site Modified: stable/8/share/man/man4/gif.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/gif.4 ============================================================================== --- stable/8/share/man/man4/gif.4 Sat Aug 6 00:44:29 2011 (r224665) +++ stable/8/share/man/man4/gif.4 Sat Aug 6 00:44:52 2011 (r224666) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 23, 2011 +.Dd August 1, 2011 .Dt GIF 4 .Os .Sh NAME @@ -198,7 +198,7 @@ to 1. .%B RFC2893 .%T Transition Mechanisms for IPv6 Hosts and Routers .%D August 2000 -.%U http://www.ietf.org/rfc/rfc2893.txt +.%U http://tools.ietf.org/html/rfc2893 .Re .Rs .%A Sally Floyd From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 6 00:49:27 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 514D2106566C for ; Sat, 6 Aug 2011 00:49:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from glenbarber.us (onyx.glenbarber.us [199.48.134.227]) by mx1.freebsd.org (Postfix) with SMTP id BAF668FC16 for ; Sat, 6 Aug 2011 00:49:26 +0000 (UTC) Received: (qmail 32082 invoked by uid 0); 5 Aug 2011 20:49:25 -0400 Received: from unknown (HELO schism.local) (gjb@76.124.49.145) by 0 with SMTP; 5 Aug 2011 20:49:25 -0400 Message-ID: <4E3C8F94.7070308@FreeBSD.org> Date: Fri, 05 Aug 2011 20:49:24 -0400 From: Glen Barber User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: src-committers@freebsd.org References: <201108060043.p760hs8q027832@svn.freebsd.org> In-Reply-To: <201108060043.p760hs8q027832@svn.freebsd.org> X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r224664 - stable/8/usr.sbin/faithd X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2011 00:49:27 -0000 On 8/5/11 8:43 PM, Glen Barber wrote: > Author: gjb (doc committer) > Date: Sat Aug 6 00:43:54 2011 > New Revision: 224664 > URL: http://svn.freebsd.org/changeset/base/224664 > > Log: > Provide a more user friendly URL to the IETF site > This is an MFC of 224609. I missed including that. -- Glen Barber | gjb@FreeBSD.org FreeBSD Documentation Project From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 6 00:51:13 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D5631065678 for ; Sat, 6 Aug 2011 00:51:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from glenbarber.us (onyx.glenbarber.us [199.48.134.227]) by mx1.freebsd.org (Postfix) with SMTP id E12FD8FC17 for ; Sat, 6 Aug 2011 00:51:12 +0000 (UTC) Received: (qmail 32147 invoked by uid 0); 5 Aug 2011 20:51:12 -0400 Received: from unknown (HELO schism.local) (gjb@76.124.49.145) by 0 with SMTP; 5 Aug 2011 20:51:12 -0400 Message-ID: <4E3C8FFF.9010800@FreeBSD.org> Date: Fri, 05 Aug 2011 20:51:11 -0400 From: Glen Barber User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: src-committers@freebsd.org References: <201108060044.p760iqAu027951@svn.freebsd.org> In-Reply-To: <201108060044.p760iqAu027951@svn.freebsd.org> X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r224666 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2011 00:51:13 -0000 On 8/5/11 8:44 PM, Glen Barber wrote: > Author: gjb (doc committer) > Date: Sat Aug 6 00:44:52 2011 > New Revision: 224666 > URL: http://svn.freebsd.org/changeset/base/224666 > > Log: > Provide a more user friendly URL to the IETF site > This is an MFC of r224587. I missed including that. -- Glen Barber | gjb@FreeBSD.org FreeBSD Documentation Project From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 6 07:00:27 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57DE31065673; Sat, 6 Aug 2011 07:00:27 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 471838FC14; Sat, 6 Aug 2011 07:00:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p7670RJN039393; Sat, 6 Aug 2011 07:00:27 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7670RKd039390; Sat, 6 Aug 2011 07:00:27 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201108060700.p7670RKd039390@svn.freebsd.org> From: Martin Matuska Date: Sat, 6 Aug 2011 07:00:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224670 - stable/8/contrib/gcc/cp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2011 07:00:27 -0000 Author: mm Date: Sat Aug 6 07:00:26 2011 New Revision: 224670 URL: http://svn.freebsd.org/changeset/base/224670 Log: MFC r224523, r224524: MFC r224523: Fix invalid assertion of C++ external static data member declarations as anonymous namespaces are local to the current translation. MFC r224524: Fix accidential dos-style endings to unix-style line endings from last commit (r224523) to match the version approved by re@ GCC PR: c++/33094 Reviewed by: uqs Obtained from: gcc (branches/redhat/gcc-4_1-branch, rev. 129554, GPLv2) Modified: stable/8/contrib/gcc/cp/ChangeLog stable/8/contrib/gcc/cp/decl.c Directory Properties: stable/8/contrib/gcc/ (props changed) Modified: stable/8/contrib/gcc/cp/ChangeLog ============================================================================== --- stable/8/contrib/gcc/cp/ChangeLog Sat Aug 6 04:49:25 2011 (r224669) +++ stable/8/contrib/gcc/cp/ChangeLog Sat Aug 6 07:00:26 2011 (r224670) @@ -1,3 +1,9 @@ +2007-09-29 Jason Merrill + + PR c++/33094 + * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member + constant to not have DECL_EXTERNAL if it's file-local. + 2007-08-24 Jakub Jelinek PR c++/31941 Modified: stable/8/contrib/gcc/cp/decl.c ============================================================================== --- stable/8/contrib/gcc/cp/decl.c Sat Aug 6 04:49:25 2011 (r224669) +++ stable/8/contrib/gcc/cp/decl.c Sat Aug 6 07:00:26 2011 (r224670) @@ -4968,7 +4968,7 @@ make_rtl_for_nonlocal_decl (tree decl, t /* An in-class declaration of a static data member should be external; it is only a declaration, and not a definition. */ if (init == NULL_TREE) - gcc_assert (DECL_EXTERNAL (decl)); + gcc_assert (DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl)); } /* We don't create any RTL for local variables. */ From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 6 11:33:17 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFD15106564A; Sat, 6 Aug 2011 11:33:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A60FC8FC0A; Sat, 6 Aug 2011 11:33:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p76BXH1V049995; Sat, 6 Aug 2011 11:33:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p76BXHcT049993; Sat, 6 Aug 2011 11:33:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201108061133.p76BXHcT049993@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 6 Aug 2011 11:33:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224676 - stable/8/sys/vm X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2011 11:33:17 -0000 Author: kib Date: Sat Aug 6 11:33:17 2011 New Revision: 224676 URL: http://svn.freebsd.org/changeset/base/224676 Log: MFC r224522: Fix a race in the device pager allocation. If another thread won and allocated the device pager for the given handle, then the object fictitious pages list and the object membership in the global object list still need to be initialized. Otherwise, dev_pager_dealloc() will traverse uninitialized pointers. Modified: stable/8/sys/vm/device_pager.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/vm/device_pager.c ============================================================================== --- stable/8/sys/vm/device_pager.c Sat Aug 6 10:12:59 2011 (r224675) +++ stable/8/sys/vm/device_pager.c Sat Aug 6 11:33:17 2011 (r224676) @@ -168,6 +168,7 @@ dev_pager_alloc(void *handle, vm_ooffset object1 = vm_object_allocate(OBJT_DEVICE, pindex); object1->flags |= OBJ_COLORED; object1->pg_color = atop(paddr) - OFF_TO_IDX(off - PAGE_SIZE); + TAILQ_INIT(&object1->un_pager.devp.devp_pglist); mtx_lock(&dev_pager_mtx); object = vm_pager_object_lookup(&dev_pager_object_list, handle); if (object != NULL) { @@ -180,7 +181,6 @@ dev_pager_alloc(void *handle, vm_ooffset object = object1; object1 = NULL; object->handle = handle; - TAILQ_INIT(&object->un_pager.devp.devp_pglist); TAILQ_INSERT_TAIL(&dev_pager_object_list, object, pager_object_list); } @@ -190,7 +190,14 @@ dev_pager_alloc(void *handle, vm_ooffset } mtx_unlock(&dev_pager_mtx); dev_relthread(dev, ref); - vm_object_deallocate(object1); + if (object1 != NULL) { + object1->handle = object1; + mtx_lock(&dev_pager_mtx); + TAILQ_INSERT_TAIL(&dev_pager_object_list, object1, + pager_object_list); + mtx_unlock(&dev_pager_mtx); + vm_object_deallocate(object1); + } return (object); }