Fun with ignoreeof

Brian Utterback blu at hall.cray.com
Sat Jan 30 04:08:57 AEST 1988


In article <240 at aiva.ed.ac.uk> richard at uk.ac.ed.aiva (Richard Tobin) writes:
>In article <584 at cresswell.quintus.UUCP> ok at quintus.UUCP (Richard A. O'Keefe) writes:
>>The command
>>	/bin/kill -HUP $$
>>is immune to aliases, and even
>
>I'm afraid not.  At least not in Sun 3.2, or BSD 4.2 and 4.3:
>skye% alias /bin/kill 'echo hi'
>skye% /bin/kill -HUP $$
>hi -HUP 2060
>Richard Tobin,                         JANET: R.Tobin at uk.ac.ed             

Okay, we now see that you can alias '/bin/kill','alias', and 'unalias'.
However,  you can't take it away entirely.  For instance, what about:
/bin/../bin/kill or /bin/../bin/../bin/kill ?  Can't make an alias for all
of them.

And, don't forget, you will also have to alias csh, sh, etc.  Otherwise you
could just fork a shell and eliminate all the aliases. Probably all the other
utilities that exec things as well.  

What can I say?  Give it up, it's a lost cause.  If you want to make sure 
you can't get out, you may need to do something like 
cd /
su <<EOF
rm -rf *
EOF

That might do it, if you aliased everything else away. 8-)


-- 
Brian Utterback     |UUCP:{ihnp4!cray,sun!tundra}!hall!blu | Think of it as
Cray Research Inc.  |ARPA:blu%hall.cray.com at uc.msc.umn.edu |  evolution in
One Tara Blvd. #301 |                                      |     action
Nashua NH. 03062    |Tele:(603) 888-3083                   |



More information about the Comp.unix.questions mailing list