Age | Commit message (Collapse) | Author |
|
|
|
randomly mixing 'return (blah)' and 'return blah' idioms.
Nuke the '()'s. No intentional functional change.
|
|
Based on a proposal of tobhe@.
ok tobhe@
|
|
'N-* 100' means a max of all 'extra' disk space not all disk
space.
Fixes templates with partitions after a 'N-* 100' entry.
Reported by anton@
|
|
Encode cert and intermediate CAs in new cert bundle object,
so the information can be passed to the ca process in one step.
Pass untrusted intermediates to X509_verify_cert().
From markus@
|
|
would lose their parent.
ok tobhe@
|
|
editor_allocspace() interates over alloc_tables calling
allocate_space(). allocate_space() iterates over
space_allocations calling allocate_partition().
allocate_partition() calls allocate_diskchunk() which finds disk
space for the partition.
No intentional functional change.
ok otto@
|
|
it's a noop; nowadays both LibreSSL and OpenSSL libcrypto and libssl
initialize themselves automatically before doing anything.
spotted by tb, ok tb tobhe
|
|
or keep the memory pointed at by the char ** parameter.
Allows mpfree() to be used against the global mountpoints[] and
eliminates a couple of manual loops to free the current contents
of mountpoints[].
No intentional functional change.
|
|
string. Don't rely on GPT partition name containing a terminating
zero or the reserved bytes beyond gp_name being properly
initialized to zero.
|
|
blanks to the end of the line.
Unexpected line wrapping noticed by kettenis@, cause spotted by deraadt@
Nuke an unused variable in passing.
|
|
Functions extending ibuf_add to work with more specific data types
ibuf_add_buf, ibuf_add_zero, ibuf_add_n8, ibuf_add_n16, ibuf_add_n32,
ibuf_add_n64
Functions replacing ibuf_seek where data at a specific offset is modified
ibuf_set, ibuf_set_n8, ibuf_set_n16, ibuf_set_n32, ibuf_set_n64
Functions to check, get and set the filedescriptor stored on the ibuf
ibuf_fd_avail, ibuf_fd_get, ibuf_fd_set
and ibuf_data() to access the data buffer, to be used together with ibuf_size()
On top of this add an optimized imsg_compose_ibuf() where an ibuf is wrapped
into an imsg in an efficent way.
Finally remove msgbuf_drain since it is not used by anything outside of
the ibuf code. Because of this removal bump the major of libutil.
Remove ibuf_data() in iked since the same function is now provided by libutil.
OK tb@
|
|
and err(1, NULL) with consistent err(1, NULL) when responding to
out of memory conditions.
|
|
manipulating tape drives -> means gid operator on device nodes). This group
is also used with group-access bit on the setuid-root shutdown command
(mode ug+x,u+s). Some people use this to shutdown/reboot their machines, but
use of that group is giving them disk read access also, which is wrong.
It would be a pain to re-gid all the device nodes, so instead let's renumber
the operator execution gid into group "_shutdown".
Users using this shutdown/reboot functionality will notice it no longer works,
and move themselves to the correct group.
Various choices discussed at large, this seems our best choice.
ok sthen
|
|
occurrances.
Shorter lines, more obvious intent.
|
|
its maximum.
|
|
from markus
|
|
ok claudio tobhe
|
|
In most cases print_host(addr, buf, buflen) can be replaced with
strlcpy(buf, print_addr(addr), buflen).
Some code was never fully adjusted to the full power of print_host() and
there are remnants of times well before print_host() supported multiple
internal buffers.
With and OK tb@
|
|
The vast majority of print_host() callers cast the first argument
(usually a sockaddr_storage *) to (struct sockaddr *) and pass both
a NULL buffer and 0 length. Cast and useless arguments lead to
awkward line wrapping in many places. Clean this up by introducing a
helper. Make this helper take a void pointer, so all casts go away.
ok claudio kn tobhe
|
|
If flowf is NULL then fclose(spif) must be called.
Split up the error check from if (spif == NULL || flowf == NULL) to
individual checks since that is easier to read.
Noticed by markus@, OK tb@
|
|
abuse ibufs for that. Using stdio for this has the benefit of using any
stdio function to build up strings including fprintf().
With and OK tb@
|
|
Noticed by Bradley Latus
Diff from Jane Johansson
OK tb
|
|
more consistent.
discussed with jan@ mvs@ chris@ claudio@ dlg@
|
|
is loaded with ibuf_data(). This is by no means better but allows to
switch ibuf_data() to return void *.
OK tb@
|
|
the same in these cases.
OK tb@
|
|
"wgdescr[iption] foo" to label one peer (amongst many) on a wg(4) interface,
"-wgdescr[iption]" or "wgdescr ''" to remove the label, completely analogous
to existing interface discriptions.
Idea/initial diff from Mikolaj Kucharski (OK sthen)
Tests/prodded by Hrvoje Popovski
Tweaks/manual bits from me
Feedback deraadt sthen mvs claudio
OK claudio
|
|
method but instead of overwriting ibuf internals replace the buf a level up.
Users of ikev2_msg_send() are not allowed to hold and reuse a pointer to
msg_data (which is another footgun to disarm at some point).
OK tb@
|
|
OK tobhe@ tb@ kn@
|
|
get_cpt() simply set a partition's p_fragblock/p_cpg to default
values. Replace them with a single function set_fragblock().
No functional change.
|
|
OK kn@ tb@
|
|
More cleanup will follow.
OK tobhe@
|
|
both CHS and LBA values in the MBR partition.
Restores pre-7.0 initialization of MBR partition start/end, using
slightly less opaque code that retains the slightly different
initialization required by GPT protective MBR's.
Fixes booting from disks >8G on systems where the BIOS uses CHS.
Encountered by Paul de Weerd on his Alix.2 using BIOS 0.99.
Much diagnosis and testing by Paul of various iterations. Thanks!
|
|
0. Just use p_fragblock = 0 as in all other initializations of
p_fragblock.
No functional change.
|
|
to control the charging of laptop batteries:
* hw.battery.chargemode (int)
-1: force discharge
0: inhibit charge
1: auto
In auto mode charging may be controlled by:
* hw.battery.chargestop (int)
Percentage (0-100) of last full capacity at which the battery should
stop charging.
* hw.battery.chargestart (int)
Percentage (0-100) of last full capacity at which the battery should
start charging.
The idea is that with
hw.battery.chargemode=1
hw.battery.chargestop=80
hw.battery.chargestart=75
the battery would be kept charged within the range between 75% and 80%.
Allowable settings and some details of the behavior may differ between
hardware implementations.
Committing this early to easy testing of further diffs that implement this
functionality in acpithinkpad(4) and aplsmc(4).
ok kn@
|
|
PRT_prt_to_dp() and PRT_parse() to PRT_dp_to_prt().
No functional change.
|
|
This diff introduces separate capabilities for TCP offloading. We split this
into LRO (large receive offloading) and TSO (TCP segmentation offloading).
LRO can be turned on/off via tcprecvoffload option of ifconfig and is not
inherited to sub interfaces.
TSO is inherited by sub interfaces to signal this hardware offloading capability
to the network stack.
With tweaks from bluhm, claudio and dlg
ok bluhm, claudio
|
|
specified in the disktab entry (:dt:) when setting the default
disklabel's d_type. This will enable installboot(8) to know the
vnd device should be treated as a floppy disk.
Feedback & improved field packing from millert@
|
|
use the d_type value provided by the kernel when creating,
editing or printing a disklabel.
i.e. treat d_type as disk geometry is treated, reflecting
current reality as opposed to historical data.
|
|
Suggested by Hrvoje Popovski.
ok phessler@
|
|
partitions. Inadvertantly lost in transition to new menu logic.
|
|
than Basic Data partitions. e.g. Windows Recovery and Windows
Reserved partitions.
So tweak verbiage to make clear they are MS attributes by
prepending 'MS' and always display them.
No functional change other than modified fdisk -v output.
|
|
a bpf read timeout means every read will end after the timeout
expires. because pflogd has a half second read timeout it would sit
in a loop doing reads all the time even if there were no packets
to log.
the wait timeout means that when bpf catches a packet, it will wait
a bit for more packets to arrive before waking up the pending read.
pflogd now sits in the read syscall until packets are actually
available to log.
found by deraadt@ and ktrace
discussed with and ok sashan@
|
|
|
|
literal '0's.
No functional change.
|
|
ok florian@
|
|
draft-ietf-6man-slaac-renum-05 and implemented by Linux in 2020.
OK florian@
|
|
check the cksums of the attribute values instead of comparing the
revisions. diff from NetBSD through naito.yuichiro at gmail.com. test
by kolipe.c at exoticsilicon.com.
ok kevlo miod deraadt
|
|
retrieve rules from kernel. The current implementation requires
like O((n^2)/2) operation to read the complete rule set, because
each DIOCGETRULE operation must iterate over previous n
rules to find (n + 1)-th rule to read.
To address the issue diff introduces a pf_trans structure to keep
pointer to next rule to read, thus reading process does not need
to iterate from beginning of rule set to reach the next rule.
All transactions opened by process get closed either when process
is done (reads all rules) or when /dev/pf device is closed.
the diff also comes with lots of improvements from dlg@ and kn@
OK dlg@, kn@
|
|
confusing users with FFS attributes that only experts should
fiddle with. Actual use has withered away with functionality
rendered moot or moved elsewhere.
'-e' remains for the truly obscure corner cases.
Simply excise the code for now to see if hidden users/uses are
exposed. Further simplifications are possible if no such
users/uses surface.
ok with sthen@ millert@ kn@ otto@
|