crypt bug

Try to do these steps and tell me if I'm wrong.

echo "echo \"I'm here\"" > /tmp/crypt

chmod 755 /tmp/crypt

export PATH=/tmp:$PATH

cd /

Try to run:

/usr/bin/crypt

Everything is fine. We have to type key and then we will crypt everything :).

Now try to run:

/usr/bin/crypt key (we run crypt with one parameter)

Somehow crypt from /tmp is run, not the correct one from /usr/bin.

Magic? No. There is bug in crypt file but this is not my problem. Somewhere inside crypt, it tries to run itself(don't know why) but it using PATH to find crypt and it takes this crypt from tmp.

I checked this at work on Solaris 9.

[692 byte] By [jakubiec] at [2007-11-26 10:27:10]
# 1

> Magic? No. There is bug in crypt file but this is

> not my problem. Somewhere inside crypt, it tries to

> run itself(don't know why)

It reexecs so that the password isn't trivially visible in 'ps' output.

but it using PATH to find

> crypt and it takes this crypt from tmp.

> I checked this at work on Solaris 9.

Looks that way.

--

Darren

Darren_Dunham at 2007-7-7 2:31:21 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...