eric [Sat, 3 Nov 2018 09:13:24 +0000 (09:13 +0000)]
For correctness, do not read struct servent if getservbyname_r() failed.
Also simplify code.
gilles [Sat, 3 Nov 2018 08:59:54 +0000 (08:59 +0000)]
remove log_debug
jcs [Fri, 2 Nov 2018 21:32:30 +0000 (21:32 +0000)]
Revert previous, it broke my Anker USB device
ok patrick
gilles [Fri, 2 Nov 2018 17:20:22 +0000 (17:20 +0000)]
report rDNS in link connect event
gilles [Fri, 2 Nov 2018 17:16:30 +0000 (17:16 +0000)]
smtp_report_link_connect() should be called from smtp_connected()
gilles [Fri, 2 Nov 2018 17:03:17 +0000 (17:03 +0000)]
when reporting smtp-in link-connect event, report src and dest port too
gilles [Fri, 2 Nov 2018 16:50:23 +0000 (16:50 +0000)]
pass struct sockaddr_storage instead of ss_to_text() in reporting
krw [Fri, 2 Nov 2018 16:15:55 +0000 (16:15 +0000)]
When reacting to SIGHUP, i.e. trying to restart, ignore incoming
packets, routing socket messages and cancel any pending protocol
timeout.
Since >1 packet can be received from bpf at a time, don't process any
further buffered packets after one triggers a decision to exit or
a signal is received.
gilles [Fri, 2 Nov 2018 16:09:57 +0000 (16:09 +0000)]
report connection event earlier
gilles [Fri, 2 Nov 2018 15:56:47 +0000 (15:56 +0000)]
in-smtp -> smtp-in in reporting protocol
stsp [Fri, 2 Nov 2018 14:40:24 +0000 (14:40 +0000)]
Remove 'reused group key update received' printfs.
These have served no useful purpose in practice; all reported instances were
legitimate group key retransmissions by the AP, e.g. after laptop suspend.
We fixed KRACK long ago; re-used group key messages are nothing to worry about.
gilles [Fri, 2 Nov 2018 13:45:59 +0000 (13:45 +0000)]
add REG_NOSUB to flags in regcompile
suggested by jung@
tb [Fri, 2 Nov 2018 13:38:01 +0000 (13:38 +0000)]
move X509_get0_serialNumber where it belongs
kn [Fri, 2 Nov 2018 12:46:10 +0000 (12:46 +0000)]
Accept numeric user IDs
This makes `top -U 0' and "u-1000" work.
Feedback and "that looks right" tedu, OK millert, manual bits and OK jmc
kn [Fri, 2 Nov 2018 10:21:29 +0000 (10:21 +0000)]
Prefer user names over numeric user IDs
Behave like chown(8) to prevent clobbering user names which are numbers.
Prompted by and "this is how it should be" tedu, OK millert
fcambus [Fri, 2 Nov 2018 09:59:36 +0000 (09:59 +0000)]
Remove unnecessary if/else block, both branches are identical. We can
in fact use the ATA_DELAY macro directly.
Coverity CID
1453008.
OK sthen@, kn@
espie [Fri, 2 Nov 2018 08:11:43 +0000 (08:11 +0000)]
help landry
otto [Fri, 2 Nov 2018 07:26:25 +0000 (07:26 +0000)]
ld.so's malloc has no runtime option processing, so remove the
setting flags and replace them by constants. ok deraadt@ guenther@
anton [Fri, 2 Nov 2018 07:17:34 +0000 (07:17 +0000)]
make debug flags continuous
anton [Fri, 2 Nov 2018 07:15:03 +0000 (07:15 +0000)]
disable LOCKF_DIAGNOSTIC
tb [Fri, 2 Nov 2018 05:30:41 +0000 (05:30 +0000)]
whitespace
kn [Thu, 1 Nov 2018 18:04:13 +0000 (18:04 +0000)]
Merge duplicate code into helper functions
This introduces filteruser() and filterpid(), where the first one can now
easily be extended to support matching numeric UIDs. The latter one is now
used by the `highlight` command as well.
No change in behaviour or output.
Feedback and OK millert
gilles [Thu, 1 Nov 2018 18:01:51 +0000 (18:01 +0000)]
log_warn() -> log_warnx() and only display warning that running commands
from aliases is dangerous if expand node is EXPAND_FILTER
jmc [Thu, 1 Nov 2018 16:07:00 +0000 (16:07 +0000)]
update currency exchange rates;
the economist has no data for hungary, iceland, ukraine, or vietnam this month
(actually their whole section has been reformatted in a way that less information
is given, and it is poorer for it);
gilles [Thu, 1 Nov 2018 14:48:49 +0000 (14:48 +0000)]
teach smtp process how to report smtp events to lka and teach lka how to
report these events to a proc
ok millert@
claudio [Thu, 1 Nov 2018 14:20:41 +0000 (14:20 +0000)]
Make this compile again by defining struct rde_memstats rdemem; in the tests.
gilles [Thu, 1 Nov 2018 10:47:46 +0000 (10:47 +0000)]
introduce K_REGEX table type and table_regex_match(), unused for now
ok eric@
jsg [Thu, 1 Nov 2018 10:44:27 +0000 (10:44 +0000)]
Add SPDX-License-Identifier tag from drm-intel-next-queued to
intel_ringbuffer.h which previously had no license text.
jsg [Thu, 1 Nov 2018 10:35:08 +0000 (10:35 +0000)]
Add SPDX-License-Identifier tags from linux git master to drm files
which previously had no license text.
gilles [Thu, 1 Nov 2018 10:13:25 +0000 (10:13 +0000)]
allow smtpd to fork processes at startup and maintain a socketpair with
them.
ok jung@, eric@
denis [Thu, 1 Nov 2018 10:09:52 +0000 (10:09 +0000)]
fix typos
Noticed by David Higgs, thanks.
OK claudio@
tb [Thu, 1 Nov 2018 07:01:42 +0000 (07:01 +0000)]
Make the documentation of -conv_form match reality. It defaults
to uncompressed rather than compressed.
From Jacqueline Jolicoeur
sashan [Thu, 1 Nov 2018 00:18:44 +0000 (00:18 +0000)]
- odd condition/test in PF lexer
(and other lexers too)
This commit rectifies earlier change:
in the lex... even inside quotes, a \ followed by space or tab should
expand to space or tab, and a \ followed by newline should be ignored
(as a line continuation). compatible with the needs of hoststated
(which has the most strict quoted string requirements), and ifstated
(where one commonly does line continuations in strings).
OK deraadt@, OK millert@
kettenis [Wed, 31 Oct 2018 23:10:24 +0000 (23:10 +0000)]
Add comment to remind people to bump libc++.
anton [Wed, 31 Oct 2018 19:59:37 +0000 (19:59 +0000)]
add missing echo call to cleanup target for consistency
deraadt [Wed, 31 Oct 2018 17:05:54 +0000 (17:05 +0000)]
typo; fix from hiltjo posthuma
gilles [Wed, 31 Oct 2018 16:45:24 +0000 (16:45 +0000)]
smtp_tx_mail_from() and smtp_tx_rcpt_to() should take a const char *line
gilles [Wed, 31 Oct 2018 16:40:35 +0000 (16:40 +0000)]
set a banner_sent flag in a session when banner was sent, this is noop as
of now but will reduce an upcoming diff
gilles [Wed, 31 Oct 2018 16:32:12 +0000 (16:32 +0000)]
add helper valid_smtp_response() to be used in upcoming commits
gilles [Wed, 31 Oct 2018 15:14:21 +0000 (15:14 +0000)]
in rule_to_text(), use "tls" not "starttls"
gilles [Wed, 31 Oct 2018 15:13:21 +0000 (15:13 +0000)]
log tls events as "tls" not "starttls" it has confused people
claudio [Wed, 31 Oct 2018 14:58:59 +0000 (14:58 +0000)]
Remove extra ,
Noticed by denis@
claudio [Wed, 31 Oct 2018 14:51:12 +0000 (14:51 +0000)]
Show the number of references hold by struct rde_aspath objects (which should
be the same as the number of prefixes for now).
OK denis@
claudio [Wed, 31 Oct 2018 14:50:07 +0000 (14:50 +0000)]
Remove tail queues which link peer, aspath and prefix together. These
lists are no longer needed and make it possible to share rde_aspath between
peers & prefixes. Instead of the lists the rde_aspath is now reference counted.
With this struct prefix is now the central place where everything is connected
to making the RIB a bit easier to handle.
With input and OK denis@
claudio [Wed, 31 Oct 2018 14:45:36 +0000 (14:45 +0000)]
Never remove the default RIBs from the RDE.
OK denis@
patrick [Wed, 31 Oct 2018 14:18:09 +0000 (14:18 +0000)]
Increase max frame size and hard MTU so that we can use VLANs and
Jumbo frames on ure(4).
ok kevlo@
dtucker [Wed, 31 Oct 2018 11:20:04 +0000 (11:20 +0000)]
Import new moduli.
dtucker [Wed, 31 Oct 2018 11:09:27 +0000 (11:09 +0000)]
UsePrivilegeSeparation no is deprecated, test "yes" and "sandbox".
rCVS: ----------------------------------------------------------------------
jsg [Wed, 31 Oct 2018 10:35:27 +0000 (10:35 +0000)]
add simple implementation of intel trace files which just define away
functions
ok kettenis@
kettenis [Wed, 31 Oct 2018 10:15:47 +0000 (10:15 +0000)]
Bring over gapdummy.c changes from amd64/amr64/armv7/i386.
ok deraadt@, mortimer@, visa@
miko [Wed, 31 Oct 2018 10:06:54 +0000 (10:06 +0000)]
remove a guard in mio_read(), mio_write, sio_read() & sio_write() for a
zero length request. return value of zero is preserved in this case.
OK ratchov@
nicm [Wed, 31 Oct 2018 10:05:47 +0000 (10:05 +0000)]
Reset all flags in screen_write_reset, reported by Benjamin Poirier.
miko [Wed, 31 Oct 2018 09:50:24 +0000 (09:50 +0000)]
zap return keyword to clarify umidi_flush() returns no value; ok ratchov@
kettenis [Wed, 31 Oct 2018 08:50:25 +0000 (08:50 +0000)]
Add support to uvm to establish write-combining mappings. Use this in the
inteldrm driver to add support for the I915_MMAP_WC flag.
ok deraadt@, jsg@
mestre [Wed, 31 Oct 2018 07:39:13 +0000 (07:39 +0000)]
ifstated(8) needs to load configfile from within the main loop, but also to
reload it on SIGHUP so unveil(2) it with read permissions. Additionally all
commands are exec'ed through /bin/sh instead of directly so we can just
unveil(2) /bin/sh with x perms.
OK deraadt@
mestre [Wed, 31 Oct 2018 07:39:10 +0000 (07:39 +0000)]
htpasswd(1) when in batch mode (-I) and 1 argument is used, or when not in
batch mode and 2 arguments are used we know we have to access argv[0] with rwc
permissions and also to rwc a temporary file in /tmp so we can unveil(2) both
argv[0] and /tmp with rwc permissions. In order to avoid adding "unveil" to
pledge(2), just call it after getopt(3).
Remaining code paths already have fs access disabled via pledge(2).
OK florian@ deraadt@
miko [Wed, 31 Oct 2018 02:25:26 +0000 (02:25 +0000)]
sc argument of start_output, start_input, trigger_output and trigger_input
is void* so no need to cast; ok ratchov@
jmc [Tue, 30 Oct 2018 22:31:45 +0000 (22:31 +0000)]
use Mdocdate;
kettenis [Tue, 30 Oct 2018 19:53:51 +0000 (19:53 +0000)]
Replace with minimal version written from scratch that just defines the data
structures and function prototypes that we need. The original file doesn't
even a suitable license even though the associated drm_mipi_dsi.c file is
MIT-licensed. Probably a mistake upstream, but better safe than sorry.
ok deraadt@
deraadt [Tue, 30 Oct 2018 18:08:56 +0000 (18:08 +0000)]
sync
anton [Tue, 30 Oct 2018 17:56:54 +0000 (17:56 +0000)]
add missing Pf macro; ok jmc@
remi [Tue, 30 Oct 2018 16:52:19 +0000 (16:52 +0000)]
ospf6d does not support reloading so its parent proc does not need
filesystem access with the exception of the control socket cleanup on
exit.
ok florian@
guenther [Tue, 30 Oct 2018 16:28:42 +0000 (16:28 +0000)]
Add C11's timespec_get(3); minor bump for libc.
Tweaked diff from brad@
manpage tweaks florian@ and jmc@
ok deraadt@ millert@
gilles [Tue, 30 Oct 2018 14:17:17 +0000 (14:17 +0000)]
in mda.c, when reading the last line of an mda, we should never have a \n
in the buffer, however better be safe than sorry, add VIS_NL to strnvis()
flags because a \n would corrupt an envelope.
while debugging an issue from Jason Donenfeld, this appears as a safety-net
ok eric@
kettenis [Tue, 30 Oct 2018 11:10:03 +0000 (11:10 +0000)]
The way we currently generate gap.o using a linker script results in .rodata
and .data segments that have the X (executable) flag set when using lld.
This doesn't result in those sections being mapped executable in the bsd
kernel, but it does result in the X flag being set on those sections in
the final kernel binary, which confuses some scanning tools for (ROP)
gadgets.
Fix this by tweaking the generated gapdummy.c file that is used for
building gap.o. It now defines the .rodata section using inline asm.
This also fixes .data as it will inherit its flags from .rodata.
ok deraadt@, mortimer@
kettenis [Tue, 30 Oct 2018 11:08:30 +0000 (11:08 +0000)]
The way we currently generate gap.o using a linker script results in .rodata
and .data segments that have the X (executable) flag set when using lld.
This doesn't result in those sections being mapped executable in the bsd
kernel, but it does result in the X flag being set on those sections in
the final kernel binary, which confuses some scanning tools for (ROP)
gadgets.
Fix this by tweaking the generated gapdummy.c file that is used for
building gap.o. It now defines the .rodata section using inline asm.
This also fixes .data as it will inherit its flags from .rodata.
ok deraadt@, mortimer@
ajacoutot [Tue, 30 Oct 2018 10:22:16 +0000 (10:22 +0000)]
Missed that SUBDIR remnant in previous.
prodded by a mail from "multiplexd"
ok robert@
jmc [Tue, 30 Oct 2018 07:25:57 +0000 (07:25 +0000)]
typo; from bryan stenson
deraadt [Tue, 30 Oct 2018 03:27:45 +0000 (03:27 +0000)]
If we execute a #!shell binary, the shell is an integral part of the
binary so it should bypass unveil restrictions. This is similar
(but different...) to how the ELF linker (ld.so) is loaded (after
unveils get dropped). Discovered in doas, due to more accurate unveil
semantics.
ok guenther tedu beck
remi [Mon, 29 Oct 2018 22:13:33 +0000 (22:13 +0000)]
The parent process of ospfd is not supposed to write or execute files.
Unveil "/" readonly and allow to cleanup the control socket on exit.
Just unveiling ospfd.conf is not possible since it can contain an arbitrary
number of includes.
ok benno@
guenther [Mon, 29 Oct 2018 17:10:40 +0000 (17:10 +0000)]
Support _ISOC11_SOURCE for forcing C11 feature visibility. Change the
default when no feature test defines are given to be C11 instead of C99
headers.
ok kettenis@ millert@
naddy@ doesn't think ports needs any pretesting for this
deraadt [Mon, 29 Oct 2018 14:29:44 +0000 (14:29 +0000)]
irrelevant part snuck into previous commit; from semarie
claudio [Mon, 29 Oct 2018 12:12:27 +0000 (12:12 +0000)]
Now that most archs have better NMBCLUSTERS defaults it is possible to bring
back rev 1.90.
----
mbufs and mbuf clusters are now backed by large pools. Because of this
we can relax the oversubscribe limit of socketbuffers a fair bit.
Instead of maxing out as sb_max * 1.125 or 2 * sb_hiwat the maximum is
increased to 8 * sb_hiwat -- which seems to be a good compromise between
memory waste and better socket buffer usage.
OK deraadt@
----
ok benno@
dlg [Mon, 29 Oct 2018 09:51:20 +0000 (09:51 +0000)]
use the tunnelttl in the ip6 encap too, not ip6_defhlim.
claudio [Mon, 29 Oct 2018 09:28:31 +0000 (09:28 +0000)]
Replace some walkers using the aspath/prefix lists with a rib_dump walker.
network_flush() is now using rib_dump_new to walk the Adj-RIB-In and
remove all dynamically added announcements. peer_flush() got generalized
and is now used also in peer_down(). It also uses a walker to remove all
prefixes of a peer but does it in a synchronous way for now.
OK benno@
claudio [Mon, 29 Oct 2018 09:22:48 +0000 (09:22 +0000)]
Fix route-collector mode by allowing the RDE to disable the decision process
on reload but after that not allowing it to be re-enabled. So now it is
possible to enable route-collector mode again but it is still not possible
to turn it of via reload. Problem reported by Aaron A. Glenn.
OK benno@
ajacoutot [Mon, 29 Oct 2018 07:55:40 +0000 (07:55 +0000)]
Revert previous (for now).
semarie found a few regressions with daemon that will fail if cwd is not
accessible.
deraadt [Mon, 29 Oct 2018 00:11:37 +0000 (00:11 +0000)]
needs sys/lock.h
beck [Sun, 28 Oct 2018 22:42:33 +0000 (22:42 +0000)]
Correctly deal with upper level unveil's by keeping track of the covering
unveil for each unveil in the process at unveil() time, and refactoring the
handling of current directory and ISDOTDOT to be much more sensible.
Worked out at ns2k18 with guenther@.
ok deraadt@
nicm [Sun, 28 Oct 2018 16:10:02 +0000 (16:10 +0000)]
Do not printf NULL.
nicm [Sun, 28 Oct 2018 15:34:27 +0000 (15:34 +0000)]
Do not check for a key again without an escape if only \033 is present.
naddy [Sun, 28 Oct 2018 15:21:49 +0000 (15:21 +0000)]
lld generates DT_RUNPATH elements instead of the older DT_RPATH.
Handle both. From semarie@, tweaked by espie@
ok phessler@ espie@
ajacoutot [Sun, 28 Oct 2018 09:00:07 +0000 (09:00 +0000)]
Properly handle symlinks.
millert [Sat, 27 Oct 2018 17:03:33 +0000 (17:03 +0000)]
Update to tzdata2018g from ftp.iana.org
ajacoutot [Sat, 27 Oct 2018 16:49:16 +0000 (16:49 +0000)]
SUBDIR is a remnant of the past.
ok robert@
phessler [Sat, 27 Oct 2018 10:02:47 +0000 (10:02 +0000)]
pass around the ess and ni structures we plan to use directly, instead
of rediscovering them (possibly badly).
OK stsp@
phessler [Sat, 27 Oct 2018 09:55:26 +0000 (09:55 +0000)]
clean up accounting of the AUTO_JOIN flag by making sure it is set or cleared
based on the state of the joinlist
OK stsp@
phessler [Sat, 27 Oct 2018 09:47:36 +0000 (09:47 +0000)]
don't join to a network where we expect cleartext, and the AP is using crypto
OK stsp@
anton [Sat, 27 Oct 2018 08:53:35 +0000 (08:53 +0000)]
Temporarily enable LOCKF_DIAGNOSTIC in order to catch potential bugs.
ok deraadt@ visa@ (as part of a larger diff)
anton [Sat, 27 Oct 2018 08:51:13 +0000 (08:51 +0000)]
Add assertions for lockf list manipulation, hidden behind LOCKF_DIAGNOSTIC.
While here, improve existing lockf debug routines and sprinkle some more logging
related to list manipulation.
ok deraadt@ visa@ (as part of a larger diff)
anton [Sat, 27 Oct 2018 08:47:09 +0000 (08:47 +0000)]
Rework previous lockf fix; bluhm@ noticed a regress failure during consecutive
runs. This is a second attempt in which the lockf structure is turned into a
doubly linked list which makes it easier to ensure correctness during list
insertion and deletion.
ok deraadt@ visa@
miko [Sat, 27 Oct 2018 01:01:34 +0000 (01:01 +0000)]
size for free(); ok ratchov@
kettenis [Fri, 26 Oct 2018 20:28:40 +0000 (20:28 +0000)]
Use EFI memory map to determine what memory regions are availble just like
we already do on arm64. Prevents using the framebuffer on the cubox-i as
regular memory for example.
kettenis [Fri, 26 Oct 2018 20:26:19 +0000 (20:26 +0000)]
Add acpipci(4) on amd64. For now this only calls the PCI-specific _OSC
method to let the ACPI implementation know what features we support.
mestre [Fri, 26 Oct 2018 17:11:33 +0000 (17:11 +0000)]
If we pass `file' via args then we need to unveil(2) it with read permission,
otherwise if omitted we need to unveil(2) both _PATH_UNIX and _PATH_KSYMS with
same permissions.
Unconditionally we need to also unveil(2) dbdir, which by default is
_PATH_VARDB but can be changed via args (-o directory), with read/write/create
permissions. There are a couple of temp files that will be created but it's
inside dbdir so there's no need to unveil(2) them individually.
Since we already call pledge(2) before, twice, we need to add "unveil" promise
to both of them, and finally call pledge(2) once again with the needed promises
except "unveil".
OK millert@
mestre [Fri, 26 Oct 2018 17:11:32 +0000 (17:11 +0000)]
The code path were we pass `pathname' in the arguments is already limited
with pledge(2), but since we know exactly what it is then we can go further and
also unveil(2) it with read permissions.
OK millert@ deraadt@
claudio [Fri, 26 Oct 2018 16:54:53 +0000 (16:54 +0000)]
Show how much memory is used for *-sets.
OK deraadt@
claudio [Fri, 26 Oct 2018 16:53:55 +0000 (16:53 +0000)]
Track the amount of memory used for sets and tries (aka anything-set)
OK deraadt@
jeremy [Fri, 26 Oct 2018 16:20:59 +0000 (16:20 +0000)]
Update for default ruby version switch from 2.4 to 2.5.
naddy [Fri, 26 Oct 2018 15:00:54 +0000 (15:00 +0000)]
With lld the calculation of the entry point was wrong since
LOADADDR(.text) is only available after the description of the text
section. Instead simply use ENTRY(start) like we do on amd64. The
bootloader strips the high bits from the entry point address already,
so using the virtual address as the entry point address works.
with/ok kettenis@