openbsd
5 years agosimplify
eric [Thu, 29 Nov 2018 08:30:27 +0000 (08:30 +0000)]
simplify

ok gilles@

5 years agoRefactor a tangle in ssl3_send_client_verify() into one function for each
tb [Thu, 29 Nov 2018 06:21:09 +0000 (06:21 +0000)]
Refactor a tangle in ssl3_send_client_verify() into one function for each
type, sigalgs/rsa/ec/gost.  Move a few special dances for GOST where they
belong now.  This prompted a fix for a long-standing bug with GOST client
certificate authentication where tls1_transcript_data() fails since the
transcript was already freed before.  Add a bit of missing error checking
and leave some further cleanup for later.

idea, guidance & ok jsing

5 years agoWe're manipulating malloc flags ourselves, start with restting them all.
otto [Thu, 29 Nov 2018 06:04:09 +0000 (06:04 +0000)]
We're manipulating malloc flags ourselves, start with restting them all.
ok bluhm@

5 years agoBetter handle automatic column width assignments in the presence of
schwarze [Thu, 29 Nov 2018 01:54:58 +0000 (01:54 +0000)]
Better handle automatic column width assignments in the presence of
horizontal spans, by implementing a moderately difficult iterative
algoritm.  The benefit is that spans containing long text no longer
cause an excessive width of their starting column.

The result is likely not optimal, in particular in the presence
of many spans overlapping in complicated ways nor when spans
interact with equalizing or maximizing colums.  But i doubt the
practical usefulness of making this more complicated.

Issue originally reported in synaptics(4), which now looks better,
by tedu@ three years ago, and reminded by Pali Rohar this summer.

5 years agoallow configuration of ecn processing
dlg [Thu, 29 Nov 2018 00:14:29 +0000 (00:14 +0000)]
allow configuration of ecn processing

this is a step toward better rfc6040 support

ok claudio@

5 years agohandle tunnel ecn configuration and reporting.
dlg [Thu, 29 Nov 2018 00:12:34 +0000 (00:12 +0000)]
handle tunnel ecn configuration and reporting.

tested with normal and special ifconfig builds.

ok claudio@

5 years agorestrict setting ecn to root
dlg [Thu, 29 Nov 2018 00:11:49 +0000 (00:11 +0000)]
restrict setting ecn to root

ok claudio@

5 years agoallow configuration of ecn propagation on tunnel interfaces.
dlg [Thu, 29 Nov 2018 00:11:23 +0000 (00:11 +0000)]
allow configuration of ecn propagation on tunnel interfaces.

ok claudio@

5 years agosync
deraadt [Wed, 28 Nov 2018 22:54:16 +0000 (22:54 +0000)]
sync

5 years agoAllow reverse sort order
kn [Wed, 28 Nov 2018 22:00:30 +0000 (22:00 +0000)]
Allow reverse sort order

