]> xenbits.xensource.com Git - people/liuw/freebsd.git/commitdiff
Protecting against rm -rf / is now POSIXLY_CORRECT per posix 1003.1
authorbapt <bapt@FreeBSD.org>
Sat, 7 Nov 2015 02:18:19 +0000 (02:18 +0000)
committerbapt <bapt@FreeBSD.org>
Sat, 7 Nov 2015 02:18:19 +0000 (02:18 +0000)
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

bin/rm/rm.1
bin/rm/rm.c

index 840b560a7d4f7a9aa8113e2b69c2b1fdbf931157..4b53c2a2e1028956522f4f0f2f7450037d1c7376 100644 (file)
@@ -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
index d91af54a5c1247219a13a055fb11063fd3fd893a..7beae2d627668b5a929cd2cf7670ac5f34cecbe0 100644 (file)
@@ -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);