Page MenuHomeFreeBSD

protecting against rm -rf / is now POSIXLY_CORRECT
ClosedPublic

Authored by bapt on Nov 6 2015, 8:07 AM.
Tags
None
Referenced Files
F133688738: D4092.id10005.diff
Mon, Oct 27, 3:02 PM
F133688737: D4092.id.diff
Mon, Oct 27, 3:02 PM
F133688735: D4092.id9980.diff
Mon, Oct 27, 3:02 PM
F133663561: D4092.diff
Mon, Oct 27, 9:36 AM
Unknown Object (File)
Sat, Oct 25, 5:49 PM
Unknown Object (File)
Fri, Oct 10, 10:55 PM
Unknown Object (File)
Fri, Oct 3, 2:17 AM
Unknown Object (File)
Fri, Oct 3, 2:17 AM
Subscribers

Details

Summary

Per POSIX 1003.1, 2013:

if an operand resolves to the root directory, rm shall write a diagnostic
message to standard error and do nothing more with such operands.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1047
Build 1050: arc lint + arc unit

Event Timeline

bapt retitled this revision from to protecting against rm -rf / is now POSIXLY_CORRECT.
bapt updated this object.
bapt edited the test plan for this revision. (Show Details)
bapt added a reviewer: des.
imp added a reviewer: imp.

You need to update the man page to say this is expected to comply with the 2013 version in the standards section.

I'm a little sad to see POSIXLY_CORRECT go, but I would have been sadder if we had the off-color POSIX_ME_HARDER and it was going...

This revision is now accepted and ready to land.Nov 6 2015, 4:37 PM
This revision was automatically updated to reflect the committed changes.