summaryrefslogtreecommitdiff
path: root/sbin/newfs_ext2fs/newfs_ext2fs.c
AgeCommit message (Collapse)Author
2016-03-16There's no reason to have execute permissions on a file system image.natano
ok millert
2016-03-14Replace an ad-hoc implementation of opendev(), with said function andnatano
open the device only once with the correct flags, instead of twice (one file handle for reading and one for writing). Committing this at once because the changes are interrelated. ok stefan
2016-03-14Add a missing "cpath" promise; newfs_ext2fs can create files when usednatano
with the -F and -s flags. ok stefan
2015-12-06Avoid out of boundary access on illegal command line arguments.Tobias Stoeckmann
ok deraadt, mmcc, tedu
2015-11-28Oops, left the pledge "tty" active in the previous commitedTheo de Raadt
pointed out by Chris Hettrick
2015-11-26Instead, hoist TIOCGWINSZ up to the top, then "tty" pledge is not needed.Theo de Raadt
2015-11-26unbelievable.. this uses TIOCGWINSZ.. how did i miss that. pledge "tty".Theo de Raadt
2015-11-23Use pledge "disklabel" as needed. The theory here is these tools become moreTheo de Raadt
resistant against memory correctup, if a corrupt filesystem is given to them. ok krw
2015-10-14unfortunately rewritelabel() just before termination does a non-permittedTheo de Raadt
ioctl to rewrite the label, in support of the old-school "frag info in the disklabel" concept. disklabel folk, please come talk to me...
2015-10-13can pledge "stdio" after opening device.Theo de Raadt
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-11-20remove sys/file.h includes in favor of fcntl.h where needed.Ted Unangst
ok deraadt guenther
2014-06-29do not need sys/disk.hTheo de Raadt
2014-05-21Use errc/warnc to simplify code.Philip Guenther
ok jca@ krw@
2014-04-22Clarify an err() messagePhilip Guenther
2014-04-21While we don't recommend using ext2fs, the directions for doing soPhilip Guenther
shouldn't be misleading ok krw@
2013-11-22Whole bunch of (unsigned char) casts carefully added for ctype calls.Theo de Raadt
Careful second audit by millert
2013-10-27If a constant string needs a name, use a static const array instead of aPhilip Guenther
pointer or non-const array, as that minimizes the symbols, maximizes the placement into read-only memory, and avoids warnings from gcc -Wformat=2 when they're used as format strings. ok deraadt@
2012-12-04remove some unnecessary sys/cdefs.h inclusionsTheo de Raadt
2010-05-18dont let sys/ioctl.h imply that you get the ioctls in dkio.h. thisDavid Gwynne
gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include <sys/dkio.h> to the places that actually want and use the disk ioctls. this became an issue when krw@'s X build failed when he was testing a change to dkio.h. tested by krw@ help from and ok miod@
2010-02-18Add -q flag for compatiblity with newfs as requested by miod@Otto Moerbeek
2010-02-17handle -t for when being called by newfsOtto Moerbeek
2010-02-16fix OpenBSD rcs tags, prompted by Tim van der MolenOtto Moerbeek
2010-02-16default verbosity to 4Otto Moerbeek
2010-02-16Port of newfs_ext2fs from NetBSD. not hooked to the build yet.Otto Moerbeek
ok miod@