extfs shell scripts [was: Re: Call for development freeze]



Hello Roland,

On Wed, 2004-11-10 at 07:43, Roland Illig wrote:
> Here are some more issues regarding the VFS shell scripts.

> --- vfs/extfs/audio.in	18 Oct 2004 02:20:09 -0000	1.8
> -	A=`echo $A | sed -e 's/\.//' -e 's/^\(.\)$/0\1/'`
> +	A=`echo "$A" | sed -e 's/\.//' -e 's/^\(.\)$/0\1/'`

Unnecessary as the value of $A is only parsed, not passed to a shell,
and not even interpreted by echo.

> -    if [ "$2" == "CDDB" ]; then
> +    if [ x"$2" = x"CDDB" ]; then

More correct wrt old versions of bash. Ok.

> Index: vfs/extfs/trpm
> -name=`sed 's/.*\///;s/\.trpm$//' "$2"`
> +name=`echo "$2" | sed 's/.*\///;s/\.trpm$//'`

Please explain. What's the use of putting an echo "$2" in front? Again,
quotes are not needed here. And shouldn't this command include an -e in
this case?

For the rest: Quoting of temporary file names is unnecessary as they
have no spaces in their names, but technically correct, so ok.

Other quotes are correct, but none of these omissions cause
vulnerabilities. Still good to fix of course.

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]