florian [Mon, 19 Jan 2015 20:00:07 +0000 (20:00 +0000)]
s/clt_fcgi_remote_user/clt_remote_user/
OK reyk@
guenther [Mon, 19 Jan 2015 19:57:59 +0000 (19:57 +0000)]
Move doaccept() declaration from its .c file to sys/socketvar.h for use
by compat/linux
markus [Mon, 19 Jan 2015 19:52:16 +0000 (19:52 +0000)]
update packet.c & isolate, introduce struct ssh
a) switch packet.c to buffer api and isolate per-connection info into struct ssh
b) (de)serialization of the state is moved from monitor to packet.c
c) the old packet.c API is implemented in opacket.[ch]
d) compress.c/h is removed and integrated into packet.c
with and ok djm@
guenther [Mon, 19 Jan 2015 19:47:29 +0000 (19:47 +0000)]
Delete ABI compat for osockaddr: 20 years and many ABI bumps since sa_len added
ok krw@ bluhm@ deraadt@
miod [Mon, 19 Jan 2015 19:46:55 +0000 (19:46 +0000)]
Prefer strdup() to malloc() + strcpy() and ftello() to ftell()
ok deraadt@ guenther@ millert@
reyk [Mon, 19 Jan 2015 19:37:50 +0000 (19:37 +0000)]
Decouple auth parameters from struct server_config into struct auth.
OK florian@
deraadt [Mon, 19 Jan 2015 19:25:47 +0000 (19:25 +0000)]
Does not need netinet/ip_ipsp.h
kettenis [Mon, 19 Jan 2015 19:25:28 +0000 (19:25 +0000)]
Also print the fspace member of map entries when PRINT_VM_MAP_ENTRY is
requested.
ok deraadt@
miod [Mon, 19 Jan 2015 18:38:41 +0000 (18:38 +0000)]
Remove dead store causing clang to warn; dhill
deraadt [Mon, 19 Jan 2015 18:37:19 +0000 (18:37 +0000)]
use SYMLOOP_MAX rather than MAXSYMLINKS
deraadt [Mon, 19 Jan 2015 18:36:51 +0000 (18:36 +0000)]
mikeb points out that 'struct ipsec_policy' can also be hidden by _KERNEL
deraadt [Mon, 19 Jan 2015 18:20:47 +0000 (18:20 +0000)]
remove #ifndef #define blocks trying to handle lack of BUFSIZ
ok millert
tedu [Mon, 19 Jan 2015 18:07:47 +0000 (18:07 +0000)]
mlk jr day is the third monday, and not just for new york.
from richard
deraadt [Mon, 19 Jan 2015 18:05:41 +0000 (18:05 +0000)]
SYMLOOP_MAX == MAXSYMLINKS, so use SYMLOOP_MAX
millert [Mon, 19 Jan 2015 18:01:13 +0000 (18:01 +0000)]
Kill loadavg.h and just use the fscale value directly.
There's no need for crazy casts of p_pctcpu in ORDERKEY_PCTCPU
since kinfo_proc exports it as uint32_t. OK deraadt@
miod [Mon, 19 Jan 2015 18:01:11 +0000 (18:01 +0000)]
sparc also needs <machine/param.h> for CPU_SUN*.
djm [Mon, 19 Jan 2015 17:35:48 +0000 (17:35 +0000)]
fix format strings in (disabled) debugging
djm [Mon, 19 Jan 2015 17:31:13 +0000 (17:31 +0000)]
this test was broken in at least two ways, such that it
wasn't checking that a KRL was not excluding valid keys
deraadt [Mon, 19 Jan 2015 16:49:04 +0000 (16:49 +0000)]
First step of hiding many kernel-only parts of <netinet/ip_ipsp.h>
under _KERNEL, and adjust the one consumer (netstat) so that it requests
the exposure. Will take a few more rounds to get this right.
ok mikeb
deraadt [Mon, 19 Jan 2015 16:43:28 +0000 (16:43 +0000)]
cleanup of the SMALL hiding from Mathias Svensson
bluhm [Mon, 19 Jan 2015 16:40:49 +0000 (16:40 +0000)]
Replace HOST_NAME_MAX+1 with NI_MAXHOST when the hostname is used
with getaddrinfo() or getnameinfo(), but keep HOST_NAME_MAX+1 when
the hostname comes from gethostname().
No binary change; OK deraadt@
jsg [Mon, 19 Jan 2015 16:01:43 +0000 (16:01 +0000)]
Make use of an msr available on recent Intel processors to obtain the
maximum supported temperature, Tj(Max). As the temperature values are
relative to this value this should make the sensor values more accurate.
From Simon Mages.
millert [Mon, 19 Jan 2015 15:54:11 +0000 (15:54 +0000)]
Explicitly mention that PATH_MAX includes the NUL in the ENAMETOOLONG
description.
krw [Mon, 19 Jan 2015 15:30:52 +0000 (15:30 +0000)]
Make some $OpenBSD$ lines prettier/standardier by eliminating
superflous '*' after '/*' and adding blank after terminating '$'.
Also eases parsing of the lines by simple awk scripts.
Aesthetic approval from tedu@.
mikeb [Mon, 19 Jan 2015 14:42:42 +0000 (14:42 +0000)]
Remove unnecessary <netinet/ip_ipsp.h> includes
millert [Mon, 19 Jan 2015 13:59:16 +0000 (13:59 +0000)]
Back out changes unrelated to the ENAMETOOLONG diff.
mpi [Mon, 19 Jan 2015 13:53:55 +0000 (13:53 +0000)]
<netinet6/in6_ifattach.h> is not needed here.
bcook [Mon, 19 Jan 2015 11:44:08 +0000 (11:44 +0000)]
remove a couple of unused headers.
reported by Jonas 'Sortie' Termansen
nicm [Mon, 19 Jan 2015 09:58:34 +0000 (09:58 +0000)]
Make a tmux-%u directory under TMUX_TMPDIR, like TMPDIR.
nicm [Mon, 19 Jan 2015 09:57:33 +0000 (09:57 +0000)]
Only care about other permissions, allow group to be set.
nicm [Mon, 19 Jan 2015 09:53:15 +0000 (09:53 +0000)]
Remove unnecessary duplicate S_ISDIR check, from Dmitri Paduchikh.
espie [Mon, 19 Jan 2015 09:42:06 +0000 (09:42 +0000)]
add a specialized version of version compares that should not update
everything all the time, at the bequest of aja.
(basically, we updated everything when runtime dependencies changed, even
though we actually only care for wantlib, and hard dependencies, but those
trigger bumps all over the tree)
Experimental for now, turn on with -DSHORTENED. Likely to become the new
default if nothing bad comes out of it.
deraadt [Mon, 19 Jan 2015 07:41:01 +0000 (07:41 +0000)]
If SIGUSR1 and SIGUSR2 are unavailable, don't invent something crazy
honouring systems before 4.3BSD.
deraadt [Mon, 19 Jan 2015 07:39:24 +0000 (07:39 +0000)]
replace local MIN() with MINIMUM()
dlg [Mon, 19 Jan 2015 06:27:57 +0000 (06:27 +0000)]
pass the size of the softc to free.
ok deraadt@
djm [Mon, 19 Jan 2015 06:01:32 +0000 (06:01 +0000)]
be a bit more careful in these tests to ensure that
known_hosts is clean
dlg [Mon, 19 Jan 2015 03:57:22 +0000 (03:57 +0000)]
white space fixes. no binary change.
deraadt [Mon, 19 Jan 2015 02:44:53 +0000 (02:44 +0000)]
gcc does not understand that the loop conditionally sets bsod before
using it, so it warns... Copy the warning silencing code from the
same function in ../ld.so
deraadt [Mon, 19 Jan 2015 01:53:18 +0000 (01:53 +0000)]
like in ps(1), fetch the FSCALE value using sysctl rather than using
the header version
ok guenther
deraadt [Mon, 19 Jan 2015 01:48:57 +0000 (01:48 +0000)]
move to <limits.h> universe
ok yasuoka
deraadt [Mon, 19 Jan 2015 01:24:39 +0000 (01:24 +0000)]
CMASK went out of scope with the recent <sys/param.h> removal. But oh
golly gee, ftpd can handle that itself due to the glorious old practice
of #ifndef #define. Remove that junk.
ok guenther
deraadt [Mon, 19 Jan 2015 01:19:17 +0000 (01:19 +0000)]
unneccessary cmask variable; ok guenther
deraadt [Mon, 19 Jan 2015 01:05:32 +0000 (01:05 +0000)]
If UID_MAX is not defined, this should fail to compile.
ok guenther
deraadt [Mon, 19 Jan 2015 00:47:01 +0000 (00:47 +0000)]
normalize formatting
deraadt [Mon, 19 Jan 2015 00:41:44 +0000 (00:41 +0000)]
cleanup sys/param.h comment
deraadt [Mon, 19 Jan 2015 00:32:54 +0000 (00:32 +0000)]
djm, your /usr/include tree is old
guenther [Mon, 19 Jan 2015 00:22:30 +0000 (00:22 +0000)]
The kernel doesn't actually care what a sockaddr's sa_len is on input,
so don't waste code setting it
djm [Sun, 18 Jan 2015 22:00:18 +0000 (22:00 +0000)]
regression test for known_host file editing using
ssh-keygen (-H / -R / -F) after hostkeys_foreach() change;
feedback and ok markus@
djm [Sun, 18 Jan 2015 21:51:19 +0000 (21:51 +0000)]
some feedback from markus@: comment hostkeys_foreach()
context and avoid a member in it.
djm [Sun, 18 Jan 2015 21:49:42 +0000 (21:49 +0000)]
make ssh-keygen use hostkeys_foreach(). Removes some
horrendous code; ok markus@
djm [Sun, 18 Jan 2015 21:48:09 +0000 (21:48 +0000)]
convert load_hostkeys() (hostkey ordering and known_host
matching) to use the new hostkey_foreach() iterator;
ok markus
millert [Sun, 18 Jan 2015 21:47:16 +0000 (21:47 +0000)]
Back out previous. HOST_NAME_MAX is only defined for newer POSIX
revisions so it is not safe to define MAXHOSTNAMELEN in terms of it.
djm [Sun, 18 Jan 2015 21:40:23 +0000 (21:40 +0000)]
introduce hostkeys_foreach() to allow iteration over a
known_hosts file or controlled subset thereof. This will
allow us to pull out some ugly and duplicated code, and
will be used to implement hostkey rotation later.
feedback and ok markus
guenther [Sun, 18 Jan 2015 20:35:44 +0000 (20:35 +0000)]
Forward declare 'struct file' so that libkvm and others that indirectly pull
in sys/uio.h with _KERNEL defined don't warn.
ok deraadt@
mpi [Sun, 18 Jan 2015 20:35:11 +0000 (20:35 +0000)]
Do not trust the content of event TRBs coming from the hardware and
maintain a list of possibly submitted commands.
deraadt [Sun, 18 Jan 2015 20:29:31 +0000 (20:29 +0000)]
Stop including <sys/param.h> from <netdb.h>. Portable software must either
include <sys/param.h> (to operate in legacy mode) or if it wishes to operate
in the POSIX world use <limits.h>
ok guenther millert doug naddy
guenther [Sun, 18 Jan 2015 20:05:20 +0000 (20:05 +0000)]
Eliminate a gcc warnings by not #defining _KERNEL when pulling in
<sys/socket.h>: it doesn't expose anything kdump cares about.
Also, COMPAT_43 is dead
warning noted by deraadt@
djm [Sun, 18 Jan 2015 19:54:46 +0000 (19:54 +0000)]
more and better key tests
test signatures and verification
test certificate generation
flesh out nested cert test
removes most of the XXX todo markers
djm [Sun, 18 Jan 2015 19:53:58 +0000 (19:53 +0000)]
make the signature fuzzing test much more rigorous:
ensure that the fuzzed input cases do not match the
original (using new fuzz_matches_original() function)
and check that the verification fails in each case
djm [Sun, 18 Jan 2015 19:52:44 +0000 (19:52 +0000)]
add a fuzz_matches_original() function to the fuzzer to
detect fuzz cases that are identical to the original data.
Hacky implementation, but very useful when you need the
fuzz to be different, e.g. when verifying signature
djm [Sun, 18 Jan 2015 19:50:55 +0000 (19:50 +0000)]
better dumps from the fuzzer (shown on errors) - include the
original data as well as the fuzzed copy.
djm [Sun, 18 Jan 2015 19:50:15 +0000 (19:50 +0000)]
didn't mean to commit these changes
djm [Sun, 18 Jan 2015 19:47:55 +0000 (19:47 +0000)]
enable hostkey-agent.sh test
bluhm [Sun, 18 Jan 2015 19:37:59 +0000 (19:37 +0000)]
Implement sending syslog messages over TLS.
OK reyk@
florian [Sun, 18 Jan 2015 18:39:46 +0000 (18:39 +0000)]
tweak previous
with help from jmc@
mpi [Sun, 18 Jan 2015 17:18:08 +0000 (17:18 +0000)]
This size check was obviously commented out because of the incorrect
size computed for reports with reportID.
Tested by Benjamin Baier.
mpi [Sun, 18 Jan 2015 17:16:06 +0000 (17:16 +0000)]
Do not calculated the length of a report with an extra byte for the
reportID because the kernel skips it.
Problem reported and fix tested by Benjamin Baier.
jsg [Sun, 18 Jan 2015 16:26:39 +0000 (16:26 +0000)]
When restoring spsr values when handling traps use spsr_fsxc instead
of spsr_all so all the bits are restored. Using the msr instruction
with spsr_all is treated the same as spsr_fc and does not include the
status and extension fields (bits 23:8).
This fixes the problem of some i.MX6 machines powering up with the
big endian bit set in the extension field causing them to crash
on returning from the first interrupt.
From NetBSD.
jsg [Sun, 18 Jan 2015 14:55:02 +0000 (14:55 +0000)]
Switch some uses of msr that only deal with interrupts/mode to use
just the control field ('c' bits 7:0) instead of 'all' which includes
the flags field ('f' bits 31:24) which isn't modified.
mpi [Sun, 18 Jan 2015 14:51:43 +0000 (14:51 +0000)]
Do not even try to dereference a NULL pointer.
Found the hard way by Peter N. M. Hansteen.
ok claudio@, phessler@
mpi [Sun, 18 Jan 2015 14:49:04 +0000 (14:49 +0000)]
Complete synchronous abort method modeled after the existing ones.
Because our USB stack wants the aborted xfer to be removed from the
pipe during abort(), we have to sleep in the abort function.
Regarding the xHCI process, when a TD is being aborted, we simply stop
the endpoint and then move the dequeue pointer past its last TRB. This
is fairly simple for the moment since only one xfer can be pending on a
given pipe.
mpi [Sun, 18 Jan 2015 14:40:05 +0000 (14:40 +0000)]
Do not try to free xfers before aborting the pipes, otherwise a clown
might eat you.
deraadt [Sun, 18 Jan 2015 14:21:53 +0000 (14:21 +0000)]
sync
aoyama [Sun, 18 Jan 2015 14:13:18 +0000 (14:13 +0000)]
Add commented-out necsb(4) and audio(4) configuration to GENERIC.
miod [Sun, 18 Jan 2015 14:01:54 +0000 (14:01 +0000)]
Revert 1.166 (but keep the bufq_wait() interface change), for this is wrong
and the bufq pointer might be NULL at the time it is `saved'.
Found the hard way on sparc due to the limited kva, with all disk active
processes ending up sleeping on "buf_needva".
ok kettenis@ krw@
florian [Sun, 18 Jan 2015 14:01:17 +0000 (14:01 +0000)]
First stab at implementing basic auth.
Currently the htpasswd file needs to be in the chroot; will hopefully
improved soonish.
Based on a diff from Oscar Linderholm many months ago but turned into
a complete rewrite.
input/OK reyk@
deraadt [Sun, 18 Jan 2015 14:01:00 +0000 (14:01 +0000)]
string truncation due to sizeof(size)
ok djm markus
djm [Sun, 18 Jan 2015 13:33:34 +0000 (13:33 +0000)]
avoid trailing ',' in host key algorithms
djm [Sun, 18 Jan 2015 13:22:28 +0000 (13:22 +0000)]
infer key length correctly when user specified a fully-
qualified key name instead of using the -b bits option;
ok markus@
jsg [Sun, 18 Jan 2015 12:03:11 +0000 (12:03 +0000)]
The 'mrs' instruction only deals with the whole register without
masking. Remove the use of cpsr_all/spsr_all with 'mrs' and just use
the register names. This matches the arm docs and avoids confusion as
cpsr_all/spsr_all don't include bits 23->8 when used with the 'msr'
instruction but do with 'mrs'.
mpi [Sun, 18 Jan 2015 11:54:02 +0000 (11:54 +0000)]
Since we are no longer resetting rings when a Babble or Stall condition
is detected, simply keep track of the faulty xfer instead of completing
all the pending ones.
Fix a race condition where we could end up aborting a freshly enqueued
xfer when two different threads are submitting control transfers (i.e.
usbdevs(8) and a kernel driver).
ajacoutot [Sun, 18 Jan 2015 10:29:53 +0000 (10:29 +0000)]
Drop backward compat syntax.
jsg [Sun, 18 Jan 2015 10:17:41 +0000 (10:17 +0000)]
unifdef IPKDB. These codepaths are holdouts from NetBSD code and are
not used.
guenther [Sun, 18 Jan 2015 05:30:58 +0000 (05:30 +0000)]
The world is ELF: use <sys/exec_elf.h> instead of <a.out.h> or <sys/exec.h>
Use a better test for an input being ELF: struct exec is dead and there are
defines for the ELF magic. Reorder #includes and do some whitespace cleanup.
Oh, and don't lead the fd if an input file isn't ELF.
ok deraadt@
guenther [Sun, 18 Jan 2015 04:52:03 +0000 (04:52 +0000)]
Per POSIX, <sys/socket.h> needs to expose struct iovec, and may do so
by pulling in <sys/uio.h>, so do so. Remove some stuff that we can trust
<sys/uio.h> to also provide, like cdefs.h, _types.h, and exposing size_t
and ssize_t
pointed out by naddy@
ok deraadt@
deraadt [Sun, 18 Jan 2015 04:48:24 +0000 (04:48 +0000)]
do not require <a.out.h>
deraadt [Sun, 18 Jan 2015 03:46:24 +0000 (03:46 +0000)]
sync
tedu [Sat, 17 Jan 2015 20:37:04 +0000 (20:37 +0000)]
remove des.h. it somehow escaped from ssleay into /usr/include, but none
of the functions prototyped here exist in libc, making it useless.
djm [Sat, 17 Jan 2015 18:54:30 +0000 (18:54 +0000)]
unit test for hostkeys in ssh-agent
djm [Sat, 17 Jan 2015 18:53:34 +0000 (18:53 +0000)]
fix hostkeys on ssh agent; found by unit test I'm about to commit
mpi [Sat, 17 Jan 2015 18:37:12 +0000 (18:37 +0000)]
Split the consumer & producer logic into two different functions in
order to read last TRB of the event ring.
Fix a bug introduced in r1.1.
tedu [Sat, 17 Jan 2015 18:01:43 +0000 (18:01 +0000)]
Improve wording in alloca.
1. it's not a bug; it's a caveat.
2. "slightly unsafe" gives me the willies.
3. one .Xr to malloc should suffice
ok deraadt jmc
deraadt [Sat, 17 Jan 2015 17:49:26 +0000 (17:49 +0000)]
use NGROUPS_MAX
tedu [Sat, 17 Jan 2015 17:44:15 +0000 (17:44 +0000)]
guard usingacpi variable inside NACPI. from oyvind jaegtnes
deraadt [Sat, 17 Jan 2015 17:22:07 +0000 (17:22 +0000)]
use NGROUPS_MAX instead of NGROUPS
deraadt [Sat, 17 Jan 2015 17:17:10 +0000 (17:17 +0000)]
NGROUPS_MAX, not NGROUPS
millert [Sat, 17 Jan 2015 15:03:09 +0000 (15:03 +0000)]
Define MAXHOSTNAMELEN as HOST_NAME_MAX+1. OK deraadt@
rpe [Sat, 17 Jan 2015 14:36:58 +0000 (14:36 +0000)]
Remove unnecessary double-quotes inside [[]].
OK krw@
millert [Sat, 17 Jan 2015 13:37:59 +0000 (13:37 +0000)]
Remove a pasto introduced in the last commit, spotted by schwarze@
espie [Sat, 17 Jan 2015 13:20:04 +0000 (13:20 +0000)]
make sure we have an interactivestub... I forgot the -I part from the old
script.