openbsd
7 years agoSync variable names with netstart version of stripcom().
rpe [Fri, 7 Apr 2017 22:02:29 +0000 (22:02 +0000)]
Sync variable names with netstart version of stripcom().
Use $_file variable instead of $1 with the wile-loop.

7 years agoAlign comments of stripcom() function in netstart and install.sub.
rpe [Fri, 7 Apr 2017 21:44:07 +0000 (21:44 +0000)]
Align comments of stripcom() function in netstart and install.sub.

7 years agoExtend the information shown by diskinfo() to help to identify
rpe [Fri, 7 Apr 2017 21:00:42 +0000 (21:00 +0000)]
Extend the information shown by diskinfo() to help to identify
disks. Extract the disk information enclosed in <> and the NAA
from the last matching dmesg line. Useful if there are multiple
identically sized disk of the same type.

Suggested by jirib at devio dot us
Discussed with deraadt@

7 years agoIn ssl.h TLS 1.0 is called TLSv1. Adapt name in test to make it pass.
bluhm [Fri, 7 Apr 2017 17:33:45 +0000 (17:33 +0000)]
In ssl.h TLS 1.0 is called TLSv1.  Adapt name in test to make it pass.
OK jsing@

7 years agoAdapt test to new syslogd's local message priority.
bluhm [Fri, 7 Apr 2017 15:49:46 +0000 (15:49 +0000)]
Adapt test to new syslogd's local message priority.

7 years agoIncoming TCP connections from clients fill the files of a log server.
bluhm [Fri, 7 Apr 2017 15:36:16 +0000 (15:36 +0000)]
Incoming TCP connections from clients fill the files of a log server.
A log client reconnects at every SIGHUP.  Write these accept and
close messages with debug priority, then they can be turned on in
syslog.conf.  Default is off.
While there, move a debug message and set the priority of the exit
message explicitly to error.
OK mpf@ millert@

7 years agoSimply decoding of domain search option. No intentional functional
krw [Fri, 7 Apr 2017 15:03:00 +0000 (15:03 +0000)]
Simply decoding of domain search option. No intentional functional
change.

7 years agoAdd prid for CN72xx/CN73xx.
visa [Fri, 7 Apr 2017 14:17:38 +0000 (14:17 +0000)]
Add prid for CN72xx/CN73xx.

7 years agoMake SoC version available in a simple form.
visa [Fri, 7 Apr 2017 13:30:43 +0000 (13:30 +0000)]
Make SoC version available in a simple form.

7 years agoUse uint8_t instead of u_int8_t - for consistency and to make things easier
jsing [Fri, 7 Apr 2017 08:48:30 +0000 (08:48 +0000)]
Use uint8_t instead of u_int8_t - for consistency and to make things easier
for portable.

From Raphael Hittich.

7 years agosi_addr should be of type void *, not char *
guenther [Fri, 7 Apr 2017 04:48:44 +0000 (04:48 +0000)]
si_addr should be of type void *, not char *

From Andrew Aldridge (i80and(at)foxquill.com)
ok millert@ mpi@

7 years agoSimplify the size calculation for memset()
guenther [Fri, 7 Apr 2017 04:45:24 +0000 (04:45 +0000)]
Simplify the size calculation for memset()

From Anton Lindqvist (anton.lindqvist(at)gmail.com)

7 years agoInspired by recent dhcrelay(8) changes add some stricter CFLAGS. No code
krw [Thu, 6 Apr 2017 22:41:39 +0000 (22:41 +0000)]
Inspired by recent dhcrelay(8) changes add some stricter CFLAGS. No code
changes needed (yet).

7 years ago"kernel" got renamed to "boot" in vm.conf but I didn't commit the parse.y bits.
reyk [Thu, 6 Apr 2017 21:35:22 +0000 (21:35 +0000)]
"kernel" got renamed to "boot" in vm.conf but I didn't commit the parse.y bits.

Found by Pontus Lundkvist

OK deraadt

7 years agoreplace some long if/else chains with a switch
tedu [Thu, 6 Apr 2017 21:16:14 +0000 (21:16 +0000)]
replace some long if/else chains with a switch

