Date: Wed, 10 May 2000 07:34:08 +1000 From: Peter Jeremy <peter.jeremy@alcatel.com.au> To: Warner Losh <imp@village.org> Cc: Kris Kennaway <kris@FreeBSD.ORG>, FreeBSD-audit <FreeBSD-audit@FreeBSD.ORG> Subject: Re: that patch for mktemp? Message-ID: <00May10.073410est.115224@border.alcanet.com.au> In-Reply-To: <200005010404.WAA74367@harmony.village.org>; from imp@village.org on Mon, May 01, 2000 at 02:06:00PM %2B1000 References: <XFMail.20000430235830.mheffner@mailandnews.com> <200005010404.WAA74367@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2000-May-01 14:06:00 +1000, Warner Losh <imp@village.org> wrote: >In message <XFMail.20000430235830.mheffner@mailandnews.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00May10.073410est.115224>