standards/176412: newfs writes by default, compare to bsdlabel/disklabel.

root at root at
Mon Feb 25 06:10:02 UTC 2013

>Number:         176412
>Category:       standards
>Synopsis:       newfs writes by default, compare to bsdlabel/disklabel.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-standards
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 25 06:10:01 UTC 2013
>Originator:     Charlie
>Release:        FreeBSD 9.1-RELEASE i386
No Organization
System: FreeBSD 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243826: Tue Dec 4 06:55:39 UTC 2012 root at i386
	fdisk/bsdlabel will not write to a drive by default, and require special options to do so, yet newfs will destroy an entire drive, easily and accidently, unlike other dangerous utilities.  This can cause severe problems when a user only wants newfs to read and report superblocks, and in utilizing the command, may easily forget the -N option, whereafter, the user loses his entire drive and all data.  It is also easy to be careless with newfs when previously, fdisk/bsdlabel are used without worry of accidental destructive writes to a drive.
	Play with newfs to read superblocks on a drive, and while experimenting with options, forget the -N option one time, and your drive and data are lost forever.
	It would be consistent with dangerous utilities like fdisk/bsdlabel for newfs to read by default, and only write when a user clearly demands such functionality.  There is no good reason for newfs to operate otherwise.  It's an accident waiting to happen, almost as if deliberately.


More information about the freebsd-standards mailing list