Date: Thu, 8 Jun 2006 17:54:22 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: Doug White <dwhite@gumbysoft.com> Cc: freebsd-rc@freebsd.org Subject: Re: conf/94377 : [patch] /etc/rc.d/sshd improperly tests random dev state Message-ID: <20060609005422.GA25288@odin.ac.hmc.edu> In-Reply-To: <200606082130.k58LUYQO069255@freefall.freebsd.org> References: <200606082130.k58LUYQO069255@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--u3/rZRmxL6MmkK24 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 08, 2006 at 09:30:34PM +0000, Doug White wrote: > The following reply was made to PR conf/94377; it has been noted by GNATS. >=20 > From: Doug White <dwhite@gumbysoft.com> > To: Rostislav Krasny <rosti.bsd@gmail.com> > Cc: Florent Thoumie <flz@FreeBSD.org>, Doug White <dwhite@FreeBSD.org>,= =20 > bug-followup@FreeBSD.org > Subject: Re: conf/94377 : [patch] /etc/rc.d/sshd improperly tests random = dev > state > Date: Thu, 8 Jun 2006 10:36:05 -0700 (PDT) >=20 > On Thu, 8 Jun 2006, Rostislav Krasny wrote: > =20 > > I've seen that patch just today, when it is already MFCed. I think it > > could be simpler. Instead of > > > > [ "x${seeded}" !=3D "x" ] && [ ${seeded} -eq 0 ] > > > > you can write just > > > > [ "${seeded}" =3D "0" ] > > > > and it will be still correct against sysctl failing and returning an > > empty string. > =20 > No, because if ${seeded} is empty, the shell interprets the test as > =20 > [ =3D "0" ] > =20 > which results in a syntax error. The 'x' in the first test is significan= t. Not true. The 'x' bit has been unnecessicary 31337 for quite some time IMO. If you didn't quote ${seeded} then it would be, but "${variable_that_expands_to_null}" is "". Otherwise -z and -n wouldn't work. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --u3/rZRmxL6MmkK24 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFEiMa+XY6L6fI4GtQRAqHvAJ9qm2bwN/Iqe01MgSKycudbnDuC8gCfcn3a TbajPJMl5kzciV6Roei7oH4= =1m1M -----END PGP SIGNATURE----- --u3/rZRmxL6MmkK24--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060609005422.GA25288>