summaryrefslogtreecommitdiff
path: root/sbin
AgeCommit message (Collapse)Author
2015-04-02Don't printf("offset: ...) before every call to MBR_print(). Do itKenneth R Westerback
once inside MBR_print().
2015-03-30Even better -- readsector() and writesector() become DISK_readsector() andKenneth R Westerback
DISK_writesector() and live in disk.[ch].
2015-03-30Nuke declaration of unused and non-existant function MBR_print_disk().Kenneth R Westerback
2015-03-29Rename MBR_readsector() and MBR_writesector() to just readsector()Kenneth R Westerback
and writesector(). Move them to misc.[ch]. Soon to be used for more than MBR reading/writing. No intentional functional change.
2015-03-29A couple of letoh64() to make GPTSIGNATURE test work better onKenneth R Westerback
non-amd64 boxen.
2015-03-28Add a simple crc32() implmentation to avoid pulling in libz, whichKenneth R Westerback
would complicate install media. Will be used by GPT support.
2015-03-27Wrap some annoying long lines.Kenneth R Westerback
2015-03-27Use DOSACTIVE define instead of magic number 0x80.Kenneth R Westerback
2015-03-26Adapt ask_string() from disklabel's getstring(). It will be usedKenneth R Westerback
to obtain GPT partition names. Tweak ask_pid() to take low/high bounds so it can handle 1-ff (MBR) or 1000-ffff (GPT) partition pids as required. A pid of '0' is still special and disables the partition. No visible or intentional functional change.
2015-03-26initial support for RFC 7427 signatures, so we are no longerMarkus Friedl
restricted to SHA1 for RSA signatures. ok mikeb@
2015-03-26Allow input/printing/conversion of terabyte sizes. Which GPT partitonsKenneth R Westerback
will eventually be able to use.
2015-03-26Expand internal representation of partition starting LBA and sizeKenneth R Westerback
to 64 bits, adjusting printf()'s, etc. as required. Preparing for GPT partitions. Add 't' size unit. No other intentional functional change.
2015-03-26Remove bits of unfinished IPsec proxy support. DNS' KX records, anyone?Mike Belopuhov
ok markus, hshoexer
2015-03-24unwire lmc(4) and san(4).David Gwynne
they do "interesting" things with APIs i want to change, and i can't find any evidence anyone uses them anymore. instead of burning time on changes i cant test, ill take a chance that noone will miss them. no objections from anyone ok mpi@ deraadt@ henning@ sthen@
2015-03-23port src/sbin/ping/ping.c r1.118 to ping6:David Gwynne
> obfuscate the monotonic clock values we put on the wire by offsetting > them with a random value.
2015-03-23port src/sbin/ping/ping.c r1.116 to ping6:David Gwynne
> bump the size of the time types on the wire to 64bit, and use nsec > instead of usec so its easier to translate to/from timespecs instead > of timevals. this raises the size of the default ping payload from 16 to 24bytes, but claudio@ thinks we'll be fine with this.
2015-03-23obfuscate the monotonic clock values we put on the wire by offsettingDavid Gwynne
them with a random value. picking between ^ and +- as the operator for the obfuscation has turned out to be a great bikeshed. im picking + and - cos it prevents observers seeing high bits roll over which can indicate the magnitude of the current clock value. discussed with many.
2015-03-20Fix cut & pasto in warning message; from Andre SmaginTodd C. Miller
2015-03-19When zapping the GPT at the end of the disk, don't use disk.sizeKenneth R Westerback
to get the location. disk.size is a 32 bit value for MBR use. Use DL_GETDSIZE(&dl) to get the real location even on 'big' disks.
2015-03-19Nuke now unused variable.Kenneth R Westerback
2015-03-18Instead of embedding interface names in a sockaddr use their indexesMartin Pieuchot
when adding route entries with the -link option. This prevent the ARP layer to take the name of your interface for an Ethernet address. If you still want to add stupid content to your routing table, please write your own tool. Thanks to Henk Jan Agteresch for reporting the original issue and testing this diff. ok mikeb@, deraadt@, benno@, claudio@
2015-03-18Make init(8) static PIE.Pascal Stumpf
ok deraadt@
2015-03-18Stop passing around little used 'struct mbr tt' parameter. JustKenneth R Westerback
make the initial mbr that tt pointed at a global that can be directly accessed in the couple of places it is needed. Fewer parameters, less confusion, no functional change.
2015-03-18Sort getopt() string.Masao Uebayashi
2015-03-17Stop passing around little used and superfluous 'offset' parameter.Kenneth R Westerback
Just use the offset recorded/parsed in the struct mbr being used. Can still traverse/edit extended MBRs so offset really wasn't needed. Fewer parameters, less confusion, no functional change.
2015-03-17for small mem machines, make sure max does not get smaller thanOtto Moerbeek
min, otherwise the constraint cannot be satisfied; ok deraadt@ okan@
2015-03-16Stop passing around a pointer to the stack variable 'disk' in main().Kenneth R Westerback
There is only one disk being worked on, so just make it a global. Fewer parameters, less confusion, no functional change.
2015-03-16Document that -i/-u are mutually exclusive and clean up the relatedKenneth R Westerback
code a bit. ok deraadt@ igor@ (with suggested tweak that is coming)
2015-03-15tzfile.h is an internal header that should never have been installed.Todd C. Miller
What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@
2015-03-14Whitespace & KNF tweaks. Change functions whose return values areKenneth R Westerback
not checked to void. Use continue inside a do loop instead of a goto to the top. Move a #define/#undef more local to use. Eliminate some lint. General cleanup of things noticed preparing the big churn. No intentional functional change.
2015-03-14Zap unused variable.Kenneth R Westerback
Diff from chl@. Committing now so it doesn't get lost in upcoming megachurn.
2015-03-14Switch all the license blocks to the standard OpenBSD/ISC license.Kenneth R Westerback
With the permission of Toby. ok deraadt@
2015-03-13remove the first comma from constructs like ", and," and ", or,": you can useJason McIntyre
"and" and "or" to join sentence clauses, and you can use commas, but both hinders reading;
2015-03-13request from Thomas Schmidt to mention dmesg retention over rebootTheo de Raadt
ok ingo
2015-03-12automatic parent interface selection does not work anymore (see rev.Sebastian Benoit
1.245 of sys/netinet/ip_carp.c), carpdev is a required argument now. ok florian
2015-03-12Only read time information from the received packet if it is bigFlorian Obser
enough. OK deraadt@
2015-03-12replace bcopy with memcpyDavid Gwynne
2015-03-12bump the size of the time types on the wire to 64bit, and use nsecDavid Gwynne
instead of usec so its easier to translate to/from timespecs instead of timevals. ok deraadt@ florian@
2015-03-11port src/sbin/ping/ping.c r1.115.David Gwynne
> use clock_gettime(CLOCK_MONOTONIC) to get timestamps to measure the > interval between sending a ping and getting a reply for it. > > this makes it resistant against local wall clock changes, which can > skew the intervals reported or make them go negative. requested by deraadt@ florian@
2015-03-11use clock_gettime(CLOCK_MONOTONIC) to get timestamps to measure theDavid Gwynne
interval between sending a ping and getting a reply for it. this makes it resistant against local wall clock changes, which can skew the intervals reported or make them go negative. ok deraadt@ florian@ makes sense to lots of others
2015-02-28Reduce usage of predefined strings in manpages.Anthony J. Bentley
Predefined strings are not very portable across troff implementations, and they make the source much harder to read. Usually the intended character can be written directly. No output changes, except for two instances where the incorrect escape was used in the first place. tweaks + ok schwarze@
2015-02-26%% not % in error message; ok millert@ henning@Stuart Henderson
2015-02-15Use "In" to mark up include files, instead of wrongly wrapping with Aq.Anthony J. Bentley
Aq is not the same as <> in non-ASCII situations, so this caused incorrect output in some places. And it provided no semantics besides. ok schwarze@
2015-02-15convert bcmp to memcmpTed Unangst
ok doug millert miod
2015-02-15These functions turned up in my grep for bcmp. There are already perfectlyTed Unangst
good cmp functions written for qsort, but then different versions were written which (ab)use the fact that bsearch doesn't strictly require the key type to be the same as the element type. Nevertheless, I think it's clearer and cleaner to create a complete key struct and search with that. As a bonus, we don't need two different compare functions just to compare with two different encoding values. ok millert
2015-02-14Rather than using 0xff as a placeholder for "don't check prio", use 0xff toStuart Henderson
mean "prio is 0". This avoids the need for code changes in programs which add pf rules (as was done in pfctl but not other programs) to handle the new "check prio" functionality. Specifically this unbreaks ftp-proxy. Use of #define rather than magic 0xff suggested by benno. ok benno "if henning doesnt like it he can change it when he recovers from jet-lag"
2015-02-13Direct people to netstat for the new multicast routing sysctls.Philip Guenther
problem noted by dcoppa@ ok claudio@
2015-02-10since we inherit prio (as in, the queuing priority) from outside sources,Henning Brauer
i. e. on vlan interfaces, it is useful to be able to match on it - effectively matching on classification done elsewhere. i thought i had long implemented that, but chrisz@ asking for it made me notice that wasn't the case. tests by chrisz, ok phessler pelikan
2015-02-10Groundwork for better route support over multiple interfaces byKenneth R Westerback
using RTM_IFA to bind routes to an interface. Keep the subnet route conflict avoidance code for the time being. diff from claudio@ as part of larger routing magic diff. ok claudio@ mpi@
2015-02-10If 'write' is issued after a 'reinit' command, and the MBR to beKenneth R Westerback
written does not contain an EFI partition, zap any GPT signature found on the 2nd (LBA 1) and last sectors on the disk. The install script uses this sequence. This is a temporary workaround until more GPT support is imported post-5.7. Should fix at least some machines who insist on using the GPT even after we have overritten the 'protective' MBR. ok deraadt@ tedu@ beck@ millert@