7 years agoa little const here and there to prevent rules from changing
tedu [Thu, 6 Apr 2017 21:14:12 +0000 (21:14 +0000)]
a little const here and there to prevent rules from changing

7 years agoprepenv can take a const rule
tedu [Thu, 6 Apr 2017 21:12:06 +0000 (21:12 +0000)]
prepenv can take a const rule

7 years agoRemove the CD9660MAXPATH define. It was used to construct the path for
natano [Thu, 6 Apr 2017 19:09:45 +0000 (19:09 +0000)]
Remove the CD9660MAXPATH define. It was used to construct the path for
opening the file, so PATH_MAX makes more sense here. While there change
the code to do two less allocations per file.

ok deraadt

7 years agoless chatty EXAMPLES; from anton lindqvist
jmc [Thu, 6 Apr 2017 18:55:42 +0000 (18:55 +0000)]
less chatty EXAMPLES; from anton lindqvist

7 years agotrailing ; on end of macro definition is wrong; ok guenther
deraadt [Thu, 6 Apr 2017 18:25:38 +0000 (18:25 +0000)]
trailing ; on end of macro definition is wrong; ok guenther

7 years agoDo not expose vmm(4) VM IDs to the user, use vmd(8)'s IDs instead.
reyk [Thu, 6 Apr 2017 18:07:13 +0000 (18:07 +0000)]
Do not expose vmm(4) VM IDs to the user, use vmd(8)'s IDs instead.

Each VM has two IDs: one from the kernel (vmm) and a different one
from userland (vmd).  The vmm ID is not consistent and incremented on
every boot during runtimg of the host system.  The vmd ID remains the
same during the lifetime of a configured VM, even after reboots.
Configured VMs will even get and keep their IDs when the configuration
is loaded.  This is more what users expect.

Pointed out and tested by otto@

OK deraadt@

7 years agoConvert bcopy to memcpy where the memory does not overlap, otherwise,
dhill [Thu, 6 Apr 2017 17:36:18 +0000 (17:36 +0000)]
Convert bcopy to memcpy where the memory does not overlap, otherwise,
use memmove.  While here, change some previous conversions to a simple
assignment.

ok deraadt@

7 years agoshuffle for a saner read; help/ok bluhm
jmc [Thu, 6 Apr 2017 17:36:00 +0000 (17:36 +0000)]
shuffle for a saner read; help/ok bluhm

7 years agodocument -=; while here, simplify things so that we don;t add a separate
jmc [Thu, 6 Apr 2017 17:33:39 +0000 (17:33 +0000)]
document -=; while here, simplify things so that we don;t add a separate
usage every time we think of a new way to use this;

-= bits from anton lindqvist
ok tb tom

7 years agoSizes for the remaining free() calls, and use mallocarray()
deraadt [Thu, 6 Apr 2017 17:00:53 +0000 (17:00 +0000)]
Sizes for the remaining free() calls, and use mallocarray()
ok visa

7 years agoConsistentcy between nmembers and size order. From Christopher Hettrick;
otto [Thu, 6 Apr 2017 17:00:52 +0000 (17:00 +0000)]
Consistentcy between nmembers and size order. From Christopher Hettrick;
ok deraadt@

7 years agoCheck that local syslog messages have the the expected priority.
bluhm [Thu, 6 Apr 2017 16:56:44 +0000 (16:56 +0000)]
Check that local syslog messages have the the expected priority.

7 years agofix missing \ on \n, spotted by Edgar Pettijohn
beck [Thu, 6 Apr 2017 15:30:12 +0000 (15:30 +0000)]
fix missing \ on \n, spotted by Edgar Pettijohn

7 years agoUse the correct interrupt disestablish routine.
visa [Thu, 6 Apr 2017 15:29:47 +0000 (15:29 +0000)]
Use the correct interrupt disestablish routine.

7 years agoExtend the fdt interrupt API a little.
visa [Thu, 6 Apr 2017 15:25:24 +0000 (15:25 +0000)]
Extend the fdt interrupt API a little.