Prefixing the field with a dash will sort processes in reverse order.
`o -pid' will therefore list PID 1 on top.

"looks good" tedu, improvements and OK cheloha

5 years agofuse_parse_cmd_line(3) is called fuse_parse_cmdline(3).
mpi [Wed, 28 Nov 2018 21:19:11 +0000 (21:19 +0000)]
fuse_parse_cmd_line(3) is called fuse_parse_cmdline(3).

Based on a diff from Edgar Pettijohn III.

5 years agoCorrect lock initialisation for libcrypto.
jsing [Wed, 28 Nov 2018 15:51:32 +0000 (15:51 +0000)]
Correct lock initialisation for libcrypto.

The current crypto_lock_init() function is not called early enough, meaning
that locks are already in use before it gets called. Worse, locks could be
in use when they are then initialised. Furthermore, since functions like
CRYPTO_lock() are public API, these could be called directly bypassing
initialisation.

Avoid these issues by using static initialisers.

ok bcook@

5 years agoBugfix: never set termp->enc to the ambiguous value TERMENC_LOCALE,
schwarze [Wed, 28 Nov 2018 14:23:02 +0000 (14:23 +0000)]
Bugfix: never set termp->enc to the ambiguous value TERMENC_LOCALE,
but instead set it to TERMENC_UTF8 or TERMENC_ASCII.
Makes tbl(7) box drawing work under -T locale (that is, by default
when LC_CTYPE is defined appropriately).

5 years agoadditional check needed after the previous (box drawing) patch
schwarze [Wed, 28 Nov 2018 13:43:26 +0000 (13:43 +0000)]
additional check needed after the previous (box drawing) patch

5 years agoThis test does not terminate if malloc conf is preconfigured with
bluhm [Wed, 28 Nov 2018 13:34:06 +0000 (13:34 +0000)]
This test does not terminate if malloc conf is preconfigured with
J.  Clear that option to allow running full regress with paranoid
malloc flags.  Also fix whitespace.
OK otto@

5 years agoHandle UTF-8 in word-separators option, GitHub issue 1551.
nicm [Wed, 28 Nov 2018 11:20:13 +0000 (11:20 +0000)]
Handle UTF-8 in word-separators option, GitHub issue 1551.

5 years agoAdjust bgpctl to handle the community changes done in bgpd.
claudio [Wed, 28 Nov 2018 08:33:59 +0000 (08:33 +0000)]
Adjust bgpctl to handle the community changes done in bgpd.
OK job@, phessler@

5 years agoStart reworking community handling. Merge standard communities and large
claudio [Wed, 28 Nov 2018 08:32:26 +0000 (08:32 +0000)]
Start reworking community handling. Merge standard communities and large
communities into one filter_community struct and allow it that more then
one community can be used in filter rules (currently up to 3).
Also rework the code handling bgpctl show rib commands. The special IMSG
types for the various filters are gone and the code is in general simpler.
OK job@, phessler@

5 years agoFurther cleanup of icmp_do_error.
claudio [Wed, 28 Nov 2018 08:15:29 +0000 (08:15 +0000)]
Further cleanup of icmp_do_error.
- Use m_align() since it handles all cases
- Use same rounding logic in the size check as in m_align() so all data will
  filt always.
- consolidate pkthdr initalisation into one place
- use m_prepend() instead of direct pointer manipulation (including the panic
  in case an underflow happens).
OK bluhm@

5 years agoTest for EMSGSIZE return when sending more fds in a message then the receiver
claudio [Wed, 28 Nov 2018 08:06:22 +0000 (08:06 +0000)]
Test for EMSGSIZE return when sending more fds in a message then the receiver
can handle and also test the case where the reciever is using read() instead
of recvmsg() to test the unp_discard() codepath in the kernel. The latter test
is just instrumenting the code but has no way to check if the discarding was
successful.
OK guenther@ bluhm@

5 years agoDiscovered prefixes should not override explicitly configured
florian [Wed, 28 Nov 2018 06:41:31 +0000 (06:41 +0000)]
Discovered prefixes should not override explicitly configured
prefixes. That way one can have multiple prefixes configured on an
interface and set "autonomous address-configuration no" in rad.conf to
tell clients to not form addresses from some of these prefixes.

Pointed out by Ross L Richardson (openbsd AT rlr.id.au), thanks!
OK phessler

5 years agodon't truncate user or host name in "user@host's password: " prompts.
djm [Wed, 28 Nov 2018 06:00:38 +0000 (06:00 +0000)]
don't truncate user or host name in "user@host's password: " prompts.
requested by Marcel Logen; ok dtucker@

5 years agoIn -T utf8 output mode, render tbl(7) borders with the Unicode
schwarze [Wed, 28 Nov 2018 04:47:46 +0000 (04:47 +0000)]
In -T utf8 output mode, render tbl(7) borders with the Unicode
box drawing characters, U+2500 to U+257F.

Originally suggested by bentley@ four years ago,
reminded this summer by Pali Rohar.

Binary and decimal arithmetics are boring,
so let's use some ternary arithmetics for a change.

That said, some other aspects are too complicated for my liking,
so this could use some polishing in the future.

5 years agoImplement support for DT_GNU_HASH, taking all the interesting bits
guenther [Wed, 28 Nov 2018 03:18:00 +0000 (03:18 +0000)]
Implement support for DT_GNU_HASH, taking all the interesting bits
from Matt Dillon's implementation in DragonFlyBSD commit 7629c631.
One difference is that as long as DT_HASH is still present, ld.so
will use that to get the total number of symbols rather than walking
the GNU hash chains.  Note that the GPLv2 binutils we have doesn't
support DT_GNU_HASH, so this only helps archs were lld is used.

ok kettenis@ mpi@

5 years agoRefactor "find the right pool" code into a function. ok djm@ tb@
otto [Tue, 27 Nov 2018 17:29:55 +0000 (17:29 +0000)]
Refactor "find the right pool" code into a function. ok djm@ tb@

5 years agoEVFILT_TIMER: Remove extra tick from tvtohz(9) on timeout reload.
cheloha [Tue, 27 Nov 2018 15:52:50 +0000 (15:52 +0000)]
EVFILT_TIMER: Remove extra tick from tvtohz(9) on timeout reload.

tvtohz(9) adds an extra tick to account for the present tick, but this
tick needs to be removed when the timeout is reloaded thereafter.  We
already do this for periodic setitimer(2) timeouts.

Prompted by Paul Herman's writeup on clock aliasing for DragonflyBSD:
https://frenchfries.net/paul/dfly/nanosleep.html

Also fixed in FreeBSD r238424.

Style tweaks from visa.

ok visa@, guenther@

5 years agoFree sizes for the subdevs array.
mpi [Tue, 27 Nov 2018 14:56:09 +0000 (14:56 +0000)]
Free sizes for the subdevs array.

ok anton@, visa@

5 years agoAttach the driver only if the stack managed to set the configuration.
mpi [Tue, 27 Nov 2018 14:53:56 +0000 (14:53 +0000)]
Attach the driver only if the stack managed to set the configuration.

Tested by stsp@

5 years agoSync with ldap(1)
martijn [Tue, 27 Nov 2018 12:10:29 +0000 (12:10 +0000)]
Sync with ldap(1)

5 years agoSync with ldap(1)
martijn [Tue, 27 Nov 2018 12:09:38 +0000 (12:09 +0000)]
Sync with ldap(1)

5 years agoSync aldap and ber with ldap(1).
martijn [Tue, 27 Nov 2018 12:06:39 +0000 (12:06 +0000)]
Sync aldap and ber with ldap(1).

OK claudio@

5 years agoLDAP returns values as OCTET STRINGs, which can be LDAPStrings, but isn't
martijn [Tue, 27 Nov 2018 12:04:57 +0000 (12:04 +0000)]
LDAP returns values as OCTET STRINGs, which can be LDAPStrings, but isn't
always the case. This caused some malformed output when querying databases
returning data containing NUL-bytes. Fix this by also returning the
actual size.

With this diff we should produce basically identical output to openldap's
ldapsearch.

Lots of back and forths with claudio@

OK claudio@

5 years agohandle -s and -i in a uniform fashion, do not try to change the node type
espie [Tue, 27 Nov 2018 09:33:48 +0000 (09:33 +0000)]
handle -s and -i in a uniform fashion, do not try to change the node type
but use the Targ_* functions correctly.

This fixes an oddity in end node handling noticed by kn@

review and okay kn@

5 years agoImplement tbl(7) lines in -T html output,
schwarze [Mon, 26 Nov 2018 21:05:54 +0000 (21:05 +0000)]
Implement tbl(7) lines in -T html output,
as far as they are on the edges of table cells
rather than going through the middle of cells:

* the box, doublebox, and allbox options;
* the | and || layout modifiers;
* and the _ and = data lines;
- but not yet _ and = in individual layout and data cells.

Missing feature reported by Pali dot Rohar at gmail dot com.

5 years agoWhen a conditional block is closed by putting "\}" on a text line
schwarze [Mon, 26 Nov 2018 17:44:29 +0000 (17:44 +0000)]
When a conditional block is closed by putting "\}" on a text line
by itself (which is somewhat unusual but not invalid; most authors
use the empty macro line ".\}" instead), agree more closely with
groff and do not produce a double space in the output.

Quirk reported by millert@.

While here, tweak the rest of the function body of roff_cond_text()
to more closely match roff_cond_sub().  The subtly different handling
could make people (including myself) wonder whether there is any
point in being different.  Testing shows there is not.

5 years agoPlace mandoc.css into the public domain.
schwarze [Mon, 26 Nov 2018 15:01:38 +0000 (15:01 +0000)]
Place mandoc.css into the public domain.

The reason for doing this rather than using the ISC license
is that i guess that in some contexts, a requirement to preserve
a Copyright and license header might be inconvenient, and i really
don't care at all how people use it.

What matters is that they do use it, or something similar - attempts
to use mandoc without any CSS are a constant source of grief and
bogus bug reports because HTML without CSS doesn't look very good:
the more structural and semantic and the less presentational and
old-fashioned the HTML, the more so.

Thanks to Mark Harris <mark dot hsj at gmail dot com> for pointing out
that the permissions on this particular file were unclear.

5 years agoMove the {qcow2,raw} create functions from vmctl into vmd/vio{qcow2,raw}.c
reyk [Mon, 26 Nov 2018 10:39:30 +0000 (10:39 +0000)]
Move the {qcow2,raw} create functions from vmctl into vmd/vio{qcow2,raw}.c

This way they are in the appropriate place and code can be shared with vmd.

Ok ori@ mlarkin@ ccardenas@

5 years agoKeep a list of known vms, and reuse the VM IDs.
ori [Mon, 26 Nov 2018 05:44:46 +0000 (05:44 +0000)]
Keep a list of known vms, and reuse the VM IDs.

This means that when using '-L', the IP addresses of the VMs are stable.

ok reyk@

5 years agoSimplify writing of tbl(7) cells by using the new feature of passing
schwarze [Mon, 26 Nov 2018 01:51:41 +0000 (01:51 +0000)]
Simplify writing of tbl(7) cells by using the new feature of passing
a NULL pointer for the value of a style attribute, in which case
the attribute is omitted from the HTML element.
Minus 12 lines of ugly and repetitive code, no functional change.

5 years agoSupport more than one style attribute one the same HTML element.
schwarze [Mon, 26 Nov 2018 01:38:17 +0000 (01:38 +0000)]
Support more than one style attribute one the same HTML element.
In fact, this is already required when a table uses non-default
horizontal and vertical alignment in the same cell.

5 years agoLet cells containing nothing but \^ extend the cell above.
schwarze [Sun, 25 Nov 2018 21:17:30 +0000 (21:17 +0000)]
Let cells containing nothing but \^ extend the cell above.
Missing feature reported by Pali dot Rohar at gmail dot com.

5 years agospelling; from miod
jmc [Sun, 25 Nov 2018 19:52:08 +0000 (19:52 +0000)]
spelling; from miod

5 years agospelling; from miod
jmc [Sun, 25 Nov 2018 19:48:43 +0000 (19:48 +0000)]
spelling; from miod

5 years agoIn tbl(7) -T html output,
schwarze [Sun, 25 Nov 2018 19:23:59 +0000 (19:23 +0000)]
In tbl(7) -T html output,
span cells horizontally and vertically as requested by the layout.
Does not handle spans requested in the data section yet.

To be able to do this, record the number of rows spanned
in the first data cell (struct tbl_dat) of a vertical span.

Missing feature reported by Pali dot Rohar at gmail dot com.

5 years agoregen
daniel [Sun, 25 Nov 2018 17:36:40 +0000 (17:36 +0000)]
regen

5 years agoAdd core4g thermal id; ok mlarkin.
daniel [Sun, 25 Nov 2018 17:35:44 +0000 (17:35 +0000)]
Add core4g thermal id; ok mlarkin.

5 years agoDon't allow the bootstrap to overlap the start of the OpenBSD area of
krw [Sun, 25 Nov 2018 17:34:37 +0000 (17:34 +0000)]
Don't allow the bootstrap to overlap the start of the OpenBSD area of
the disk. Even if the OpenBSD area starts with FS_UNUSED or FS_BOOT
partitions.

ok deraadt@ as part of larger diff

5 years agofix mail.mda so it handles system() exit value correctly
gilles [Sun, 25 Nov 2018 17:34:00 +0000 (17:34 +0000)]
fix mail.mda so it handles system() exit value correctly

issue reported and diff tested by florian@

5 years agoRemove (unused) FS_BOOT training wheels. If you are allowed to newfs a
krw [Sun, 25 Nov 2018 17:12:10 +0000 (17:12 +0000)]
Remove (unused) FS_BOOT training wheels. If you are allowed to newfs a
partition, you obviously know what you are doing. Even (especially?)
if the new file system will be ffs or ext2fs.

ok deraadt@ as part of larger diff

5 years agoFS_BOOT partitions are just partitions. Not free(ish) space.
krw [Sun, 25 Nov 2018 17:01:20 +0000 (17:01 +0000)]
FS_BOOT partitions are just partitions. Not free(ish) space.

ok deraadt@ as part of larger diff

5 years agomalloc(n) + bzero is better done as calloc(1,n)
deraadt [Sun, 25 Nov 2018 15:31:12 +0000 (15:31 +0000)]
malloc(n) + bzero is better done as calloc(1,n)

5 years agodon't bother with setresuid protection there is no gain doing
deraadt [Sun, 25 Nov 2018 14:58:28 +0000 (14:58 +0000)]
don't bother with setresuid protection there is no gain doing
from-root-drop without a object to protect.  Rely upon full potential
of pledge.  Instead of late sendto() with address, connect() the udp
socket early so that the main loop can run pledge "stdio"
ok ccardenas claudio florian

5 years agofix examples there were still using old grammar
gilles [Sun, 25 Nov 2018 14:41:16 +0000 (14:41 +0000)]
fix examples there were still using old grammar

diff from Edgar Pettijohn III <edgar@pettijohn-web.com>

5 years agoflock was needed by delivery_filename which was moved to the standalone MDA
gilles [Sun, 25 Nov 2018 14:37:53 +0000 (14:37 +0000)]
flock was needed by delivery_filename which was moved to the standalone MDA
mail.mboxfile, remove pledge from parent process

diff from Edgar Pettijohn III <edgar@pettijohn-web.com>

5 years agoteach mail.maildir how to junk SpamAssassin flagged spam
gilles [Sun, 25 Nov 2018 14:29:24 +0000 (14:29 +0000)]
teach mail.maildir how to junk SpamAssassin flagged spam

reported by Thuban <thuban@yeuxdelibad.net>

5 years agoprint more details about the join'd networks we have saved when a user runs
phessler [Sun, 25 Nov 2018 12:14:01 +0000 (12:14 +0000)]
print more details about the join'd networks we have saved when a user runs
  ifconfig if joinlist

OK stsp@

5 years agomerge the wpa related settings, instead of overriding them
phessler [Sun, 25 Nov 2018 12:10:38 +0000 (12:10 +0000)]
merge the wpa related settings, instead of overriding them
this fixes setting wpaprotos (e.g. enabling wpa1)

OK stsp@

5 years agodocument knob
espie [Sun, 25 Nov 2018 12:04:29 +0000 (12:04 +0000)]
document knob

5 years agoImplement horizontal and vertical alignment of tbl(7) cell content
schwarze [Sat, 24 Nov 2018 23:03:13 +0000 (23:03 +0000)]
Implement horizontal and vertical alignment of tbl(7) cell content
in -T html output.  This does not handle spanned cells yet.
Missing feature reported by Pali dot Rohar at gmail dot com.

5 years agoonly attach pvclock(4) inside a KVM guest
phessler [Sat, 24 Nov 2018 13:12:29 +0000 (13:12 +0000)]
only attach pvclock(4) inside a KVM guest

tested by brynet@
OK reyk@

5 years agozap 10 tab leading whitespace before 'struct evp_pkey_ctx_st {'
tb [Sat, 24 Nov 2018 11:16:44 +0000 (11:16 +0000)]
zap 10 tab leading whitespace before 'struct evp_pkey_ctx_st {'

5 years agoImprove error handling and logging in qcow2
ori [Sat, 24 Nov 2018 04:51:55 +0000 (04:51 +0000)]
Improve error handling and logging in qcow2

This turns most warn + returns that should never happen into hard failures,
and improves the user directed error messages.

ok @mlarkin, @reyk

5 years agoStore and return the locking callbacks, restoring previous behaviour.
jsing [Sat, 24 Nov 2018 04:11:47 +0000 (04:11 +0000)]
Store and return the locking callbacks, restoring previous behaviour.

The previous code meant that a caller could set the locking callback, after
which CRYPTO_get_locking_callback() would return non-NULL. Some existing
code depends on this behaviour, specifically to identify if lock handling
has been configured. As such, always returning NULL from
CRYPTO_get_locking_callback() can result in unexpected application
behaviour.

ok bcook@

5 years agoWhen a font escape appears in the middle of a string,
schwarze [Fri, 23 Nov 2018 19:15:32 +0000 (19:15 +0000)]
When a font escape appears in the middle of a string,
make sure it doesn't cause output of bogus whitespace.
Fixing a bug reported by Pali dot Rohar at gmail dot com.

5 years agosync
deraadt [Fri, 23 Nov 2018 17:22:44 +0000 (17:22 +0000)]
sync

5 years agoadd missing closing quote;
jmc [Fri, 23 Nov 2018 17:21:37 +0000 (17:21 +0000)]
add missing closing quote;

5 years agoChange rtable_mpath_reprio() to take the prefixlen as argument instead of
claudio [Fri, 23 Nov 2018 16:24:11 +0000 (16:24 +0000)]
Change rtable_mpath_reprio() to take the prefixlen as argument instead of
the network mask. This saves converting the prefixlen to a mask and back.
OK phessler@, benno@

5 years agoInstall pvclock(4)
reyk [Fri, 23 Nov 2018 12:38:44 +0000 (12:38 +0000)]
Install pvclock(4)

5 years agoAdd the pvclock(4) guest driver for paravirtual clocks
reyk [Fri, 23 Nov 2018 12:37:40 +0000 (12:37 +0000)]
Add the pvclock(4) guest driver for paravirtual clocks

This improves timekeeping on KVM guests as it runs much better than
the virtualized acpihpet or acpitimer timecounters and the invtsc is
not always available.

Many thanks to Janne Johansson, landry@, and benno@ for testing amd64/i386.

OK mlarkin@ phessler@

5 years agotweak previous;
jmc [Fri, 23 Nov 2018 06:58:28 +0000 (06:58 +0000)]
tweak previous;

5 years agoadd a ssh_config "Match final" predicate
djm [Fri, 23 Nov 2018 05:08:07 +0000 (05:08 +0000)]
add a ssh_config "Match final" predicate

Matches in same pass as "Match canonical" but doesn't require
hostname canonicalisation be enabled. bz#2906 ok markus

5 years agoRemove now-unneeded ifdef SIGINFO around handler since it is now always
dtucker [Fri, 23 Nov 2018 02:53:57 +0000 (02:53 +0000)]
Remove now-unneeded ifdef SIGINFO around handler since it is now always
used for SIGUSR1 even when SIGINFO is not defined.  This will make things
simpler in -portable.

5 years agoMake alpha less special: _dl_boot_bind() is written to complete
guenther [Thu, 22 Nov 2018 21:37:29 +0000 (21:37 +0000)]
Make alpha less special: _dl_boot_bind() is written to complete
relocation of ld.so's GOT without using it, so _reloc_alpha_got()
merely made the call to _dl_boot_bind() from asm simpler...while
itself being a call that required special handling.

diff and muild baking by miod@
ok guenther@

5 years agoOur *int_fast{8,16}_t types are int/unsigned int, so SCN*FAST{8,16}
guenther [Thu, 22 Nov 2018 21:20:38 +0000 (21:20 +0000)]
Our *int_fast{8,16}_t types are int/unsigned int, so SCN*FAST{8,16}
shouldn't include 'hh' or 'h'.

problem noted by Andreas Kusalananda Kähäri (andreas.kahari(at)abc.se)
ok deraadt@ martijn@

5 years agoUse em0 instead of vmx0 to clarify the parent interface example.
reyk [Thu, 22 Nov 2018 17:31:11 +0000 (17:31 +0000)]
Use em0 instead of vmx0 to clarify the parent interface example.

Pointed out by Josh Grosse
OK deraadt@

5 years agoRemove useless assignment, value is overwritten right after being set.
fcambus [Thu, 22 Nov 2018 14:54:36 +0000 (14:54 +0000)]
Remove useless assignment, value is overwritten right after being set.

Both assignements are in our tree since the driver got imported from
FreeBSD in 2001 and remained untouched since import.

The second assignment in its current form got introduced in FreeBSD in
1997 with r29233 [1], when syncinc the driver. The first assignment got
removed in 2017 with r314147 [2].

[1]: https://svnweb.freebsd.org/base?view=revision&revision=29233
[2]: https://svnweb.freebsd.org/base?view=revision&revision=314147

Coverity CID 1453008.

OK deraadt@

5 years agoCorrect and shorten the description of the sort order of apropos(1)
schwarze [Thu, 22 Nov 2018 12:32:10 +0000 (12:32 +0000)]
Correct and shorten the description of the sort order of apropos(1)
results.  As a matter of fact, which manpath the page comes from
does not matter in that context.  That only matters for the priority
of pages in man(1) mode (without -a, -f, and -k).

Noticed while working on a patch from Yuri Pankov <yuripv at FreeBSD>.

5 years agoIn apropos(1) output, stop sorting .Nm search results by name
schwarze [Thu, 22 Nov 2018 12:01:42 +0000 (12:01 +0000)]
In apropos(1) output, stop sorting .Nm search results by name
priorities (bits).  The obscure feature wasn't documented and merely
confused people - for example Edward Tomasz Napierala <trasz at
FreeBSD>, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227408.

Smaller patch provided by Yuri Pankov <yuripv at FreeBSD>, but i'm
also retiring the now unused "bits" member from struct manpage.
Simplification is good.

5 years agoIn -T locale (the default), -T ascii, and -T utf8 mode, provide a new
schwarze [Thu, 22 Nov 2018 11:30:15 +0000 (11:30 +0000)]
In -T locale (the default), -T ascii, and -T utf8 mode, provide a new
output option -O tag[=term] to move right to the definition of "term" when
opening the manual page in a pager, effectively porting the -T html
fragment name feature - https://man.openbsd.org/ksh#ulimit - to the
terminal.  Try:

$ man -O tag uvm_sysctl
$ man -O tag=ulimit ksh
$ man -O tag 3 compress

Feature development triggered by a question from kn@.  Klemens also
tested, provided feedback that resulted in improvements, and provided
an OK.

5 years agoDo not use PWD unless it actually matches the real working directory.
nicm [Thu, 22 Nov 2018 10:36:40 +0000 (10:36 +0000)]
Do not use PWD unless it actually matches the real working directory.

5 years agoOutput info on SIGUSR1 as well as SIGINFO to resync with portable.
dtucker [Thu, 22 Nov 2018 08:59:11 +0000 (08:59 +0000)]
Output info on SIGUSR1 as well as SIGINFO to resync with portable.

5 years agoAppend pid to temp files in /var/run and set a cleanup trap for them.
dtucker [Thu, 22 Nov 2018 08:48:32 +0000 (08:48 +0000)]
Append pid to temp files in /var/run and set a cleanup trap for them.
This allows multiple instances of tests to run without colliding.

5 years agoadd missing make dependency
anton [Thu, 22 Nov 2018 07:12:44 +0000 (07:12 +0000)]
add missing make dependency

5 years agosync
deraadt [Wed, 21 Nov 2018 19:07:45 +0000 (19:07 +0000)]
sync

5 years agoIn unp_internalize() check the length more carefully preventing an
claudio [Wed, 21 Nov 2018 17:07:07 +0000 (17:07 +0000)]
In unp_internalize() check the length more carefully preventing an
underflow in a later calcuation. Using the same CMSG_LEN(0) check
that other cmsghdr handlers implemented.
Probelm found by anton@
OK anton@, deraadt@, visa@

5 years agoWhen using MSG_PEEK to peak into packets skip control messages holding
claudio [Wed, 21 Nov 2018 16:50:49 +0000 (16:50 +0000)]
When using MSG_PEEK to peak into packets skip control messages holding
SCM_RIGHTS from being sent to the userland since they hold kernel internal
data and it does not make sense to externalize it.
OK deraadt@, guenther@, visa@

5 years agofree(9) sizes for bread_cluser().
mpi [Wed, 21 Nov 2018 16:14:43 +0000 (16:14 +0000)]
free(9) sizes for bread_cluser().

ok mikeb@, visa@

5 years agoFix DTLS transcript handling for HelloVerifyRequest.
jsing [Wed, 21 Nov 2018 15:13:29 +0000 (15:13 +0000)]
Fix DTLS transcript handling for HelloVerifyRequest.

If DTLS sees a HelloVerifyRequest the transcript is reset - the previous
tls1_init_finished_mac() function could be called multiple times and would
discard any existing state. The replacement tls1_transcript_init() is more
strict and fails if a transcript already exists.

Provide an explicit tls1_transcript_reset() function and call it from the
appropriate places. This also lets us make DTLS less of a special snowflake
and call tls1_transcript_init() in the same place as used for TLS.

ok beck@ tb@

5 years agoadd st. andrew's day and put the entry for st. patrick's day in a format
jmc [Wed, 21 Nov 2018 14:50:28 +0000 (14:50 +0000)]
add st. andrew's day and put the entry for st. patrick's day in a format
similar to the others;

5 years agoavoid unwanted double space;
jmc [Wed, 21 Nov 2018 13:48:20 +0000 (13:48 +0000)]
avoid unwanted double space;

5 years agoAdd support for "local inet6" interfaces.
reyk [Wed, 21 Nov 2018 12:31:47 +0000 (12:31 +0000)]
Add support for "local inet6" interfaces.

ok & test ccardenas@, additional review from kn@

5 years agoAllow rad(8) to watch interface groups; e.g. "interface tap" in rad.conf.
reyk [Wed, 21 Nov 2018 09:50:19 +0000 (09:50 +0000)]
Allow rad(8) to watch interface groups; e.g. "interface tap" in rad.conf.

OK florian@, additional review from kn@

5 years agono more malloc.conf - it's contents are now in malloc(3) itself,
jmc [Wed, 21 Nov 2018 09:26:02 +0000 (09:26 +0000)]
no more malloc.conf - it's contents are now in malloc(3) itself,
and sysctl(2);

ok otto deraadt

5 years agofold the contents of malloc.conf.5 into malloc.3 and sysctl.2,
jmc [Wed, 21 Nov 2018 09:22:58 +0000 (09:22 +0000)]
fold the contents of malloc.conf.5 into malloc.3 and sysctl.2,
now that there is essentially no malloc.conf;

text tweaked by deraadt; ok otto deraadt

5 years agosync
deraadt [Wed, 21 Nov 2018 07:38:30 +0000 (07:38 +0000)]
sync

5 years agoIntroducing malloc_usable_size() was a mistake. While some other
otto [Wed, 21 Nov 2018 06:57:04 +0000 (06:57 +0000)]
Introducing malloc_usable_size() was a mistake. While some other
libs have it, it is a function that is considered harmful, so:

Delete malloc_usable_size(). It is a function that blurs the line
between malloc managed memory and application managed memory and
exposes some of the internal workings of malloc.  If an application
relies on that, it is likely to break using another implementation
of malloc.  If you want usable size x, just allocate x bytes. ok
deraadt@ and other devs

5 years agowhen printing essids return the number of chars we printed, like printf
phessler [Tue, 20 Nov 2018 20:49:26 +0000 (20:49 +0000)]
when printing essids return the number of chars we printed, like printf

OK stsp@

5 years agofix whitespace in debugging function
phessler [Tue, 20 Nov 2018 20:26:01 +0000 (20:26 +0000)]
fix whitespace in debugging function

5 years agosplit up long line
anton [Tue, 20 Nov 2018 19:43:48 +0000 (19:43 +0000)]
split up long line

5 years agotest getown
anton [Tue, 20 Nov 2018 19:37:10 +0000 (19:37 +0000)]
test getown