From owner-p4-projects@FreeBSD.ORG Thu Oct 2 09:38:21 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B0DAD106568A; Thu, 2 Oct 2008 09:38:21 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7369110656D1 for ; Thu, 2 Oct 2008 09:38:21 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5FD5C8FC13 for ; Thu, 2 Oct 2008 09:38:21 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m929cL9b064830 for ; Thu, 2 Oct 2008 09:38:21 GMT (envelope-from ed@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m929c8JC064817 for perforce@freebsd.org; Thu, 2 Oct 2008 09:38:08 GMT (envelope-from ed@FreeBSD.org) Date: Thu, 2 Oct 2008 09:38:08 GMT Message-Id: <200810020938.m929c8JC064817@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ed@FreeBSD.org using -f From: Ed Schouten To: Perforce Change Reviews Cc: Subject: PERFORCE change 150796 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2008 09:38:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=150796 Change 150796 by ed@ed_dull on 2008/10/02 09:37:36 IFC. Affected files ... .. //depot/projects/mpsafetty/bin/pkill/pkill.1#3 integrate .. //depot/projects/mpsafetty/bin/pkill/pkill.c#3 integrate .. //depot/projects/mpsafetty/crypto/openssh/moduli.5#2 integrate .. //depot/projects/mpsafetty/crypto/openssh/scp.1#3 integrate .. //depot/projects/mpsafetty/crypto/openssh/sftp-server.8#3 integrate .. //depot/projects/mpsafetty/crypto/openssh/sftp.1#3 integrate .. //depot/projects/mpsafetty/crypto/openssh/ssh-add.1#3 integrate .. //depot/projects/mpsafetty/crypto/openssh/ssh-agent.1#3 integrate .. //depot/projects/mpsafetty/crypto/openssh/ssh-keygen.1#3 integrate .. //depot/projects/mpsafetty/crypto/openssh/ssh-keyscan.1#3 integrate .. //depot/projects/mpsafetty/crypto/openssh/ssh-keysign.8#3 integrate .. //depot/projects/mpsafetty/crypto/openssh/ssh.1#3 integrate .. //depot/projects/mpsafetty/crypto/openssh/ssh_config.5#3 integrate .. //depot/projects/mpsafetty/crypto/openssh/sshd.8#3 integrate .. //depot/projects/mpsafetty/crypto/openssh/sshd_config.5#3 integrate .. //depot/projects/mpsafetty/etc/network.subr#2 integrate .. //depot/projects/mpsafetty/lib/libarchive/archive_entry.c#3 integrate .. //depot/projects/mpsafetty/lib/libarchive/archive_entry.h#4 integrate .. //depot/projects/mpsafetty/lib/libarchive/archive_entry_copy_stat.c#2 integrate .. //depot/projects/mpsafetty/lib/libarchive/archive_entry_private.h#3 integrate .. //depot/projects/mpsafetty/lib/libarchive/archive_entry_stat.c#2 integrate .. //depot/projects/mpsafetty/lib/libarchive/archive_read_support_format_tar.c#3 integrate .. //depot/projects/mpsafetty/lib/libarchive/archive_write_disk.c#9 integrate .. //depot/projects/mpsafetty/lib/libarchive/archive_write_set_format_pax.c#3 integrate .. //depot/projects/mpsafetty/lib/libarchive/config_freebsd.h#4 integrate .. //depot/projects/mpsafetty/lib/libarchive/test/Makefile#4 integrate .. //depot/projects/mpsafetty/lib/libarchive/test/test_entry.c#3 integrate .. //depot/projects/mpsafetty/lib/libarchive/test/test_write_disk.c#6 integrate .. //depot/projects/mpsafetty/lib/libarchive/test/test_write_disk_times.c#1 branch .. //depot/projects/mpsafetty/lib/libarchive/test/test_write_format_pax.c#1 branch .. //depot/projects/mpsafetty/lib/libc/gen/getosreldate.3#3 integrate .. //depot/projects/mpsafetty/lib/libc/sys/cpuset.2#2 integrate .. //depot/projects/mpsafetty/lib/libc/sys/cpuset_getaffinity.2#2 integrate .. //depot/projects/mpsafetty/lib/libpmc/pmc.k7.3#2 integrate .. //depot/projects/mpsafetty/lib/libpmc/pmc.p5.3#2 integrate .. //depot/projects/mpsafetty/lib/libpmc/pmc.p6.3#2 integrate .. //depot/projects/mpsafetty/sbin/bsdlabel/bsdlabel.c#3 integrate .. //depot/projects/mpsafetty/sbin/fdisk/fdisk.c#4 integrate .. //depot/projects/mpsafetty/sbin/ifconfig/ifconfig.c#4 integrate .. //depot/projects/mpsafetty/share/examples/FreeBSD_version/FreeBSD_version.c#2 integrate .. //depot/projects/mpsafetty/share/man/man4/nfe.4#2 integrate .. //depot/projects/mpsafetty/share/man/man4/wpi.4#2 integrate .. //depot/projects/mpsafetty/share/zoneinfo/southamerica#4 integrate .. //depot/projects/mpsafetty/sys/amd64/amd64/dump_machdep.c#3 integrate .. //depot/projects/mpsafetty/sys/amd64/amd64/minidump_machdep.c#4 integrate .. //depot/projects/mpsafetty/sys/amd64/include/param.h#4 integrate .. //depot/projects/mpsafetty/sys/arm/arm/dump_machdep.c#3 integrate .. //depot/projects/mpsafetty/sys/arm/at91/at91_mci.c#4 integrate .. //depot/projects/mpsafetty/sys/conf/newvers.sh#3 integrate .. //depot/projects/mpsafetty/sys/conf/options#11 integrate .. //depot/projects/mpsafetty/sys/ddb/db_textdump.c#3 integrate .. //depot/projects/mpsafetty/sys/dev/cxgb/cxgb_main.c#10 integrate .. //depot/projects/mpsafetty/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#5 integrate .. //depot/projects/mpsafetty/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#5 integrate .. //depot/projects/mpsafetty/sys/dev/cxgb/ulp/tom/cxgb_vm.c#3 integrate .. //depot/projects/mpsafetty/sys/dev/cxgb/ulp/tom/cxgb_vm.h#2 integrate .. //depot/projects/mpsafetty/sys/dev/dc/dcphy.c#2 integrate .. //depot/projects/mpsafetty/sys/dev/dc/pnphy.c#2 integrate .. //depot/projects/mpsafetty/sys/dev/fatm/if_fatm.c#2 integrate .. //depot/projects/mpsafetty/sys/dev/hwpmc/pmc_events.h#2 integrate .. //depot/projects/mpsafetty/sys/dev/mii/ciphy.c#2 integrate .. //depot/projects/mpsafetty/sys/dev/mii/e1000phy.c#3 integrate .. //depot/projects/mpsafetty/sys/dev/mii/miidevs#3 integrate .. //depot/projects/mpsafetty/sys/dev/mmc/mmc.c#3 integrate .. //depot/projects/mpsafetty/sys/dev/mmc/mmcreg.h#3 integrate .. //depot/projects/mpsafetty/sys/dev/mmc/mmcsd.c#3 integrate .. //depot/projects/mpsafetty/sys/dev/mmc/mmcvar.h#3 integrate .. //depot/projects/mpsafetty/sys/dev/msk/if_msk.c#3 integrate .. //depot/projects/mpsafetty/sys/dev/mxge/eth_z8e.h#2 integrate .. //depot/projects/mpsafetty/sys/dev/mxge/ethp_z8e.h#2 integrate .. //depot/projects/mpsafetty/sys/dev/mxge/mxge_mcp.h#2 integrate .. //depot/projects/mpsafetty/sys/dev/mxge/rss_eth_z8e.h#2 integrate .. //depot/projects/mpsafetty/sys/dev/mxge/rss_ethp_z8e.h#2 integrate .. //depot/projects/mpsafetty/sys/dev/nfe/if_nfe.c#2 integrate .. //depot/projects/mpsafetty/sys/dev/nfe/if_nfereg.h#2 integrate .. //depot/projects/mpsafetty/sys/dev/pccbb/pccbb_pci.c#2 integrate .. //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum.h#2 integrate .. //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_drive.c#3 integrate .. //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_var.h#2 integrate .. //depot/projects/mpsafetty/sys/i386/i386/dump_machdep.c#3 integrate .. //depot/projects/mpsafetty/sys/i386/i386/minidump_machdep.c#3 integrate .. //depot/projects/mpsafetty/sys/i386/include/param.h#3 integrate .. //depot/projects/mpsafetty/sys/ia64/ia64/dump_machdep.c#3 integrate .. //depot/projects/mpsafetty/sys/kern/kern_shutdown.c#3 integrate .. //depot/projects/mpsafetty/sys/kern/uipc_socket.c#4 integrate .. //depot/projects/mpsafetty/sys/kern/vfs_lookup.c#3 integrate .. //depot/projects/mpsafetty/sys/mips/mips/pmap.c#3 integrate .. //depot/projects/mpsafetty/sys/net/if_lagg.c#3 integrate .. //depot/projects/mpsafetty/sys/netinet/in_pcb.c#7 integrate .. //depot/projects/mpsafetty/sys/netinet/in_pcb.h#7 integrate .. //depot/projects/mpsafetty/sys/netinet6/in6.h#2 integrate .. //depot/projects/mpsafetty/sys/netinet6/in6_proto.c#3 integrate .. //depot/projects/mpsafetty/sys/netinet6/nd6.h#3 integrate .. //depot/projects/mpsafetty/sys/netinet6/nd6_nbr.c#4 integrate .. //depot/projects/mpsafetty/sys/sparc64/sparc64/dump_machdep.c#3 integrate .. //depot/projects/mpsafetty/sys/sun4v/sun4v/dump_machdep.c#3 integrate .. //depot/projects/mpsafetty/sys/sys/conf.h#6 integrate .. //depot/projects/mpsafetty/sys/sys/kerneldump.h#2 integrate .. //depot/projects/mpsafetty/sys/vm/swap_pager.c#5 integrate .. //depot/projects/mpsafetty/sys/vm/vm_pageout.c#4 integrate .. //depot/projects/mpsafetty/sys/vm/vm_pageout.h#2 integrate .. //depot/projects/mpsafetty/usr.bin/cpuset/cpuset.1#2 integrate .. //depot/projects/mpsafetty/usr.bin/make/job.c#3 integrate .. //depot/projects/mpsafetty/usr.bin/top/machine.c#3 integrate .. //depot/projects/mpsafetty/usr.sbin/boot0cfg/boot0cfg.c#3 integrate Differences ... ==== //depot/projects/mpsafetty/bin/pkill/pkill.1#3 (text+ko) ==== @@ -1,6 +1,6 @@ .\" $NetBSD: pkill.1,v 1.8 2003/02/14 15:59:18 grant Exp $ .\" -.\" $FreeBSD: src/bin/pkill/pkill.1,v 1.2 2008/09/28 16:44:15 ed Exp $ +.\" $FreeBSD: src/bin/pkill/pkill.1,v 1.3 2008/09/30 17:30:39 ed Exp $ .\" .\" Copyright (c) 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -179,9 +179,10 @@ Restrict matches to processes associated with a terminal in the comma-separated list .Ar tty . -The -.Pa /dev/ -prefix of the terminal names must be omitted. +Terminal names may be of the form +.Pa tty Ns Ar xx +or the shortened form +.Ar xx . A single dash .Pq Ql - matches processes not associated with a terminal. ==== //depot/projects/mpsafetty/bin/pkill/pkill.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/bin/pkill/pkill.c,v 1.2 2008/09/28 16:44:15 ed Exp $"); +__FBSDID("$FreeBSD: src/bin/pkill/pkill.c,v 1.3 2008/09/30 17:30:39 ed Exp $"); #include #include @@ -675,16 +675,18 @@ } snprintf(buf, sizeof(buf), _PATH_DEV "%s", cp); + if (stat(buf, &st) != -1) + goto foundtty; + + snprintf(buf, sizeof(buf), _PATH_DEV "tty%s", cp); + if (stat(buf, &st) != -1) + goto foundtty; - if (stat(buf, &st) == -1) { - if (errno == ENOENT) { - errx(STATUS_BADUSAGE, - "No such tty: `%s'", sp); - } - err(STATUS_ERROR, "Cannot access `%s'", sp); - } + if (errno == ENOENT) + errx(STATUS_BADUSAGE, "No such tty: `%s'", sp); + err(STATUS_ERROR, "Cannot access `%s'", sp); - if ((st.st_mode & S_IFCHR) == 0) +foundtty: if ((st.st_mode & S_IFCHR) == 0) errx(STATUS_BADUSAGE, "Not a tty: `%s'", sp); li->li_number = st.st_rdev; ==== //depot/projects/mpsafetty/crypto/openssh/moduli.5#2 (text+ko) ==== @@ -13,7 +13,7 @@ .\" 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. -.Dd $Mdocdate: June 26 2008 $ +.Dd June 26 2008 .Dt MODULI 5 .Os .Sh NAME ==== //depot/projects/mpsafetty/crypto/openssh/scp.1#3 (text+ko) ==== @@ -11,7 +11,7 @@ .\" .\" $OpenBSD: scp.1,v 1.46 2008/07/12 05:33:41 djm Exp $ .\" -.Dd $Mdocdate: July 12 2008 $ +.Dd July 12 2008 .Dt SCP 1 .Os .Sh NAME ==== //depot/projects/mpsafetty/crypto/openssh/sftp-server.8#3 (text+ko) ==== @@ -22,7 +22,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. .\" -.Dd $Mdocdate: July 18 2008 $ +.Dd July 18 2008 .Dt SFTP-SERVER 8 .Os .Sh NAME ==== //depot/projects/mpsafetty/crypto/openssh/sftp.1#3 (text+ko) ==== @@ -22,7 +22,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. .\" -.Dd $Mdocdate: July 15 2008 $ +.Dd July 15 2008 .Dt SFTP 1 .Os .Sh NAME ==== //depot/projects/mpsafetty/crypto/openssh/ssh-add.1#3 (text+ko) ==== @@ -37,7 +37,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. .\" -.Dd $Mdocdate: June 12 2007 $ +.Dd June 12 2007 .Dt SSH-ADD 1 .Os .Sh NAME ==== //depot/projects/mpsafetty/crypto/openssh/ssh-agent.1#3 (text+ko) ==== @@ -34,7 +34,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. .\" -.Dd $Mdocdate: June 5 2007 $ +.Dd June 5 2007 .Dt SSH-AGENT 1 .Os .Sh NAME ==== //depot/projects/mpsafetty/crypto/openssh/ssh-keygen.1#3 (text+ko) ==== @@ -37,7 +37,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. .\" -.Dd $Mdocdate: June 12 2008 $ +.Dd June 12 2008 .Dt SSH-KEYGEN 1 .Os .Sh NAME ==== //depot/projects/mpsafetty/crypto/openssh/ssh-keyscan.1#3 (text+ko) ==== @@ -6,7 +6,7 @@ .\" permitted provided that due credit is given to the author and the .\" OpenBSD project by leaving this copyright notice intact. .\" -.Dd $Mdocdate: April 30 2008 $ +.Dd April 30 2008 .Dt SSH-KEYSCAN 1 .Os .Sh NAME ==== //depot/projects/mpsafetty/crypto/openssh/ssh-keysign.8#3 (text+ko) ==== @@ -22,7 +22,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. .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd May 31 2007 .Dt SSH-KEYSIGN 8 .Os .Sh NAME ==== //depot/projects/mpsafetty/crypto/openssh/ssh.1#3 (text+ko) ==== @@ -35,8 +35,8 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $OpenBSD: ssh.1,v 1.277 2008/07/02 13:47:39 djm Exp $ -.\" $FreeBSD: src/crypto/openssh/ssh.1,v 1.36 2008/08/01 02:48:36 des Exp $ -.Dd $Mdocdate: July 2 2008 $ +.\" $FreeBSD: src/crypto/openssh/ssh.1,v 1.37 2008/09/29 10:53:05 des Exp $ +.Dd July 2 2008 .Dt SSH 1 .Os .Sh NAME ==== //depot/projects/mpsafetty/crypto/openssh/ssh_config.5#3 (text+ko) ==== @@ -35,8 +35,8 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $OpenBSD: ssh_config.5,v 1.111 2008/06/26 11:46:31 grunk Exp $ -.\" $FreeBSD: src/crypto/openssh/ssh_config.5,v 1.24 2008/08/01 02:48:36 des Exp $ -.Dd $Mdocdate: June 26 2008 $ +.\" $FreeBSD: src/crypto/openssh/ssh_config.5,v 1.25 2008/09/29 10:53:05 des Exp $ +.Dd June 26 2008 .Dt SSH_CONFIG 5 .Os .Sh NAME ==== //depot/projects/mpsafetty/crypto/openssh/sshd.8#3 (text+ko) ==== @@ -35,8 +35,8 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $OpenBSD: sshd.8,v 1.246 2008/07/02 02:24:18 djm Exp $ -.\" $FreeBSD: src/crypto/openssh/sshd.8,v 1.35 2008/08/01 02:48:36 des Exp $ -.Dd $Mdocdate: July 2 2008 $ +.\" $FreeBSD: src/crypto/openssh/sshd.8,v 1.36 2008/09/29 10:53:05 des Exp $ +.Dd July 2 2008 .Dt SSHD 8 .Os .Sh NAME ==== //depot/projects/mpsafetty/crypto/openssh/sshd_config.5#3 (text+ko) ==== @@ -35,8 +35,8 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $OpenBSD: sshd_config.5,v 1.96 2008/07/02 02:24:18 djm Exp $ -.\" $FreeBSD: src/crypto/openssh/sshd_config.5,v 1.30 2008/08/01 02:48:36 des Exp $ -.Dd $Mdocdate: July 2 2008 $ +.\" $FreeBSD: src/crypto/openssh/sshd_config.5,v 1.31 2008/09/29 10:53:05 des Exp $ +.Dd July 2 2008 .Dt SSHD_CONFIG 5 .Os .Sh NAME ==== //depot/projects/mpsafetty/etc/network.subr#2 (text+ko) ==== @@ -22,7 +22,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/network.subr,v 1.190 2008/06/23 20:50:11 mtm Exp $ +# $FreeBSD: src/etc/network.subr,v 1.191 2008/10/01 18:46:46 brooks Exp $ # # @@ -506,15 +506,9 @@ # Create wireless interfaces child_wlans=`get_if_var $ifn wlans_IF` - if [ -z "${child_wlans}" ]; then - child_wlans=`get_if_var $ifn vaps_IF` - if [ -n "${child_wlans}" ]; then - warn "soon to be deleted vaps_$ifn variable defined use wlans_$ifn" - fi - fi for child in ${child_wlans}; do - create_args="wlandev $ifn `get_if_var $child create_args_IF` `get_if_var $child vap_create_IF`" + create_args="wlandev $ifn `get_if_var $child create_args_IF`" if expr $child : 'wlan[0-9][0-9]*$' >/dev/null 2>&1; then ifconfig $child create ${create_args} && cfg=0 else ==== //depot/projects/mpsafetty/lib/libarchive/archive_entry.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.53 2008/09/01 04:54:29 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.54 2008/09/30 03:53:03 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -461,6 +461,24 @@ } time_t +archive_entry_birthtime(struct archive_entry *entry) +{ + return (entry->ae_stat.aest_birthtime); +} + +long +archive_entry_birthtime_nsec(struct archive_entry *entry) +{ + return (entry->ae_stat.aest_birthtime_nsec); +} + +int +archive_entry_birthtime_is_set(struct archive_entry *entry) +{ + return (entry->ae_set & AE_SET_BIRTHTIME); +} + +time_t archive_entry_ctime(struct archive_entry *entry) { return (entry->ae_stat.aest_ctime); @@ -838,6 +856,22 @@ } void +archive_entry_set_birthtime(struct archive_entry *entry, time_t m, long ns) +{ + entry->stat_valid = 0; + entry->ae_set |= AE_SET_BIRTHTIME; + entry->ae_stat.aest_birthtime = m; + entry->ae_stat.aest_birthtime_nsec = ns; +} + +void +archive_entry_unset_birthtime(struct archive_entry *entry) +{ + archive_entry_set_birthtime(entry, 0, 0); + entry->ae_set &= ~AE_SET_BIRTHTIME; +} + +void archive_entry_set_ctime(struct archive_entry *entry, time_t t, long ns) { entry->stat_valid = 0; ==== //depot/projects/mpsafetty/lib/libarchive/archive_entry.h#4 (text+ko) ==== @@ -22,7 +22,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_entry.h,v 1.29 2008/09/18 04:19:06 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/archive_entry.h,v 1.30 2008/09/30 03:53:03 kientzle Exp $ */ #ifndef ARCHIVE_ENTRY_H_INCLUDED @@ -174,6 +174,9 @@ __LA_DECL time_t archive_entry_atime(struct archive_entry *); __LA_DECL long archive_entry_atime_nsec(struct archive_entry *); __LA_DECL int archive_entry_atime_is_set(struct archive_entry *); +__LA_DECL time_t archive_entry_birthtime(struct archive_entry *); +__LA_DECL long archive_entry_birthtime_nsec(struct archive_entry *); +__LA_DECL int archive_entry_birthtime_is_set(struct archive_entry *); __LA_DECL time_t archive_entry_ctime(struct archive_entry *); __LA_DECL long archive_entry_ctime_nsec(struct archive_entry *); __LA_DECL int archive_entry_ctime_is_set(struct archive_entry *); @@ -224,6 +227,8 @@ __LA_DECL void archive_entry_set_atime(struct archive_entry *, time_t, long); __LA_DECL void archive_entry_unset_atime(struct archive_entry *); +__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); __LA_DECL void archive_entry_unset_ctime(struct archive_entry *); __LA_DECL void archive_entry_set_dev(struct archive_entry *, dev_t); ==== //depot/projects/mpsafetty/lib/libarchive/archive_entry_copy_stat.c#2 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_copy_stat.c,v 1.1 2007/05/29 01:00:18 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_copy_stat.c,v 1.2 2008/09/30 03:53:03 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -47,6 +47,12 @@ archive_entry_set_atime(entry, st->st_atime, 0); archive_entry_set_ctime(entry, st->st_ctime, 0); archive_entry_set_mtime(entry, st->st_mtime, 0); +#if HAVE_STRUCT_STAT_ST_BIRTHTIME + archive_entry_set_birthtime(entry, st->st_birthtime, 0); +#endif +#endif +#if HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC + archive_entry_set_birthtime(entry, st->st_birthtime, st->st_birthtimespec.tv_nsec); #endif archive_entry_set_dev(entry, st->st_dev); archive_entry_set_gid(entry, st->st_gid); ==== //depot/projects/mpsafetty/lib/libarchive/archive_entry_private.h#3 (text+ko) ==== @@ -22,7 +22,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_entry_private.h,v 1.5 2008/09/01 04:54:29 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/archive_entry_private.h,v 1.6 2008/09/30 03:53:03 kientzle Exp $ */ #ifndef ARCHIVE_ENTRY_PRIVATE_H_INCLUDED @@ -112,6 +112,8 @@ uint32_t aest_ctime_nsec; int64_t aest_mtime; uint32_t aest_mtime_nsec; + int64_t aest_birthtime; + uint32_t aest_birthtime_nsec; gid_t aest_gid; ino_t aest_ino; mode_t aest_mode; @@ -142,6 +144,7 @@ #define AE_SET_ATIME 4 #define AE_SET_CTIME 8 #define AE_SET_MTIME 16 +#define AE_SET_BIRTHTIME 32 #define AE_SET_SIZE 64 /* ==== //depot/projects/mpsafetty/lib/libarchive/archive_entry_stat.c#2 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_stat.c,v 1.1 2007/05/29 01:00:18 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_stat.c,v 1.2 2008/09/30 03:53:03 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -64,6 +64,9 @@ * the appropriate conversions get invoked. */ st->st_atime = archive_entry_atime(entry); +#if HAVE_STRUCT_STAT_ST_BIRTHTIME + st->st_birthtime = archive_entry_birthtime(entry); +#endif st->st_ctime = archive_entry_ctime(entry); st->st_mtime = archive_entry_mtime(entry); st->st_dev = archive_entry_dev(entry); @@ -88,6 +91,9 @@ st->st_ctim.tv_nsec = archive_entry_ctime_nsec(entry); st->st_mtim.tv_nsec = archive_entry_mtime_nsec(entry); #endif +#if HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC + st->st_birthtimespec.tv_nsec = archive_entry_birthtime_nsec(entry); +#endif /* * TODO: On Linux, store 32 or 64 here depending on whether ==== //depot/projects/mpsafetty/lib/libarchive/archive_read_support_format_tar.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.70 2008/07/10 09:50:55 cperciva Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.71 2008/09/30 03:57:07 kientzle Exp $"); #ifdef HAVE_ERRNO_H #include @@ -1451,6 +1451,10 @@ if (strcmp(key, "LIBARCHIVE.xxxxxxx")==0) archive_entry_set_xxxxxx(entry, value); */ + if (strcmp(key, "LIBARCHIVE.creationtime")==0) { + pax_time(value, &s, &n); + archive_entry_set_birthtime(entry, s, n); + } if (strncmp(key, "LIBARCHIVE.xattr.", 17)==0) pax_attribute_xattr(entry, key, value); break; ==== //depot/projects/mpsafetty/lib/libarchive/archive_write_disk.c#9 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_disk.c,v 1.39 2008/09/14 05:51:25 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_disk.c,v 1.40 2008/09/30 04:02:36 kientzle Exp $"); #ifdef HAVE_SYS_TYPES_H #include @@ -96,10 +96,12 @@ struct fixup_entry { struct fixup_entry *next; mode_t mode; + int64_t atime; + int64_t birthtime; int64_t mtime; - int64_t atime; + unsigned long atime_nanos; + unsigned long birthtime_nanos; unsigned long mtime_nanos; - unsigned long atime_nanos; unsigned long fflags_set; int fixup; /* bitmask of what needs fixing */ char *name; @@ -227,7 +229,8 @@ unsigned long fflags_set, unsigned long fflags_clear); static int set_ownership(struct archive_write_disk *); static int set_mode(struct archive_write_disk *, int mode); -static int set_time(struct archive_write_disk *); +static int set_time(int, int, const char *, time_t, long, time_t, long); +static int set_times(struct archive_write_disk *); static struct fixup_entry *sort_dir_list(struct fixup_entry *p); static gid_t trivial_lookup_gid(void *, const char *, gid_t); static uid_t trivial_lookup_uid(void *, const char *, uid_t); @@ -448,19 +451,29 @@ || archive_entry_atime_is_set(entry))) { fe = current_fixup(a, archive_entry_pathname(entry)); fe->fixup |= TODO_TIMES; + if (archive_entry_atime_is_set(entry)) { + fe->atime = archive_entry_atime(entry); + fe->atime_nanos = archive_entry_atime_nsec(entry); + } else { + /* If atime is unset, use start time. */ + fe->atime = a->start_time; + fe->atime_nanos = 0; + } if (archive_entry_mtime_is_set(entry)) { fe->mtime = archive_entry_mtime(entry); fe->mtime_nanos = archive_entry_mtime_nsec(entry); } else { + /* If mtime is unset, use start time. */ fe->mtime = a->start_time; fe->mtime_nanos = 0; } - if (archive_entry_atime_is_set(entry)) { - fe->atime = archive_entry_atime(entry); - fe->atime_nanos = archive_entry_atime_nsec(entry); + if (archive_entry_birthtime_is_set(entry)) { + fe->birthtime = archive_entry_birthtime(entry); + fe->birthtime_nanos = archive_entry_birthtime_nsec(entry); } else { - fe->atime = a->start_time; - fe->atime_nanos = 0; + /* If birthtime is unset, use mtime. */ + fe->birthtime = fe->mtime; + fe->birthtime_nanos = fe->mtime_nanos; } } @@ -698,7 +711,7 @@ if (r2 < ret) ret = r2; } if (a->todo & TODO_TIMES) { - int r2 = set_time(a); + int r2 = set_times(a); if (r2 < ret) ret = r2; } if (a->todo & TODO_ACLS) { @@ -1170,10 +1183,19 @@ #ifdef HAVE_UTIMES /* {f,l,}utimes() are preferred, when available. */ struct timeval times[2]; + times[0].tv_sec = p->atime; + times[0].tv_usec = p->atime_nanos / 1000; +#ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME + /* if it's valid and not mtime, push the birthtime first */ + if (((times[1].tv_sec = p->birthtime) < p->mtime) && + (p->birthtime > 0)) + { + times[1].tv_usec = p->birthtime_nanos / 1000; + utimes(p->name, times); + } +#endif times[1].tv_sec = p->mtime; times[1].tv_usec = p->mtime_nanos / 1000; - times[0].tv_sec = p->atime; - times[0].tv_usec = p->atime_nanos / 1000; #ifdef HAVE_LUTIMES lutimes(p->name, times); #else @@ -1687,61 +1709,31 @@ * when they're available. */ static int -set_time(struct archive_write_disk *a) +set_time(int fd, int mode, const char *name, + time_t atime, long atime_nsec, + time_t mtime, long mtime_nsec) { struct timeval times[2]; - /* If no time was provided, we're done. */ - if (!archive_entry_atime_is_set(a->entry) - && !archive_entry_mtime_is_set(a->entry)) - return (ARCHIVE_OK); - - /* We know at least one is set, so... */ - if (archive_entry_mtime_is_set(a->entry)) { - times[1].tv_sec = archive_entry_mtime(a->entry); - times[1].tv_usec = archive_entry_mtime_nsec(a->entry) / 1000; - } else { - times[1].tv_sec = a->start_time; - times[1].tv_usec = 0; - } + times[0].tv_sec = atime; + times[0].tv_usec = atime_nsec / 1000; + times[1].tv_sec = mtime; + times[1].tv_usec = mtime_nsec / 1000; - /* If no atime was specified, use start time instead. */ - /* In theory, it would be marginally more correct to use - * time(NULL) here, but that would cost us an extra syscall - * for little gain. */ - if (archive_entry_atime_is_set(a->entry)) { - times[0].tv_sec = archive_entry_atime(a->entry); - times[0].tv_usec = archive_entry_atime_nsec(a->entry) / 1000; - } else { - times[0].tv_sec = a->start_time; - times[0].tv_usec = 0; - } - #ifdef HAVE_FUTIMES - if (a->fd >= 0 && futimes(a->fd, times) == 0) { - return (ARCHIVE_OK); - } + if (fd >= 0) + return (futimes(fd, times)); +#else + (void)fd; /* UNUSED */ #endif - #ifdef HAVE_LUTIMES - if (lutimes(a->name, times) != 0) + (void)mode; /* UNUSED */ + return (lutimes(name, times)); #else - if (!S_ISLNK(a->mode) && utimes(a->name, times) != 0) + if (S_ISLNK(mode)) + return (0); + return (utimes(name, times)); #endif - { - archive_set_error(&a->archive, errno, "Can't update time for %s", - a->name); - return (ARCHIVE_WARN); - } - - /* - * Note: POSIX does not provide a portable way to restore ctime. - * (Apart from resetting the system clock, which is distasteful.) - * So, any restoration of ctime will necessarily be OS-specific. - */ - - /* XXX TODO: Can FreeBSD restore ctime? XXX */ - return (ARCHIVE_OK); } #elif defined(HAVE_UTIME) /* @@ -1749,47 +1741,93 @@ * if utimes() isn't available. */ static int -set_time(struct archive_write_disk *a) +set_time(int fd, int mode, const char *name, + time_t atime, long atime_nsec, + time_t mtime, long mtime_nsec) { struct utimbuf times; + (void)fd; /* UNUSED */ + (void)name; /* UNUSED */ + (void)atime_nsec; /* UNUSED */ + (void)mtime_nsec; /* UNUSED */ + times.actime = atime; + times.modtime = mtime; + if (S_ISLINK(mode)) + return (ARCHIVE_OK); + return (utime(name, ×)); +} +#else +static int +set_time(int fd, int mode, const char *name, + time_t atime, long atime_nsec, + time_t mtime, long mtime_nsec) +{ + return (ARCHIVE_WARN); +} +#endif +static int +set_times(struct archive_write_disk *a) +{ + time_t atime = a->start_time, mtime = a->start_time; + long atime_nsec = 0, mtime_nsec = 0; + /* If no time was provided, we're done. */ if (!archive_entry_atime_is_set(a->entry) +#if HAVE_STRUCT_STAT_ST_BIRTHTIME + && !archive_entry_birthtime_is_set(a->entry) +#endif && !archive_entry_mtime_is_set(a->entry)) return (ARCHIVE_OK); - /* We know at least one is set, so... */ - /* Set mtime from mtime if set, else start time. */ - if (archive_entry_mtime_is_set(a->entry)) - times.modtime = archive_entry_mtime(a->entry); - else - times.modtime = a->start_time; + /* If no atime was specified, use start time instead. */ + /* In theory, it would be marginally more correct to use + * time(NULL) here, but that would cost us an extra syscall + * for little gain. */ + if (archive_entry_atime_is_set(a->entry)) { + atime = archive_entry_atime(a->entry); + atime_nsec = archive_entry_atime_nsec(a->entry); + } - /* Set atime from provided atime, else mtime. */ - if (archive_entry_atime_is_set(a->entry)) - times.actime = archive_entry_atime(a->entry); - else - times.actime = a->start_time; + /* + * If you have struct stat.st_birthtime, we assume BSD birthtime + * semantics, in which {f,l,}utimes() updates birthtime to earliest + * mtime. So we set the time twice, first using the birthtime, + * then using the mtime. + */ +#if HAVE_STRUCT_STAT_ST_BIRTHTIME + /* If birthtime is set, flush that through to disk first. */ + if (archive_entry_birthtime_is_set(a->entry)) + if (set_time(a->fd, a->mode, a->name, atime, atime_nsec, + archive_entry_birthtime(a->entry), + archive_entry_birthtime_nsec(a->entry))) { + archive_set_error(&a->archive, errno, + "Can't update time for %s", + a->name); + return (ARCHIVE_WARN); + } +#endif - if (!S_ISLNK(a->mode) && utime(a->name, ×) != 0) { + if (archive_entry_mtime_is_set(a->entry)) { + mtime = archive_entry_mtime(a->entry); + mtime_nsec = archive_entry_mtime_nsec(a->entry); + } + if (set_time(a->fd, a->mode, a->name, + atime, atime_nsec, mtime, mtime_nsec)) { archive_set_error(&a->archive, errno, - "Can't update time for %s", a->name); + "Can't update time for %s", + a->name); return (ARCHIVE_WARN); } + + /* + * Note: POSIX does not provide a portable way to restore ctime. + * (Apart from resetting the system clock, which is distasteful.) + * So, any restoration of ctime will necessarily be OS-specific. + */ + return (ARCHIVE_OK); } -#else -/* This platform doesn't give us a way to restore the time. */ -static int -set_time(struct archive_write_disk *a) -{ - (void)a; /* UNUSED */ - archive_set_error(&a->archive, errno, - "Can't update time for %s", a->name); - return (ARCHIVE_WARN); -} -#endif - static int set_mode(struct archive_write_disk *a, int mode) ==== //depot/projects/mpsafetty/lib/libarchive/archive_write_set_format_pax.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_pax.c,v 1.48 2008/08/10 02:06:28 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_pax.c,v 1.49 2008/09/30 03:57:07 kientzle Exp $"); #ifdef HAVE_ERRNO_H #include @@ -762,6 +762,15 @@ archive_entry_atime(entry_main), archive_entry_atime_nsec(entry_main)); + /* Store birth/creationtime only if it's earlier than mtime */ + if (archive_entry_birthtime_is_set(entry_main) && + archive_entry_birthtime(entry_main) + < archive_entry_mtime(entry_main)) + add_pax_attr_time(&(pax->pax_header), + "LIBARCHIVE.creationtime", + archive_entry_birthtime(entry_main), + archive_entry_birthtime_nsec(entry_main)); + /* I use a star-compatible file flag attribute. */ p = archive_entry_fflags_text(entry_main); if (p != NULL && *p != '\0') ==== //depot/projects/mpsafetty/lib/libarchive/config_freebsd.h#4 (text+ko) ==== @@ -22,7 +22,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/config_freebsd.h,v 1.14 2008/09/14 05:51:25 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/config_freebsd.h,v 1.15 2008/09/30 03:53:03 kientzle Exp $ */ /* FreeBSD 5.0 and later have ACL support. */ @@ -89,6 +89,8 @@ #define HAVE_STRING_H 1 #define HAVE_STRRCHR 1 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 +#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 #define HAVE_STRUCT_STAT_ST_FLAGS 1 #define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 #define HAVE_SYS_ACL_H 1 ==== //depot/projects/mpsafetty/lib/libarchive/test/Makefile#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libarchive/test/Makefile,v 1.25 2008/09/08 00:58:12 kientzle Exp $ +# $FreeBSD: src/lib/libarchive/test/Makefile,v 1.27 2008/09/30 04:02:36 kientzle Exp $ # Where to find the libarchive sources LA_SRCDIR=${.CURDIR}/.. @@ -57,11 +57,13 @@ test_write_disk_hardlink.c \ test_write_disk_perms.c \ test_write_disk_secure.c \ + test_write_disk_times.c \ test_write_format_ar.c \ test_write_format_cpio.c \ test_write_format_cpio_empty.c \ test_write_format_cpio_newc.c \ test_write_format_cpio_odc.c \ + test_write_format_pax.c \ test_write_format_shar_empty.c \ test_write_format_tar.c \ test_write_format_tar_empty.c \ ==== //depot/projects/mpsafetty/lib/libarchive/test/test_entry.c#3 (text+ko) ==== @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/lib/libarchive/test/test_entry.c,v 1.8 2008/09/01 05:38:33 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/test/test_entry.c,v 1.10 2008/09/30 04:13:21 kientzle Exp $"); #include @@ -79,6 +79,15 @@ assertEqualInt(archive_entry_atime_nsec(e), 0); assert(!archive_entry_atime_is_set(e)); + /* birthtime */ + archive_entry_set_birthtime(e, 17579, 24990); + assertEqualInt(archive_entry_birthtime(e), 17579); + assertEqualInt(archive_entry_birthtime_nsec(e), 24990); + archive_entry_unset_birthtime(e); + assertEqualInt(archive_entry_birthtime(e), 0); + assertEqualInt(archive_entry_birthtime_nsec(e), 0); + assert(!archive_entry_birthtime_is_set(e)); + /* ctime */ archive_entry_set_ctime(e, 13580, 24681); assertEqualInt(archive_entry_ctime(e), 13580); @@ -312,6 +321,7 @@ /* Set values in 'e' */ archive_entry_clear(e); archive_entry_set_atime(e, 13579, 24680); + archive_entry_set_birthtime(e, 13779, 24990); archive_entry_set_ctime(e, 13580, 24681); #if ARCHIVE_VERSION_NUMBER >= 1009000 archive_entry_set_dev(e, 235); @@ -348,6 +358,8 @@ /* Clone should have same contents. */ assertEqualInt(archive_entry_atime(e2), 13579); assertEqualInt(archive_entry_atime_nsec(e2), 24680); + assertEqualInt(archive_entry_birthtime(e2), 13779); + assertEqualInt(archive_entry_birthtime_nsec(e2), 24990); assertEqualInt(archive_entry_ctime(e2), 13580); assertEqualInt(archive_entry_ctime_nsec(e2), 24681); #if ARCHIVE_VERSION_NUMBER >= 1009000 @@ -435,6 +447,7 @@ /* Change the original */ archive_entry_set_atime(e, 13580, 24690); + archive_entry_set_birthtime(e, 13980, 24999); archive_entry_set_ctime(e, 13590, 24691); #if ARCHIVE_VERSION_NUMBER >= 1009000 archive_entry_set_dev(e, 245); @@ -468,6 +481,8 @@ /* Clone should still have same contents. */ assertEqualInt(archive_entry_atime(e2), 13579); assertEqualInt(archive_entry_atime_nsec(e2), 24680); >>> TRUNCATED FOR MAIL (1000 lines) <<<