From owner-freebsd-ports@FreeBSD.ORG Tue Jan 19 04:53:28 2010 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80D78106566B for ; Tue, 19 Jan 2010 04:53:28 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id F2CEB8FC0C for ; Tue, 19 Jan 2010 04:53:27 +0000 (UTC) Received: from inchoate.gsoft.com.au ([203.31.81.30]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id o0J4Okmx099937 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 19 Jan 2010 14:54:47 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: ports@freebsd.org Date: Tue, 19 Jan 2010 14:54:32 +1030 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1733903.FJNtoNvKi3"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201001191454.44005.doconnor@gsoft.com.au> X-Spam-Score: -3.634 () ALL_TRUSTED,AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: Subject: security/cfs fix X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 04:53:28 -0000 --nextPart1733903.FJNtoNvKi3 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, This is a quick patch to cfs which stops it stalling (forever) the system startup if mountd fails. This can happen if mountd picks a port which is already used (no idea why it doesn't try a few times) and then cfsd fails.. If cfsd is not running mount will try forever (by default) to connect. The second part makes sure that cfsd is killed on stop even if the umount failed for some reason. diff -ur /usr/ports/security/cfs/files/cfsd.sh.in cfs/files/cfsd.sh.in =2D-- /usr/ports/security/cfs/files/cfsd.sh.in 2005-06-08 20:41:08.00000= 0000 +0930 +++ cfs/files/cfsd.sh.in 2010-01-19 14:52:43.000000000 +1030 @@ -29,7 +29,7 @@ cfsd_poststart() { if [ -n "$cfsd_mountpoint" ]; then =2D mount -o port=3D"$cfsd_port",nfsv2 localhost:%%CFSD_BOOTS= TRAP%% "$cfsd_mountpoint" + mount_nfs -R 1 -o port=3D"$cfsd_port",nfsv2 localhost:%%CFS= D_BOOTSTRAP%% "$cfsd_mountpoint" fi } @@ -37,6 +37,7 @@ { if [ -n "$cfsd_mountpoint" ]; then umount "$cfsd_mountpoint" + echo >/dev/null fi } =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1733903.FJNtoNvKi3 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iD8DBQBLVTQL5ZPcIHs/zowRArLcAJsEs9HVOhm6lnwkTKiedsN5NwLJxQCeOVOG KdePRoLmZJX2W2RpyVW4KTw= =E3j2 -----END PGP SIGNATURE----- --nextPart1733903.FJNtoNvKi3--