openbsd
2 years agoMake "config -e" work with ramdisk kernels
kn [Thu, 11 Nov 2021 20:25:56 +0000 (20:25 +0000)]
Make "config -e" work with ramdisk kernels

amd64, alpha, i386 and macppc strip *all* symbols off the ramdisk bsd.rd
(before compressing it) and thus break config(8)'s modification feature:

$ gzcat bsd.rd > bsd.rd.raw
$ config -e bsd.rd.raw
...
config: failed to get first cfdata

This is different from "boot> boot /bsd.rd -c" which sucessfully drops into
UKC on all platforms regardless of stripping.

Having needed "config -e" this on arm64 made me look into this for all
platforms.  Other platforms work because they don't strip these symbols.

Tweak objcopy(1)'s stripping on amd64 and macppc to unbreak permanent
modifications.  I have no alpha or i386 to test, so these remain broken.

macppc works without cranking media size.
amd64 was cranked to the smallest possible size.

OK deraadt

2 years agoThe Apple DART has a nifty feature that allows us protection of subranges
kettenis [Thu, 11 Nov 2021 18:43:05 +0000 (18:43 +0000)]
The Apple DART has a nifty feature that allows us protection of subranges
of a page with a granularity of 32-bit words.  Use this to expose just
those parts of memory to devices that we want the device to see.  This
means that handing down a small mbuf to a network card driver no longer
gives the hardware access to other mbufs in the same page.

It turns out that bge(4) always does aligned 64-bit access to memory though.
So round up/down to the nearest 64-bit boundary to prevent triggering an
IOMMU fault.

ok patrick@

2 years agoFix GENERIC kernel compilation.
mvs [Thu, 11 Nov 2021 18:36:59 +0000 (18:36 +0000)]
Fix GENERIC kernel compilation.

2 years agoDo not call ip_deliver() recursively from IPsec. As there is no
bluhm [Thu, 11 Nov 2021 18:08:17 +0000 (18:08 +0000)]
Do not call ip_deliver() recursively from IPsec.  As there is no
crypto task anymore, it is possible to return the next protocol.
Then ip_deliver() will walk the header chain in its loop.
IPsec bridge(4) tested by jan@
OK mvs@ tobhe@ jan@

2 years agoremove switch(4) entry in SEE ALSO;
jmc [Thu, 11 Nov 2021 17:33:10 +0000 (17:33 +0000)]
remove switch(4) entry in SEE ALSO;

2 years agoUse vnode(9) lock to protect `v_socket' dereference.
mvs [Thu, 11 Nov 2021 17:20:02 +0000 (17:20 +0000)]
Use vnode(9) lock to protect `v_socket' dereference.

The bind(2)ed UNIX socket hat the reference from the file system layer.
When we bind(2) such socket we link it to `v_socket' of associated
vnode(9). When we connect(2) to the socket we previously bind(2)ed we
finding it by namei(9) and obtain it's reference through `v_socket'. When
we close(2) this socket we set `v_socket' of associated vnode(9) to NULL.

This time the global `unp_lock' rwlock(9) protects the whole layer and the
dereference of `v_socket'. With the upcoming fine grained locking diffs it
will be replaced by per-socket solock(). So the dereference of `v_socket'
will be unsafe because it will be unlocked and has no extra reference in
the associated file descriptor.

Actually we have vnode(9) locked while we perform unp_bind() and
unp_connect() paths so use vnode(9) lock in the unp_detach() path too when
we disconnect dying socket from the associated vnode(9). This makes
`v_socket' locking consistent because `v_socket' relies to vnode(9) layer.
Also this makes `v_socket' dereference safe for the upcoming fine grained
locking diffs.

Do `v_socket' unlinking before `unp_refs' list cleanup to prevent
concurrent connections while dying socket `so' is unlocked.

ok bluhm@

2 years agosync
deraadt [Thu, 11 Nov 2021 16:41:39 +0000 (16:41 +0000)]
sync

2 years agoDestroy protocol control block before perform `so_q0' and `so_q' queues
mvs [Thu, 11 Nov 2021 16:35:09 +0000 (16:35 +0000)]
Destroy protocol control block before perform `so_q0' and `so_q' queues
cleanup.

