summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-11-10 07:17:38 +0000
committerbapt <bapt@FreeBSD.org>2015-11-10 07:17:38 +0000
commit7d9f73688650e3b57abc35211b6f7fadbbe57ab7 (patch)
treee754673423909d81e7f4d8053e97b093e51b57c7 /bin
parentf0bd9d7687ebb4a333ffb79acccf6ac46805f21a (diff)
downloadFreeBSD-src-7d9f73688650e3b57abc35211b6f7fadbbe57ab7.zip
FreeBSD-src-7d9f73688650e3b57abc35211b6f7fadbbe57ab7.tar.gz
MFC r290480
Protecting against rm -rf / is now POSIXLY_CORRECT per posix 1003.1 edition 2013. No need anymore to disable the protection if one set the POXILY_CORRECT environment variable. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D4092
Diffstat (limited to 'bin')
-rw-r--r--bin/rm/rm.14
-rw-r--r--bin/rm/rm.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/bin/rm/rm.1 b/bin/rm/rm.1
index 824b627..a0e7754 100644
--- a/bin/rm/rm.1
+++ b/bin/rm/rm.1
@@ -32,7 +32,7 @@
.\" @(#)rm.1 8.5 (Berkeley) 12/5/94
.\" $FreeBSD$
.\"
-.Dd April 25, 2013
+.Dd November 7, 2015
.Dt RM 1
.Os
.Sh NAME
@@ -235,7 +235,7 @@ not the standard error output.
The
.Nm
command conforms to
-.St -p1003.2 .
+.St -p1003.1-2013 .
.Pp
The simplified
.Nm unlink
diff --git a/bin/rm/rm.c b/bin/rm/rm.c
index d91af54..7beae2d 100644
--- a/bin/rm/rm.c
+++ b/bin/rm/rm.c
@@ -155,8 +155,7 @@ main(int argc, char *argv[])
}
checkdot(argv);
- if (getenv("POSIXLY_CORRECT") == NULL)
- checkslash(argv);
+ checkslash(argv);
uid = geteuid();
(void)signal(SIGINFO, siginfo);
OpenPOWER on IntegriCloud