7 years agoAdd the LOG_SYSLOG facility to local messages.
bluhm [Thu, 6 Apr 2017 14:55:43 +0000 (14:55 +0000)]
Add the LOG_SYSLOG facility to local messages.
OK millert@

7 years agoReplace bcopy with a simple assignment where both variables are
dhill [Thu, 6 Apr 2017 14:25:18 +0000 (14:25 +0000)]
Replace bcopy with a simple assignment where both variables are
properly aligned and sockaddr_union fields, or with memcpy when
the memory doesn't overlap.

OK bluhm@

7 years agouse memset() instead of bzero()
gsoares [Thu, 6 Apr 2017 12:22:32 +0000 (12:22 +0000)]
use memset() instead of bzero()
OK jmatthew

7 years agofix format string found by clang -Wformat-security
gsoares [Thu, 6 Apr 2017 12:20:48 +0000 (12:20 +0000)]
fix format string found by clang -Wformat-security
OK deraadt millert

7 years agobump version for new development branch
bcook [Thu, 6 Apr 2017 10:38:24 +0000 (10:38 +0000)]
bump version for new development branch

7 years agoCompile C code with -funwind-tables. Fixes exception handling on architectures
kettenis [Thu, 6 Apr 2017 09:28:29 +0000 (09:28 +0000)]
Compile C code with -funwind-tables.  Fixes exception handling on architectures
that don't generate .eh_frame info by default such as arm64.

ok jsg@

7 years agofirst print size in meta-data then supplied arg size when an inconsistency is
otto [Thu, 6 Apr 2017 08:39:47 +0000 (08:39 +0000)]
first print size in meta-data then supplied arg size when an inconsistency is
detected wrt recallocarray()

7 years agoremove stray character in previous that broke the build
jsg [Thu, 6 Apr 2017 07:07:28 +0000 (07:07 +0000)]
remove stray character in previous that broke the build

7 years agoUnify a few attach-time patterns between usb *com drivers, and remove
deraadt [Thu, 6 Apr 2017 04:48:54 +0000 (04:48 +0000)]
Unify a few attach-time patterns between usb *com drivers, and remove
extra zero'ing of variables not needed because softc is pre-zero'd.
ok jsg

7 years agoadd sizes to free() calls
deraadt [Thu, 6 Apr 2017 03:15:29 +0000 (03:15 +0000)]
add sizes to free() calls
ok dhill

7 years agoConvert bcopy to memcpy as the memory does not overlap.
dhill [Thu, 6 Apr 2017 02:11:08 +0000 (02:11 +0000)]
Convert bcopy to memcpy as the memory does not overlap.

ok deraadt@

7 years ago3 more mallocarray() uses
deraadt [Wed, 5 Apr 2017 22:45:21 +0000 (22:45 +0000)]
3 more mallocarray() uses

7 years agoSyslogd's debug and error messages have changed a bit, adapt test.
bluhm [Wed, 5 Apr 2017 22:32:14 +0000 (22:32 +0000)]
Syslogd's debug and error messages have changed a bit, adapt test.

7 years agoReplace 2 bcopy()'s with a simple assignment as both variables are
dhill [Wed, 5 Apr 2017 22:27:03 +0000 (22:27 +0000)]
Replace 2 bcopy()'s with a simple assignment as both variables are
properly aligned malloc(9)d data and sockaddr_union fields.  While here,
convert the remaining bcopy() to memmove().

with and ok @bluhm

7 years agoThe global variable Startup is not used anymore and can be deleted.
bluhm [Wed, 5 Apr 2017 22:15:35 +0000 (22:15 +0000)]
The global variable Startup is not used anymore and can be deleted.
The functionality has moved into log_setdebug().
OK millert@

7 years agoAs we did not have nice log functions before, ttymsg() had to return
bluhm [Wed, 5 Apr 2017 21:55:31 +0000 (21:55 +0000)]
As we did not have nice log functions before, ttymsg() had to return
the error string.  Log the message when the error happens and make
the function void.
OK millert@