The dying socket is already unlinked from the file descriptor layer, but
still accessible from the stack or from the file system layer. We need to
unlink the socket to prevent concurrent connection when we unlocked dying
socket while we perform `so_q0' or `so_q' queues cleanup or while we
perform (*pr_detach)(). This unlocking will be appeared with the upcoming
fine grained locked sockets diffs.

ok bluhm@

2 years agoexponential_test passes on i386.
mbuhl [Thu, 11 Nov 2021 16:01:38 +0000 (16:01 +0000)]
exponential_test passes on i386.

2 years agomention the public constants XN_FLAG_SEP_MASK and XN_FLAG_FN_MASK
schwarze [Thu, 11 Nov 2021 15:58:49 +0000 (15:58 +0000)]
mention the public constants XN_FLAG_SEP_MASK and XN_FLAG_FN_MASK

2 years agoMove the assignment of http_query down. Also do not assign a non-malloced
claudio [Thu, 11 Nov 2021 15:52:33 +0000 (15:52 +0000)]
Move the assignment of http_query down. Also do not assign a non-malloced
string to it since the code assumes it can call free on it.
Fixes crashes noticed by tobhe@ and florian@
OK otto@ tobhe@

2 years agoConvert from select() to ppoll(). Along the way, I observed that the
deraadt [Thu, 11 Nov 2021 15:32:32 +0000 (15:32 +0000)]
Convert from select() to ppoll().  Along the way, I observed that the
select() code was using exceptfds incorrectly..
ok millert

2 years agoIgnore tags files
kn [Thu, 11 Nov 2021 14:03:21 +0000 (14:03 +0000)]
Ignore tags files

Besides obj (and all the build objects inside), tags seem to be the only
thing that's automatically created by our build infrastructure which should
never be committed.

CVS ignores "tags" due to its builtin list of ignore patterns.
Git does not ignore tags, although it has a builtin list (e.g. "*.o").
Got has no such builtin list.

Add "**/tags" to .gitignore specifically to provide a sane default for
Got checkouts.

Mirror .gitignore with sys/.gitignore to have the same experience with
kernel-only checkouts, as is common practise with Got.

OK stsp sthen

2 years agoMention the X509v3_KU_* aliases for the KU_* constants
schwarze [Thu, 11 Nov 2021 13:58:59 +0000 (13:58 +0000)]
Mention the X509v3_KU_* aliases for the KU_* constants
because some third party application code uses them.
List the full names (even though they are long)
such that they can be found with "man -k Dv=...".

2 years agoFix iwn(4) with 4965 devices.
stsp [Thu, 11 Nov 2021 13:36:58 +0000 (13:36 +0000)]
Fix iwn(4) with 4965 devices.

Our driver was using the wrong data structure for RXON_ASSOC commands on
4965 devices. This resulted in fatal firmware errors during association.

Problem found and fix tested on 4965 by jsg@.
Patch also tested on 6200 by me.

2 years agoExplicitly list all public functions in roff(7) comments
schwarze [Thu, 11 Nov 2021 13:13:38 +0000 (13:13 +0000)]
Explicitly list all public functions in roff(7) comments
that are related to this page but intentionally undocumented,
to better support grepping the source directory for function names.

2 years agoadd tests to cover DIOCCHANGERULE ioctl(2)
sashan [Thu, 11 Nov 2021 12:49:53 +0000 (12:49 +0000)]
add tests to cover DIOCCHANGERULE ioctl(2)

OK bluhm@

2 years agoAllow pfi_kif_get() callers to pre-allocate buffer for new kif. If kif
sashan [Thu, 11 Nov 2021 12:35:01 +0000 (12:35 +0000)]
Allow pfi_kif_get() callers to pre-allocate buffer for new kif. If kif
object exists already, then caller must free the pre-allocated buffer.
If caller does not pre-allocate buffer, the pfi_kif_get() will get
memory from pool using M_NOWAIT flag.

Commit is  also polishing pfi_initialize() a bit so it uses M_WAITOK
allocation for pfi_all.

there is no change in current behaviour.

feedback by bluhm@

OK bluhm@

2 years agoTweak rc_stop and rc_reload description by mentioning their corresponding
ajacoutot [Thu, 11 Nov 2021 12:23:15 +0000 (12:23 +0000)]
Tweak rc_stop and rc_reload description by mentioning their corresponding
_signal variable.
Fix a warning from 'mandoc -T lint' while here.

