From owner-svn-src-stable-6@FreeBSD.ORG Sun Jan 17 13:24:29 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F40D106568B; Sun, 17 Jan 2010 13:24:29 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D6EF8FC1C; Sun, 17 Jan 2010 13:24:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDOT1D034515; Sun, 17 Jan 2010 13:24:29 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDOTZj034513; Sun, 17 Jan 2010 13:24:29 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171324.o0HDOTZj034513@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202472 - stable/6/sys/netinet6 X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 13:24:29 -0000 Author: bz Date: Sun Jan 17 13:24:28 2010 New Revision: 202472 URL: http://svn.freebsd.org/changeset/base/202472 Log: MFC r201688: Correct a typo. Submitted by: sn_ (sn_ gmx.net) on hackers@ Modified: stable/6/sys/netinet6/icmp6.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/netinet6/icmp6.c ============================================================================== --- stable/6/sys/netinet6/icmp6.c Sun Jan 17 13:24:15 2010 (r202471) +++ stable/6/sys/netinet6/icmp6.c Sun Jan 17 13:24:28 2010 (r202472) @@ -281,7 +281,7 @@ icmp6_error(m, type, code, param) * we should basically suppress sending an error (RFC 2463, Section * 2.4). * We have two exceptions (the item e.2 in that section): - * - the Pakcet Too Big message can be sent for path MTU discovery. + * - the Packet Too Big message can be sent for path MTU discovery. * - the Parameter Problem Message that can be allowed an icmp6 error * in the option type field. This check has been done in * ip6_unknown_opt(), so we can just check the type and code. From owner-svn-src-stable-6@FreeBSD.ORG Sun Jan 17 13:32:15 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12DDE1065700; Sun, 17 Jan 2010 13:32:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0154B8FC08; Sun, 17 Jan 2010 13:32:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDWEQb036544; Sun, 17 Jan 2010 13:32:14 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDWEKn036542; Sun, 17 Jan 2010 13:32:14 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171332.o0HDWEKn036542@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:32:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202476 - stable/6/sys/opencrypto X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 13:32:15 -0000 Author: bz Date: Sun Jan 17 13:32:14 2010 New Revision: 202476 URL: http://svn.freebsd.org/changeset/base/202476 Log: MFC r187826: While OpenBSD's crypto/ framework has sha1 and md5 implementations that can cope with a result buffer of NULL in the "Final" function, we cannot. Thus pass in a temporary buffer long enough for either md5 or sha1 results so that we do not panic. PR: bin/126468 Reviewed by: cperciva Modified: stable/6/sys/opencrypto/cryptosoft.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/opencrypto/cryptosoft.c ============================================================================== --- stable/6/sys/opencrypto/cryptosoft.c Sun Jan 17 13:31:48 2010 (r202475) +++ stable/6/sys/opencrypto/cryptosoft.c Sun Jan 17 13:32:14 2010 (r202476) @@ -425,12 +425,17 @@ swcr_authprepare(struct auth_hash *axf, break; case CRYPTO_MD5_KPDK: case CRYPTO_SHA1_KPDK: + { + /* We need a buffer that can hold an md5 and a sha1 result. */ + u_char buf[SHA1_RESULTLEN]; + sw->sw_klen = klen; bcopy(key, sw->sw_octx, klen); axf->Init(sw->sw_ictx); axf->Update(sw->sw_ictx, key, klen); - axf->Final(NULL, sw->sw_ictx); + axf->Final(buf, sw->sw_ictx); break; + } default: printf("%s: CRD_F_KEY_EXPLICIT flag given, but algorithm %d " "doesn't use keys.\n", __func__, axf->type); From owner-svn-src-stable-6@FreeBSD.ORG Sun Jan 17 13:36:40 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 999EF1065693; Sun, 17 Jan 2010 13:36:40 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 879B78FC1A; Sun, 17 Jan 2010 13:36:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDae6m037764; Sun, 17 Jan 2010 13:36:40 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDaesC037761; Sun, 17 Jan 2010 13:36:40 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171336.o0HDaesC037761@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202479 - in stable/6: . sys/opencrypto X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 13:36:40 -0000 Author: bz Date: Sun Jan 17 13:36:40 2010 New Revision: 202479 URL: http://svn.freebsd.org/changeset/base/202479 Log: MFC r201898: Add comments trying to explain what bad things happen here, i.e. how hashed MD5/SHA are implemented, abusing Final() for padding and sw_octx to transport the key from the beginning to the end. Enlightened about what was going on here by: cperciva Reviewed by: cperciva Modified: stable/6/Makefile (contents, props changed) stable/6/sys/opencrypto/cryptosoft.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/Makefile ============================================================================== --- stable/6/Makefile Sun Jan 17 13:36:25 2010 (r202478) +++ stable/6/Makefile Sun Jan 17 13:36:40 2010 (r202479) @@ -262,12 +262,14 @@ make: .PHONY # existing system is. # .if make(universe) +TARGETS?=alpha amd64 i386 ia64 pc98 powerpc sparc64 + universe: universe_prologue universe_prologue: @echo "--------------------------------------------------------------" @echo ">>> make universe started on ${STARTTIME}" @echo "--------------------------------------------------------------" -.for target in alpha amd64 i386 ia64 pc98 powerpc sparc64 +.for target in ${TARGETS} KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \ find [A-Z]*[A-Z] -type f -maxdepth 0 \ ! -name DEFAULTS ! -name LINT @@ -275,22 +277,30 @@ KERNCONFS:= ${KERNCONFS:S/^NOTES$/LINT/} universe: universe_${target} .ORDER: universe_prologue universe_${target} universe_epilogue universe_${target}: +.if !defined(MAKE_JUST_KERNELS) @echo ">> ${target} started on `LC_ALL=C date`" - -cd ${.CURDIR} && ${MAKE} ${JFLAG} buildworld \ + @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ + ${MAKE} ${JFLAG} buildworld \ TARGET=${target} \ - __MAKE_CONF=/dev/null \ - > _.${target}.buildworld 2>&1 + > _.${target}.buildworld 2>&1 || \ + echo "${target} world failed," \ + "check _.${target}.buildworld for details") @echo ">> ${target} buildworld completed on `LC_ALL=C date`" +.endif .if exists(${.CURDIR}/sys/${target}/conf/NOTES) - -cd ${.CURDIR}/sys/${target}/conf && ${MAKE} LINT \ - > ${.CURDIR}/_.${target}.makeLINT 2>&1 + @(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \ + ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ + echo "${target} 'make LINT' failed," \ + "check _.${target}.makeLINT for details") .endif .for kernel in ${KERNCONFS} - -cd ${.CURDIR} && ${MAKE} ${JFLAG} buildkernel \ + @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ + ${MAKE} ${JFLAG} buildkernel \ TARGET=${target} \ KERNCONF=${kernel} \ - __MAKE_CONF=/dev/null \ - > _.${target}.${kernel} 2>&1 + > _.${target}.${kernel} 2>&1 || \ + echo "${target} ${kernel} kernel failed," \ + "check _.${target}.${kernel} for details") .endfor @echo ">> ${target} completed on `LC_ALL=C date`" .endfor Modified: stable/6/sys/opencrypto/cryptosoft.c ============================================================================== --- stable/6/sys/opencrypto/cryptosoft.c Sun Jan 17 13:36:25 2010 (r202478) +++ stable/6/sys/opencrypto/cryptosoft.c Sun Jan 17 13:36:40 2010 (r202479) @@ -426,7 +426,16 @@ swcr_authprepare(struct auth_hash *axf, case CRYPTO_MD5_KPDK: case CRYPTO_SHA1_KPDK: { - /* We need a buffer that can hold an md5 and a sha1 result. */ + /* + * We need a buffer that can hold an md5 and a sha1 result + * just to throw it away. + * What we do here is the initial part of: + * ALGO( key, keyfill, .. ) + * adding the key to sw_ictx and abusing Final() to get the + * "keyfill" padding. + * In addition we abuse the sw_octx to save the key to have + * it to be able to append it at the end in swcr_authcompute(). + */ u_char buf[SHA1_RESULTLEN]; sw->sw_klen = klen; @@ -487,9 +496,17 @@ swcr_authcompute(struct cryptodesc *crd, case CRYPTO_MD5_KPDK: case CRYPTO_SHA1_KPDK: + /* If we have no key saved, return error. */ if (sw->sw_octx == NULL) return EINVAL; + /* + * Add the trailing copy of the key (see comment in + * swcr_authprepare()) after the data: + * ALGO( .., key, algofill ) + * and let Final() do the proper, natural "algofill" + * padding. + */ axf->Update(&ctx, sw->sw_octx, sw->sw_klen); axf->Final(aalg, &ctx); break; From owner-svn-src-stable-6@FreeBSD.ORG Sun Jan 17 13:49:18 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99658106566C; Sun, 17 Jan 2010 13:49:18 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87D3F8FC1D; Sun, 17 Jan 2010 13:49:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDnIsp041016; Sun, 17 Jan 2010 13:49:18 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDnIR2041014; Sun, 17 Jan 2010 13:49:18 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171349.o0HDnIR2041014@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202483 - stable/6 X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 13:49:18 -0000 Author: bz Date: Sun Jan 17 13:49:18 2010 New Revision: 202483 URL: http://svn.freebsd.org/changeset/base/202483 Log: Backup this part of r202479 which was not meant to be committed along with the merge of r201898. Modified: stable/6/Makefile (contents, props changed) Modified: stable/6/Makefile ============================================================================== --- stable/6/Makefile Sun Jan 17 13:45:33 2010 (r202482) +++ stable/6/Makefile Sun Jan 17 13:49:18 2010 (r202483) @@ -262,14 +262,12 @@ make: .PHONY # existing system is. # .if make(universe) -TARGETS?=alpha amd64 i386 ia64 pc98 powerpc sparc64 - universe: universe_prologue universe_prologue: @echo "--------------------------------------------------------------" @echo ">>> make universe started on ${STARTTIME}" @echo "--------------------------------------------------------------" -.for target in ${TARGETS} +.for target in alpha amd64 i386 ia64 pc98 powerpc sparc64 KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \ find [A-Z]*[A-Z] -type f -maxdepth 0 \ ! -name DEFAULTS ! -name LINT @@ -277,30 +275,22 @@ KERNCONFS:= ${KERNCONFS:S/^NOTES$/LINT/} universe: universe_${target} .ORDER: universe_prologue universe_${target} universe_epilogue universe_${target}: -.if !defined(MAKE_JUST_KERNELS) @echo ">> ${target} started on `LC_ALL=C date`" - @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ - ${MAKE} ${JFLAG} buildworld \ + -cd ${.CURDIR} && ${MAKE} ${JFLAG} buildworld \ TARGET=${target} \ - > _.${target}.buildworld 2>&1 || \ - echo "${target} world failed," \ - "check _.${target}.buildworld for details") + __MAKE_CONF=/dev/null \ + > _.${target}.buildworld 2>&1 @echo ">> ${target} buildworld completed on `LC_ALL=C date`" -.endif .if exists(${.CURDIR}/sys/${target}/conf/NOTES) - @(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \ - ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ - echo "${target} 'make LINT' failed," \ - "check _.${target}.makeLINT for details") + -cd ${.CURDIR}/sys/${target}/conf && ${MAKE} LINT \ + > ${.CURDIR}/_.${target}.makeLINT 2>&1 .endif .for kernel in ${KERNCONFS} - @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ - ${MAKE} ${JFLAG} buildkernel \ + -cd ${.CURDIR} && ${MAKE} ${JFLAG} buildkernel \ TARGET=${target} \ KERNCONF=${kernel} \ - > _.${target}.${kernel} 2>&1 || \ - echo "${target} ${kernel} kernel failed," \ - "check _.${target}.${kernel} for details") + __MAKE_CONF=/dev/null \ + > _.${target}.${kernel} 2>&1 .endfor @echo ">> ${target} completed on `LC_ALL=C date`" .endfor From owner-svn-src-stable-6@FreeBSD.ORG Sun Jan 17 13:55:09 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BF191065672; Sun, 17 Jan 2010 13:55:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id A2E518FC08; Sun, 17 Jan 2010 13:55:08 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id D3B0841C757; Sun, 17 Jan 2010 14:55:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id vxb-hqOz+Q5y; Sun, 17 Jan 2010 14:55:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 04EF241C75A; Sun, 17 Jan 2010 14:55:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 5CA0F4448EC; Sun, 17 Jan 2010 13:52:11 +0000 (UTC) Date: Sun, 17 Jan 2010 13:52:11 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org In-Reply-To: <201001171349.o0HDnIR2041014@svn.freebsd.org> Message-ID: <20100117135119.Q50938@maildrop.int.zabbadoz.net> References: <201001171349.o0HDnIR2041014@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r202483 - stable/6 X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 13:55:09 -0000 On Sun, 17 Jan 2010, Bjoern A. Zeeb wrote: > Author: bz > Date: Sun Jan 17 13:49:18 2010 > New Revision: 202483 > URL: http://svn.freebsd.org/changeset/base/202483 > > Log: > Backup this part of r202479 which was not meant to be committed along with s,Backup,Backout, something about this seriously doesn't like me;-) > the merge of r201898. > > Modified: > stable/6/Makefile (contents, props changed) -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-stable-6@FreeBSD.ORG Sun Jan 17 14:11:43 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58ABD106566C; Sun, 17 Jan 2010 14:11:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46D7C8FC19; Sun, 17 Jan 2010 14:11:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HEBhuk046396; Sun, 17 Jan 2010 14:11:43 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HEBhOC046394; Sun, 17 Jan 2010 14:11:43 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201001171411.o0HEBhOC046394@svn.freebsd.org> From: Ed Maste Date: Sun, 17 Jan 2010 14:11:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202484 - stable/6/bin/sh X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 14:11:43 -0000 Author: emaste Date: Sun Jan 17 14:11:42 2010 New Revision: 202484 URL: http://svn.freebsd.org/changeset/base/202484 Log: Log: MFC r197371: Mention that NUL characters are not allowed in sh(1) input. PR: bin/25542 Modified: stable/6/bin/sh/sh.1 Directory Properties: stable/6/bin/sh/ (props changed) Modified: stable/6/bin/sh/sh.1 ============================================================================== --- stable/6/bin/sh/sh.1 Sun Jan 17 13:49:18 2010 (r202483) +++ stable/6/bin/sh/sh.1 Sun Jan 17 14:11:42 2010 (r202484) @@ -370,6 +370,10 @@ introduces a comment if used at the begi The word starting with .Ql # and the rest of the line are ignored. +.Pp +.Tn ASCII +.Dv NUL +characters (character code 0) are not allowed in shell input. .Ss Quoting Quoting is used to remove the special meaning of certain characters or words to the shell, such as operators, whitespace, keywords, From owner-svn-src-stable-6@FreeBSD.ORG Sun Jan 17 17:40:31 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A00091065679; Sun, 17 Jan 2010 17:40:31 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CFD68FC26; Sun, 17 Jan 2010 17:40:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HHeVrb096610; Sun, 17 Jan 2010 17:40:31 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HHeVKD096607; Sun, 17 Jan 2010 17:40:31 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001171740.o0HHeVKD096607@svn.freebsd.org> From: Christian Brueffer Date: Sun, 17 Jan 2010 17:40:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202495 - in stable/6: share/man/man4 usr.sbin/faithd X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 17:40:31 -0000 Author: brueffer Date: Sun Jan 17 17:40:31 2010 New Revision: 202495 URL: http://svn.freebsd.org/changeset/base/202495 Log: MFC: r201870, r201889 Various language fixes. Also fixed the URL to totd, obtained from NetBSD. Modified: stable/6/share/man/man4/faith.4 stable/6/usr.sbin/faithd/faithd.8 Directory Properties: stable/6/share/man/man4/ (props changed) stable/6/usr.sbin/faithd/ (props changed) Modified: stable/6/share/man/man4/faith.4 ============================================================================== --- stable/6/share/man/man4/faith.4 Sun Jan 17 17:36:25 2010 (r202494) +++ stable/6/share/man/man4/faith.4 Sun Jan 17 17:40:31 2010 (r202495) @@ -58,15 +58,15 @@ variable in .Xr rc.conf 5 . .Pp Special action will be taken when IPv6 TCP traffic is seen on a router, -and routing table suggests to route it to +and the routing table suggests to route it to the .Nm interface. In this case, the packet will be accepted by the router, -regardless of list of IPv6 interface addresses assigned to the router. -The packet will be captured by an IPv6 TCP socket, if it has +regardless of the list of IPv6 interface addresses assigned to the router. +The packet will be captured by an IPv6 TCP socket, if it has the .Dv IN6P_FAITH -flag turned on and it has matching address/port pairs. -In result, +flag turned on and matching address/port pairs. +As a result, .Nm will let you capture IPv6 TCP traffic to some specific destination addresses. Userland programs, such as @@ -79,43 +79,42 @@ and perform application-specific address .Pp The .Dv IN6P_FAITH -flag on IPv6 TCP socket can be set by using +flag on a IPv6 TCP socket can be set by using .Xr setsockopt 2 , -with level equals to +with level .Dv IPPROTO_IPV6 -and optname equals to +and optname .Dv IPv6_FAITH . .Pp -To handle error reports by ICMPv6, some of ICMPv6 packets routed to +To handle error reports by ICMPv6, some ICMPv6 packets routed to an .Nm interface will be delivered to IPv6 TCP, as well. .Pp To understand how .Nm -can be used, take a look at source code of +can be used, take a look at the source code of .Xr faithd 8 . .Pp -As +As the .Nm -interface implements potentially dangerous operation, -great care must be taken when configuring -.Nm -interface. -To avoid possible misuse, +interface implements potentially dangerous operations, +great care must be taken when configuring it. +To avoid possible misuse, the .Xr sysctl 8 variable .Li net.inet6.ip6.keepfaith must be set to .Li 1 -prior to the use of the interface. +prior to using the interface. When .Li net.inet6.ip6.keepfaith is .Li 0 , -no packet will be captured by +no packets will be captured by the .Nm interface. .Pp +The .Nm interface is intended to be used on routers, not on hosts. .\" @@ -130,5 +129,5 @@ interface is intended to be used on rout .%O RFC3142 .Re .Sh HISTORY -The FAITH IPv6-to-IPv4 TCP relay translator was first appeared in +The FAITH IPv6-to-IPv4 TCP relay translator first appeared in the WIDE hydrangea IPv6 stack. Modified: stable/6/usr.sbin/faithd/faithd.8 ============================================================================== --- stable/6/usr.sbin/faithd/faithd.8 Sun Jan 17 17:36:25 2010 (r202494) +++ stable/6/usr.sbin/faithd/faithd.8 Sun Jan 17 17:40:31 2010 (r202495) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 1998 +.Dd January 9, 2010 .Dt FAITHD 8 .Os .Sh NAME @@ -44,20 +44,18 @@ .Sh DESCRIPTION The .Nm -utility provides IPv6-to-IPv4 TCP relay. -It must be used on an IPv4/v6 dual stack router. +utility provides IPv6-to-IPv4 TCP relaying. +It can only be used on an IPv4/v6 dual stack router. .Pp When .Nm receives .Tn TCPv6 -traffic, -.Nm -will relay the +traffic, it will relay the .Tn TCPv6 traffic to .Tn TCPv4 . -Destination for relayed +The destination for the relayed .Tn TCPv4 connection will be determined by the last 4 octets of the original .Tn IPv6 @@ -73,14 +71,14 @@ destination address is the traffic will be relayed to IPv4 destination .Li 10.1.1.1 . .Pp -To use +To use the .Nm translation service, an IPv6 address prefix must be reserved for mapping IPv4 addresses into. -Kernel must be properly configured to route all the TCP connection +The kernel must be properly configured to route all the TCP connections toward the reserved IPv6 address prefix into the .Xr faith 4 -pseudo interface, by using +pseudo interface, using the .Xr route 8 command. Also, @@ -91,7 +89,7 @@ to .Dv 1 . .Pp The router must be configured to capture all the TCP traffic -toward reserved +for the reserved .Tn IPv6 address prefix, by using .Xr route 8 @@ -101,21 +99,20 @@ commands. .Pp The .Nm -utility needs a special name-to-address translation logic, so that -hostnames gets resolved into special +utility needs special name-to-address translation logic, so that +hostnames get resolved into the special .Tn IPv6 address prefix. -For small-scale installation, use -.Xr hosts 5 . -For large-scale installation, it is useful to have +For small-scale installations, use +.Xr hosts 5 ; +For large-scale installations, it is useful to have a DNS server with special address translation support. An implementation called .Nm totd -is available -at -.Pa http://www.vermicelli.pasta.cs.uit.no/ipv6/software.html . -Make sure you do not propagate translated DNS records to normal DNS cloud, -it is highly harmful. +is available at +.Pa http://www.vermicelli.pasta.cs.uit.no/software/totd.html . +Make sure you do not propagate translated DNS records over to normal +DNS, as it can cause severe problems. .Ss Daemon mode When .Nm @@ -150,9 +147,9 @@ to you can run local daemons on the router. The .Nm -utility will invoke local daemon at +utility will invoke a local daemon at .Ar serverpath -if the destination address is local interface address, +if the destination address is a local interface address, and will perform translation to IPv4 TCP in other cases. You can also specify .Ar serverargs @@ -182,7 +179,7 @@ The .Nm utility includes special support for protocols used by .Xr ftp 1 . -When translating FTP protocol, +When translating the FTP protocol, .Nm translates network level addresses in .Li PORT/LPRT/EPRT @@ -191,8 +188,8 @@ and commands. .Pp Inactive sessions will be disconnected in 30 minutes, -to avoid stale sessions from chewing up resources. -This may be inappropriate for some of the services +to prevent stale sessions from chewing up resources. +This may be inappropriate for some services (should this be configurable?). .Ss inetd mode When @@ -200,13 +197,13 @@ When is invoked via .Xr inetd 8 , .Nm -will handle connection passed from standard input. +will handle connections passed from standard input. If the connection endpoint is in the reserved IPv6 address prefix, .Nm will relay the connection. Otherwise, .Nm -will invoke service-specific daemon like +will invoke a service-specific daemon like .Xr telnetd 8 , by using the command argument passed from .Xr inetd 8 . @@ -219,16 +216,16 @@ For example, if .Nm is invoked via .Xr inetd 8 -on FTP port, it will operate as a FTP relay. +on the FTP port, it will operate as an FTP relay. .Pp The operation mode requires special support for .Nm in .Xr inetd 8 . .Ss Access control -To prevent malicious accesses, +To prevent malicious access, .Nm -implements a simple address-based access control. +implements simple address-based access control. With .Pa /etc/faithd.conf (or @@ -239,7 +236,7 @@ specified by will avoid relaying unwanted traffic. The .Pa faithd.conf -contains directives with the following format: +configuration file contains directives of the following format: .Bl -bullet .It .Ar src Ns / Ns Ar slen Cm deny Ar dst Ns / Ns Ar dlen @@ -281,6 +278,7 @@ on error. .Sh EXAMPLES Before invoking .Nm , +the .Xr faith 4 interface has to be configured properly. .Bd -literal -offset @@ -334,12 +332,12 @@ ssh stream tcp6/faith nowait root .Ed .Pp .Xr inetd 8 -will open listening sockets with enabling kernel TCP relay support. -Whenever connection comes in, +will open listening sockets with kernel TCP relay support enabled. +Whenever a connection comes in, .Nm will be invoked by .Xr inetd 8 . -If it the connection endpoint is in the reserved IPv6 address prefix. +If the connection endpoint is in the reserved IPv6 address prefix. The .Nm utility will relay the connection. @@ -377,12 +375,12 @@ setting. .Sh HISTORY The .Nm -utility first appeared in WIDE Hydrangea IPv6 protocol stack kit. +utility first appeared in the WIDE Hydrangea IPv6 protocol stack kit. .\" .Pp IPv6 and IPsec support based on the KAME Project (http://www.kame.net/) stack was initially integrated into -.Fx 4.0 +.Fx 4.0 . .Sh SECURITY CONSIDERATIONS It is very insecure to use IP-address based authentication, for connections relayed by .Nm , @@ -392,16 +390,15 @@ Administrators are advised to limit acce .Nm using .Pa faithd.conf , -or by using IPv6 packet filters. -It is to protect +or by using IPv6 packet filters, to protect the .Nm -service from malicious parties and avoid theft of service/bandwidth. -IPv6 destination address can be limited by -carefully configuring routing entries that points to +service from malicious parties, and to avoid theft of service/bandwidth. +IPv6 destination addresses can be limited by +carefully configuring routing entries that point to .Xr faith 4 , using .Xr route 8 . -IPv6 source address needs to be filtered by using packet filters. -Documents listed in +The IPv6 source address needs to be filtered using packet filters. +The documents listed in .Sx SEE ALSO -have more discussions on this topic. +have more information on this topic. From owner-svn-src-stable-6@FreeBSD.ORG Thu Jan 21 10:16:49 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B6C510656B3; Thu, 21 Jan 2010 10:16:49 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FCD18FC24; Thu, 21 Jan 2010 10:16:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LAGnco094031; Thu, 21 Jan 2010 10:16:49 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LAGn5Y094028; Thu, 21 Jan 2010 10:16:49 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201001211016.o0LAGn5Y094028@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 21 Jan 2010 10:16:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202742 - stable/6/usr.bin/whois X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 10:16:49 -0000 Author: edwin Date: Thu Jan 21 10:16:49 2010 New Revision: 202742 URL: http://svn.freebsd.org/changeset/base/202742 Log: MFC of 202280, 202281 - Remove -d option, whois.nic.mil doesn't exist anymore. - Make whois capable of searching for IPv6 addresses just like it can do for IPv4 addresses without having to explicetly specify that the ARIN server should be used to get the initial information. PR: bin/142507, bin/128725 Submitted by: Dan Mahoney , "Matt D. Harris" domain && *--pos == '.';) *pos = '\0'; if (*domain == '\0') @@ -362,7 +362,7 @@ static void usage(void) { fprintf(stderr, - "usage: whois [-aAbdfgiIklmQrR6] [-c country-code | -h hostname] " + "usage: whois [-aAbfgiIklmQrR6] [-c country-code | -h hostname] " "[-p port] name ...\n"); exit(EX_USAGE); } From owner-svn-src-stable-6@FreeBSD.ORG Fri Jan 22 17:33:05 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63F8B1065670; Fri, 22 Jan 2010 17:33:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 389738FC22; Fri, 22 Jan 2010 17:33:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MHX5Ds037809; Fri, 22 Jan 2010 17:33:05 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MHX5uF037807; Fri, 22 Jan 2010 17:33:05 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001221733.o0MHX5uF037807@svn.freebsd.org> From: Doug Barton Date: Fri, 22 Jan 2010 17:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202820 - stable/6/etc/namedb X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 17:33:05 -0000 Author: dougb Date: Fri Jan 22 17:33:04 2010 New Revision: 202820 URL: http://svn.freebsd.org/changeset/base/202820 Log: MFC r202582: Update named.conf for documentation IP addresses and domains Modified: stable/6/etc/namedb/named.conf Directory Properties: stable/6/etc/ (props changed) Modified: stable/6/etc/namedb/named.conf ============================================================================== --- stable/6/etc/namedb/named.conf Fri Jan 22 17:31:54 2010 (r202819) +++ stable/6/etc/namedb/named.conf Fri Jan 22 17:33:04 2010 (r202820) @@ -149,7 +149,7 @@ zone "in-addr.arpa" { 1. Faster local resolution for your users 2. No spurious traffic will be sent from your network to the roots */ -// RFC 1912 +// RFC 1912 (and BCP 32 for localhost) zone "localhost" { type master; file "/etc/namedb/master/localhost-forward.db"; }; zone "127.in-addr.arpa" { type master; file "/etc/namedb/master/localhost-reverse.db"; }; zone "255.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; @@ -183,8 +183,21 @@ zone "168.192.in-addr.arpa" { type maste // Link-local/APIPA (RFCs 3330 and 3927) zone "254.169.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; -// TEST-NET for Documentation (RFC 3330) +// TEST-NET-[1-3] for Documentation (RFC 5737) zone "2.0.192.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "100.51.198.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "113.0.203.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; + +// IPv6 Range for Documentation (RFC 3849) +zone "0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; + +// Domain Names for Documentation and Testing (BCP 32) +zone "test" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example" { type master; file "/etc/namedb/master/empty.db"; }; +zone "invalid" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.com" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.net" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.org" { type master; file "/etc/namedb/master/empty.db"; }; // Router Benchmark Testing (RFC 3330) zone "18.198.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; From owner-svn-src-stable-6@FreeBSD.ORG Fri Jan 22 23:19:34 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 052E2106566B; Fri, 22 Jan 2010 23:19:34 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E4F1A8FC13; Fri, 22 Jan 2010 23:19:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MNJX13019622; Fri, 22 Jan 2010 23:19:33 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MNJXDj019603; Fri, 22 Jan 2010 23:19:33 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <201001222319.o0MNJXDj019603@svn.freebsd.org> From: Florent Thoumie Date: Fri, 22 Jan 2010 23:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202842 - in stable/6/usr.sbin/pkg_install: add create delete info lib updating version X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 23:19:34 -0000 Author: flz Date: Fri Jan 22 23:19:33 2010 New Revision: 202842 URL: http://svn.freebsd.org/changeset/base/202842 Log: Synchronize pkg_install with HEAD. Modified: stable/6/usr.sbin/pkg_install/add/main.c stable/6/usr.sbin/pkg_install/add/perform.c stable/6/usr.sbin/pkg_install/create/main.c stable/6/usr.sbin/pkg_install/create/perform.c stable/6/usr.sbin/pkg_install/delete/Makefile stable/6/usr.sbin/pkg_install/delete/main.c stable/6/usr.sbin/pkg_install/info/Makefile stable/6/usr.sbin/pkg_install/info/main.c stable/6/usr.sbin/pkg_install/info/perform.c stable/6/usr.sbin/pkg_install/lib/lib.h stable/6/usr.sbin/pkg_install/lib/pen.c stable/6/usr.sbin/pkg_install/lib/plist.c stable/6/usr.sbin/pkg_install/lib/url.c stable/6/usr.sbin/pkg_install/updating/Makefile stable/6/usr.sbin/pkg_install/version/Makefile stable/6/usr.sbin/pkg_install/version/main.c Modified: stable/6/usr.sbin/pkg_install/add/main.c ============================================================================== --- stable/6/usr.sbin/pkg_install/add/main.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/add/main.c Fri Jan 22 23:19:33 2010 (r202842) @@ -81,13 +81,16 @@ struct { { 604000, 604099, "/packages-6.4-release" }, { 700000, 700099, "/packages-7.0-release" }, { 701000, 701099, "/packages-7.1-release" }, + { 702000, 702099, "/packages-7.2-release" }, + { 800000, 800499, "/packages-8.0-release" }, { 300000, 399000, "/packages-3-stable" }, { 400000, 499000, "/packages-4-stable" }, { 502100, 502128, "/packages-5-current" }, { 503100, 599000, "/packages-5-stable" }, { 600100, 699000, "/packages-6-stable" }, { 700100, 799000, "/packages-7-stable" }, - { 800000, 899000, "/packages-8-current" }, + { 800500, 899000, "/packages-8-stable" }, + { 900000, 999000, "/packages-9-current" }, { 0, 9999999, "/packages-current" }, { 0, 0, NULL } }; @@ -341,7 +344,7 @@ getpackagesite(void) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n", "usage: pkg_add [-viInfFrRMSK] [-t template] [-p prefix] [-P prefix] [-C chrootdir]", Modified: stable/6/usr.sbin/pkg_install/add/perform.c ============================================================================== --- stable/6/usr.sbin/pkg_install/add/perform.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/add/perform.c Fri Jan 22 23:19:33 2010 (r202842) @@ -52,9 +52,6 @@ pkg_perform(char **pkgs) return err_cnt; } -static Package Plist; -static char *Home; - /* * This is seriously ugly code following. Written very fast! * [And subsequently made even worse.. Sigh! This code was just born @@ -63,10 +60,12 @@ static char *Home; static int pkg_do(char *pkg) { + Package Plist; char pkg_fullname[FILENAME_MAX]; char playpen[FILENAME_MAX]; char extract_contents[FILENAME_MAX]; - char *where_to, *extract; + char *extract; + const char *where_to; FILE *cfile; int code; PackingList p; @@ -87,6 +86,8 @@ pkg_do(char *pkg) strcpy(playpen, FirstPen); inPlace = 0; + memset(&Plist, '\0', sizeof(Plist)); + /* Are we coming in for a second pass, everything already extracted? */ if (!pkg) { fgets(playpen, FILENAME_MAX, stdin); @@ -102,11 +103,10 @@ pkg_do(char *pkg) else { /* Is it an ftp://foo.bar.baz/file.t[bg]z specification? */ if (isURL(pkg)) { - if (!(Home = fileGetURL(NULL, pkg, KeepPackage))) { + if (!(where_to = fileGetURL(NULL, pkg, KeepPackage))) { warnx("unable to fetch '%s' by URL", pkg); return 1; } - where_to = Home; strcpy(pkg_fullname, pkg); cfile = fopen(CONTENTS_FNAME, "r"); if (!cfile) { @@ -135,13 +135,11 @@ pkg_do(char *pkg) extract = NULL; sb.st_size = 100000; /* Make up a plausible average size */ } - Home = make_playpen(playpen, sb.st_size * 4); - if (!Home) + if (!(where_to = make_playpen(playpen, sb.st_size * 4))) errx(1, "unable to make playpen for %lld bytes", (long long)sb.st_size * 4); - where_to = Home; /* Since we can call ourselves recursively, keep notes on where we came from */ if (!getenv("_TOP")) - setenv("_TOP", Home, 1); + setenv("_TOP", where_to, 1); if (unpack(pkg_fullname, extract)) { warnx( "unable to extract table of contents file from '%s' - not a package?", @@ -280,6 +278,44 @@ pkg_do(char *pkg) warnx("-f specified; proceeding anyway"); } +#if ENSURE_THAT_ALL_REQUIREMENTS_ARE_MET + /* + * Before attempting to do the slave mode bit, ensure that we've + * downloaded & processed everything we need. + * It's possible that we haven't already installed all of our + * dependencies if the dependency list was misgenerated due to + * other dynamic dependencies or if a dependency was added to a + * package without all REQUIRED_BY packages being regenerated. + */ + for (p = pkg ? Plist.head : NULL; p; p = p->next) { + const char *ext; + char *deporigin; + + if (p->type != PLIST_PKGDEP) + continue; + deporigin = (p->next->type == PLIST_DEPORIGIN) ? p->next->name : NULL; + + if (isinstalledpkg(p->name) <= 0 && + !(deporigin != NULL && matchbyorigin(deporigin, NULL) != NULL)) { + char subpkg[FILENAME_MAX], *sep; + + strlcpy(subpkg, pkg, sizeof subpkg); + if ((sep = strrchr(subpkg, '/')) != NULL) { + *sep = '\0'; + if ((sep = strrchr(subpkg, '/')) != NULL) { + *sep = '\0'; + strlcat(subpkg, "/All/", sizeof subpkg); + strlcat(subpkg, p->name, sizeof subpkg); + if ((ext = strrchr(pkg, '.')) == NULL) + ext = ".tbz"; + strlcat(subpkg, ext, sizeof subpkg); + pkg_do(subpkg); + } + } + } + } +#endif + /* Now check the packing list for dependencies */ for (p = Plist.head; p ; p = p->next) { char *deporigin; @@ -295,7 +331,8 @@ pkg_do(char *pkg) } if (isinstalledpkg(p->name) <= 0 && !(deporigin != NULL && matchbyorigin(deporigin, NULL) != NULL)) { - char path[FILENAME_MAX], *cp = NULL; + char path[FILENAME_MAX]; + const char *cp = NULL; if (!Fake) { char prefixArg[2 + MAXPATHLEN]; /* "-P" + Prefix */ @@ -333,7 +370,7 @@ pkg_do(char *pkg) } else if ((cp = fileGetURL(pkg, p->name, KeepPackage)) != NULL) { if (Verbose) - printf("Finished loading %s over FTP.\n", p->name); + printf("Finished loading %s via a URL\n", p->name); if (!fexists("+CONTENTS")) { warnx("autoloaded package %s has no +CONTENTS file?", p->name); @@ -645,7 +682,8 @@ cleanup(int sig) printf("Signal %d received, cleaning up..\n", sig); if (!Fake && zapLogDir && LogDir[0]) vsystem("%s -rf %s", REMOVE_CMD, LogDir); - leave_playpen(); + while (leave_playpen()) + ; } if (sig) exit(1); Modified: stable/6/usr.sbin/pkg_install/create/main.c ============================================================================== --- stable/6/usr.sbin/pkg_install/create/main.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/create/main.c Fri Jan 22 23:19:33 2010 (r202842) @@ -249,7 +249,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n", "usage: pkg_create [-YNOhjnvyz] [-C conflicts] [-P pkgs] [-p prefix]", Modified: stable/6/usr.sbin/pkg_install/create/perform.c ============================================================================== --- stable/6/usr.sbin/pkg_install/create/perform.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/create/perform.c Fri Jan 22 23:19:33 2010 (r202842) @@ -39,11 +39,10 @@ static void make_dist(const char *, cons static int create_from_installed_recursive(const char *, const char *); static int create_from_installed(const char *, const char *, const char *); -static char *home; - int pkg_perform(char **pkgs) { + static const char *home; char *pkg = *pkgs; /* Only one arg to create */ char *cp; FILE *pkg_in, *fp; Modified: stable/6/usr.sbin/pkg_install/delete/Makefile ============================================================================== --- stable/6/usr.sbin/pkg_install/delete/Makefile Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/delete/Makefile Fri Jan 22 23:19:33 2010 (r202842) @@ -5,7 +5,6 @@ SRCS= main.c perform.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBMD} Modified: stable/6/usr.sbin/pkg_install/delete/main.c ============================================================================== --- stable/6/usr.sbin/pkg_install/delete/main.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/delete/main.c Fri Jan 22 23:19:33 2010 (r202842) @@ -170,7 +170,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n", "usage: pkg_delete [-dDfGinrvxX] [-p prefix] pkg-name ...", Modified: stable/6/usr.sbin/pkg_install/info/Makefile ============================================================================== --- stable/6/usr.sbin/pkg_install/info/Makefile Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/info/Makefile Fri Jan 22 23:19:33 2010 (r202842) @@ -5,7 +5,6 @@ SRCS= main.c perform.c show.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} Modified: stable/6/usr.sbin/pkg_install/info/main.c ============================================================================== --- stable/6/usr.sbin/pkg_install/info/main.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/info/main.c Fri Jan 22 23:19:33 2010 (r202842) @@ -282,7 +282,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", "usage: pkg_info [-bcdDEfgGiIjkKLmopPqQrRsvVxX] [-e package] [-l prefix]", Modified: stable/6/usr.sbin/pkg_install/info/perform.c ============================================================================== --- stable/6/usr.sbin/pkg_install/info/perform.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/info/perform.c Fri Jan 22 23:19:33 2010 (r202842) @@ -85,8 +85,6 @@ pkg_perform(char **pkgs) return err_cnt; } -static char *Home; - static int pkg_do(char *pkg) { @@ -96,7 +94,7 @@ pkg_do(char *pkg) Package plist; FILE *fp; struct stat sb; - char *cp = NULL; + const char *cp = NULL; int code = 0; if (isURL(pkg)) { @@ -138,7 +136,7 @@ pkg_do(char *pkg) code = 1; goto bail; } - Home = make_playpen(PlayPen, sb.st_size / 2); + make_playpen(PlayPen, sb.st_size / 2); if (unpack(fname, "'+*'")) { warnx("error during unpacking, no info for '%s' available", pkg); code = 1; Modified: stable/6/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- stable/6/usr.sbin/pkg_install/lib/lib.h Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/lib/lib.h Fri Jan 22 23:19:33 2010 (r202842) @@ -84,14 +84,14 @@ #define DISPLAY_FNAME "+DISPLAY" #define MTREE_FNAME "+MTREE_DIRS" -#if defined(__FreeBSD_version) && __FreeBSD_version >= 800000 +#if defined(__FreeBSD_version) && __FreeBSD_version >= 900000 +#define INDEX_FNAME "INDEX-9" +#elif defined(__FreeBSD_version) && __FreeBSD_version >= 800000 #define INDEX_FNAME "INDEX-8" #elif defined(__FreeBSD_version) && __FreeBSD_version >= 700000 #define INDEX_FNAME "INDEX-7" #elif defined(__FreeBSD_version) && __FreeBSD_version >= 600000 #define INDEX_FNAME "INDEX-6" -#elif defined(__FreeBSD_version) && __FreeBSD_version >= 500036 -#define INDEX_FNAME "INDEX-5" #else #define INDEX_FNAME "INDEX" #endif @@ -102,10 +102,10 @@ #define PKG_PREFIX_VNAME "PKG_PREFIX" /* - * Version of the package tools - increase only when some - * functionality used by bsd.port.mk is changed, added or removed + * Version of the package tools - increase whenever you make a change + * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20080708 +#define PKG_INSTALL_VERSION 20090902 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) @@ -159,9 +159,9 @@ STAILQ_HEAD(reqr_by_head, reqr_by_entry) int vsystem(const char *, ...); char *vpipe(const char *, ...); void cleanup(int); -char *make_playpen(char *, off_t); +const char *make_playpen(char *, off_t); char *where_playpen(void); -void leave_playpen(void); +int leave_playpen(void); off_t min_free(const char *); /* String */ @@ -183,7 +183,7 @@ Boolean isfile(const char *); Boolean isempty(const char *); Boolean issymlink(const char *); Boolean isURL(const char *); -char *fileGetURL(const char *, const char *, int); +const char *fileGetURL(const char *, const char *, int); char *fileFindByPath(const char *, const char *); char *fileGetContents(const char *); void write_file(const char *, const char *); Modified: stable/6/usr.sbin/pkg_install/lib/pen.c ============================================================================== --- stable/6/usr.sbin/pkg_install/lib/pen.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/lib/pen.c Fri Jan 22 23:19:33 2010 (r202842) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); /* For keeping track of where we are */ static char PenLocation[FILENAME_MAX]; -static char Previous[FILENAME_MAX]; char * where_playpen(void) @@ -76,12 +75,14 @@ find_play_pen(char *pen, off_t sz) static char *pstack[MAX_STACK]; static int pdepth = -1; -static void +static const char * pushPen(const char *pen) { if (++pdepth == MAX_STACK) errx(2, "%s: stack overflow.\n", __func__); pstack[pdepth] = strdup(pen); + + return pstack[pdepth]; } static void @@ -99,10 +100,11 @@ popPen(char *pen) * Make a temporary directory to play in and chdir() to it, returning * pathname of previous working directory. */ -char * +const char * make_playpen(char *pen, off_t sz) { char humbuf1[6], humbuf2[6]; + char cwd[FILENAME_MAX]; if (!find_play_pen(pen, sz)) return NULL; @@ -134,7 +136,7 @@ make_playpen(char *pen, off_t sz) "with more space and\ntry the command again", __func__, pen); } - if (!getcwd(Previous, FILENAME_MAX)) { + if (!getcwd(cwd, FILENAME_MAX)) { upchuck("getcwd"); return NULL; } @@ -144,34 +146,35 @@ make_playpen(char *pen, off_t sz) errx(2, "%s: can't chdir to '%s'", __func__, pen); } - if (PenLocation[0]) - pushPen(PenLocation); - strcpy(PenLocation, pen); - return Previous; + return pushPen(cwd); } /* Convenience routine for getting out of playpen */ -void +int leave_playpen() { + static char left[FILENAME_MAX]; void (*oldsig)(int); + if (!PenLocation[0]) + return 0; + /* Don't interrupt while we're cleaning up */ oldsig = signal(SIGINT, SIG_IGN); - if (Previous[0]) { - if (chdir(Previous) == FAIL) { - cleanup(0); - errx(2, "%s: can't chdir back to '%s'", __func__, Previous); - } - Previous[0] = '\0'; - } - if (PenLocation[0]) { - if (PenLocation[0] == '/' && vsystem("/bin/rm -rf %s", PenLocation)) - warnx("couldn't remove temporary dir '%s'", PenLocation); - popPen(PenLocation); + strcpy(left, PenLocation); + popPen(PenLocation); + + if (chdir(PenLocation) == FAIL) { + cleanup(0); + errx(2, "%s: can't chdir back to '%s'", __func__, PenLocation); } + + if (left[0] == '/' && vsystem("/bin/rm -rf %s", left)) + warnx("couldn't remove temporary dir '%s'", left); signal(SIGINT, oldsig); + + return 1; } off_t Modified: stable/6/usr.sbin/pkg_install/lib/plist.c ============================================================================== --- stable/6/usr.sbin/pkg_install/lib/plist.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/lib/plist.c Fri Jan 22 23:19:33 2010 (r202842) @@ -285,6 +285,10 @@ read_plist(Package *pkg, FILE *fp) } if (*cp == '\0') { cp = NULL; + if (cmd == PLIST_PKGDEP) { + warnx("corrupted record (pkgdep line without argument), ignoring"); + cmd = FAIL; + } goto bottom; } if (cmd == PLIST_COMMENT && sscanf(cp, "PKG_FORMAT_REVISION:%d.%d\n", Modified: stable/6/usr.sbin/pkg_install/lib/url.c ============================================================================== --- stable/6/usr.sbin/pkg_install/lib/url.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/lib/url.c Fri Jan 22 23:19:33 2010 (r202842) @@ -32,10 +32,11 @@ __FBSDID("$FreeBSD$"); * Try and fetch a file by URL, returning the directory name for where * it's unpacked, if successful. */ -char * +const char * fileGetURL(const char *base, const char *spec, int keep_package) { - char *cp, *rp, *tmp; + const char *rp; + char *cp, *tmp; char fname[FILENAME_MAX]; char pen[FILENAME_MAX]; char pkg[FILENAME_MAX]; @@ -105,7 +106,7 @@ fileGetURL(const char *base, const char fetchDebug = (Verbose > 0); if ((ftp = fetchGetURL(fname, Verbose ? "v" : NULL)) == NULL) { - printf("Error: FTP Unable to get %s: %s\n", + printf("Error: Unable to get %s: %s\n", fname, fetchLastErrString); return NULL; } Modified: stable/6/usr.sbin/pkg_install/updating/Makefile ============================================================================== --- stable/6/usr.sbin/pkg_install/updating/Makefile Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/updating/Makefile Fri Jan 22 23:19:33 2010 (r202842) @@ -5,7 +5,6 @@ SRCS= main.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} Modified: stable/6/usr.sbin/pkg_install/version/Makefile ============================================================================== --- stable/6/usr.sbin/pkg_install/version/Makefile Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/version/Makefile Fri Jan 22 23:19:33 2010 (r202842) @@ -5,7 +5,6 @@ SRCS= main.c perform.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} Modified: stable/6/usr.sbin/pkg_install/version/main.c ============================================================================== --- stable/6/usr.sbin/pkg_install/version/main.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/version/main.c Fri Jan 22 23:19:33 2010 (r202842) @@ -127,7 +127,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n%s\n", "usage: pkg_version [-hIoqv] [-l limchar] [-L limchar] [[-X] -s string] [-O origin] [index]", From owner-svn-src-stable-6@FreeBSD.ORG Sat Jan 23 20:13:55 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E21F41065672 for ; Sat, 23 Jan 2010 20:13:55 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 7166A8FC12 for ; Sat, 23 Jan 2010 20:13:55 +0000 (UTC) Received: (qmail 6897 invoked by uid 399); 23 Jan 2010 19:47:13 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 23 Jan 2010 19:47:13 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B5B5247.4010306@FreeBSD.org> Date: Sat, 23 Jan 2010 11:47:19 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.5) Gecko/20100114 Thunderbird/3.0 MIME-Version: 1.0 To: Florent Thoumie References: <201001222319.o0MNJXDj019603@svn.freebsd.org> In-Reply-To: <201001222319.o0MNJXDj019603@svn.freebsd.org> X-Enigmail-Version: 1.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-6@freebsd.org Subject: Re: svn commit: r202842 - in stable/6/usr.sbin/pkg_install: add create delete info lib updating version X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 20:13:56 -0000 On 01/22/10 15:19, Florent Thoumie wrote: > Author: flz > Date: Fri Jan 22 23:19:33 2010 > New Revision: 202842 > URL: http://svn.freebsd.org/changeset/base/202842 > > Log: > Synchronize pkg_install with HEAD. I am not of the camp that believes repeating the entire commit message (or messages) is always necessary, however a brief summary of the changes is usually desirable. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso