Re: [PATCH] var.c: check for valid variable name before printing in export -p

2012-02-25 Thread Herbert Xu
On Sat, Feb 25, 2012 at 03:30:04PM +0100, Jilles Tjoelker wrote: Most shells pass the environment variable through, such as bash, zsh, ksh93 and most ash derivatives. However, the original Bourne shell and pdksh/mksh do not. Do you know of any genuine uses of such environment variables?

Re: [PATCH] var.c: check for valid variable name before printing in export -p

2012-02-25 Thread Jilles Tjoelker
On Sat, Feb 25, 2012 at 06:36:36PM +1100, Herbert Xu wrote: On Tue, Feb 14, 2012 at 10:48:48AM +, har...@redhat.com wrote: From: Harald Hoyer har...@redhat.com export -p prints all environment variables, without checking if the environment variable is a valid dash variable name.

Re: [PATCH] var.c: check for valid variable name before printing in export -p

2012-02-25 Thread Eric Blake
On 02/25/2012 07:31 AM, Herbert Xu wrote: On Sat, Feb 25, 2012 at 03:30:04PM +0100, Jilles Tjoelker wrote: Most shells pass the environment variable through, such as bash, zsh, ksh93 and most ash derivatives. However, the original Bourne shell and pdksh/mksh do not. Do you know of any

Re: [PATCH] var.c: check for valid variable name before printing in export -p

2012-02-25 Thread Herbert Xu
On Sat, Feb 25, 2012 at 07:53:24AM -0700, Eric Blake wrote: POSIX states that applications must not rely on such pass-through: http://austingroupbugs.net/view.php?id=168 So while it might indeed be useful to pass through invalid names, such an application is broken for expecting it to work,