From owner-svn-src-vendor@freebsd.org Tue Jun 14 23:41:09 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40C6CAF08F9; Tue, 14 Jun 2016 23:41:09 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DC462A51; Tue, 14 Jun 2016 23:41:08 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5ENf8PB071916; Tue, 14 Jun 2016 23:41:08 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5ENf81w071915; Tue, 14 Jun 2016 23:41:08 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201606142341.u5ENf81w071915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 14 Jun 2016 23:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r301899 - in vendor/amd/dist: . amd amq conf/checkmount conf/fh_dref conf/hn_dref conf/mount conf/mtab conf/nfs_prot conf/sa_dref conf/transp conf/trap conf/umount doc fixmount fsinfo h... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 23:41:09 -0000 Author: pfg Date: Tue Jun 14 23:41:07 2016 New Revision: 301899 URL: https://svnweb.freebsd.org/changeset/base/301899 Log: am-utils: Disable keyword expansion. As recommended in the Committers guide section 5.4.4.1.2. Modified: Directory Properties: vendor/amd/dist/AUTHORS (props changed) vendor/amd/dist/BUGS (props changed) vendor/amd/dist/COPYING (props changed) vendor/amd/dist/ChangeLog (props changed) vendor/amd/dist/FAQ (props changed) vendor/amd/dist/INSTALL (props changed) vendor/amd/dist/MIRRORS.html (props changed) vendor/amd/dist/MIRRORS.txt (props changed) vendor/amd/dist/NEWS (props changed) vendor/amd/dist/README (props changed) vendor/amd/dist/README.attrcache (props changed) vendor/amd/dist/README.ldap (props changed) vendor/amd/dist/README.y2k (props changed) vendor/amd/dist/TODO (props changed) vendor/amd/dist/amd/am_ops.c (props changed) vendor/amd/dist/amd/amd.8 (props changed) vendor/amd/dist/amd/amd.c (props changed) vendor/amd/dist/amd/amd.h (props changed) vendor/amd/dist/amd/amfs_auto.c (props changed) vendor/amd/dist/amd/amfs_direct.c (props changed) vendor/amd/dist/amd/amfs_error.c (props changed) vendor/amd/dist/amd/amfs_generic.c (props changed) vendor/amd/dist/amd/amfs_host.c (props changed) vendor/amd/dist/amd/amfs_link.c (props changed) vendor/amd/dist/amd/amfs_linkx.c (props changed) vendor/amd/dist/amd/amfs_nfsl.c (props changed) vendor/amd/dist/amd/amfs_nfsx.c (props changed) vendor/amd/dist/amd/amfs_program.c (props changed) vendor/amd/dist/amd/amfs_root.c (props changed) vendor/amd/dist/amd/amfs_toplvl.c (props changed) vendor/amd/dist/amd/amfs_union.c (props changed) vendor/amd/dist/amd/amq_subr.c (props changed) vendor/amd/dist/amd/amq_svc.c (props changed) vendor/amd/dist/amd/autil.c (props changed) vendor/amd/dist/amd/clock.c (props changed) vendor/amd/dist/amd/conf.c (props changed) vendor/amd/dist/amd/conf_parse.y (props changed) vendor/amd/dist/amd/conf_tok.l (props changed) vendor/amd/dist/amd/get_args.c (props changed) vendor/amd/dist/amd/info_exec.c (props changed) vendor/amd/dist/amd/info_file.c (props changed) vendor/amd/dist/amd/info_hesiod.c (props changed) vendor/amd/dist/amd/info_ldap.c (props changed) vendor/amd/dist/amd/info_ndbm.c (props changed) vendor/amd/dist/amd/info_nis.c (props changed) vendor/amd/dist/amd/info_nisplus.c (props changed) vendor/amd/dist/amd/info_passwd.c (props changed) vendor/amd/dist/amd/info_union.c (props changed) vendor/amd/dist/amd/map.c (props changed) vendor/amd/dist/amd/mapc.c (props changed) vendor/amd/dist/amd/mntfs.c (props changed) vendor/amd/dist/amd/nfs_prot_svc.c (props changed) vendor/amd/dist/amd/nfs_start.c (props changed) vendor/amd/dist/amd/nfs_subr.c (props changed) vendor/amd/dist/amd/ops_TEMPLATE.c (props changed) vendor/amd/dist/amd/ops_autofs.c (props changed) vendor/amd/dist/amd/ops_cachefs.c (props changed) vendor/amd/dist/amd/ops_cdfs.c (props changed) vendor/amd/dist/amd/ops_efs.c (props changed) vendor/amd/dist/amd/ops_lofs.c (props changed) vendor/amd/dist/amd/ops_mfs.c (props changed) vendor/amd/dist/amd/ops_nfs.c (props changed) vendor/amd/dist/amd/ops_nfs3.c (props changed) vendor/amd/dist/amd/ops_nullfs.c (props changed) vendor/amd/dist/amd/ops_pcfs.c (props changed) vendor/amd/dist/amd/ops_tfs.c (props changed) vendor/amd/dist/amd/ops_tmpfs.c (props changed) vendor/amd/dist/amd/ops_ufs.c (props changed) vendor/amd/dist/amd/ops_umapfs.c (props changed) vendor/amd/dist/amd/ops_unionfs.c (props changed) vendor/amd/dist/amd/ops_xfs.c (props changed) vendor/amd/dist/amd/opts.c (props changed) vendor/amd/dist/amd/readdir.c (props changed) vendor/amd/dist/amd/restart.c (props changed) vendor/amd/dist/amd/rpc_fwd.c (props changed) vendor/amd/dist/amd/sched.c (props changed) vendor/amd/dist/amd/srvr_amfs_auto.c (props changed) vendor/amd/dist/amd/srvr_nfs.c (props changed) vendor/amd/dist/amq/amq.8 (props changed) vendor/amd/dist/amq/amq.c (props changed) vendor/amd/dist/amq/amq.h (props changed) vendor/amd/dist/amq/amq_clnt.c (props changed) vendor/amd/dist/amq/amq_xdr.c (props changed) vendor/amd/dist/amq/pawd.1 (props changed) vendor/amd/dist/amq/pawd.c (props changed) vendor/amd/dist/aux_conf.h.in (props changed) vendor/amd/dist/bootstrap (props changed) vendor/amd/dist/conf/checkmount/checkmount_bsd44.c (props changed) vendor/amd/dist/conf/fh_dref/fh_dref_freebsd22.h (props changed) vendor/amd/dist/conf/hn_dref/hn_dref_default.h (props changed) vendor/amd/dist/conf/mount/mount_default.c (props changed) vendor/amd/dist/conf/mount/mount_freebsd3.c (props changed) vendor/amd/dist/conf/mtab/mtab_bsd.c (props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_aix5_1.h (props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_darwin.h (props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_freebsd2.h (props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_freebsd3.h (props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_osf5.h (props changed) vendor/amd/dist/conf/nfs_prot/nfs_prot_sunos5_8.h (props changed) vendor/amd/dist/conf/sa_dref/sa_dref_bsd44.h (props changed) vendor/amd/dist/conf/transp/transp_sockets.c (props changed) vendor/amd/dist/conf/trap/trap_default.h (props changed) vendor/amd/dist/conf/trap/trap_freebsd3.h (props changed) vendor/amd/dist/conf/umount/umount_bsd44.c (props changed) vendor/amd/dist/cvs-server.txt (props changed) vendor/amd/dist/doc/am-utils.texi (props changed) vendor/amd/dist/doc/stamp-vti (props changed) vendor/amd/dist/doc/texinfo.tex (props changed) vendor/amd/dist/doc/version.texi (props changed) vendor/amd/dist/fixmount/fixmount.8 (props changed) vendor/amd/dist/fixmount/fixmount.c (props changed) vendor/amd/dist/fsinfo/fsi_analyze.c (props changed) vendor/amd/dist/fsinfo/fsi_data.h (props changed) vendor/amd/dist/fsinfo/fsi_dict.c (props changed) vendor/amd/dist/fsinfo/fsi_gram.y (props changed) vendor/amd/dist/fsinfo/fsi_lex.l (props changed) vendor/amd/dist/fsinfo/fsi_util.c (props changed) vendor/amd/dist/fsinfo/fsinfo.8 (props changed) vendor/amd/dist/fsinfo/fsinfo.c (props changed) vendor/amd/dist/fsinfo/fsinfo.h (props changed) vendor/amd/dist/fsinfo/wr_atab.c (props changed) vendor/amd/dist/fsinfo/wr_bparam.c (props changed) vendor/amd/dist/fsinfo/wr_dumpset.c (props changed) vendor/amd/dist/fsinfo/wr_exportfs.c (props changed) vendor/amd/dist/fsinfo/wr_fstab.c (props changed) vendor/amd/dist/hlfsd/hlfsd.8 (props changed) vendor/amd/dist/hlfsd/hlfsd.c (props changed) vendor/amd/dist/hlfsd/hlfsd.h (props changed) vendor/amd/dist/hlfsd/homedir.c (props changed) vendor/amd/dist/hlfsd/nfs_prot_svc.c (props changed) vendor/amd/dist/hlfsd/stubs.c (props changed) vendor/amd/dist/include/am_compat.h (props changed) vendor/amd/dist/include/am_defs.h (props changed) vendor/amd/dist/include/am_utils.h (props changed) vendor/amd/dist/include/am_xdr_func.h (props changed) vendor/amd/dist/include/amq_defs.h (props changed) vendor/amd/dist/include/mount_headers1.h (props changed) vendor/amd/dist/include/mount_headers2.h (props changed) vendor/amd/dist/ldap-id.ms (props changed) vendor/amd/dist/ldap-id.txt (props changed) vendor/amd/dist/ldap.schema (props changed) vendor/amd/dist/libamu/alloca.c (props changed) vendor/amd/dist/libamu/amu.h (props changed) vendor/amd/dist/libamu/clnt_sperrno.c (props changed) vendor/amd/dist/libamu/hasmntopt.c (props changed) vendor/amd/dist/libamu/misc_rpc.c (props changed) vendor/amd/dist/libamu/mount_fs.c (props changed) vendor/amd/dist/libamu/mtab.c (props changed) vendor/amd/dist/libamu/nfs_prot_xdr.c (props changed) vendor/amd/dist/libamu/strerror.c (props changed) vendor/amd/dist/libamu/strutil.c (props changed) vendor/amd/dist/libamu/wire.c (props changed) vendor/amd/dist/libamu/xdr_func.c (props changed) vendor/amd/dist/libamu/xutil.c (props changed) vendor/amd/dist/mk-amd-map/mk-amd-map.8 (props changed) vendor/amd/dist/mk-amd-map/mk-amd-map.c (props changed) vendor/amd/dist/scripts/Makefile.am (props changed) vendor/amd/dist/scripts/Makefile.in (props changed) vendor/amd/dist/scripts/am-eject.in (props changed) vendor/amd/dist/scripts/amd.conf-sample (props changed) vendor/amd/dist/scripts/amd.conf.5 (props changed) vendor/amd/dist/scripts/amd2ldif.in (props changed) vendor/amd/dist/scripts/amd2sun.in (props changed) vendor/amd/dist/scripts/automount2amd.8 (props changed) vendor/amd/dist/scripts/automount2amd.in (props changed) vendor/amd/dist/scripts/ctl-amd.in (props changed) vendor/amd/dist/scripts/ctl-hlfsd.in (props changed) vendor/amd/dist/scripts/expn.1 (props changed) vendor/amd/dist/scripts/expn.in (props changed) vendor/amd/dist/scripts/fix-amd-map.in (props changed) vendor/amd/dist/scripts/fixrmtab (props changed) vendor/amd/dist/scripts/fixrmtab.in (props changed) vendor/amd/dist/scripts/lostaltmail.conf-sample (props changed) vendor/amd/dist/scripts/lostaltmail.in (props changed) vendor/amd/dist/scripts/redhat-ctl-amd.in (props changed) vendor/amd/dist/scripts/test-attrcache.in (props changed) vendor/amd/dist/scripts/wait4amd.in (props changed) vendor/amd/dist/scripts/wait4amd2die.in (props changed) vendor/amd/dist/tasks (props changed) vendor/amd/dist/vers.m4 (props changed) vendor/amd/dist/wire-test/wire-test.8 (props changed) vendor/amd/dist/wire-test/wire-test.c (props changed) From owner-svn-src-vendor@freebsd.org Wed Jun 15 06:14:11 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4143B729E4; Wed, 15 Jun 2016 06:14:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68E6D25DA; Wed, 15 Jun 2016 06:14:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u5F6E5Qm077157 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 15 Jun 2016 09:14:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u5F6E5Qm077157 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u5F6E5il077156; Wed, 15 Jun 2016 09:14:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 15 Jun 2016 09:14:05 +0300 From: Konstantin Belousov To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r301899 - in vendor/amd/dist: . amd amq conf/checkmount conf/fh_dref conf/hn_dref conf/mount conf/mtab conf/nfs_prot conf/sa_dref conf/transp conf/trap conf/umount doc fixmount fsinfo h... Message-ID: <20160615061405.GP38613@kib.kiev.ua> References: <201606142341.u5ENf81w071915@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201606142341.u5ENf81w071915@repo.freebsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 06:14:11 -0000 On Tue, Jun 14, 2016 at 11:41:08PM +0000, Pedro F. Giffuni wrote: > Author: pfg > Date: Tue Jun 14 23:41:07 2016 > New Revision: 301899 > URL: https://svnweb.freebsd.org/changeset/base/301899 > > Log: > am-utils: Disable keyword expansion. > > As recommended in the Committers guide section 5.4.4.1.2. Wouldn't it be better to remove amd before 11 ? From owner-svn-src-vendor@freebsd.org Wed Jun 15 22:37:50 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DD1CA4731B for ; Wed, 15 Jun 2016 22:37:50 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm41-vm8.bullet.mail.bf1.yahoo.com (nm41-vm8.bullet.mail.bf1.yahoo.com [216.109.114.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E92CF1E47 for ; Wed, 15 Jun 2016 22:37:49 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1466006032; bh=5JnzlqM1JgLbgB/6x1UpVPPDVA9gWBKYLpWTB6fNSfU=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=keztOTHhsHm8iJjW5YnnQ8XSD2d8ijpH77Qp2h0NbjBbjmh10BlFf92FLvXx5utmu9PuxCl7l7W0SSx89n9qlayEUu7JgDhtTCKQs9mhaiMWjOUNaFdjG6OQmGUpBVH67qu+1EX7QTY0Bqfp2TbNxbmzSL/GBUVqrxWr9N9njsiddF2JrQT0CPeNEUsOrSTBX196NAMPDNxAdqVhQhPIEKCpN64jLawsFglhN5H2ODruCch/+OFzWLODmmB87obY5Cg8rp6YiHknpRB5bSJuPsTkO3vc3WFdWUieu9lNPnY28M6IW9ELb6Cb1AxWbbk48yTt/gH5iLS9ydrOuUjPOg== Received: from [98.139.215.140] by nm41.bullet.mail.bf1.yahoo.com with NNFMP; 15 Jun 2016 15:53:52 -0000 Received: from [68.142.230.74] by tm11.bullet.mail.bf1.yahoo.com with NNFMP; 15 Jun 2016 15:53:52 -0000 Received: from [127.0.0.1] by smtp231.mail.bf1.yahoo.com with NNFMP; 15 Jun 2016 15:53:52 -0000 X-Yahoo-Newman-Id: 278477.20707.bm@smtp231.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: _QVOV2oVM1mJnbyI4ojjn8sb19mKnne0msK10KT.iCcJ7xv KvCIfllqYAFk3UdLVvzcDZXnkcFD1C0FvQeTw5sT6pdYUJZCKn6nSODlqybz TcooUHz4xVGYYRKNKWNhxN0Bv7D_dh5..c8_DgkEHlAO3i44fUbla4Ovxr3B mIqQqMylw5IsnAuo7xXBxz_Be.RSCiuNFOkLD2YBlhxGu3ZqJ7sMdtpBmM9M f43AV3nc3YrVrpobvZAxHOUTXnFQlvi016s_1MuIywaS9A..O0h7RpyNod_1 KDIv0ZTrCL806pQgGsGbwIBPWBmpDMsrpHHcQs0x8FVUKmi.0lKO8ASl6Ixs p21WAln65j0EtiF4_OvaY0yjTea03iQF0M79cPOM4xJWhVGonOWRVOgsI6il RBPAc2.HXCRr3WjAhTwquJDnt9HVTkMHlLobN.2xdH9Jg9pNO6KeVJNsgoZe cw4z14XvkgFzVeE4iOFnHEtfiXzYQQRwe1igPchv3fR_h3s8XbcA2WLNtpdr kkDWj_PxFx4_8vNAwj5zBK7O1BTfGKnNA X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r301899 - in vendor/amd/dist: . amd amq conf/checkmount conf/fh_dref conf/hn_dref conf/mount conf/mtab conf/nfs_prot conf/sa_dref conf/transp conf/trap conf/umount doc fixmount fsinfo h... To: Konstantin Belousov References: <201606142341.u5ENf81w071915@repo.freebsd.org> <20160615061405.GP38613@kib.kiev.ua> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org From: Pedro Giffuni Message-ID: <129d6f78-e3c6-5d18-9466-a97ca1b11f76@FreeBSD.org> Date: Wed, 15 Jun 2016 10:53:59 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160615061405.GP38613@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 22:37:50 -0000 Hello; On 06/15/16 01:14, Konstantin Belousov wrote: > On Tue, Jun 14, 2016 at 11:41:08PM +0000, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Tue Jun 14 23:41:07 2016 >> New Revision: 301899 >> URL: https://svnweb.freebsd.org/changeset/base/301899 >> >> Log: >> am-utils: Disable keyword expansion. >> >> As recommended in the Committers guide section 5.4.4.1.2. > Wouldn't it be better to remove amd before 11 ? > Yes, that would be better. FWIW, I was only investigating a README.autofs file in the upstream distribution but I have *no* plans to touch any of this, especially not during a code freeze. Pedro. From owner-svn-src-vendor@freebsd.org Thu Jun 16 01:21:29 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A705DA45D5B; Thu, 16 Jun 2016 01:21:29 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5BAA81744; Thu, 16 Jun 2016 01:21:29 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id DLzkb8XLLEWlrDLzlbkIqF; Wed, 15 Jun 2016 19:21:22 -0600 X-Authority-Analysis: v=2.2 cv=P7p4vWIu c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=pD_ry4oyNxEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=9EfbjnueN5bFe6Zoxe4A:9 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id C1EBC13753; Wed, 15 Jun 2016 18:21:19 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u5G1LIPf057835; Wed, 15 Jun 2016 18:21:18 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201606160121.u5G1LIPf057835@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Pedro Giffuni cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r301899 - in vendor/amd/dist: . amd amq conf/checkmount conf/fh_dref conf/hn_dref conf/mount conf/mtab conf/nfs_prot conf/sa_dref conf/transp conf/trap conf/umount doc fixmount fsinfo h... In-Reply-To: Message from Pedro Giffuni of "Wed, 15 Jun 2016 10:53:59 -0500." <129d6f78-e3c6-5d18-9466-a97ca1b11f76@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 15 Jun 2016 18:21:18 -0700 X-CMAE-Envelope: MS4wfFhVT53Fo5H2J+AL0ZXVC0El7UUT9+oQyMjpkbOxsVpMRPu/Dgzc9J+qQpOLW0ZkBKUrbXj0+8dpPhHmJYhEuNqNtarYf+K1bzyYIUcKyWyPPV45WtJv f8qb3dEcBmdB+KidpuGxI1UunE0Vg39Xb3mzjPh/A53VXmG/DGkwPad+HwNx1lvd+8Ee6ew1J63P1L7TO+Nag7hcAVf58fCqV9qT5BJFohuW7798np0WQBRi rMkxCi5dgjMkn/kD0b7a5IzvOGIbOIR6tmWb6Aktb5WY3cvBp6fz73Ym0ev5QTUPLJLabztk4oBGihINhLGqvg== X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 01:21:29 -0000 In message <129d6f78-e3c6-5d18-9466-a97ca1b11f76@FreeBSD.org>, Pedro Giffuni wr ites: > Hello; > > On 06/15/16 01:14, Konstantin Belousov wrote: > > On Tue, Jun 14, 2016 at 11:41:08PM +0000, Pedro F. Giffuni wrote: > >> Author: pfg > >> Date: Tue Jun 14 23:41:07 2016 > >> New Revision: 301899 > >> URL: https://svnweb.freebsd.org/changeset/base/301899 > >> > >> Log: > >> am-utils: Disable keyword expansion. > >> > >> As recommended in the Committers guide section 5.4.4.1.2. > > Wouldn't it be better to remove amd before 11 ? > > > > Yes, that would be better. > > FWIW, I was only investigating a README.autofs file in > the upstream distribution but I have *no* plans to > touch any of this, especially not during a code freeze. It doesn't look like there is anything FreeBSD specific in our amd that is not in am-utils. I spent many years as a Solaris (and many other platforms which don't exist any more) admin. I've always found amd, which I ran on SunOS 4, to be superior to automount as implemented by Sun and currently in use on Linux. (Amd supported NIS but not NIS+). It looks like our autofs is a re-implementation of that. For example, in an NIS (or LDAP) map one could have, * host==cwsys;type:=link;fs:=/export/home/${key} \ host==slippy;type:=link;fs:=/export/home/${key} \ host==oslippy;type:=link;fs:=/export/home/${key} \ host==beastie;rhost:=slippy6;rfs:=/export/home/${key};type:=nfs;fs:=${autodir}/${key} \ host==bob;rhost:=cwsys;rfs:=/export/home/${key};type:=nfs;fs:=${autodir}/${key} \ host==bob;rhost:=cwsys2;rfs:=/export/home/${key};type:=nfs;fs:=${autodir}/${key} \ host==bob;rhost:=slippy;rfs:=/export/home/${key};type:=nfs;fs:=${autodir}/${key} (Hopefully exmh won't munge the above beyond recognition.) The above allows for failover and also allows an admin to specify different mappings for different client systems. Unfortunately automount as originally implemented by Sun never allowed such flexibility unless maps were copied to individual servers, even if multiple servers shared the same maps. I suppose we could extend our automount daemons support this but unfortunately it wouldn't be compatible with anything Solaris or Linux. IIRC many Linux distros have replaced automountd with systemd whereas IMO looking at the direction Solaris is going I'd put money on it being irrelevant in the mid future so, this may not be a big argument against extending our autofs to support this. I will lament the loss of such a powerful tool from base. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-vendor@freebsd.org Sat Jun 18 08:25:35 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 476A5A799CB; Sat, 18 Jun 2016 08:25:35 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11DAA1527; Sat, 18 Jun 2016 08:25:35 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5I8PY0N047616; Sat, 18 Jun 2016 08:25:34 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5I8PWHo047593; Sat, 18 Jun 2016 08:25:32 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201606180825.u5I8PWHo047593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Sat, 18 Jun 2016 08:25:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r302003 - in vendor/libarchive/dist: . cat/test cpio/test libarchive libarchive/test tar tar/test X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2016 08:25:35 -0000 Author: mm Date: Sat Jun 18 08:25:31 2016 New Revision: 302003 URL: https://svnweb.freebsd.org/changeset/base/302003 Log: Update vendor/libarchive to git d85976e7ff4a062e1de6e04dab7bb78e3344768f Fixed vendor issues: Issue 553: Fix broken decryption for ZIP files Issue 657: Allow up to 8k for the test root directory name Issue 682: Correctly write gnutar filenames of exactly 512 bytes Issue 708: tar should fail if a named input file is missing PR 715: Fix libarchive/archive_read_support_format_mtree.c:1388:11: error: array subscript is above array bounds Added: vendor/libarchive/dist/cpio/test/test_missing_file.c (contents, props changed) vendor/libarchive/dist/libarchive/test/test_write_format_gnutar_filenames.c (contents, props changed) vendor/libarchive/dist/tar/test/test_missing_file.c (contents, props changed) Modified: vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/cat/test/main.c vendor/libarchive/dist/configure.ac vendor/libarchive/dist/cpio/test/CMakeLists.txt vendor/libarchive/dist/cpio/test/main.c vendor/libarchive/dist/libarchive/archive_entry_xattr.c vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c vendor/libarchive/dist/libarchive/archive_write_disk_windows.c vendor/libarchive/dist/libarchive/archive_write_filter.3 vendor/libarchive/dist/libarchive/archive_write_set_format_gnutar.c vendor/libarchive/dist/libarchive/archive_write_set_format_iso9660.c vendor/libarchive/dist/libarchive/archive_write_set_options.3 vendor/libarchive/dist/libarchive/libarchive-formats.5 vendor/libarchive/dist/libarchive/libarchive_changes.3 vendor/libarchive/dist/libarchive/test/CMakeLists.txt vendor/libarchive/dist/libarchive/test/main.c vendor/libarchive/dist/tar/test/CMakeLists.txt vendor/libarchive/dist/tar/test/main.c vendor/libarchive/dist/tar/write.c Modified: vendor/libarchive/dist/Makefile.am ============================================================================== --- vendor/libarchive/dist/Makefile.am Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/Makefile.am Sat Jun 18 08:25:31 2016 (r302003) @@ -533,6 +533,7 @@ libarchive_test_SOURCES= \ libarchive/test/test_write_format_cpio_newc.c \ libarchive/test/test_write_format_cpio_odc.c \ libarchive/test/test_write_format_gnutar.c \ + libarchive/test/test_write_format_gnutar_filenames.c \ libarchive/test/test_write_format_iso9660.c \ libarchive/test/test_write_format_iso9660_boot.c \ libarchive/test/test_write_format_iso9660_empty.c \ @@ -909,6 +910,7 @@ bsdtar_test_SOURCES= \ tar/test/test_format_newc.c \ tar/test/test_help.c \ tar/test/test_leading_slash.c \ + tar/test/test_missing_file.c \ tar/test/test_option_C_upper.c \ tar/test/test_option_H_upper.c \ tar/test/test_option_L_upper.c \ @@ -1064,6 +1066,7 @@ bsdcpio_test_SOURCES= \ cpio/test/test_extract_cpio_xz.c \ cpio/test/test_format_newc.c \ cpio/test/test_gcpio_compat.c \ + cpio/test/test_missing_file.c \ cpio/test/test_option_0.c \ cpio/test/test_option_B_upper.c \ cpio/test/test_option_C_upper.c \ Modified: vendor/libarchive/dist/cat/test/main.c ============================================================================== --- vendor/libarchive/dist/cat/test/main.c Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/cat/test/main.c Sat Jun 18 08:25:31 2016 (r302003) @@ -2534,18 +2534,36 @@ usage(const char *program) static char * get_refdir(const char *d) { - char tried[512] = { '\0' }; - char buff[128]; - char *pwd, *p; + size_t tried_size, buff_size; + char *buff, *tried, *pwd = NULL, *p = NULL; + +#ifdef PATH_MAX + buff_size = PATH_MAX; +#else + buff_size = 8192; +#endif + buff = calloc(buff_size, 1); + if (buff == NULL) { + fprintf(stderr, "Unable to allocate memory\n"); + exit(1); + } + + /* Allocate a buffer to hold the various directories we checked. */ + tried_size = buff_size * 2; + tried = calloc(tried_size, 1); + if (tried == NULL) { + fprintf(stderr, "Unable to allocate memory\n"); + exit(1); + } /* If a dir was specified, try that */ if (d != NULL) { pwd = NULL; - snprintf(buff, sizeof(buff), "%s", d); + snprintf(buff, buff_size, "%s", d); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); goto failure; } @@ -2559,48 +2577,48 @@ get_refdir(const char *d) pwd[strlen(pwd) - 1] = '\0'; /* Look for a known file. */ - snprintf(buff, sizeof(buff), "%s", pwd); + snprintf(buff, buff_size, "%s", pwd); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); - snprintf(buff, sizeof(buff), "%s/test", pwd); + snprintf(buff, buff_size, "%s/test", pwd); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); #if defined(LIBRARY) - snprintf(buff, sizeof(buff), "%s/%s/test", pwd, LIBRARY); + snprintf(buff, buff_size, "%s/%s/test", pwd, LIBRARY); #else - snprintf(buff, sizeof(buff), "%s/%s/test", pwd, PROGRAM); + snprintf(buff, buff_size, "%s/%s/test", pwd, PROGRAM); #endif p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); #if defined(PROGRAM_ALIAS) - snprintf(buff, sizeof(buff), "%s/%s/test", pwd, PROGRAM_ALIAS); + snprintf(buff, buff_size, "%s/%s/test", pwd, PROGRAM_ALIAS); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); #endif if (memcmp(pwd, "/usr/obj", 8) == 0) { - snprintf(buff, sizeof(buff), "%s", pwd + 8); + snprintf(buff, buff_size, "%s", pwd + 8); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); - snprintf(buff, sizeof(buff), "%s/test", pwd + 8); + snprintf(buff, buff_size, "%s/test", pwd + 8); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); } failure: @@ -2615,7 +2633,12 @@ failure: success: free(p); free(pwd); - return strdup(buff); + free(tried); + + /* Copy result into a fresh buffer to reduce memory usage. */ + p = strdup(buff); + free(buff); + return p; } int Modified: vendor/libarchive/dist/configure.ac ============================================================================== --- vendor/libarchive/dist/configure.ac Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/configure.ac Sat Jun 18 08:25:31 2016 (r302003) @@ -252,7 +252,7 @@ esac # Checks for header files. AC_HEADER_DIRENT AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([acl/libacl.h attr/xattr.h copyfile.h ctype.h]) +AC_CHECK_HEADERS([copyfile.h ctype.h]) AC_CHECK_HEADERS([errno.h ext2fs/ext2_fs.h fcntl.h grp.h]) AC_CACHE_CHECK([whether EXT2_IOC_GETFLAGS is usable], @@ -272,7 +272,7 @@ AC_CHECK_HEADERS([linux/fiemap.h linux/f AC_CHECK_HEADERS([locale.h paths.h poll.h pthread.h pwd.h]) AC_CHECK_HEADERS([readpassphrase.h signal.h spawn.h]) AC_CHECK_HEADERS([stdarg.h stdint.h stdlib.h string.h]) -AC_CHECK_HEADERS([sys/acl.h sys/cdefs.h sys/extattr.h]) +AC_CHECK_HEADERS([sys/cdefs.h sys/extattr.h]) AC_CHECK_HEADERS([sys/ioctl.h sys/mkdev.h sys/mount.h]) AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/select.h sys/statfs.h sys/statvfs.h]) AC_CHECK_HEADERS([sys/time.h sys/utime.h sys/utsname.h sys/vfs.h]) @@ -644,7 +644,7 @@ AC_CHECK_MEMBER(struct dirent.d_namlen,, # Check for Extended Attributes support AC_ARG_ENABLE([xattr], AS_HELP_STRING([--disable-xattr], - [Enable Extended Attributes support (default: check)])) + [Disable Extended Attributes support (default: check)])) if test "x$enable_xattr" != "xno"; then AC_CHECK_HEADERS([attr/xattr.h]) @@ -670,9 +670,10 @@ fi # AC_ARG_ENABLE([acl], AS_HELP_STRING([--disable-acl], - [Enable ACL support (default: check)])) + [Disable ACL support (default: check)])) if test "x$enable_acl" != "xno"; then + AC_CHECK_HEADERS([acl/libacl.h]) AC_CHECK_HEADERS([sys/acl.h]) AC_CHECK_LIB([acl],[acl_get_file]) AC_CHECK_FUNCS([acl_create_entry acl_init acl_set_fd acl_set_fd_np acl_set_file]) Modified: vendor/libarchive/dist/cpio/test/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/cpio/test/CMakeLists.txt Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/cpio/test/CMakeLists.txt Sat Jun 18 08:25:31 2016 (r302003) @@ -25,6 +25,7 @@ IF(ENABLE_CPIO AND ENABLE_TEST) test_extract_cpio_xz test_format_newc.c test_gcpio_compat.c + test_missing_file.c test_option_0.c test_option_B_upper.c test_option_C_upper.c Modified: vendor/libarchive/dist/cpio/test/main.c ============================================================================== --- vendor/libarchive/dist/cpio/test/main.c Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/cpio/test/main.c Sat Jun 18 08:25:31 2016 (r302003) @@ -2535,18 +2535,36 @@ usage(const char *program) static char * get_refdir(const char *d) { - char tried[512] = { '\0' }; - char buff[128]; - char *pwd, *p; + size_t tried_size, buff_size; + char *buff, *tried, *pwd = NULL, *p = NULL; + +#ifdef PATH_MAX + buff_size = PATH_MAX; +#else + buff_size = 8192; +#endif + buff = calloc(buff_size, 1); + if (buff == NULL) { + fprintf(stderr, "Unable to allocate memory\n"); + exit(1); + } + + /* Allocate a buffer to hold the various directories we checked. */ + tried_size = buff_size * 2; + tried = calloc(tried_size, 1); + if (tried == NULL) { + fprintf(stderr, "Unable to allocate memory\n"); + exit(1); + } /* If a dir was specified, try that */ if (d != NULL) { pwd = NULL; - snprintf(buff, sizeof(buff), "%s", d); + snprintf(buff, buff_size, "%s", d); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); goto failure; } @@ -2560,48 +2578,48 @@ get_refdir(const char *d) pwd[strlen(pwd) - 1] = '\0'; /* Look for a known file. */ - snprintf(buff, sizeof(buff), "%s", pwd); + snprintf(buff, buff_size, "%s", pwd); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); - snprintf(buff, sizeof(buff), "%s/test", pwd); + snprintf(buff, buff_size, "%s/test", pwd); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); #if defined(LIBRARY) - snprintf(buff, sizeof(buff), "%s/%s/test", pwd, LIBRARY); + snprintf(buff, buff_size, "%s/%s/test", pwd, LIBRARY); #else - snprintf(buff, sizeof(buff), "%s/%s/test", pwd, PROGRAM); + snprintf(buff, buff_size, "%s/%s/test", pwd, PROGRAM); #endif p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); #if defined(PROGRAM_ALIAS) - snprintf(buff, sizeof(buff), "%s/%s/test", pwd, PROGRAM_ALIAS); + snprintf(buff, buff_size, "%s/%s/test", pwd, PROGRAM_ALIAS); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); #endif if (memcmp(pwd, "/usr/obj", 8) == 0) { - snprintf(buff, sizeof(buff), "%s", pwd + 8); + snprintf(buff, buff_size, "%s", pwd + 8); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); - snprintf(buff, sizeof(buff), "%s/test", pwd + 8); + snprintf(buff, buff_size, "%s/test", pwd + 8); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); } failure: @@ -2616,7 +2634,12 @@ failure: success: free(p); free(pwd); - return strdup(buff); + free(tried); + + /* Copy result into a fresh buffer to reduce memory usage. */ + p = strdup(buff); + free(buff); + return p; } int Added: vendor/libarchive/dist/cpio/test/test_missing_file.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/cpio/test/test_missing_file.c Sat Jun 18 08:25:31 2016 (r302003) @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2016 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 "test.h" +__FBSDID("$FreeBSD$"); + +DEFINE_TEST(test_missing_file) +{ + int r; + + assertMakeFile("file1", 0644, "file1"); + assertMakeFile("file2", 0644, "file2"); + + assertMakeFile("filelist1", 0644, "file1\nfile2\n"); + r = systemf("%s -o stdout1 2>stderr1", testprog); + assertEqualInt(r, 0); + assertTextFileContents("1 block\n", "stderr1"); + + assertMakeFile("filelist2", 0644, "file1\nfile2\nfile3\n"); + r = systemf("%s -o stdout2 2>stderr2", testprog); + assert(r != 0); + + assertMakeFile("filelist3", 0644, ""); + r = systemf("%s -o stdout3 2>stderr3", testprog); + assertEqualInt(r, 0); + assertTextFileContents("1 block\n", "stderr3"); + + assertMakeFile("filelist4", 0644, "file3\n"); + r = systemf("%s -o stdout4 2>stderr4", testprog); + assert(r != 0); +} Modified: vendor/libarchive/dist/libarchive/archive_entry_xattr.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry_xattr.c Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/libarchive/archive_entry_xattr.c Sat Jun 18 08:25:31 2016 (r302003) @@ -91,16 +91,11 @@ archive_entry_xattr_add_entry(struct arc { 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; + __archive_errx(1, "Out of memory"); if ((xp->name = strdup(name)) == NULL) - /* XXX Error XXX */ - return; + __archive_errx(1, "Out of memory"); if ((xp->value = malloc(size)) != NULL) { memcpy(xp->value, value, size); Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c Sat Jun 18 08:25:31 2016 (r302003) @@ -1385,12 +1385,12 @@ parse_device(dev_t *pdev, struct archive "Missing number"); return ARCHIVE_WARN; } - numbers[argc++] = (unsigned long)mtree_atol(&p); - if (argc > MAX_PACK_ARGS) { + if (argc >= MAX_PACK_ARGS) { archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, "Too many arguments"); return ARCHIVE_WARN; } + numbers[argc++] = (unsigned long)mtree_atol(&p); } if (argc < 2) { archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c Sat Jun 18 08:25:31 2016 (r302003) @@ -181,6 +181,14 @@ struct zip { char init_decryption; /* Decryption buffer. */ + /* + * The decrypted data starts at decrypted_ptr and + * extends for decrypted_bytes_remaining. Decryption + * adds new data to the end of this block, data is returned + * to clients from the beginning. When the block hits the + * end of decrypted_buffer, it has to be shuffled back to + * the beginning of the buffer. + */ unsigned char *decrypted_buffer; unsigned char *decrypted_ptr; size_t decrypted_buffer_size; @@ -1293,8 +1301,9 @@ zip_read_data_deflate(struct archive_rea if (zip->tctx_valid || zip->cctx_valid) { if (zip->decrypted_bytes_remaining < (size_t)bytes_avail) { - size_t buff_remaining = zip->decrypted_buffer_size - - (zip->decrypted_ptr - zip->decrypted_buffer); + size_t buff_remaining = + (zip->decrypted_buffer + zip->decrypted_buffer_size) + - (zip->decrypted_ptr + zip->decrypted_bytes_remaining); if (buff_remaining > (size_t)bytes_avail) buff_remaining = (size_t)bytes_avail; Modified: vendor/libarchive/dist/libarchive/archive_write_disk_windows.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_windows.c Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/libarchive/archive_write_disk_windows.c Sat Jun 18 08:25:31 2016 (r302003) @@ -468,9 +468,17 @@ permissive_name_w(struct archive_write_d return (-1); archive_wstring_ensure(&(a->_name_data), 4 + l + 1 + wcslen(wn) + 1); a->name = a->_name_data.s; - /* Prepend "\\?\" and drive name. */ - archive_wstrncpy(&(a->_name_data), L"\\\\?\\", 4); - archive_wstrncat(&(a->_name_data), wsp, l); + /* Prepend "\\?\" and drive name if not already added. */ + if (l > 3 && wsp[0] == L'\\' && wsp[1] == L'\\' && + wsp[2] == L'?' && wsp[3] == L'\\') + { + archive_wstrncpy(&(a->_name_data), wsp, l); + } + else + { + archive_wstrncpy(&(a->_name_data), L"\\\\?\\", 4); + archive_wstrncat(&(a->_name_data), wsp, l); + } archive_wstrncat(&(a->_name_data), L"\\", 1); archive_wstrcat(&(a->_name_data), wn); a->name = a->_name_data.s; Modified: vendor/libarchive/dist/libarchive/archive_write_filter.3 ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_filter.3 Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/libarchive/archive_write_filter.3 Sat Jun 18 08:25:31 2016 (r302003) @@ -43,6 +43,7 @@ .Nm archive_write_add_filter_program , .Nm archive_write_add_filter_uuencode , .Nm archive_write_add_filter_xz +.Nd functions enabling output filters .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) .Sh SYNOPSIS Modified: vendor/libarchive/dist/libarchive/archive_write_set_format_gnutar.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_set_format_gnutar.c Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/libarchive/archive_write_set_format_gnutar.c Sat Jun 18 08:25:31 2016 (r302003) @@ -467,7 +467,7 @@ archive_write_gnutar_header(struct archi } } if (gnutar->linkname_length > GNUTAR_linkname_size) { - size_t todo = gnutar->linkname_length; + size_t length = gnutar->linkname_length + 1; struct archive_entry *temp = archive_entry_new2(&a->archive); /* Uname/gname here don't really matter since no one reads them; @@ -476,7 +476,7 @@ archive_write_gnutar_header(struct archi archive_entry_set_gname(temp, "wheel"); archive_entry_set_pathname(temp, "././@LongLink"); - archive_entry_set_size(temp, gnutar->linkname_length + 1); + archive_entry_set_size(temp, length); ret = archive_format_gnutar_header(a, buff, temp, 'K'); if (ret < ARCHIVE_WARN) goto exit_write_header; @@ -484,11 +484,12 @@ archive_write_gnutar_header(struct archi if(ret < ARCHIVE_WARN) goto exit_write_header; archive_entry_free(temp); - /* Write as many 512 bytes blocks as needed to write full name. */ - ret = __archive_write_output(a, gnutar->linkname, todo); + /* Write name and trailing null byte. */ + ret = __archive_write_output(a, gnutar->linkname, length); if(ret < ARCHIVE_WARN) goto exit_write_header; - ret = __archive_write_nulls(a, 0x1ff & (-(ssize_t)todo)); + /* Pad to 512 bytes */ + ret = __archive_write_nulls(a, 0x1ff & (-(ssize_t)length)); if (ret < ARCHIVE_WARN) goto exit_write_header; } @@ -496,7 +497,7 @@ archive_write_gnutar_header(struct archi /* If pathname is longer than 100 chars we need to add an 'L' header. */ if (gnutar->pathname_length > GNUTAR_name_size) { const char *pathname = gnutar->pathname; - size_t todo = gnutar->pathname_length; + size_t length = gnutar->pathname_length + 1; struct archive_entry *temp = archive_entry_new2(&a->archive); /* Uname/gname here don't really matter since no one reads them; @@ -505,7 +506,7 @@ archive_write_gnutar_header(struct archi archive_entry_set_gname(temp, "wheel"); archive_entry_set_pathname(temp, "././@LongLink"); - archive_entry_set_size(temp, gnutar->pathname_length + 1); + archive_entry_set_size(temp, length); ret = archive_format_gnutar_header(a, buff, temp, 'L'); if (ret < ARCHIVE_WARN) goto exit_write_header; @@ -513,11 +514,12 @@ archive_write_gnutar_header(struct archi if(ret < ARCHIVE_WARN) goto exit_write_header; archive_entry_free(temp); - /* Write as many 512 bytes blocks as needed to write full name. */ - ret = __archive_write_output(a, pathname, todo); + /* Write pathname + trailing null byte. */ + ret = __archive_write_output(a, pathname, length); if(ret < ARCHIVE_WARN) goto exit_write_header; - ret = __archive_write_nulls(a, 0x1ff & (-(ssize_t)todo)); + /* Pad to multiple of 512 bytes. */ + ret = __archive_write_nulls(a, 0x1ff & (-(ssize_t)length)); if (ret < ARCHIVE_WARN) goto exit_write_header; } Modified: vendor/libarchive/dist/libarchive/archive_write_set_format_iso9660.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_set_format_iso9660.c Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/libarchive/archive_write_set_format_iso9660.c Sat Jun 18 08:25:31 2016 (r302003) @@ -6225,7 +6225,7 @@ isoent_gen_joliet_identifier(struct arch unsigned char *p; size_t l; int r; - int ffmax, parent_len; + size_t ffmax, parent_len; static const struct archive_rb_tree_ops rb_ops = { isoent_cmp_node_joliet, isoent_cmp_key_joliet }; @@ -6239,7 +6239,7 @@ isoent_gen_joliet_identifier(struct arch else ffmax = 128; - r = idr_start(a, idr, isoent->children.cnt, ffmax, 6, 2, &rb_ops); + r = idr_start(a, idr, isoent->children.cnt, (int)ffmax, 6, 2, &rb_ops); if (r < 0) return (r); @@ -6252,7 +6252,7 @@ isoent_gen_joliet_identifier(struct arch int ext_off, noff, weight; size_t lt; - if ((int)(l = np->file->basename_utf16.length) > ffmax) + if ((l = np->file->basename_utf16.length) > ffmax) l = ffmax; p = malloc((l+1)*2); @@ -6285,7 +6285,7 @@ isoent_gen_joliet_identifier(struct arch /* * Get a length of MBS of a full-pathname. */ - if ((int)np->file->basename_utf16.length > ffmax) { + if (np->file->basename_utf16.length > ffmax) { if (archive_strncpy_l(&iso9660->mbs, (const char *)np->identifier, l, iso9660->sconv_from_utf16be) != 0 && @@ -6302,7 +6302,9 @@ isoent_gen_joliet_identifier(struct arch /* If a length of full-pathname is longer than 240 bytes, * it violates Joliet extensions regulation. */ - if (parent_len + np->mb_len > 240) { + if (parent_len > 240 + || np->mb_len > 240 + || parent_len + np->mb_len > 240) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "The regulation of Joliet extensions;" " A length of a full-pathname of `%s' is " @@ -6314,11 +6316,11 @@ isoent_gen_joliet_identifier(struct arch /* Make an offset of the number which is used to be set * hexadecimal number to avoid duplicate identifier. */ - if ((int)l == ffmax) + if (l == ffmax) noff = ext_off - 6; - else if ((int)l == ffmax-2) + else if (l == ffmax-2) noff = ext_off - 4; - else if ((int)l == ffmax-4) + else if (l == ffmax-4) noff = ext_off - 2; else noff = ext_off; Modified: vendor/libarchive/dist/libarchive/archive_write_set_options.3 ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_set_options.3 Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/libarchive/archive_write_set_options.3 Sat Jun 18 08:25:31 2016 (r302003) @@ -32,7 +32,7 @@ .Nm archive_write_set_format_option , .Nm archive_write_set_option , .Nm archive_write_set_options -.Nd functions controlling options for reading archives +.Nd functions controlling options for writing archives .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) .Sh SYNOPSIS Modified: vendor/libarchive/dist/libarchive/libarchive-formats.5 ============================================================================== --- vendor/libarchive/dist/libarchive/libarchive-formats.5 Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/libarchive/libarchive-formats.5 Sat Jun 18 08:25:31 2016 (r302003) @@ -65,7 +65,6 @@ Later variants have extended this by eit areas of the header record, extending the header to multiple records, or by storing special entries that modify the interpretation of subsequent entries. -.Pp .Bl -tag -width indent .It Cm gnutar The Modified: vendor/libarchive/dist/libarchive/libarchive_changes.3 ============================================================================== --- vendor/libarchive/dist/libarchive/libarchive_changes.3 Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/libarchive/libarchive_changes.3 Sat Jun 18 08:25:31 2016 (r302003) @@ -28,7 +28,7 @@ .Dt LIBARCHIVE_CHANGES 3 .Os .Sh NAME -.Nm changes in libarchive interface +.Nd changes in libarchive interface .\" .Sh CHANGES IN LIBARCHIVE 3 This page describes user-visible changes in libarchive3, and lists Modified: vendor/libarchive/dist/libarchive/test/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/libarchive/test/CMakeLists.txt Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/libarchive/test/CMakeLists.txt Sat Jun 18 08:25:31 2016 (r302003) @@ -222,6 +222,7 @@ IF(ENABLE_TEST) test_write_format_cpio_newc.c test_write_format_cpio_odc.c test_write_format_gnutar.c + test_write_format_gnutar_filenames.c test_write_format_iso9660.c test_write_format_iso9660_boot.c test_write_format_iso9660_empty.c Modified: vendor/libarchive/dist/libarchive/test/main.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/main.c Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/libarchive/test/main.c Sat Jun 18 08:25:31 2016 (r302003) @@ -2533,18 +2533,36 @@ usage(const char *program) static char * get_refdir(const char *d) { - char tried[512] = { '\0' }; - char buff[128]; - char *pwd, *p; + size_t tried_size, buff_size; + char *buff, *tried, *pwd = NULL, *p = NULL; + +#ifdef PATH_MAX + buff_size = PATH_MAX; +#else + buff_size = 8192; +#endif + buff = calloc(buff_size, 1); + if (buff == NULL) { + fprintf(stderr, "Unable to allocate memory\n"); + exit(1); + } + + /* Allocate a buffer to hold the various directories we checked. */ + tried_size = buff_size * 2; + tried = calloc(tried_size, 1); + if (tried == NULL) { + fprintf(stderr, "Unable to allocate memory\n"); + exit(1); + } /* If a dir was specified, try that */ if (d != NULL) { pwd = NULL; - snprintf(buff, sizeof(buff), "%s", d); + snprintf(buff, buff_size, "%s", d); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); goto failure; } @@ -2558,48 +2576,48 @@ get_refdir(const char *d) pwd[strlen(pwd) - 1] = '\0'; /* Look for a known file. */ - snprintf(buff, sizeof(buff), "%s", pwd); + snprintf(buff, buff_size, "%s", pwd); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); - snprintf(buff, sizeof(buff), "%s/test", pwd); + snprintf(buff, buff_size, "%s/test", pwd); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); #if defined(LIBRARY) - snprintf(buff, sizeof(buff), "%s/%s/test", pwd, LIBRARY); + snprintf(buff, buff_size, "%s/%s/test", pwd, LIBRARY); #else - snprintf(buff, sizeof(buff), "%s/%s/test", pwd, PROGRAM); + snprintf(buff, buff_size, "%s/%s/test", pwd, PROGRAM); #endif p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); #if defined(PROGRAM_ALIAS) - snprintf(buff, sizeof(buff), "%s/%s/test", pwd, PROGRAM_ALIAS); + snprintf(buff, buff_size, "%s/%s/test", pwd, PROGRAM_ALIAS); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); #endif if (memcmp(pwd, "/usr/obj", 8) == 0) { - snprintf(buff, sizeof(buff), "%s", pwd + 8); + snprintf(buff, buff_size, "%s", pwd + 8); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); - snprintf(buff, sizeof(buff), "%s/test", pwd + 8); + snprintf(buff, buff_size, "%s/test", pwd + 8); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); } failure: @@ -2614,7 +2632,12 @@ failure: success: free(p); free(pwd); - return strdup(buff); + free(tried); + + /* Copy result into a fresh buffer to reduce memory usage. */ + p = strdup(buff); + free(buff); + return p; } int Added: vendor/libarchive/dist/libarchive/test/test_write_format_gnutar_filenames.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/libarchive/test/test_write_format_gnutar_filenames.c Sat Jun 18 08:25:31 2016 (r302003) @@ -0,0 +1,145 @@ +/*- + * Copyright (c) 2016 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 "test.h" +__FBSDID("$FreeBSD$"); + +/* + * Inspired by Github issue #682, which reported that gnutar filenames + * of exactly 512 bytes weren't getting written correctly. + * + * This writes a filename of every length from 1 to 2000 bytes and + * reads back to verify it. + */ + +static char filename[1024]; + +DEFINE_TEST(test_write_format_gnutar_filenames) +{ + size_t buffsize = 1000000; + char *buff; + struct archive_entry *ae, *template; + struct archive *a; + size_t used; + + buff = malloc(buffsize); /* million bytes of work area */ + assert(buff != NULL); + + /* Create a template entry. */ + assert((template = archive_entry_new()) != NULL); + archive_entry_set_atime(template, 2, 20); + archive_entry_set_birthtime(template, 3, 30); + archive_entry_set_ctime(template, 4, 40); + archive_entry_set_mtime(template, 5, 50); + archive_entry_set_mode(template, S_IFREG | 0755); + archive_entry_set_size(template, 8); + + for (int i = 0; i < 2000; ++i) { + filename[i] = 'a'; + filename[i + 1] = '\0'; + archive_entry_copy_pathname(template, filename); + + /* Write a one-item gnutar format archive. */ + assert((a = archive_write_new()) != NULL); + assertA(0 == archive_write_set_format_gnutar(a)); + assertA(0 == archive_write_add_filter_none(a)); + assertA(0 == archive_write_open_memory(a, buff, buffsize, &used)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, template)); + assertEqualIntA(a, 8, archive_write_data(a, "12345678", 9)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_free(a)); + + + /* Read back and verify the filename. */ + assert((a = archive_read_new()) != NULL); + assertEqualIntA(a, 0, archive_read_support_format_all(a)); + assertEqualIntA(a, 0, archive_read_support_filter_all(a)); + assertEqualIntA(a, 0, archive_read_open_memory(a, buff, used)); + + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualString(filename, archive_entry_pathname(ae)); + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); + } + + archive_entry_free(template); + + free(buff); +} + + +DEFINE_TEST(test_write_format_gnutar_linknames) +{ + size_t buffsize = 1000000; + char *buff; + struct archive_entry *ae, *template; + struct archive *a; + size_t used; + + buff = malloc(buffsize); /* million bytes of work area */ + assert(buff != NULL); + + /* Create a template entry. */ + assert((template = archive_entry_new()) != NULL); + archive_entry_set_atime(template, 2, 20); + archive_entry_set_birthtime(template, 3, 30); + archive_entry_set_ctime(template, 4, 40); + archive_entry_set_mtime(template, 5, 50); + archive_entry_set_mode(template, S_IFLNK | 0755); + archive_entry_copy_pathname(template, "link"); + + for (int i = 0; i < 2000; ++i) { + filename[i] = 'a'; + filename[i + 1] = '\0'; + archive_entry_copy_symlink(template, filename); + + /* Write a one-item gnutar format archive. */ + assert((a = archive_write_new()) != NULL); + assertA(0 == archive_write_set_format_gnutar(a)); + assertA(0 == archive_write_add_filter_none(a)); + assertA(0 == archive_write_open_memory(a, buff, buffsize, &used)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, template)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_free(a)); + + + /* Read back and verify the filename. */ + assert((a = archive_read_new()) != NULL); + assertEqualIntA(a, 0, archive_read_support_format_all(a)); + assertEqualIntA(a, 0, archive_read_support_filter_all(a)); + assertEqualIntA(a, 0, archive_read_open_memory(a, buff, used)); + + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualString("link", archive_entry_pathname(ae)); + assertEqualString(filename, archive_entry_symlink(ae)); + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); + } + + archive_entry_free(template); + + free(buff); +} Modified: vendor/libarchive/dist/tar/test/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/tar/test/CMakeLists.txt Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/tar/test/CMakeLists.txt Sat Jun 18 08:25:31 2016 (r302003) @@ -25,6 +25,7 @@ IF(ENABLE_TAR AND ENABLE_TEST) test_format_newc.c test_help.c test_leading_slash.c + test_missing_file.c test_option_C_upper.c test_option_H_upper.c test_option_L_upper.c Modified: vendor/libarchive/dist/tar/test/main.c ============================================================================== --- vendor/libarchive/dist/tar/test/main.c Sat Jun 18 01:23:38 2016 (r302002) +++ vendor/libarchive/dist/tar/test/main.c Sat Jun 18 08:25:31 2016 (r302003) @@ -2535,18 +2535,36 @@ usage(const char *program) static char * get_refdir(const char *d) { - char tried[512] = { '\0' }; - char buff[128]; - char *pwd, *p; + size_t tried_size, buff_size; + char *buff, *tried, *pwd = NULL, *p = NULL; + +#ifdef PATH_MAX + buff_size = PATH_MAX; +#else + buff_size = 8192; +#endif + buff = calloc(buff_size, 1); + if (buff == NULL) { + fprintf(stderr, "Unable to allocate memory\n"); + exit(1); + } + + /* Allocate a buffer to hold the various directories we checked. */ + tried_size = buff_size * 2; + tried = calloc(tried_size, 1); + if (tried == NULL) { + fprintf(stderr, "Unable to allocate memory\n"); + exit(1); + } /* If a dir was specified, try that */ if (d != NULL) { pwd = NULL; - snprintf(buff, sizeof(buff), "%s", d); + snprintf(buff, buff_size, "%s", d); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; - strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); - strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + strncat(tried, buff, tried_size - strlen(tried) - 1); + strncat(tried, "\n", tried_size - strlen(tried) - 1); goto failure; } @@ -2560,48 +2578,48 @@ get_refdir(const char *d) pwd[strlen(pwd) - 1] = '\0'; /* Look for a known file. */ - snprintf(buff, sizeof(buff), "%s", pwd); + snprintf(buff, buff_size, "%s", pwd); p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); if (p != NULL) goto success; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***