Age | Commit message (Collapse) | Author |
|
pledge in-between the two funtion calls. The new readlabel() only does
a DIOC*DINFO ioctl, making sure the fd points to a disk, while
parselabel() does the scary string manipulations. In the makelabel()
code path do an early DIOCGDINFO before pledge. This fixes yet another
pledge problem (disklabel -w /dev/tty floppy576).
Some of this was discussed with beck.
ok semarie, earlier version ok deraadt
|
|
ok tb@
|
|
previous commit. readlabel() calls editor_allocspace() which will use
the default label unless a template was provided beforehand. Thus,
call parse_autolabel() before redlabel().
Problem found and fix provided by Mark Patruck, thanks!
Fix asap, deraadt@
|
|
fallout related to pledge disklabel (e.g. 'disklabel /dev/tty').
- Allow 'disklabel sdN' again for non-root users.
- Make sure at least one DIO* ioctl comes before pledge "disklabel"
- Fix the op == WRITE logic that broke 'make release' in -r2.217
Based on -r2.17 from beck.
ok beck
|
|
|
|
when the provided device is not a disk
ok tb@
|
|
|
|
the provided path is bogus or not a device.
ok deraadt
|
|
|
|
an arbitrary location is a possibility.
Suggested by & ok deraadt@
|
|
resistant against memory correctup, if a corrupt filesystem is given to them.
ok krw
|
|
to build boot blocks.
ok miod@
|
|
it are now using MI installboot for that purpose.
ok krw@ deraadt@
|
|
unknown disks...), after opening & reading the disklabel, pledge "stdio"
ok doug
|
|
NUMBOOT arch is left: Vax.
|
|
|
|
cylinder of the disk with extra copies of the boot blocks and
disklabel. There are no plans to ever support the native SMD
controllers that would find this useful.
ok miod@
|
|
ok otto@ deraadt@
|
|
malloc, calloc, realloc*
ok krw millert
|
|
|
|
is non-portable. Also add missing asprintf() return value checks.
OK deraadt@ guenther@ doug@
|
|
|
|
template gives mountpoints, min-max size ranges and percentage of disk
foremost intended for autoinstalls, installer bits to follow soon.
with input from many, ok theo
|
|
ok tedu miod
|
|
delete <sys/param.h> if now possible
ok guenther
|
|
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)
|
|
the errno of an intervening cleanup operation like close/unlink/etc.
Diff from Doug Hogan (doug (at) acyclic.org)
|
|
information if present. Can be used with -F/-f options to create
an fstab from the saved label.
ok otto@
|
|
required fields like disk size, causing consistency check failures.
with and ok krw@
|
|
this hardware alive is becoming increasingly difficult, and I should heed the
message sent by the three disks which have died on me over the last few days.
Noone sane will mourn these ports anyway. So long, and thanks for the fish.
|
|
fields that are ignored when reading an ascii disklabel. Actually
remove the parsing of 'total sectors', which was just above the line
trying to skip said parsing.
Spotted when halex@ forced me to read this code again.
|
|
Careful second audit by millert
|
|
instead of binary operators for comparison.
OK krw@
|
|
|
|
DEV_BSIZE blocks. Counts of possibly other-sized blocks (e.g. disk
sector addresses) are u_int64_t. The values stored in disklabels are
counts of possibly other-sized blocks and hence should be handled with
u_int64_t variables.
Start enforcing this rule. No intended functional change.
Rule strongly suggested by deraadt@
|
|
No doubt quiets one or more of the fringe compilers out there. Use
variable 'part' rather than recalculating same value in the subsequent
printf().
From dhill. ok otto@
|
|
test period; i think 3 years ago the last bugs fell out.
ok otto beck others
|
|
ok jsing
|
|
(2008), when '-r' support was removed. Spotted by jsg@ with the
assistance of clang.
|
|
There's nothing special about -c and -d requiring them to be
separated from other flags or specified as mutually exclusive. So
just show a single block of flags. Some flag combos are silly
but harmless.
Move all -B options inside NUMBOOT #if, eliminating confusing
duplication of -w and -R usage lines. And some string
declaration dancing.
Since we only have NUMBOOT = 1, no need to try and finesse
output for different values of NUMBOOT.
Line shit up.
|
|
it and the associated 'bootxx' variable. Update man page accordingly.
|
|
'N' command line options.
ok matthew@
|
|
info from the physical disk after 'disklabel -e' writes the label
to disk. Saves having to reboot or do other contortions to initialize
these fields. Toss in same treatment for total sectors so all fields
forcibly set by kernel have current values.
0'ing of the bounds noted by matthew@.
'lovely' deraadt@
|
|
|
|
in disklabel(8)
pointed out by jmc@
|
|
|
|
information to the specified file. After every label write, read the
label to get current UID info.
Some internal code cleanup with no intended functional change.
ok deraadt@
|
|
|
|
naming.
ok krw@
|
|
a disklabel UID. Based on a diff from josh@elsasser.org. Resolves PR6471.
ok krw@
|