Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!sci34hub!gary From: gary@sci34hub.UUCP (Gary Heston) Newsgroups: comp.unix.questions Subject: Re: mount points not special Message-ID: <684@sci34hub.UUCP> Date: 3 Jul 90 15:17:56 GMT References: <1990Jul2.002149.2226@pilikia.pegasus.com> Reply-To: gary@sci34hub.sci.com (Gary Heston) Distribution: comp Organization: SCI Technology, Inc., Huntsville, Al. Lines: 32 In article dnb@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.