From owner-svn-src-head@freebsd.org Sat Nov 7 02:18:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0E61A25E7F; Sat, 7 Nov 2015 02:18:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FAC0109B; Sat, 7 Nov 2015 02:18:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA72IJtV047106; Sat, 7 Nov 2015 02:18:19 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA72IJFC047104; Sat, 7 Nov 2015 02:18:19 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201511070218.tA72IJFC047104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 7 Nov 2015 02:18:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290480 - head/bin/rm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2015 02:18:20 -0000 Author: bapt Date: Sat Nov 7 02:18:19 2015 New Revision: 290480 URL: https://svnweb.freebsd.org/changeset/base/290480 Log: 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 Modified: head/bin/rm/rm.1 head/bin/rm/rm.c Modified: head/bin/rm/rm.1 ============================================================================== --- head/bin/rm/rm.1 Sat Nov 7 02:03:06 2015 (r290479) +++ head/bin/rm/rm.1 Sat Nov 7 02:18:19 2015 (r290480) @@ -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 Modified: head/bin/rm/rm.c ============================================================================== --- head/bin/rm/rm.c Sat Nov 7 02:03:06 2015 (r290479) +++ head/bin/rm/rm.c Sat Nov 7 02:18:19 2015 (r290480) @@ -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);