From owner-freebsd-audit Sun Jan 16 19:52: 5 2000 Delivered-To: freebsd-audit@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 758) id 197BE14C2D; Sun, 16 Jan 2000 19:52:04 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 0527F1CD431; Sun, 16 Jan 2000 19:52:04 -0800 (PST) (envelope-from kris@hub.freebsd.org) Date: Sun, 16 Jan 2000 19:52:03 -0800 (PST) From: Kris Kennaway To: Peter Jeremy Cc: audit@FreeBSD.ORG Subject: Re: libc patch to warn about tempfiles In-Reply-To: <00Jan17.142945est.40327@border.alcanet.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 17 Jan 2000, Peter Jeremy wrote: > I think that changing the algorithm to use a denser encoding (eg > encoding the PID in base-62 or more, rather than base 10) would be > a better solution. This way you don't need to change the functions > using mktemp() et al. Hmm..that's not a bad idea. With base-64 we'd have 36 bits, of which about 17 would be taken up by the encoded PID, leaving about 520000 possible tempfiles (a factor of 10^4 better than now). OTOH, using 10 X's in the current system has a target space of size 52^6, or 1.97e+10 :-) Kris ---- "How many roads must a man walk down, before you call him a man?" "Eight!" "That was a rhetorical question!" "Oh..then, seven!" -- Homer Simpson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message