7 years agoThe function logmsg() was used to generate local messages and to
bluhm [Wed, 5 Apr 2017 21:30:04 +0000 (21:30 +0000)]
The function logmsg() was used to generate local messages and to
process incoming messages.  Split this functionality into log_info()
and logline().  Sort the parameters like they appear in the syslog
line.
OK millert@

7 years agoReplace logerror() functions with generic log_warn() from log.c.
bluhm [Wed, 5 Apr 2017 19:34:49 +0000 (19:34 +0000)]
Replace logerror() functions with generic log_warn() from log.c.
Make messages a bit more consistent.  Note that the new function
supports format strings.  Replace some log_debug() with log_warn().
OK millert@

7 years agoShuffle sendhup() into dispatch.c, the only place it is used.
krw [Wed, 5 Apr 2017 18:22:30 +0000 (18:22 +0000)]
Shuffle sendhup() into dispatch.c, the only place it is used.

7 years agoNot all devices support mmap, document EINVAL in this case too.
millert [Wed, 5 Apr 2017 18:15:43 +0000 (18:15 +0000)]
Not all devices support mmap, document EINVAL in this case too.
OK deraadt@

7 years agoClamp size to length if snprintf ever indicates overflow
deraadt [Wed, 5 Apr 2017 15:57:11 +0000 (15:57 +0000)]
Clamp size to length if snprintf ever indicates overflow
w/ millert

7 years agoReplace all combinations of logerror() and die() with log.c fatal().
bluhm [Wed, 5 Apr 2017 15:16:12 +0000 (15:16 +0000)]
Replace all combinations of logerror() and die() with log.c fatal().
Internally syslogd's fatal() calls die() to do cleanup if necessary.
Also replace all err(3) after log_init() with fatal().
OK millert@

7 years agoUnify variables used for recvmsg/sendmsg
jca [Wed, 5 Apr 2017 14:50:05 +0000 (14:50 +0000)]
Unify variables used for recvmsg/sendmsg

ok millert@ deraadt@

7 years agosendmsg returns a signed value, fix error check
jca [Wed, 5 Apr 2017 14:48:48 +0000 (14:48 +0000)]
sendmsg returns a signed value, fix error check

ok millert@ deraadt@

7 years agoWe can enable many -W compiler warnings now.
reyk [Wed, 5 Apr 2017 14:43:14 +0000 (14:43 +0000)]
We can enable many -W compiler warnings now.

OK rzalamena@

7 years agoRework the packet.c code for decoding and assembling DHCP messages.
reyk [Wed, 5 Apr 2017 14:40:56 +0000 (14:40 +0000)]
Rework the packet.c code for decoding and assembling DHCP messages.

This code suffered from many years of incremental improvements, fix it to:
- verify available buffer space in all cases and don't just trust the caller
- have an API where you always pass the full buffer length and absolute offset
- use consistent types for lengths and buffer offsets (int vs. size_t, ssize_t)
- don't just ignore errors, return and fail when something is wrong

OK rzalamena@

7 years agoDon't rely on asprintf setting pointer to NULL on failure.
jca [Wed, 5 Apr 2017 13:38:18 +0000 (13:38 +0000)]
Don't rely on asprintf setting pointer to NULL on failure.

ok millert@ deraadt@ tom@

7 years agoWhen building counter memory in preparation to copy to userland, always
deraadt [Wed, 5 Apr 2017 13:35:18 +0000 (13:35 +0000)]
When building counter memory in preparation to copy to userland, always
zero the buffers first.  All the current objects appear to be safe,
however future changes might introduce structure pads.
Discussed with guenther, ok bluhm

7 years agoAdd Home and End for copy mode.
nicm [Wed, 5 Apr 2017 12:14:18 +0000 (12:14 +0000)]
Add Home and End for copy mode.

7 years agoFor a non-interactive attempt to pkg_delete a firmware package, print a
sthen [Wed, 5 Apr 2017 11:57:58 +0000 (11:57 +0000)]
For a non-interactive attempt to pkg_delete a firmware package, print a
message advising use of "fw_update -d" rather than saying "ok" and doing
nothing. (pkg_delete intentionally makes it hard to uninstall firmware
to prevent surprises when cleaning a machine).

