mount points not special

Gary Heston gary at sci34hub.UUCP
Wed Jul 4 01:17:56 AEST 1990


In article <DNB.90Jul2103510 at chaos.cs.brandeis.edu> dnb at chaos.cs.brandeis.edu (David N. Blank) writes:
>Actually, I kind of expected this to be "normal" behavior, but was
>looking for a trick to prevent it (or discussion on what could be 
>added to the opsys which to prevent you from shooting yourself
>in the foot).  The user in question actually has root privs on that
>machine (not my decision), and blew it under that auspice.  How about
>having a message like "Directory busy" appear while leaving the
>directory intact, similar to the one you receive when you attempt to
>remove a directory which still has files in it?  

Write a semi-intelligent script and replace rm with it. If the -r option
is specified, check to see whether or not the current directory contains
less than two slashes. If so, uuencode the kernel and dump it to the
users' tty to indicate that they did something wrong....

Two slashes? Yes, if `pwd` doesn't return something with a path
similar to /usr/idiot, the script would fail. Move the real
rm to someplace obscure and rename it (something like /usr/lib/obscure.h)
to prevent from being used directly.

Of course, the alternate course you mentioned not only prevents the
user in question from repeating the offense, but discourages others
from following in his recursive path....  :-)

Writing a script to count occurrences of a character in a string is
left as an exercise for the user...

-- 
    Gary Heston     { uunet!sci34hub!gary  }    System Mismanager
   SCI Technology, Inc.  OEM Products Department  (i.e., computers)
"The esteemed gentleman says I called him a liar. That's true, and I
regret it." Retief, a character created by Keith Laumer.



More information about the Comp.unix.questions mailing list