diff options
author | bapt <bapt@FreeBSD.org> | 2015-11-07 02:18:19 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2015-11-07 02:18:19 +0000 |
commit | 05540ecb969a0c143c420639b69daaeb6a4b80e3 (patch) | |
tree | 39ad6179d480cc2863b590b1fa7561fe6ee95f7e /bin/rm/rm.c | |
parent | b3a334d8516e0cb3bdc6d261203d3812a73ca56d (diff) | |
download | FreeBSD-src-05540ecb969a0c143c420639b69daaeb6a4b80e3.zip FreeBSD-src-05540ecb969a0c143c420639b69daaeb6a4b80e3.tar.gz |
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
Diffstat (limited to 'bin/rm/rm.c')
-rw-r--r-- | bin/rm/rm.c | 3 |
1 files changed, 1 insertions, 2 deletions
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); |