summaryrefslogtreecommitdiff
path: root/bin/rm
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-11-07 02:18:19 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-11-07 02:18:19 +0000
commit8e5c71e2d6b9e513b250041ee1dd2e2036a687b8 (patch)
tree39ad6179d480cc2863b590b1fa7561fe6ee95f7e /bin/rm
parent1dbbea555436df267ef9787d9ea933b73b768144 (diff)
downloadsrc-test2-8e5c71e2d6b9e513b250041ee1dd2e2036a687b8.tar.gz
src-test2-8e5c71e2d6b9e513b250041ee1dd2e2036a687b8.zip
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 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D4092
Notes
Notes: svn path=/head/; revision=290480
Diffstat (limited to 'bin/rm')
-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 840b560a7d4f..4b53c2a2e102 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
@@ -234,7 +234,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 d91af54a5c12..7beae2d62766 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);