2 years agoRun "_rc_wait stop" _before_ stopping the daemon and not after...
ajacoutot [Thu, 11 Nov 2021 12:08:36 +0000 (12:08 +0000)]
Run "_rc_wait stop" _before_ stopping the daemon and not after...
This doesn't change the default behavior but fixes rc.d scripts with a home made
rc_stop() function that can block and potentially hangs halt/reboot forever.

ok robert@

2 years agonew manual page X509_policy_tree_get0_policies(3),
schwarze [Thu, 11 Nov 2021 12:06:25 +0000 (12:06 +0000)]
new manual page X509_policy_tree_get0_policies(3),
also documenting X509_policy_tree_get0_user_policies(3)

2 years agoReturn 0 in case we reach KILL; this allows "restart" to work as expected
ajacoutot [Thu, 11 Nov 2021 10:37:36 +0000 (10:37 +0000)]
Return 0 in case we reach KILL; this allows "restart" to work as expected
in this situation.

reported by and ok robert@

2 years agoRemove switchd regress tests.
claudio [Thu, 11 Nov 2021 10:03:54 +0000 (10:03 +0000)]
Remove switchd regress tests.

2 years agoRetire switch(4) it never really was production ready and the OpenFlow
claudio [Thu, 11 Nov 2021 10:03:08 +0000 (10:03 +0000)]
Retire switch(4) it never really was production ready and the OpenFlow
API implemented is a deadend.
OK akoshibe@ yasuoka@ deraadt@ kn@ patrick@ sthen@

2 years agoRetire switchd and switchctl. While interesting they never managed to
claudio [Thu, 11 Nov 2021 09:59:19 +0000 (09:59 +0000)]
Retire switchd and switchctl. While interesting they never managed to
really get into a usable state. The OpenFlow API is mostly superseeded
by P4 and so this is a bit of a dead end.
OK akoshibe@ yasuoka@ deraadt@ kn@ patrick@ sthen@

2 years agoUnhook switchd and switchctl
claudio [Thu, 11 Nov 2021 09:52:24 +0000 (09:52 +0000)]
Unhook switchd and switchctl

2 years agoRegen after switch(4) removal
claudio [Thu, 11 Nov 2021 09:51:32 +0000 (09:51 +0000)]
Regen after switch(4) removal

2 years agoRegen after switch(4) removal
claudio [Thu, 11 Nov 2021 09:49:29 +0000 (09:49 +0000)]
Regen after switch(4) removal

2 years ago/dev/switch[0-4] is no longer needed.
claudio [Thu, 11 Nov 2021 09:47:32 +0000 (09:47 +0000)]
/dev/switch[0-4] is no longer needed.

2 years agoUnhook switch.4 and update bridge.4 since some switch(4) specific ioctls
claudio [Thu, 11 Nov 2021 09:45:27 +0000 (09:45 +0000)]
Unhook switch.4 and update bridge.4 since some switch(4) specific ioctls
will be removed soon.
OK sthen@ kn@ patrick@

2 years agoRemove switch(4) specific bits from ifconfig.
claudio [Thu, 11 Nov 2021 09:39:16 +0000 (09:39 +0000)]
Remove switch(4) specific bits from ifconfig.
OK deraadt@ patrick@

2 years agoswitch(4) and switchd(8) are retiering. Unhook them from various
claudio [Thu, 11 Nov 2021 09:38:14 +0000 (09:38 +0000)]
switch(4) and switchd(8) are retiering. Unhook them from various
configuration files.
OK sthen@ kn@ patrick@

2 years agoConvert a for loop into LIST_FOREACH to reduce the diff to NetBSD.
tb [Thu, 11 Nov 2021 09:34:27 +0000 (09:34 +0000)]
Convert a for loop into LIST_FOREACH to reduce the diff to NetBSD.

ok millert mpi

2 years agoswitch(4) is being retired, sthen@ already removed the bits in the code
claudio [Thu, 11 Nov 2021 09:33:36 +0000 (09:33 +0000)]
switch(4) is being retired, sthen@ already removed the bits in the code
adjust the man page as well.
OK sthen@ kn@ patrick@

2 years agoIf automatic-rename is off, allow the escape sequence to set an empty
nicm [Thu, 11 Nov 2021 09:31:16 +0000 (09:31 +0000)]
If automatic-rename is off, allow the escape sequence to set an empty
window name, GitHub issue 2964.