aja and I were surprised by the "ok" leaving the fw package installed.
suggestion from espie to mention fw_update -d in the message.

7 years agoReplace logdebug() with generic log_debug() from log.c. Implement
bluhm [Wed, 5 Apr 2017 11:31:45 +0000 (11:31 +0000)]
Replace logdebug() with generic log_debug() from log.c.  Implement
log_debugadd() to construct debug message incrementally.
OK deraadt@

7 years agoTry again to resolve problems with mistaking sessions for windows: now
nicm [Wed, 5 Apr 2017 11:04:48 +0000 (11:04 +0000)]
Try again to resolve problems with mistaking sessions for windows: now
do not look up windows as sessions (and panes as windows) when they are
qualified with a ':' or a '.'. So 'foo' as a window target will look for
windows and sessions called 'foo', but ':foo' will only look for
windows, and 'foo:' only for sessions. This means the common case of
using an unadorned session as a window target (send -tfoo) should
continue to work, but an explicit window will not get confused with a
session (send -t:foo).

7 years agoGive each client a name. This defaults to the tty name as before but
nicm [Wed, 5 Apr 2017 10:49:46 +0000 (10:49 +0000)]
Give each client a name. This defaults to the tty name as before but
falls back to an alternative if the tty name is not available. This is
clearer than overloading the client ttyname member and allows us to
remove the path stored in the tty struct, it should always be the same
as the client.

7 years agocfg_file can be static.
nicm [Wed, 5 Apr 2017 10:45:39 +0000 (10:45 +0000)]
cfg_file can be static.

7 years agoChange tty_repeat_space to write large sets of spaces together instead
nicm [Wed, 5 Apr 2017 10:45:20 +0000 (10:45 +0000)]
Change tty_repeat_space to write large sets of spaces together instead
of writing them individually.

7 years agovarious improvements, from klemens nanni;
jmc [Wed, 5 Apr 2017 08:45:33 +0000 (08:45 +0000)]
various improvements, from klemens nanni;
i've omitted hunk 3 of his diff, as what's there now is correct;

ok mikeb

7 years ago- -Z before -z in options list
jmc [Wed, 5 Apr 2017 06:55:59 +0000 (06:55 +0000)]
- -Z before -z in options list
- add -Z to help and usage()

7 years agoan annoying whitespace glitch
deraadt [Wed, 5 Apr 2017 04:44:03 +0000 (04:44 +0000)]
an annoying whitespace glitch

7 years agotimeval has trailing padding on powerpc and m88k, so memset it before
guenther [Wed, 5 Apr 2017 04:15:44 +0000 (04:15 +0000)]
timeval has trailing padding on powerpc and m88k, so memset it before
copyout to avoid leaking kernel stack

ok deraadt@

7 years agoHere at OpenBSD we change ABIs at the fling of a hat. Just in case a
deraadt [Wed, 5 Apr 2017 04:00:41 +0000 (04:00 +0000)]
Here at OpenBSD we change ABIs at the fling of a hat.  Just in case a
future disk info sysctl has pads in the structures, use M_ZERO when
allocating the storage to avoid leaking kernel memory.

7 years agoclear structure on the stack before copying out for sysctl. At present
deraadt [Wed, 5 Apr 2017 03:59:13 +0000 (03:59 +0000)]
clear structure on the stack before copying out for sysctl.  At present
it has no pads, but a future ABI change could add something and leak
kernel memory.

7 years agosync
deraadt [Wed, 5 Apr 2017 03:23:37 +0000 (03:23 +0000)]
sync

7 years agoAllow nc to save the peer certificate and chain in a pem file specified
beck [Wed, 5 Apr 2017 03:20:19 +0000 (03:20 +0000)]
Allow nc to save the peer certificate and chain in a pem file specified
with -Z
ok jsing@

