bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: GNU Sharutils and security


From: Stepan Kasal
Subject: Re: GNU Sharutils and security
Date: Fri, 2 Jul 2004 19:18:23 +0200
User-agent: Mutt/1.4.1i

Hi,

On Fri, Jul 02, 2004 at 07:16:18AM -0700, Bruce Korb wrote:
> > $ cat :x ; echo RUN: ; ./:x
> > #!/bin/echo this_is_a_test  ; \
> > exit 1
> > 
> > echo i am alive
> > exit 0
> > RUN:
> > this_is_a_test  ; \ ./:x
> 
> weird.

perhaps someone will appreciate a more detailed explanation:

The shell executes:

/bin/echo "this_is_a_test  ; \" ./:x

the rest of the first line forms the first argument.
If you write:

#!/bin/awk -f
... an awk script

and the first line has a spare blank at its end, then the following is
executed:

/bin/awk "-f " scriptname

which should mean that the script with name " " (one space) is to be
executed.  (Gawk does recognize this special case and loads the right
file anyway.)

Hope this amused you,
        Stepan Kasal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]