2 years agoIf trimming menu item text, show key if it would take up less than a
nicm [Thu, 11 Nov 2021 09:22:33 +0000 (09:22 +0000)]
If trimming menu item text, show key if it would take up less than a
quarter of the space; from Alexis Hildebrandt.

Also new sentence, new line in tmux.1, from jmc.

2 years agoremove whitespace
mestre [Thu, 11 Nov 2021 08:48:48 +0000 (08:48 +0000)]
remove whitespace

2 years agoThere's no need to call pledge(2) so many times, or on many places, with the
mestre [Thu, 11 Nov 2021 08:42:31 +0000 (08:42 +0000)]
There's no need to call pledge(2) so many times, or on many places, with the
same promises, just call it once before the switch case while at the same time
hoisting one unveil(2) so they are all grouped.

The call to pledge(2) on file() can also be simplified since "stdio rpath getpw"
will already be activated when we reach it.

OK deraadt@

2 years agoHere we go again, revert the second attempt to resolve the
anton [Thu, 11 Nov 2021 07:04:45 +0000 (07:04 +0000)]
Here we go again, revert the second attempt to resolve the
UHIDEV_CLAIM_MULTIPLE_REPORTID conflict.

Breaks fido(4) as reported by gnezdo@

2 years agoresolvd(8) also monitors proposals learned by sppp(4)
bket [Thu, 11 Nov 2021 05:52:03 +0000 (05:52 +0000)]
resolvd(8) also monitors proposals learned by sppp(4)

OK kn@

2 years agoWhen sending via UDP, syslogd(8) can use iovec with sendmsg(2)
bluhm [Wed, 10 Nov 2021 21:59:47 +0000 (21:59 +0000)]
When sending via UDP, syslogd(8) can use iovec with sendmsg(2)
instead of copying the strings with snprintf(3).
OK martijn@

2 years agoRemove switch(4) pieces, feedback/missing piece millert@ ok claudio@ mlarkin@
sthen [Wed, 10 Nov 2021 20:49:04 +0000 (20:49 +0000)]
Remove switch(4) pieces, feedback/missing piece millert@ ok claudio@ mlarkin@

2 years agoGive sppp(4) its own RTP_PROPOSAL priority
bket [Wed, 10 Nov 2021 20:24:22 +0000 (20:24 +0000)]
Give sppp(4) its own RTP_PROPOSAL priority

OK semarie@

2 years agoMax size of src also changed. Noted by Mikhail <mp39590@gmail.com>
otto [Wed, 10 Nov 2021 20:15:26 +0000 (20:15 +0000)]
Max size of src also changed. Noted by Mikhail <mp39590@gmail.com>

2 years agoAdd missing chunk form previous commit
otto [Wed, 10 Nov 2021 18:38:51 +0000 (18:38 +0000)]
Add missing chunk form previous commit

2 years agosync
deraadt [Wed, 10 Nov 2021 16:25:15 +0000 (16:25 +0000)]
sync

2 years agoremove a pointless call of setlocale(3);
schwarze [Wed, 10 Nov 2021 15:06:24 +0000 (15:06 +0000)]
remove a pointless call of setlocale(3);
patch from Jan Stary <hans at stare dot cz>;
OK martijn@

2 years agosppp(4) - support PPP IPCP extensions for DNS
bket [Wed, 10 Nov 2021 15:04:26 +0000 (15:04 +0000)]
sppp(4) - support PPP IPCP extensions for DNS

RFC 1877 extends the family of network control protocols for
establishing and configuring the IPCP over PPP, defining the negotiation
of primary and secondary DNS addresses. After negotiation,
rtm_proposal() is used to send out DNS updates.

Feedback from claudio@ and kn@.

OK claudio@, kn@

2 years agoMerge a few additional X509error(ERR_R_MALLOC_FAILURE) calls
schwarze [Wed, 10 Nov 2021 14:34:21 +0000 (14:34 +0000)]
Merge a few additional X509error(ERR_R_MALLOC_FAILURE) calls
and various style improvements from the OpenSSL 1.1.1 branch,
which is still under a free license.

- No need to #include <openssl/lhash.h>.
- BUF_MEM_free(3) and sk_pop_free(3) can handle NULL.
- sk_value(3) can handle -1.
- Test pointers with "== NULL" rather than with "!".
- Use the safer "p = malloc(sizeof(*p))" idiom.
- return is not a function.
- Delete very wrong commented out code.

