summaryrefslogtreecommitdiffstats
path: root/bin/rm
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2004-10-04 19:24:28 +0000
committerdes <des@FreeBSD.org>2004-10-04 19:24:28 +0000
commitd6b7bd90c2776d9ccd8bb7f33a899bd213aebf85 (patch)
treee2927738bc8621d54b6425433ddc382178c261da /bin/rm
parent7b077f5960e08313881a095bfac365544bcd08ea (diff)
downloadFreeBSD-src-d6b7bd90c2776d9ccd8bb7f33a899bd213aebf85.zip
FreeBSD-src-d6b7bd90c2776d9ccd8bb7f33a899bd213aebf85.tar.gz
The previous commit added code to rm(1) to warn about and remove any
occurrences of "/" in the argument list. This corresponds to Enhancement Request Number 5 in the Austin Group TC2 Aardvark's XCU Defects Report (<URL:http://www.opengroup.org/austin/aardvark/finaltext/xcubug.txt>). Further discussion is available in the Austin Group mailing list archives (<URL:http://www.opengroup.org/austin/mailarchives/>, "Defect in XCU rm") and for Austin Group members, in the Austin Group Interpretations archive (<URL:http://www.opengroup.org/austin/interps/>, AI-019) This commit makes that check conditional on !POSIXLY_CORRECT, since it is not strictly correct according to the current version of the standard (but is expected to be correct according to the next version, and has already been adopted by Solaris).
Diffstat (limited to 'bin/rm')
-rw-r--r--bin/rm/rm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/rm/rm.c b/bin/rm/rm.c
index 9c3f839..c313282 100644
--- a/bin/rm/rm.c
+++ b/bin/rm/rm.c
@@ -141,7 +141,8 @@ main(int argc, char *argv[])
}
checkdot(argv);
- checkslash(argv);
+ if (getenv("POSIXLY_CORRECT") == NULL)
+ checkslash(argv);
uid = geteuid();
if (*argv) {
OpenPOWER on IntegriCloud