fixing rm * (was: Worm/Passwords)
Richard A. O'Keefe
ok at quintus.uucp
Wed Nov 30 21:27:42 AEST 1988
In article <1248 at atari.UUCP> achar at atari.UUCP (Alan Char) writes:
>In article <727 at quintus.UUCP> ok at quintus.UUCP (Richard A. O'Keefe) writes:
>|One answer, of course, would be to have a
>| GLOBASK=rm:rmdir
>|shell variable, so that one could put
>| GLOBASK=a.rm:$GLOBASK
>|in ones .profile. (Did I just make a constructive suggestion? Oops.)
>
>GLOBASK is not that different from expandcheck. In fact,
>setting GLOBASK=<all commands> is exactly the same as setting
>expandcheck=1 modulo the prompt text.
No it isn't, because it is not *possible* to set GLOBASK=<all commands>.
That's an open set. (The set of commands accessible through my $PATH at
the moment is 661, and that's after I pruned my $PATH.) It's also quite
a different perspective; it's quite pointless to limit
echo * | wc -w
which expandcheck would do, whereas the GLOBASK approach explicitly
identifies only the believed-dangerous commands.
I am not seriously proposing GLOBASK; just pointing out that more focussed
approaches than expandcheck are possible.
More information about the Comp.unix.wizards
mailing list