Including parts of the these commits from the 2015 to 2018 time range:
25aaa98a b4faea50 90945fa3 f32b0abe 26a7d938 7fcdbd83 208056b2 5b37fef0

Requested by and OK tb@.

2 years agoIf X509_load_cert_crl_file(3) does not find any certificates
schwarze [Wed, 10 Nov 2021 13:57:42 +0000 (13:57 +0000)]
If X509_load_cert_crl_file(3) does not find any certificates
and/or CRLs in the PEM input file (for example, if the file
is empty), provide an error message in addition to returning 0.

This merges another part of this OpenSSL commit,
which is still under a free license:

  commit c0452248ea1a59a41023a4765ef7d9825e80a62b
  Author: Rich Salz <rsalz@openssl.org>
  Date:   Thu Apr 20 15:33:42 2017 -0400

I did *not* add the similar message types X509_R_NO_CERTIFICATE_FOUND
and X509_R_NO_CRL_FOUND because both code inspection and testing
have shown that the code generating them is unreachable.

OK tb@

2 years agoLook for INVALID_KE group from IKE_SA_INIT in IKE transforms,
tobhe [Wed, 10 Nov 2021 13:09:05 +0000 (13:09 +0000)]
Look for INVALID_KE group from IKE_SA_INIT in IKE transforms,
not ESP transforms.  Fixes broken key exchange negotiation with
matching proposals.

ok patrick@ markus@

2 years agoSet correct prt_flag to 0.
krw [Wed, 10 Nov 2021 13:01:08 +0000 (13:01 +0000)]
Set correct prt_flag to 0.

2 years agoAdd a test for the redirect loop limit. It would be great if someone
claudio [Wed, 10 Nov 2021 09:31:19 +0000 (09:31 +0000)]
Add a test for the redirect loop limit. It would be great if someone
rewrote these tests to use a local HTTP server instead of some random
external ones.

2 years agoSync some code style improvements from the OpenSSL 1.1.1 branch,
schwarze [Wed, 10 Nov 2021 09:19:25 +0000 (09:19 +0000)]
Sync some code style improvements from the OpenSSL 1.1.1 branch,
which is still under a free license.  No functional change.

- No need to #include <openssl/lhash.h> here.
- return is not a function.
- Do not use the pointless macro BIO_s_file_internal().
- No need to check for NULL before X509_CRL_free(3).

This includes parts of the following OpenSSL commits from
the 2015 to 2017 timeframe: 222561fe9982cbbbf32b0abe26a7d938

OK tb@

2 years agoCollaps the AFI specific IP print functions into ip_addr_print() their
claudio [Wed, 10 Nov 2021 09:15:29 +0000 (09:15 +0000)]
Collaps the AFI specific IP print functions into ip_addr_print() their
only difference was the buffersize and AF argument to inet_ntop.
Use INET6_ADDRSTRLEN as the buffer size and convert the AFI to AF in
a switch statement.
OK denis@ kn@ deraadt@

2 years agoSync the encoding functions for URI with the version of ftp(1)
claudio [Wed, 10 Nov 2021 09:13:30 +0000 (09:13 +0000)]
Sync the encoding functions for URI with the version of ftp(1)
This removes ~ from the list of "unsafe" characters.
OK kn@

2 years agoMerge two bug fixes from the OpenSSL 1.1.1 branch, which is still
schwarze [Wed, 10 Nov 2021 09:00:21 +0000 (09:00 +0000)]
Merge two bug fixes from the OpenSSL 1.1.1 branch, which is still
under a free license:

1. If the three X509_load_*(3) functions are called with a NULL
file argument, do not return 1 to the caller because the return
value 1 means "i loaded one certificate or CRL into the store".

2. When calling PEM load functions, do not ask the user for a
password in an interactive manner.

This includes parts of the following commits:

  commit   c0452248ea1a59a41023a4765ef7d9825e80a62b
  Author:  Rich Salz <rsalz@openssl.org>
  Date:    Thu Apr 20 15:33:42 2017 -0400
  Message: [...] Remove NULL checks and allow a segv to occur. [...]

  commit   db854bb14a7010712cfc02861731399b1b587474
  Author:  Bernd Edlinger <bernd.edlinger@hotmail.de>
  Date:    Mon Aug 7 18:02:53 2017 +0200
  Message: Avoid surpising password dialog in X509 file lookup.

