PERFORCE change 105813 for review
Warner Losh
imp at FreeBSD.org
Thu Sep 7 20:04:23 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=105813
Change 105813 by imp at imp_paco-paco on 2006/09/07 20:03:38
IFC @105811
Affected files ...
.. //depot/projects/arm/src/Makefile.inc1#13 integrate
.. //depot/projects/arm/src/contrib/bind9/CHANGES#2 integrate
.. //depot/projects/arm/src/contrib/bind9/bin/named/query.c#2 integrate
.. //depot/projects/arm/src/contrib/bind9/lib/dns/resolver.c#2 integrate
.. //depot/projects/arm/src/contrib/bind9/version#2 integrate
.. //depot/projects/arm/src/etc/mtree/BSD.include.dist#3 integrate
.. //depot/projects/arm/src/include/Makefile#3 integrate
.. //depot/projects/arm/src/lib/libarchive/Makefile#2 integrate
.. //depot/projects/arm/src/lib/libarchive/archive.h.in#3 integrate
.. //depot/projects/arm/src/lib/libarchive/archive_private.h#3 integrate
.. //depot/projects/arm/src/lib/libarchive/archive_read.3#2 integrate
.. //depot/projects/arm/src/lib/libarchive/archive_read.c#3 integrate
.. //depot/projects/arm/src/lib/libarchive/archive_read_extract.c#2 integrate
.. //depot/projects/arm/src/lib/libarchive/archive_read_open_file.c#3 integrate
.. //depot/projects/arm/src/lib/libarchive/archive_read_support_format_tar.c#3 integrate
.. //depot/projects/arm/src/lib/libarchive/archive_write.c#3 integrate
.. //depot/projects/arm/src/lib/libc/i386/gen/Makefile.inc#2 integrate
.. //depot/projects/arm/src/lib/libc/i386/gen/alloca.S#2 delete
.. //depot/projects/arm/src/lib/libc/stdlib/alloca.3#2 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_atfork.c#2 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_barrier.c#2 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_cond.c#2 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_event.c#2 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_fork.c#2 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_init.c#5 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_list.c#2 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_private.h#4 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_pspinlock.c#3 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_sem.c#2 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_setprio.c#2 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_setschedparam.c#2 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_sig.c#3 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_spinlock.c#2 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_umtx.c#3 integrate
.. //depot/projects/arm/src/lib/libthr/thread/thr_umtx.h#3 integrate
.. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#10 integrate
.. //depot/projects/arm/src/sbin/ifconfig/ifconfig.8#3 integrate
.. //depot/projects/arm/src/sbin/ifconfig/ifconfig.c#2 integrate
.. //depot/projects/arm/src/sbin/sysctl/sysctl.c#6 integrate
.. //depot/projects/arm/src/share/man/man4/ddb.4#2 integrate
.. //depot/projects/arm/src/share/man/man4/iic.4#2 integrate
.. //depot/projects/arm/src/share/man/man5/make.conf.5#2 integrate
.. //depot/projects/arm/src/sys/amd64/amd64/local_apic.c#11 integrate
.. //depot/projects/arm/src/sys/amd64/amd64/machdep.c#12 integrate
.. //depot/projects/arm/src/sys/boot/i386/pxeldr/pxeldr.S#3 integrate
.. //depot/projects/arm/src/sys/conf/files.amd64#15 integrate
.. //depot/projects/arm/src/sys/contrib/pf/net/pf_ioctl.c#7 integrate
.. //depot/projects/arm/src/sys/dev/aic7xxx/aic7xxx_osm.c#4 integrate
.. //depot/projects/arm/src/sys/dev/if_ndis/if_ndis_usb.c#3 integrate
.. //depot/projects/arm/src/sys/dev/iicbus/iic.c#6 integrate
.. //depot/projects/arm/src/sys/dev/mfi/mfi.c#7 integrate
.. //depot/projects/arm/src/sys/dev/mfi/mfireg.h#4 integrate
.. //depot/projects/arm/src/sys/dev/mpt/mpt_cam.c#22 integrate
.. //depot/projects/arm/src/sys/dev/sound/usb/uaudio.c#6 integrate
.. //depot/projects/arm/src/sys/dev/usb/ehci.c#11 integrate
.. //depot/projects/arm/src/sys/dev/usb/ehci_pci.c#6 integrate
.. //depot/projects/arm/src/sys/dev/usb/ehcivar.h#5 integrate
.. //depot/projects/arm/src/sys/dev/usb/hid.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/if_aue.c#5 integrate
.. //depot/projects/arm/src/sys/dev/usb/if_axe.c#7 integrate
.. //depot/projects/arm/src/sys/dev/usb/if_cdce.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/if_cue.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/if_kue.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/if_rue.c#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/if_udav.c#5 integrate
.. //depot/projects/arm/src/sys/dev/usb/if_udavreg.h#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/if_ural.c#14 integrate
.. //depot/projects/arm/src/sys/dev/usb/if_uralvar.h#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/kue_fw.h#2 integrate
.. //depot/projects/arm/src/sys/dev/usb/ohci.c#12 integrate
.. //depot/projects/arm/src/sys/dev/usb/ohcivar.h#7 integrate
.. //depot/projects/arm/src/sys/dev/usb/sl811hs.c#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/sl811hsvar.h#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/ubsa.c#2 integrate
.. //depot/projects/arm/src/sys/dev/usb/ubser.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/ucom.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/ucomvar.h#2 integrate
.. //depot/projects/arm/src/sys/dev/usb/udbp.c#2 integrate
.. //depot/projects/arm/src/sys/dev/usb/ufm.c#2 integrate
.. //depot/projects/arm/src/sys/dev/usb/ufoma.c#2 integrate
.. //depot/projects/arm/src/sys/dev/usb/uftdi.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/ugen.c#5 integrate
.. //depot/projects/arm/src/sys/dev/usb/uhci.c#7 integrate
.. //depot/projects/arm/src/sys/dev/usb/uhcivar.h#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/uhid.c#5 integrate
.. //depot/projects/arm/src/sys/dev/usb/uhub.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/ukbd.c#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/ulpt.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/umass.c#11 integrate
.. //depot/projects/arm/src/sys/dev/usb/umct.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/umodem.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/ums.c#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/uplcom.c#9 integrate
.. //depot/projects/arm/src/sys/dev/usb/urio.c#2 integrate
.. //depot/projects/arm/src/sys/dev/usb/usb.c#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/usb.h#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/usb_ethersubr.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/usb_mem.c#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/usb_port.h#7 integrate
.. //depot/projects/arm/src/sys/dev/usb/usb_quirks.c#9 integrate
.. //depot/projects/arm/src/sys/dev/usb/usb_subr.c#9 integrate
.. //depot/projects/arm/src/sys/dev/usb/usbdi.c#6 integrate
.. //depot/projects/arm/src/sys/dev/usb/usbdi.h#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/usbdi_util.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/usbdi_util.h#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/usbdivar.h#4 integrate
.. //depot/projects/arm/src/sys/dev/usb/uscanner.c#7 integrate
.. //depot/projects/arm/src/sys/dev/usb/uvisor.c#5 integrate
.. //depot/projects/arm/src/sys/dev/usb/uvscom.c#4 integrate
.. //depot/projects/arm/src/sys/geom/gate/g_gate.c#4 integrate
.. //depot/projects/arm/src/sys/geom/gate/g_gate.h#4 integrate
.. //depot/projects/arm/src/sys/i386/acpica/Makefile#2 integrate
.. //depot/projects/arm/src/sys/i386/i386/local_apic.c#10 integrate
.. //depot/projects/arm/src/sys/i386/i386/machdep.c#17 integrate
.. //depot/projects/arm/src/sys/kern/kern_umtx.c#9 integrate
.. //depot/projects/arm/src/sys/kern/uipc_sockbuf.c#4 integrate
.. //depot/projects/arm/src/sys/kern/vfs_aio.c#11 integrate
.. //depot/projects/arm/src/sys/modules/agp/Makefile#4 integrate
.. //depot/projects/arm/src/sys/net/if.c#14 integrate
.. //depot/projects/arm/src/sys/net/if.h#8 integrate
.. //depot/projects/arm/src/sys/net/if_var.h#7 integrate
.. //depot/projects/arm/src/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c#4 integrate
.. //depot/projects/arm/src/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h#2 integrate
.. //depot/projects/arm/src/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#2 integrate
.. //depot/projects/arm/src/sys/netinet/in_pcb.c#12 integrate
.. //depot/projects/arm/src/sys/netinet/ip_output.c#13 integrate
.. //depot/projects/arm/src/sys/netinet/raw_ip.c#8 integrate
.. //depot/projects/arm/src/sys/netinet/tcp_input.c#16 integrate
.. //depot/projects/arm/src/sys/netinet/tcp_output.c#5 integrate
.. //depot/projects/arm/src/sys/netinet/tcp_subr.c#11 integrate
.. //depot/projects/arm/src/sys/netinet/tcp_timer.c#8 integrate
.. //depot/projects/arm/src/sys/netinet/tcp_timer.h#4 integrate
.. //depot/projects/arm/src/sys/netinet/tcp_var.h#9 integrate
.. //depot/projects/arm/src/sys/netinet/udp_usrreq.c#13 integrate
.. //depot/projects/arm/src/sys/netinet6/icmp6.c#7 integrate
.. //depot/projects/arm/src/sys/netinet6/ip6_forward.c#6 integrate
.. //depot/projects/arm/src/sys/netinet6/udp6_usrreq.c#9 integrate
.. //depot/projects/arm/src/sys/sys/mbuf.h#13 integrate
.. //depot/projects/arm/src/usr.bin/truncate/truncate.c#2 integrate
.. //depot/projects/arm/src/usr.sbin/ppp/command.c#2 integrate
.. //depot/projects/arm/src/usr.sbin/ppp/lcp.c#2 integrate
.. //depot/projects/arm/src/usr.sbin/ppp/ppp.8.m4#2 integrate
Differences ...
==== //depot/projects/arm/src/Makefile.inc1#13 (text+ko) ====
@@ -1,5 +1,5 @@
#
-# $FreeBSD: src/Makefile.inc1,v 1.554 2006/08/24 17:02:26 imp Exp $
+# $FreeBSD: src/Makefile.inc1,v 1.556 2006/09/07 16:41:30 ru Exp $
#
# Make command line options:
# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
@@ -11,7 +11,7 @@
# -DNO_PORTSUPDATE do not update ports in ${MAKE} update
# -DNO_DOCUPDATE do not update doc in ${MAKE} update
# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list
-# TARGET_ARCH="arch" to crossbuild world to a different arch
+# TARGET="machine" to crossbuild world for a different machine type
#
# The intended user-driven targets are:
@@ -95,14 +95,36 @@
OSRELDATE= 0
.endif
.endif
+
+# Guess machine architecture from machine type, and vice versa.
+.if !defined(TARGET_ARCH) && defined(TARGET)
+TARGET_ARCH= ${TARGET:S/pc98/i386/}
+.elif !defined(TARGET) && defined(TARGET_ARCH) && \
+ ${TARGET_ARCH} != ${MACHINE_ARCH}
+TARGET= ${TARGET_ARCH}
+.endif
+# Otherwise, default to current machine type and architecture.
+TARGET?= ${MACHINE}
TARGET_ARCH?= ${MACHINE_ARCH}
-.if ${TARGET_ARCH} == ${MACHINE_ARCH}
-TARGET?= ${MACHINE}
+
+KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 powerpc sparc64
+.if ${TARGET} == ${TARGET_ARCH}
+_t= ${TARGET}
+.else
+_t= ${TARGET_ARCH}/${TARGET}
+.endif
+.for _t in ${_t}
+.if empty(KNOWN_ARCHES:M${_t})
+.error Unknown target ${TARGET_ARCH}:${TARGET}.
+.endif
+.endfor
+
+.if ${TARGET} == ${MACHINE}
TARGET_CPUTYPE?=${CPUTYPE}
.else
-TARGET?= ${TARGET_ARCH}
TARGET_CPUTYPE?=
.endif
+
.if !empty(TARGET_CPUTYPE)
_TARGET_CPUTYPE=${TARGET_CPUTYPE}
.else
==== //depot/projects/arm/src/contrib/bind9/CHANGES#2 (text+ko) ====
@@ -1,4 +1,11 @@
+ --- 9.3.2-P1 released ---
+
+2066. [security] Handle SIG queries gracefully. [RT #16300]
+
+1941. [bug] ncache_adderesult() should set eresult even if no
+ rdataset is passed to it. [RT #15642]
+
--- 9.3.2 released ---
--- 9.3.2rc1 released ---
==== //depot/projects/arm/src/contrib/bind9/bin/named/query.c#2 (text+ko) ====
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: query.c,v 1.198.2.13.4.36 2005/08/11 05:25:20 marka Exp $ */
+/* $Id: query.c,v 1.198.2.13.4.36.6.1 2006/08/17 07:12:31 marka Exp $ */
#include <config.h>
@@ -2393,7 +2393,7 @@
is_zone = ISC_FALSE;
qtype = event->qtype;
- if (qtype == dns_rdatatype_rrsig)
+ if (qtype == dns_rdatatype_rrsig || qtype == dns_rdatatype_sig)
type = dns_rdatatype_any;
else
type = qtype;
@@ -2434,7 +2434,7 @@
/*
* If it's a SIG query, we'll iterate the node.
*/
- if (qtype == dns_rdatatype_rrsig)
+ if (qtype == dns_rdatatype_rrsig || qtype == dns_rdatatype_sig)
type = dns_rdatatype_any;
else
type = qtype;
==== //depot/projects/arm/src/contrib/bind9/lib/dns/resolver.c#2 (text+ko) ====
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: resolver.c,v 1.218.2.18.4.56 2005/10/14 01:38:48 marka Exp $ */
+/* $Id: resolver.c,v 1.218.2.18.4.56.4.1 2006/08/17 07:12:31 marka Exp $ */
#include <config.h>
@@ -762,7 +762,8 @@
INSIST(result != ISC_R_SUCCESS ||
dns_rdataset_isassociated(event->rdataset) ||
fctx->type == dns_rdatatype_any ||
- fctx->type == dns_rdatatype_rrsig);
+ fctx->type == dns_rdatatype_rrsig ||
+ fctx->type == dns_rdatatype_sig);
isc_task_sendanddetach(&task, ISC_EVENT_PTR(&event));
}
@@ -3188,7 +3189,8 @@
if (hevent != NULL) {
if (!negative && !chaining &&
(fctx->type == dns_rdatatype_any ||
- fctx->type == dns_rdatatype_rrsig)) {
+ fctx->type == dns_rdatatype_rrsig ||
+ fctx->type == dns_rdatatype_sig)) {
/*
* Don't bind rdatasets; the caller
* will iterate the node.
@@ -3306,7 +3308,8 @@
if (!ISC_LIST_EMPTY(fctx->validators)) {
INSIST(!negative);
INSIST(fctx->type == dns_rdatatype_any ||
- fctx->type == dns_rdatatype_rrsig);
+ fctx->type == dns_rdatatype_rrsig ||
+ fctx->type == dns_rdatatype_sig);
/*
* Don't send a response yet - we have
* more rdatasets that still need to
@@ -3455,14 +3458,15 @@
return (result);
anodep = &event->node;
/*
- * If this is an ANY or SIG query, we're not going
- * to return any rdatasets, unless we encountered
+ * If this is an ANY, SIG or RRSIG query, we're not
+ * going to return any rdatasets, unless we encountered
* a CNAME or DNAME as "the answer". In this case,
* we're going to return DNS_R_CNAME or DNS_R_DNAME
* and we must set up the rdatasets.
*/
if ((fctx->type != dns_rdatatype_any &&
- fctx->type != dns_rdatatype_rrsig) ||
+ fctx->type != dns_rdatatype_rrsig &&
+ fctx->type != dns_rdatatype_sig) ||
(name->attributes & DNS_NAMEATTR_CHAINING) != 0) {
ardataset = event->rdataset;
asigrdataset = event->sigrdataset;
@@ -3521,7 +3525,7 @@
*/
if (secure_domain && rdataset->trust != dns_trust_glue) {
/*
- * SIGs are validated as part of validating the
+ * RRSIGs are validated as part of validating the
* type they cover.
*/
if (rdataset->type == dns_rdatatype_rrsig)
@@ -3591,7 +3595,8 @@
if (ANSWER(rdataset) && need_validation) {
if (fctx->type != dns_rdatatype_any &&
- fctx->type != dns_rdatatype_rrsig) {
+ fctx->type != dns_rdatatype_rrsig &&
+ fctx->type != dns_rdatatype_sig) {
/*
* This is The Answer. We will
* validate it, but first we cache
@@ -3763,23 +3768,28 @@
isc_result_t *eresultp)
{
isc_result_t result;
+ dns_rdataset_t rdataset;
+
+ if (ardataset == NULL) {
+ dns_rdataset_init(&rdataset);
+ ardataset = &rdataset;
+ }
result = dns_ncache_add(message, cache, node, covers, now,
maxttl, ardataset);
- if (result == DNS_R_UNCHANGED) {
+ if (result == DNS_R_UNCHANGED || result == ISC_R_SUCCESS) {
/*
- * The data in the cache are better than the negative cache
- * entry we're trying to add.
+ * If the cache now contains a negative entry and we
+ * care about whether it is DNS_R_NCACHENXDOMAIN or
+ * DNS_R_NCACHENXRRSET then extract it.
*/
- if (ardataset != NULL && ardataset->type == 0) {
+ if (ardataset->type == 0) {
/*
- * The cache data is also a negative cache
- * entry.
+ * The cache data is a negative cache entry.
*/
if (NXDOMAIN(ardataset))
*eresultp = DNS_R_NCACHENXDOMAIN;
else
*eresultp = DNS_R_NCACHENXRRSET;
- result = ISC_R_SUCCESS;
} else {
/*
* Either we don't care about the nature of the
@@ -3791,14 +3801,11 @@
* XXXRTH There's a CNAME/DNAME problem here.
*/
*eresultp = ISC_R_SUCCESS;
- result = ISC_R_SUCCESS;
}
- } else if (result == ISC_R_SUCCESS) {
- if (NXDOMAIN(ardataset))
- *eresultp = DNS_R_NCACHENXDOMAIN;
- else
- *eresultp = DNS_R_NCACHENXRRSET;
+ result = ISC_R_SUCCESS;
}
+ if (ardataset == &rdataset && dns_rdataset_isassociated(ardataset))
+ dns_rdataset_disassociate(ardataset);
return (result);
}
==== //depot/projects/arm/src/contrib/bind9/version#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $Id: version,v 1.26.2.17.2.21 2005/12/14 00:43:14 marka Exp $
+# $Id: version,v 1.26.2.17.2.21.4.1 2006/08/17 07:12:31 marka Exp $
#
# This file must follow /bin/sh rules. It is imported directly via
# configure.
@@ -6,5 +6,5 @@
MAJORVER=9
MINORVER=3
PATCHVER=2
-RELEASETYPE=
-RELEASEVER=
+RELEASETYPE=-P
+RELEASEVER=1
==== //depot/projects/arm/src/etc/mtree/BSD.include.dist#3 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.107 2006/08/01 22:19:00 sobomax Exp $
+# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.108 2006/09/07 18:24:24 emax Exp $
#
# Please see the file src/etc/mtree/README before making changes to this file.
#
@@ -66,6 +66,8 @@
..
utopia
..
+ vkbd
+ ..
wi
..
..
==== //depot/projects/arm/src/include/Makefile#3 (text+ko) ====
@@ -1,5 +1,5 @@
# @(#)Makefile 8.2 (Berkeley) 1/4/94
-# $FreeBSD: src/include/Makefile,v 1.262 2006/08/01 22:19:00 sobomax Exp $
+# $FreeBSD: src/include/Makefile,v 1.263 2006/09/07 18:24:24 emax Exp $
#
# Doing a "make install" builds /usr/include.
@@ -41,7 +41,7 @@
LSUBDIRS= cam/scsi \
dev/acpica dev/an dev/bktr dev/firewire dev/hwpmc \
dev/ic dev/iicbus ${_dev_ieee488} dev/lmc dev/ofw \
- dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/smbus dev/speaker dev/usb dev/wi dev/utopia \
+ dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/smbus dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \
fs/devfs fs/fdescfs fs/fifofs fs/msdosfs fs/ntfs fs/nullfs \
${_fs_nwfs} fs/portalfs fs/procfs fs/smbfs fs/udf fs/umapfs \
fs/unionfs \
==== //depot/projects/arm/src/lib/libarchive/Makefile#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/lib/libarchive/Makefile,v 1.49 2006/05/01 01:02:19 kientzle Exp $
+# $FreeBSD: src/lib/libarchive/Makefile,v 1.50 2006/09/05 05:59:45 kientzle Exp $
LIB= archive
DPADD= ${LIBBZ2} ${LIBZ}
@@ -35,12 +35,14 @@
INCS= archive.h archive_entry.h
# Build archive.h from archive.h.in by substituting version information.
+# Note: FreeBSD has inttypes.h, so enable that include in archive.h.in
archive.h: archive.h.in Makefile
cat ${.CURDIR}/archive.h.in | \
sed 's/@VERSION@/${VERSION}/g' | \
sed 's/@SHLIB_MAJOR@/${SHLIB_MAJOR}/g' | \
sed 's/@ARCHIVE_API_MAJOR@/${ARCHIVE_API_MAJOR}/g' | \
sed 's/@ARCHIVE_API_MINOR@/${ARCHIVE_API_MINOR}/g' | \
+ sed 's|@ARCHIVE_H_INCLUDE_INTTYPES_H@|#include <inttypes.h> /* For int64_t */|g' | \
cat > archive.h
# archive.h needs to be cleaned
@@ -152,10 +154,12 @@
MLINKS+= archive_read.3 archive_read_data_skip.3
MLINKS+= archive_read.3 archive_read_extract.3
MLINKS+= archive_read.3 archive_read_extract_set_progress_callback.3
+MLINKS+= archive_read.3 archive_read_extract_set_skip_file.3
MLINKS+= archive_read.3 archive_read_finish.3
MLINKS+= archive_read.3 archive_read_new.3
MLINKS+= archive_read.3 archive_read_next_header.3
MLINKS+= archive_read.3 archive_read_open.3
+MLINKS+= archive_read.3 archive_read_open2.3
MLINKS+= archive_read.3 archive_read_open_fd.3
MLINKS+= archive_read.3 archive_read_open_file.3
MLINKS+= archive_read.3 archive_read_set_bytes_per_block.3
==== //depot/projects/arm/src/lib/libarchive/archive.h.in#3 (text+ko) ====
@@ -23,7 +23,7 @@
* (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: src/lib/libarchive/archive.h.in,v 1.30 2006/07/30 00:29:00 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/archive.h.in,v 1.31 2006/09/05 05:59:45 kientzle Exp $
*/
#ifndef ARCHIVE_H_INCLUDED
@@ -36,7 +36,7 @@
*/
#include <sys/types.h> /* Linux requires this for off_t */
-#include <inttypes.h> /* For int64_t */
+ at ARCHIVE_H_INCLUDE_INTTYPES_H@
#include <unistd.h> /* For ssize_t and size_t */
#ifdef __cplusplus
@@ -267,6 +267,11 @@
void archive_read_extract_set_progress_callback(struct archive *,
void (*_progress_func)(void *), void *_user_data);
+/* Record the dev/ino of a file that will not be written. This is
+ * generally set to the dev/ino of the archive being read. */
+void archive_read_extract_set_skip_file(struct archive *,
+ dev_t, ino_t);
+
/* Close the file and release most resources. */
int archive_read_close(struct archive *);
/* Release all resources and destroy the object. */
@@ -291,9 +296,15 @@
struct archive *archive_write_new(void);
int archive_write_set_bytes_per_block(struct archive *,
int bytes_per_block);
+int archive_write_get_bytes_per_block(struct archive *);
/* XXX This is badly misnamed; suggestions appreciated. XXX */
int archive_write_set_bytes_in_last_block(struct archive *,
int bytes_in_last_block);
+int archive_write_get_bytes_in_last_block(struct archive *);
+
+/* The dev/ino of a file that won't be archived. This is used
+ * to avoid recursively adding an archive to itself. */
+int archive_write_set_skip_file(struct archive *, dev_t, ino_t);
int archive_write_set_compression_bzip2(struct archive *);
int archive_write_set_compression_gzip(struct archive *);
==== //depot/projects/arm/src/lib/libarchive/archive_private.h#3 (text+ko) ====
@@ -23,7 +23,7 @@
* (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: src/lib/libarchive/archive_private.h,v 1.22 2006/07/30 00:29:00 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/archive_private.h,v 1.23 2006/09/05 05:59:45 kientzle Exp $
*/
#ifndef ARCHIVE_PRIVATE_H_INCLUDED
@@ -191,7 +191,7 @@
struct extract *extract;
void (*extract_progress)(void *);
void *extract_progress_user_data;
- void (*cleanup_archive_extract)(struct archive *);
+ int (*cleanup_archive_extract)(struct archive *);
int archive_error_number;
const char *error;
==== //depot/projects/arm/src/lib/libarchive/archive_read.3#2 (text+ko) ====
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2003-2005 Tim Kientzle
+.\" Copyright (c) 2003-2006 Tim Kientzle
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -22,9 +22,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/lib/libarchive/archive_read.3,v 1.23 2005/11/24 10:06:05 ru Exp $
+.\" $FreeBSD: src/lib/libarchive/archive_read.3,v 1.24 2006/09/05 05:59:45 kientzle Exp $
.\"
-.Dd January 8, 2005
+.Dd August 19, 2006
.Dt archive_read 3
.Os
.Sh NAME
@@ -41,6 +41,7 @@
.Nm archive_read_support_format_tar ,
.Nm archive_read_support_format_zip ,
.Nm archive_read_open ,
+.Nm archive_read_open2 ,
.Nm archive_read_open_fd ,
.Nm archive_read_open_file ,
.Nm archive_read_next_header ,
@@ -83,6 +84,8 @@
.Ft int
.Fn archive_read_open "struct archive *" "void *client_data" "archive_open_callback *" "archive_read_callback *" "archive_close_callback *"
.Ft int
+.Fn archive_read_open2 "struct archive *" "void *client_data" "archive_open_callback *" "archive_read_callback *" "archive_skip_callback *" "archive_close_callback *"
+.Ft int
.Fn archive_read_open_fd "struct archive *" "int fd" "size_t block_size"
.Ft int
.Fn archive_read_open_file "struct archive *" "const char *filename" "size_t block_size"
@@ -146,9 +149,14 @@
enables support for all available formats.
Note that there is no default.
.It Fn archive_read_open
+The same as
+.Fn archive_read_open2 ,
+except that the skip callback is assumed to be
+.Dv NULL .
+.It Fn archive_read_open2
Freeze the settings, open the archive, and prepare for reading entries.
This is the most generic version of this call, which accepts
-three callback functions.
+four callback functions.
Most clients will want to use
.Fn archive_read_open_file
or
@@ -156,26 +164,20 @@
instead.
The library invokes the client-provided functions to obtain
raw bytes from the archive.
-Note: The API permits a decompression method to fork and invoke the
-callbacks from another process.
-Although none of the current decompression methods use this technique,
-future decompression methods may utilize this technique.
-If the decompressor forks, it will ensure that the open and close
-callbacks are invoked within the same process as the read callback.
-In particular, clients should not attempt to use shared variables to
-communicate between the open/read/close callbacks and the mainline code.
.It Fn archive_read_open_fd
Like
.Fn archive_read_open ,
except that it accepts a file descriptor and block size rather than
-a trio of function pointers.
+a set of function pointers.
Note that the file descriptor will not be automatically closed at
end-of-archive.
+This function is safe for use with tape drives or other blocked devices.
.It Fn archive_read_open_file
Like
.Fn archive_read_open ,
except that it accepts a simple filename and a block size.
A NULL filename represents standard input.
+This function is safe for use with tape drives or other blocked devices.
.It Fn archive_read_next_header
Read the header for the next entry and return a pointer to
a
@@ -212,6 +214,12 @@
A convenience function that repeatedly calls
.Fn archive_read_data_block
to copy the entire entry to the provided file descriptor.
+.It Fn archive_read_extract_set_skip_file
+This function records the device and inode numbers
+of a file that should not be restored.
+This is a convenience that prevents
+.Fn archive_read_extract
+from restoring a file over the archive itself.
.It Fn archive_read_extract
A convenience function that recreates the specified object on
disk and reads the entry data into that object.
@@ -298,6 +306,9 @@
.Fn archive_read_callback "struct archive *" "void *client_data" "const void **buffer"
.It
.Ft typedef int
+.Fn archive_skip_callback "struct archive *" "void *client_data" "size_t request"
+.It
+.Ft typedef int
.Fn archive_open_callback "struct archive *" "void *client_data"
.It
.Ft typedef int
@@ -333,6 +344,22 @@
to register an error code and message and
return -1.
.Pp
+The skip callback is invoked when the
+library wants to ignore a block of data.
+The return value is the number of bytes actually
+skipped, which may differ from the request.
+If the callback cannot skip data, it should return
+zero.
+If the skip callback is not provided (the
+function pointer is
+.Dv NULL ),
+the library will invoke the read function
+instead and simply discard the result.
+A skip callback can provide significant
+performance gains when reading uncompressed
+archives from slow disk drives or other media
+that can skip quickly.
+.Pp
The close callback is invoked by archive_close when
the archive processing is complete.
The callback should return
==== //depot/projects/arm/src/lib/libarchive/archive_read.c#3 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read.c,v 1.21 2006/07/30 00:29:00 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read.c,v 1.22 2006/09/05 05:59:45 kientzle Exp $");
#include <errno.h>
#include <stdio.h>
@@ -88,19 +88,16 @@
}
/*
- * Set the block size.
+ * Record the do-not-extract-to file. This belongs in archive_read_extract.c.
*/
-/*
-int
-archive_read_set_bytes_per_block(struct archive *a, int bytes_per_block)
+void
+archive_read_extract_set_skip_file(struct archive *a, dev_t d, ino_t i)
{
- __archive_check_magic(a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_NEW, "archive_read_set_bytes_per_block");
- if (bytes_per_block < 1)
- bytes_per_block = 1;
- a->bytes_per_block = bytes_per_block;
- return (0);
+ __archive_check_magic(a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_ANY, "archive_read_extract_set_skip_file");
+ a->skip_file_dev = d;
+ a->skip_file_ino = i;
}
-*/
+
/*
* Open the archive
@@ -504,19 +501,25 @@
int
archive_read_close(struct archive *a)
{
+ int r = ARCHIVE_OK, r1 = ARCHIVE_OK;
+
__archive_check_magic(a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_ANY, "archive_read_close");
a->state = ARCHIVE_STATE_CLOSED;
/* Call cleanup functions registered by optional components. */
if (a->cleanup_archive_extract != NULL)
- (a->cleanup_archive_extract)(a);
+ r = (a->cleanup_archive_extract)(a);
/* TODO: Finish the format processing. */
/* Close the input machinery. */
- if (a->compression_finish != NULL)
- (a->compression_finish)(a);
- return (ARCHIVE_OK);
+ if (a->compression_finish != NULL) {
+ r1 = (a->compression_finish)(a);
+ if (r1 < r)
+ r = r1;
+ }
+
+ return (r);
}
/*
==== //depot/projects/arm/src/lib/libarchive/archive_read_extract.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_extract.c,v 1.46 2006/05/01 01:02:19 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_extract.c,v 1.47 2006/09/05 05:59:45 kientzle Exp $");
#include <sys/types.h>
#ifdef HAVE_SYS_ACL_H
@@ -110,7 +110,7 @@
*/
#define SECURE_DIR_MODE 0700
-static void archive_extract_cleanup(struct archive *);
+static int archive_extract_cleanup(struct archive *);
static int extract_block_device(struct archive *,
struct archive_entry *, int);
static int extract_char_device(struct archive *,
@@ -318,7 +318,7 @@
* name from archive_read_finish) reduces static link pollution, since
* applications that don't use this API won't get this file linked in.
*/
-static void
+static int
archive_extract_cleanup(struct archive *a)
{
struct fixup_entry *next, *p;
@@ -353,6 +353,7 @@
archive_string_free(&extract->create_parent_dir);
free(a->extract);
a->extract = NULL;
+ return (ARCHIVE_OK);
}
/*
==== //depot/projects/arm/src/lib/libarchive/archive_read_open_file.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_open_file.c,v 1.10 2006/07/30 00:29:00 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_open_file.c,v 1.11 2006/09/05 05:59:46 kientzle Exp $");
#include <sys/stat.h>
#include <errno.h>
@@ -137,7 +137,7 @@
{
struct read_file_data *mine = client_data;
off_t old_offset, new_offset;
-
+
/* Reduce request to the next smallest multiple of block_size */
request = (request / mine->block_size) * mine->block_size;
/*
==== //depot/projects/arm/src/lib/libarchive/archive_read_support_format_tar.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.42 2006/07/30 00:29:01 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.43 2006/09/05 05:59:46 kientzle Exp $");
#include <sys/stat.h>
#ifdef MAJOR_IN_MKDEV
@@ -533,8 +533,8 @@
const void *b; /* dummy variables */
size_t s;
off_t o;
-
-
+
+
tar = *(a->pformat_data);
if (a->compression_skip == NULL) {
while (r == ARCHIVE_OK)
==== //depot/projects/arm/src/lib/libarchive/archive_write.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_write.c,v 1.17 2006/08/01 05:31:29 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_write.c,v 1.18 2006/09/05 05:59:46 kientzle Exp $");
/*
* This file contains the "essential" portions of the write API, that
@@ -88,7 +88,6 @@
return (a);
}
-
/*
* Set the block size. Returns 0 if successful.
*/
@@ -100,6 +99,15 @@
return (ARCHIVE_OK);
}
+/*
+ * Get the current block size. -1 if it has never been set.
+ */
+int
+archive_write_get_bytes_per_block(struct archive *a)
+{
+ __archive_check_magic(a, ARCHIVE_WRITE_MAGIC, ARCHIVE_STATE_ANY, "archive_write_get_bytes_per_block");
+ return (a->bytes_per_block);
+}
/*
* Set the size for the last block.
@@ -113,6 +121,30 @@
return (ARCHIVE_OK);
}
+/*
+ * Return the value set above. -1 indicates it has not been set.
+ */
+int
+archive_write_get_bytes_in_last_block(struct archive *a)
+{
+ __archive_check_magic(a, ARCHIVE_WRITE_MAGIC, ARCHIVE_STATE_ANY, "archive_write_get_bytes_in_last_block");
+ return (a->bytes_in_last_block);
+}
+
+
+/*
+ * dev/ino of a file to be rejected. Used to prevent adding
+ * an archive to itself recursively.
+ */
+int
+archive_write_set_skip_file(struct archive *a, dev_t d, ino_t i)
+{
+ __archive_check_magic(a, ARCHIVE_WRITE_MAGIC, ARCHIVE_STATE_ANY, "archive_write_set_skip_file");
+ a->skip_file_dev = d;
+ a->skip_file_ino = i;
+ return (ARCHIVE_OK);
+}
+
/*
* Open the archive using the current settings.
@@ -149,22 +181,30 @@
int
archive_write_close(struct archive *a)
{
+ int r = ARCHIVE_OK, r1 = ARCHIVE_OK;
+
__archive_check_magic(a, ARCHIVE_WRITE_MAGIC, ARCHIVE_STATE_ANY, "archive_write_close");
/* Finish the last entry. */
if (a->state & ARCHIVE_STATE_DATA)
- ((a->format_finish_entry)(a));
+ r = ((a->format_finish_entry)(a));
/* Finish off the archive. */
- if (a->format_finish != NULL)
- (a->format_finish)(a);
+ if (a->format_finish != NULL) {
+ r1 = (a->format_finish)(a);
+ if (r1 < r)
+ r = r1;
+ }
/* Finish the compression and close the stream. */
- if (a->compression_finish != NULL)
- (a->compression_finish)(a);
+ if (a->compression_finish != NULL) {
+ r1 = (a->compression_finish)(a);
+ if (r1 < r)
+ r = r1;
+ }
a->state = ARCHIVE_STATE_CLOSED;
- return (ARCHIVE_OK);
+ return (r);
}
/*
==== //depot/projects/arm/src/lib/libc/i386/gen/Makefile.inc#2 (text+ko) ====
@@ -1,6 +1,6 @@
# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $FreeBSD: src/lib/libc/i386/gen/Makefile.inc,v 1.22 2004/08/15 16:18:03 dfr Exp $
+# $FreeBSD: src/lib/libc/i386/gen/Makefile.inc,v 1.23 2006/09/05 16:21:26 ru Exp $
-SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.S \
+SRCS+= _ctx_start.S _setjmp.S _set_tp.c fabs.S \
flt_rounds.c infinity.c ldexp.c makecontext.c modf.S \
rfork_thread.S setjmp.S signalcontext.c sigsetjmp.S
==== //depot/projects/arm/src/lib/libc/stdlib/alloca.3#2 (text+ko) ====
@@ -30,9 +30,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)alloca.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/stdlib/alloca.3,v 1.11 2003/06/28 22:12:30 ru Exp $
+.\" $FreeBSD: src/lib/libc/stdlib/alloca.3,v 1.12 2006/09/05 16:30:11 ru Exp $
.\"
-.Dd June 4, 1993
+.Dd September 5, 2006
.Dt ALLOCA 3
.Os
.Sh NAME
@@ -57,9 +57,6 @@
The
.Fn alloca
function returns a pointer to the beginning of the allocated space.
-If the allocation failed, a
-.Dv NULL
-pointer is returned.
.Sh SEE ALSO
.Xr brk 2 ,
.Xr calloc 3 ,
@@ -81,3 +78,15 @@
function
is machine and compiler dependent;
its use is discouraged.
+.Pp
+The
+.Fn alloca
+function is slightly unsafe because it cannot ensure that the pointer
+returned points to a valid and usable block of memory.
+The allocation made may exceed the bounds of the stack, or even go
+further into other objects in memory, and
+.Fn alloca
+cannot determine such an error.
+Avoid
+.Fn alloca
+with large unbounded allocations.
==== //depot/projects/arm/src/lib/libthr/thread/thr_atfork.c#2 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libthr/thread/thr_atfork.c,v 1.2 2005/04/02 01:20:00 davidxu Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_atfork.c,v 1.3 2006/09/06 04:04:10 davidxu Exp $
*/
#include <errno.h>
@@ -50,8 +50,8 @@
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list