Email List: Xaustin-review-lX
[All Lists]

Defect in XCU rm

To: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Defect in XCU rm
From: yyyyyyyyy@xxxxxxx
Date: Tue, 11 Mar 2003 18:14:31 GMT
        Defect report from : John Beck , Sun Microsystems

(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)

@ page 820 line 31681-31683 section rm comment {JTB-1}

Problem:

Defect code :  3. Clarification required

An occasional user mistake, with devastating consequences, is to
write a shell script with a line such as:
        rm -rf $VARIABLE1/$VARIABLE2
or
        rm -rf /$VARIABLE1
without verifying that either variable is set, which can lead to
        rm -rf /
being the resulting command.  Since there is no plausible
circumstance under which this is the desired behavior, it seems
reasonable to disallow this.  Such a safeguard would, however,
violate the current specification.

Action:

Either extend the exceptions for . and .. on the noted lines
to list / as well, or specify that the behavior of rm if an
operand resolves to / is undefined.

<Prev in Thread] Current Thread [Next in Thread>