7 years agoAdd tls_peer_cert_chain_pem - To retreive the peer certificate and chain
beck [Wed, 5 Apr 2017 03:19:22 +0000 (03:19 +0000)]
Add tls_peer_cert_chain_pem - To retreive the peer certificate and chain
as PEM format. This allows for it to be used or examined with tools
external to libtls
bump minor
ok jsing@

7 years agoInternal changes to allow for relayd engine privsep. sends the hash of the
beck [Wed, 5 Apr 2017 03:13:53 +0000 (03:13 +0000)]
Internal changes to allow for relayd engine privsep. sends the hash of the
public key as an identifier to RSA, and adds an function for relayd to
use to disable private key checking when doing engine privsep.
ok jsing@

7 years agoDo not print a warning if closing the control socket fails. It
bluhm [Wed, 5 Apr 2017 00:35:02 +0000 (00:35 +0000)]
Do not print a warning if closing the control socket fails.  It
cannot happen and there is nothing that could be done about it.
OK deraadt@

7 years agoadd a config test flag to sasyncd
jsg [Tue, 4 Apr 2017 22:37:01 +0000 (22:37 +0000)]
add a config test flag to sasyncd

ok reyk@ deraadt@ jmc@

7 years agoAlso remove non syspatch hidden files/dirs.
ajacoutot [Tue, 4 Apr 2017 21:20:22 +0000 (21:20 +0000)]
Also remove non syspatch hidden files/dirs.

7 years agoDo not purge the CONFIG_SERVERS config in the parent. The ticket code uses
claudio [Tue, 4 Apr 2017 20:16:09 +0000 (20:16 +0000)]
Do not purge the CONFIG_SERVERS config in the parent. The ticket code uses
the servers config for its rekeying handling. Without this no rekeying happens
and httpd stops working. Learned the hard way by me and beck@
OK reyk@

7 years agostruct vfsconf is tightly packed, but let's M_ZERO it in case that ever
deraadt [Tue, 4 Apr 2017 18:17:02 +0000 (18:17 +0000)]
struct vfsconf is tightly packed, but let's M_ZERO it in case that ever
changes to avoid exposing userland memory.

7 years agoEnsure, that during upgrades, the default for the "Location of sets"
rpe [Tue, 4 Apr 2017 17:50:45 +0000 (17:50 +0000)]
Ensure, that during upgrades, the default for the "Location of sets"
question is set to http if /etc/installurl exists and override the
install method information from the cgi server.

'makes sense' deraadt@

7 years agoThe unsigned result cannot be -1, turn it into a signed variable.
reyk [Tue, 4 Apr 2017 15:52:12 +0000 (15:52 +0000)]
The unsigned result cannot be -1, turn it into a signed variable.

OK rzalamena@

7 years agoconstify pc_remote and pc_circuit
reyk [Tue, 4 Apr 2017 15:50:29 +0000 (15:50 +0000)]
constify pc_remote and pc_circuit

OK rzalamena@

7 years agoSend a RTM_PROPOSAL to clear out other dhclient instances on startup.
krw [Tue, 4 Apr 2017 15:15:48 +0000 (15:15 +0000)]
Send a RTM_PROPOSAL to clear out other dhclient instances on startup.

Replaces forcing interface link state down and up to generate
RTM_IFINFO messages.

7 years agodocument comments in table files; help/ok gilles
jmc [Tue, 4 Apr 2017 14:33:44 +0000 (14:33 +0000)]
document comments in table files; help/ok gilles

7 years agotweak previous;
jmc [Tue, 4 Apr 2017 14:08:19 +0000 (14:08 +0000)]
tweak previous;

7 years agoAdd missing newline in fprintf error message.
reyk [Tue, 4 Apr 2017 14:04:54 +0000 (14:04 +0000)]
Add missing newline in fprintf error message.

OK jsg@

7 years agoTreat SSID's like the 0 to 32 bytes of uint8_t data that they really
krw [Tue, 4 Apr 2017 13:01:20 +0000 (13:01 +0000)]
Treat SSID's like the 0 to 32 bytes of uint8_t data that they really
are. Track and use the actual lengths and use memcpy()/memcmp()
instead of strcmp()/strdup().

