Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jan 2010 14:54:32 +1030
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        ports@freebsd.org
Subject:   security/cfs fix
Message-ID:  <201001191454.44005.doconnor@gsoft.com.au>

next in thread | raw e-mail | index | archive | help
--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001191454.44005.doconnor>