OK tb@

2 years agoIncrease maximum filesize of RPKI objects to 4MB
job [Wed, 10 Nov 2021 08:34:48 +0000 (08:34 +0000)]
Increase maximum filesize of RPKI objects to 4MB

Based on feedback from Ties de Kock

OK tb@

2 years agoRevert previous
kn [Wed, 10 Nov 2021 07:32:55 +0000 (07:32 +0000)]
Revert previous

I overlooked the autoinstall case where "Requesting ..." is used,
but those messages that got fixed where omitted in ftp's SMALL version.

Noticed the hard way by anton

2 years agoSecond attempt to resolve UHIDEV_CLAIM_MULTIPLE_REPORTID conflict, this
anton [Wed, 10 Nov 2021 06:33:30 +0000 (06:33 +0000)]
Second attempt to resolve UHIDEV_CLAIM_MULTIPLE_REPORTID conflict, this
time without using sentinel that cannot be represented using a single
byte. Instead, use 0 as this report ID is reserved according to the USB
HID specification. Fixes attachment of some upd devices which exposes up
to 256 report IDs.

Thanks to Damien Couderc <openbsd at petrocore dot eu> for reporting and
testing.

2 years agoadd the sntrup761x25519-sha512@openssh.com hybrid ECDH/x25519 +
djm [Wed, 10 Nov 2021 06:29:25 +0000 (06:29 +0000)]
add the sntrup761x25519-sha512@openssh.com hybrid ECDH/x25519 +
Streamlined NTRU Prime post-quantum KEX to the default KEXAlgorithms
list (after the ECDH methods but before the prime-group DH ones).

ok markus@

2 years agofix ssh-keysign for KEX algorithms that use SHA384/512 exchange hashes;
djm [Wed, 10 Nov 2021 06:25:08 +0000 (06:25 +0000)]
fix ssh-keysign for KEX algorithms that use SHA384/512 exchange hashes;
feedback/ok markus@

2 years agowhitespace tweak, no functional change.
dlg [Wed, 10 Nov 2021 04:46:25 +0000 (04:46 +0000)]
whitespace tweak, no functional change.

enjoy rebuilding all the things cos i deleted a space.

2 years agowhitespace tweaks, no functional change.
dlg [Wed, 10 Nov 2021 04:45:15 +0000 (04:45 +0000)]
whitespace tweaks, no functional change.

2 years agoMove two BIGNUMs in printnumber() from the stack to the heap to
tb [Wed, 10 Nov 2021 04:39:16 +0000 (04:39 +0000)]
Move two BIGNUMs in printnumber() from the stack to the heap to
prepare bc(1) and dc(1) for opaque BIGNUMs.

"looks sane" otto

2 years agoUse more sensible transforms in example config.
tobhe [Tue, 9 Nov 2021 22:38:25 +0000 (22:38 +0000)]
Use more sensible transforms in example config.

2 years agoLike most archs, riscv doesn't need resolution of JUMP_SLOT relocations
guenther [Tue, 9 Nov 2021 21:22:29 +0000 (21:22 +0000)]
Like most archs, riscv doesn't need resolution of JUMP_SLOT relocations
in static PIE binaries: delete RELOC_JMPREL and HAVE_JMPREL there.

ok kettenis@

2 years agoSwitch to <endian.h> from <machine/endian.h> for better portability.
bcook [Tue, 9 Nov 2021 18:40:20 +0000 (18:40 +0000)]
Switch to <endian.h> from <machine/endian.h> for better portability.

ok tb@

2 years agoRegen
otto [Tue, 9 Nov 2021 16:54:06 +0000 (16:54 +0000)]
Regen

2 years agoIncrease min and max src a bit to accomodate growth and git users
otto [Tue, 9 Nov 2021 16:53:18 +0000 (16:53 +0000)]
Increase min and max src a bit to accomodate growth and git users
From Mikhail <mp39590@gmail.com>

2 years agoSplit a new page X509_load_cert_file(3) with three functions
schwarze [Tue, 9 Nov 2021 16:23:04 +0000 (16:23 +0000)]
Split a new page X509_load_cert_file(3) with three functions
out of X509_LOOKUP_hash_dir(3) because both groups of functions
differ substantially in purpose and structure.

