From d6b7bd90c2776d9ccd8bb7f33a899bd213aebf85 Mon Sep 17 00:00:00 2001 From: des Date: Mon, 4 Oct 2004 19:24:28 +0000 Subject: 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 (). Further discussion is available in the Austin Group mailing list archives (, "Defect in XCU rm") and for Austin Group members, in the Austin Group Interpretations archive (, 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). --- bin/rm/rm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/rm') 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) { -- cgit v1.1