7 years agoCleanup the code further. Get rid of the remaining C++-style comments,
kettenis [Tue, 4 Apr 2017 12:56:24 +0000 (12:56 +0000)]
Cleanup the code further.  Get rid of the remaining C++-style comments,
remove some debug printfs, get rid of STATIC and __inline defines and
remove a bit more unused code.

ok drahn@, visa@

7 years agoIssue memory barrier before lock release, not after. This ensures
visa [Tue, 4 Apr 2017 12:30:04 +0000 (12:30 +0000)]
Issue memory barrier before lock release, not after. This ensures
the release write becomes globally visible only after any writes
of the critical section are globally visible. In practice, the
reordering has not happened because the kernel runs in the total
store order mode.

Tested by and OK kettenis@

7 years agoadd a free() size near microcode loading
deraadt [Tue, 4 Apr 2017 04:38:31 +0000 (04:38 +0000)]
add a free() size near microcode loading

7 years agoRewrite tohexstr() to use the common idiom of converting a byte
millert [Tue, 4 Apr 2017 02:37:15 +0000 (02:37 +0000)]
Rewrite tohexstr() to use the common idiom of converting a byte
string to hex nybble by nybble.  This avoids using the return value
of snprintf() unchecked.  OK deraadt@

7 years agoAdd 8265 and 3168 support. Both cards need new firmware files which currently
claudio [Tue, 4 Apr 2017 00:40:52 +0000 (00:40 +0000)]
Add 8265 and 3168 support. Both cards need new firmware files which currently
need to be installed by hand until the iwm-firmware package has been updated.
This includes handling (by ignoring) of IWM_UCODE_TLV_FW_MEM_SEG and
IWM_DEBUG_LOG_MSG firmware commands. Mostly stolen from dragonflybsd.
With this in the X270 has working ethernet and wifi.
Commit! deraadt@

7 years agodisallow creation (of empty files) in read-only mode; reported by
djm [Tue, 4 Apr 2017 00:24:56 +0000 (00:24 +0000)]
disallow creation (of empty files) in read-only mode; reported by
Michal Zalewski, feedback & ok deraadt@

7 years agocp -p the bootblocks to RELEASEDIR; ok tb
deraadt [Tue, 4 Apr 2017 00:03:12 +0000 (00:03 +0000)]
cp -p the bootblocks to RELEASEDIR; ok tb

7 years agowarn format string should be literal.
fcambus [Mon, 3 Apr 2017 20:59:19 +0000 (20:59 +0000)]
warn format string should be literal.

OK deraadt@, millert@

7 years agoChange parse_string() to take an optional integer pointer that can
krw [Mon, 3 Apr 2017 19:59:39 +0000 (19:59 +0000)]
Change parse_string() to take an optional integer pointer that can
be used to return the final size of the parsed (i.e. un-vis'ed)
string. Use same, plus memcpy() to ensure entire final string is
copied to intended destination even if there are embedded NULs.

7 years agoAdd caveat telling it's better to always read a data byte when passing
otto [Mon, 3 Apr 2017 19:42:04 +0000 (19:42 +0000)]
Add caveat telling it's better to always read a data byte when passing
control messages.
Problem noted by Luke Small; ok deraadt@

7 years agoSend and receive 1 byte of data in addition to the control message. This is
otto [Mon, 3 Apr 2017 19:40:43 +0000 (19:40 +0000)]
Send and receive 1 byte of data in addition to the control message. This is
needed to make the code work in more cases.
Sending actually is not really needed, but do it anyway, to avoid confusing
mismatch between producer and consumer.
Problem noted by Luke Small; ok deraadt@

7 years agoWSDISPLAY_MAXFONTCOUNT macro was introduced in sys/dev/wscons/wsconsio.h
fcambus [Mon, 3 Apr 2017 18:43:41 +0000 (18:43 +0000)]
WSDISPLAY_MAXFONTCOUNT macro was introduced in sys/dev/wscons/wsconsio.h
(revision 1.75) to limit the number of fonts that can be loaded.

Reflect that in the man page as well.

OK jcs@