From owner-freebsd-audit Tue May 9 14:34:26 2000 Delivered-To: freebsd-audit@freebsd.org Received: from alcanet.com.au (mail.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id 969EF37B892; Tue, 9 May 2000 14:34:09 -0700 (PDT) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <115224>; Wed, 10 May 2000 07:34:10 +1000 Content-return: prohibited From: Peter Jeremy Subject: Re: that patch for mktemp? In-reply-to: <200005010404.WAA74367@harmony.village.org>; from imp@village.org on Mon, May 01, 2000 at 02:06:00PM +1000 To: Warner Losh Cc: Kris Kennaway , FreeBSD-audit Message-Id: <00May10.073410est.115224@border.alcanet.com.au> MIME-version: 1.0 X-Mailer: Mutt 1.0i Content-type: text/plain; charset=us-ascii References: <200005010404.WAA74367@harmony.village.org> Date: Wed, 10 May 2000 07:34:08 +1000 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2000-May-01 14:06:00 +1000, Warner Losh wrote: >In message Mike Heffner writes: >: Hrm, I suppose we might also want to get rid of '~' then. > >~ isn't too special to shells, so unless it is at the start of a >filename, you shouldn't have a problem. > >That said, all of the following are special metacharacters to shells: > !$^&*(){}[]?~`"';<>|\ When I suggested "!@#%^&-_=+:,.~" as the set of characters, I (obviously) didn't think closely enough about the impact of shells. Going through: ! - magic to *csh anywhere inside a word - drop it ^ - Obsolete synonym for `|' (which I used to know, but forgot until Warner reminded me). As someone has pointed out, it isn't magic to our sh(1) (or to csh, bash, zsh). Therefore I think it can stay. & - magic to all shells anywhere inside a word - drop it ~ - magic to most shells (except sh(1)), but only at the start of a word, therefore I think it can stay. I'd therefore suggest that padchar be initialised to: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@#%^-_=+:,.~"; I think that's the set of printable USASCII-7 characters that can be safely used as a filename inside a word, without upsetting any modern shells. base64 and padchar should also probably both be `const'. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message