Rewrite the complete text of X509_load_cert_file(3) from scratch
for correctness and clarity.

This fixes several documentation errors:
1. The names of the constants were wrong, lacking the "X509_" prefix.
2. None of these functions support X509_FILETYPE_DEFAULT,
neither in OpenSSL nor in LibreSSL.
3. The memory cache does not contain X509_STORE objects;
instead, the X509_STORE object *is* the memory cache.

2 years agoAdd gpiokeys(4) for arm64
kn [Tue, 9 Nov 2021 16:16:10 +0000 (16:16 +0000)]
Add gpiokeys(4) for arm64

This driver handles events triggered by GPIO keys such as lid status and
power button.

OK kettenis

2 years ago-i may not be specified multiple times; from josh grosse
jmc [Tue, 9 Nov 2021 16:13:40 +0000 (16:13 +0000)]
-i may not be specified multiple times; from josh grosse
ok millert

2 years agoadd some Dv; from simon branch
jmc [Tue, 9 Nov 2021 16:11:21 +0000 (16:11 +0000)]
add some Dv; from simon branch

2 years agoSort gpio{leds,charger}
kn [Tue, 9 Nov 2021 16:10:42 +0000 (16:10 +0000)]
Sort gpio{leds,charger}

2 years agoAdd ASPA OID
job [Tue, 9 Nov 2021 15:41:10 +0000 (15:41 +0000)]
Add ASPA OID

draft-ietf-sidrops-aspa-profile

OK tb@

2 years agoTry this again, with (__powerpc__ || __mips__) chunk actually
krw [Tue, 9 Nov 2021 14:02:09 +0000 (14:02 +0000)]
Try this again, with (__powerpc__ || __mips__) chunk actually
compiling.

Use a couple of local 'struct prt' variables to make MBR_init()
easier to read.

No functional change.

2 years agofix typo (noticed by sthen@)
espie [Tue, 9 Nov 2021 12:22:09 +0000 (12:22 +0000)]
fix typo (noticed by sthen@)

2 years agoPrint actually requested URLs
kn [Tue, 9 Nov 2021 12:14:35 +0000 (12:14 +0000)]
Print actually requested URLs

Encoding URL paths changes the requested URL and therefore may yield
different responses (opposed to an unencoded URL), solely depending on how
the server implements de/encoding.

Always print the encoded URL which actually gets requested in output like
"Requesting ..." and erors likes "Error retrieving ....: 404 Not Found"
and don't use the original URL provided on the command line.

This matches exactly what is seen on the wire, e.g. with tshark(1) and
helps debugging URL de/encoding related (server) issues.

Feedback OK sthen

2 years agoClarify ksh(1) dependency
kn [Tue, 9 Nov 2021 11:43:47 +0000 (11:43 +0000)]
Clarify ksh(1) dependency

OK aja

2 years agocheck that the rc script including rc.subr is using ksh; rc.subr uses ksh
sthen [Tue, 9 Nov 2021 11:29:33 +0000 (11:29 +0000)]
check that the rc script including rc.subr is using ksh; rc.subr uses ksh
features and scripts will not work correctly with sh. tweak jca/ok kn/
ok with direction aja

2 years agoLimit the number of publication points under a given TAL.
claudio [Tue, 9 Nov 2021 11:03:39 +0000 (11:03 +0000)]
Limit the number of publication points under a given TAL.
Introduce an additional timeout for each publication point.

The limits are large enough to accomodate normal operating levels.

With and OK benno@ job@ tb@ beck@ deraadt@

2 years agoIssue a parse error for XML files that include a DOCTYPE section.
claudio [Tue, 9 Nov 2021 11:01:04 +0000 (11:01 +0000)]
Issue a parse error for XML files that include a DOCTYPE section.
DTD handling is known for various security problems and so it is best to
not even enter that mine field.
Also the RFC defines the RRDP XML schema using RELAX NG instead of DTD.

With and OK benno@ job@ tb@ beck@ deraadt@

2 years agoImplementation of HTTP Keep-Alive sessions introduced a regression for
claudio [Tue, 9 Nov 2021 11:00:43 +0000 (11:00 +0000)]
Implementation of HTTP Keep-Alive sessions introduced a regression for
the HTTP redirect limit. The loop counter is reset during the redirect
because a new http request is allocated in http_redirect(). Pass the
current redirect_loop count to http_req_new() thereby the count
increases for every redirect.

