From owner-freebsd-audit Thu Nov 23 13:43:42 2000 Delivered-To: freebsd-audit@freebsd.org Received: from citusc17.usc.edu (citusc17.usc.edu [128.125.38.177]) by hub.freebsd.org (Postfix) with ESMTP id 138D337B4C5 for ; Thu, 23 Nov 2000 13:43:40 -0800 (PST) Received: (from kris@localhost) by citusc17.usc.edu (8.11.1/8.11.1) id eANLiaN36467; Thu, 23 Nov 2000 13:44:36 -0800 (PST) (envelope-from kris) Date: Thu, 23 Nov 2000 13:44:36 -0800 From: Kris Kennaway To: Sheldon Hearn Cc: audit@FreeBSD.ORG Subject: Re: makedevops.pl and makeobjops.pl tmpfiles Message-ID: <20001123134436.A36337@citusc17.usc.edu> References: <14242.974995366@axl.fw.uunet.co.za> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <14242.974995366@axl.fw.uunet.co.za>; from sheldonh@uunet.co.za on Thu, Nov 23, 2000 at 06:02:46PM +0200 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 23, 2000 at 06:02:46PM +0200, Sheldon Hearn wrote: > It seems to me that, unless we import the File::Temp perl5 module into > the base system (as NetBSD have done), we should use something like the > following patch to makeobjops.pl and makedevops.pl, less they be abused. Thanks for the patch, Sheldon. This one has been annoying me for a while. However, I think I prefer the above option as a more generic solution. I presume it includes functionality similar to mkstemp(). > The perl5.6.0's srand() subroutine seeds the PRNG from /dev/urandom, > so we don't have to worry too much about a guessable seed. In fact, > the call to srand() shouldn't be required at all, since perl5.6.0 > automatically calls srand() if it has not yet been called by the time > rand() is first called. What libc function does rand() call? random(), by the sounds of it. > + $ctmpname = "$tmpdir/ctmp." . rand(9999); > + $htmpname = "$tmpdir/htmp." . rand(9999); Any particular reason for not using rand(999999999) or so? :-) Kris --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjodj8QACgkQWry0BWjoQKVhXQCeJBH6UauK0pA5K1WGI8X09tCz pSkAnRh8N8YcodsrfdxwbRsiY5C0EJS5 =w6Il -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message