With and OK benno@ job@ tb@ beck@ deraadt@

2 years agoAdd IPv4, TCP4/6 and UDP4/6 checksum offloading.
jan [Tue, 9 Nov 2021 09:26:18 +0000 (09:26 +0000)]
Add IPv4, TCP4/6 and UDP4/6 checksum offloading.

ok jmatthew@

2 years agoThe uhidevsubmatch() routine was imported from NetBSD back in 2002 along with
anton [Tue, 9 Nov 2021 06:25:42 +0000 (06:25 +0000)]
The uhidevsubmatch() routine was imported from NetBSD back in 2002 along with
the reportid locator. The same locator was removed in 2004 making the routine
redundant.

ok gnezdo@ mpi@

2 years agono, that breaks architectures
deraadt [Tue, 9 Nov 2021 01:50:11 +0000 (01:50 +0000)]
no, that breaks architectures

2 years agoPull OpenSSL test into the Makefile using it to avoid it on "make obj"
kn [Mon, 8 Nov 2021 23:06:49 +0000 (23:06 +0000)]
Pull OpenSSL test into the Makefile using it to avoid it on "make obj"

This way a top-down "make obj" does nothing but symlink creation and "make"
or "make regress" still does the eopenssl11 check at the very end.

This is how the rest of the regress suite does it, e.g. sys/netinet/pmtu.

OK tb

2 years agoUse a couple of local 'struct prt' variables to make MBR_init()
krw [Mon, 8 Nov 2021 22:47:47 +0000 (22:47 +0000)]
Use a couple of local 'struct prt' variables to make MBR_init()
easier to read.

No functional change.

2 years agoUse plen consistently.
tobhe [Mon, 8 Nov 2021 22:36:18 +0000 (22:36 +0000)]
Use plen consistently.

ok patrick@

2 years agoimprove error message when trying to expand a ~user path for a
djm [Mon, 8 Nov 2021 21:32:49 +0000 (21:32 +0000)]
improve error message when trying to expand a ~user path for a
user that doesn't exist; better matches what the shell does

ok deraadt@

2 years agoReplace <sys/limits.h> with <limits.h>
bcook [Mon, 8 Nov 2021 18:19:22 +0000 (18:19 +0000)]
Replace <sys/limits.h> with <limits.h>

ok tb@

2 years agosync
deraadt [Mon, 8 Nov 2021 18:05:03 +0000 (18:05 +0000)]
sync

2 years agoinstall.site.5 not .8
kn [Mon, 8 Nov 2021 16:13:43 +0000 (16:13 +0000)]
install.site.5 not .8

2 years agoRename/move site(8) into install.site(5)
kn [Mon, 8 Nov 2021 16:12:09 +0000 (16:12 +0000)]
Rename/move site(8) into install.site(5)

These sets/scripts are not commands and there is nothing actually called
"site".  This is configuration, so use section five.  Also rename to what
actually exists.

Discussed with deraadt schwarze jmc
OK deraadt

2 years agoFix markup
kn [Mon, 8 Nov 2021 15:33:36 +0000 (15:33 +0000)]
Fix markup

2 years agoremove reference to ieee80211_mira.c which has been sent to the Attic
stsp [Mon, 8 Nov 2021 14:52:08 +0000 (14:52 +0000)]
remove reference to ieee80211_mira.c which has been sent to the Attic

2 years agoSend MiRA source files to the Attic.
stsp [Mon, 8 Nov 2021 14:51:30 +0000 (14:51 +0000)]
Send MiRA source files to the Attic.
These files were unhooked from the build in April 2021.

2 years agoDocument X509_gmtime_adj(3).
schwarze [Mon, 8 Nov 2021 14:44:14 +0000 (14:44 +0000)]
Document X509_gmtime_adj(3).
While here, improve some argument names, improve ordering of the
material, and mention the meaning of negative and of large arguments,

2 years agoadd extra support to pass REVISION, EPOCH, FLAVOR_LIST from the ports
espie [Mon, 8 Nov 2021 13:33:05 +0000 (13:33 +0000)]
add extra support to pass REVISION, EPOCH, FLAVOR_LIST from the ports
infrastructure, so that pkg_create can catch some naming errors.