reyk [Fri, 16 Jan 2015 15:08:52 +0000 (15:08 +0000)]
SSL_CTX_use_certificate_chain() has been added to LibreSSL and there
is no need to keep a local copy in ssl_privsep.c. This adds a little
burden on OpenSMTPD-portable because it will have to put it in
openbsd-compat for compatibility with legacy OpenSSL.
OK gilles@
deraadt [Fri, 16 Jan 2015 15:06:40 +0000 (15:06 +0000)]
Adapt to <limits.h> universe.
ok millert
deraadt [Fri, 16 Jan 2015 14:36:44 +0000 (14:36 +0000)]
Replace <sys/param.h> with <limits.h>
millert spotted the accidental <ctype.h> removal that caused binary change.
reyk [Fri, 16 Jan 2015 14:34:51 +0000 (14:34 +0000)]
The SSL/TLS session Id context is limited to 32 bytes. Instead of
using the name of relayd relay or smtpd pki, use a 32 byte arc4random
buffer that should be unique for the context. This fixes an issue in
OpenSMTPD when a long pki name could break the configuration.
OK gilles@ benno@
schwarze [Fri, 16 Jan 2015 14:19:07 +0000 (14:19 +0000)]
Tweak previous: Do not put punctuation on its own line, put it at the end
of the preceding macro line; no output change with mandoc, fixes output
with groff. Also, if you want spacing back after .Sm off, do not add
an argument containing a blank character, simply rely on .Sm on.
bluhm [Fri, 16 Jan 2015 11:51:59 +0000 (11:51 +0000)]
Add regression tests for syslog over TLS.
sf [Fri, 16 Jan 2015 10:17:51 +0000 (10:17 +0000)]
Binary code patching on amd64
This commit adds generic infrastructure to do binary code patching on amd64.
The existing code patching for SMAP is converted to the new infrastruture.
More consumers and support for i386 will follow later.
This version of the diff has some simplifications in codepatch_fill_nop()
compared to a version that was:
OK @kettenis @mlarkin @jsg
bentley [Fri, 16 Jan 2015 09:08:41 +0000 (09:08 +0000)]
Clean up macros in isakmpd(8).
- Fix mandoc warnings ("WARNING: skipping empty macro: No")
- Mark up arguments with Ar, not Aq Ic
- Mark up pathnames with Pa
ok jmc@
doug [Fri, 16 Jan 2015 08:24:04 +0000 (08:24 +0000)]
Replace <sys/param.h> with <limits.h>
This patch is from Theo. I helped verify that removing <sys/param.h>
doesn't change anything.
This produces the same binaries before and after with clang 3.5 and gcc
4.9.4 on amd64. There is a slight difference in the way it is generated by
our old gcc 4.2.1 despite the fact that the preprocessed input is almost
identical.
ok deraadt@
djm [Fri, 16 Jan 2015 07:19:48 +0000 (07:19 +0000)]
when hostname canonicalisation is enabled, try to parse hostnames
as addresses before looking them up for canonicalisation.
fixes bz#2074 and avoids needless DNS lookups in some cases;
ok markus
deraadt [Fri, 16 Jan 2015 06:47:03 +0000 (06:47 +0000)]
<sys/param.h> is not needed here either.
ok guenther millert doug
deraadt [Fri, 16 Jan 2015 06:39:28 +0000 (06:39 +0000)]
Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
tedu [Fri, 16 Jan 2015 06:16:12 +0000 (06:16 +0000)]
improve checksum parsing slightly. now handles filenames with spaces.
(though not names with ')'; sorry.)
tedu [Fri, 16 Jan 2015 06:00:39 +0000 (06:00 +0000)]
just to be careful, add a cpp guard that the sscanf sizes are ok
deraadt [Fri, 16 Jan 2015 05:53:49 +0000 (05:53 +0000)]
adjust to HOST_NAME_MAX+1 & LOGIN_NAME_MAX
deraadt [Fri, 16 Jan 2015 05:46:44 +0000 (05:46 +0000)]
If MAXPATHLEN is undefined, do not set it to 512. Dangerous.
lteo [Fri, 16 Jan 2015 04:12:45 +0000 (04:12 +0000)]
Complete the list of functions in the paragraph that mentions that
errbuf needs to hold at least PCAP_ERRBUF_SIZE chars.
lteo [Fri, 16 Jan 2015 04:03:04 +0000 (04:03 +0000)]
Rename pcap_create()'s ebuf argument to errbuf to match the rest of the
public pcap_* functions that use errbuf. Mainline libpcap also uses
"errbuf" for pcap_create().
No object file change.
lteo [Fri, 16 Jan 2015 03:37:10 +0000 (03:37 +0000)]
Add more missing argument names.
lteo [Fri, 16 Jan 2015 03:19:57 +0000 (03:19 +0000)]
Remove pointless casts for several malloc/calloc/free calls. No object
file change.
lteo [Fri, 16 Jan 2015 03:07:03 +0000 (03:07 +0000)]
The BPF paper referenced in the SEE ALSO section was most likely an unpublished
draft. Replace it with the authors' 1993 Winter USENIX paper, which is a more
authoritative reference on BPF.
ok deraadt@ jmc@ millert@
lteo [Fri, 16 Jan 2015 03:04:19 +0000 (03:04 +0000)]
Fix a use after free, where the already freed p->opt.source was used by
pcap_cleanup_bpf() to disable monitor mode on 802.11 devices.
feedback blambert@
ok deraadt@ mikeb@ millert@
schwarze [Fri, 16 Jan 2015 01:58:17 +0000 (01:58 +0000)]
Delete the MANLINT variable and the related SUFFIXES rules because
since yesterday, "mandoc -Tlint -Wfatal" can no longer fail.
Instead, as suggested by deraadt@, provide a manlint target
that is *not* run during make build, but can be run
whenever you want to check syntax of manuals.
"nice stuff" deraadt@
deraadt [Fri, 16 Jan 2015 01:37:15 +0000 (01:37 +0000)]
sync
brad [Fri, 16 Jan 2015 01:10:10 +0000 (01:10 +0000)]
Merge in a commit from upstream..
- Fix bug#637: fix that nsd.db grows limitlessly, an off by one
on one megabyte free chunks, created during AXFRs of large zones,
that caused the one megabyte chunk to be leaked.
ok sthen@
deraadt [Fri, 16 Jan 2015 00:27:00 +0000 (00:27 +0000)]
Since <netdb.h> soon won't include <sys/param.h>, MAXHOSTNAMELEN may
not be in scope, so hardcode as 256. Other options have more downside.
deraadt [Fri, 16 Jan 2015 00:19:12 +0000 (00:19 +0000)]
move to PATH_MAX, etc; normalize includes for life in the <limits.h> universe
ok guenther millert
deraadt [Fri, 16 Jan 2015 00:18:06 +0000 (00:18 +0000)]
Move to using PATH_MAX
ok millert guenther
deraadt [Fri, 16 Jan 2015 00:05:12 +0000 (00:05 +0000)]
first batch of cleanup to programs based upon the namespace cleanups
in net/pfvar.h sys/proc.h sys/ucred.h arpa/nameser.h
change to PATH_MAX, reduce use of MIN() and MAX(), HOST_NAME_MAX+1,
LOGIN_NAME_MAX, etc etc
ok millert guenther, some review by doug
deraadt [Fri, 16 Jan 2015 00:03:37 +0000 (00:03 +0000)]
first batch of programs adapting to the namespace cleanup
(pfvar.h nameser.h proc.h ucred.h)
ok guenther millert, and some review from doug as well.
deraadt [Fri, 16 Jan 2015 00:01:28 +0000 (00:01 +0000)]
Switch to including <sys/types.h> instead of <sys/param.h>
This hides the unavoidably cruddy sys/param.h namespace in some programs.
Little impact, because many programs are cruddy and still get it via
other includes.
ports testing thanks to sthen and naddy
ok guenther millert
deraadt [Thu, 15 Jan 2015 23:59:28 +0000 (23:59 +0000)]
switch to PATH_MAX
deraadt [Thu, 15 Jan 2015 23:59:09 +0000 (23:59 +0000)]
include <sys/syslimits.h> and switch to use of LOGIN_NAME_MAX, making
this far more standalone. discussed with guenther
ok millert
deraadt [Thu, 15 Jan 2015 23:58:39 +0000 (23:58 +0000)]
include <sys/syslimits.h> to get access to (and then use) NGROUPS_MAX
discussed at length with guenther
ok millert
deraadt [Thu, 15 Jan 2015 23:56:58 +0000 (23:56 +0000)]
Stop including <sys/param.h> and other stuff. Assume this will be included
with sys limits in scope, so use PATH_MAX instead.
ok millert guenther
deraadt [Thu, 15 Jan 2015 23:51:04 +0000 (23:51 +0000)]
do not assume <netmls/mpls.h> will pull in <limits.h> via <sys/param.h>
get <limits.h> directly.
ok millert
deraadt [Thu, 15 Jan 2015 23:50:31 +0000 (23:50 +0000)]
Do not include 5 header files, including <sys/param.h>
ok millert
markus [Thu, 15 Jan 2015 23:41:29 +0000 (23:41 +0000)]
add kex unit tests
tedu [Thu, 15 Jan 2015 23:26:40 +0000 (23:26 +0000)]
remove static version string
tedu [Thu, 15 Jan 2015 23:20:33 +0000 (23:20 +0000)]
simplify des headers by stripping out all the unnecessary userland bits
ok deraadt
tedu [Thu, 15 Jan 2015 23:19:48 +0000 (23:19 +0000)]
fully remove disabled mschap support, which does weird DES things.
(already won't build for some time since the removal of md4)
ok naddy
brad [Thu, 15 Jan 2015 23:06:08 +0000 (23:06 +0000)]
Remove a variable no longer used in re_tick().
From Fabian Raetz <fabian dot raetz at gmail dot com>
tedu [Thu, 15 Jan 2015 22:21:01 +0000 (22:21 +0000)]
use PATH_MAX for path buffers. in case, you know...
deraadt [Thu, 15 Jan 2015 22:08:41 +0000 (22:08 +0000)]
If some mythical system lacks PATH_MAX, do not set it to MAXPATHLEN+1
ok millert
markus [Thu, 15 Jan 2015 21:38:50 +0000 (21:38 +0000)]
remove xmalloc, switch to sshbuf
markus [Thu, 15 Jan 2015 21:37:14 +0000 (21:37 +0000)]
switch to sshbuf
guenther [Thu, 15 Jan 2015 21:19:22 +0000 (21:19 +0000)]
UVM_INH_* and UVM_ADV_* are gone; use MAP_INHERIT_* and MADV_*
miod [Thu, 15 Jan 2015 21:17:54 +0000 (21:17 +0000)]
Rework the disk label handling once again. Disk label is read at attach time
because it teaches us the drive geometry, but from then on there is no reason
not to implement disklabel spoof support and a proper DIOCGPDINFO ioctl.
As a result, this makes disklabel -A now work on SMD disks.
The drawback of this, is that, since native labels do not have a pcylinders
value, the code will now always assume pcylinders == ncylinders + acylinders.
(this ought to be the case by default for labels produced by SunOS format(8).)
miod [Thu, 15 Jan 2015 20:48:51 +0000 (20:48 +0000)]
Be sure to print time_t with the appropriate format specifier. Repairs
dump of eeprom variables on sun4.
guenther [Thu, 15 Jan 2015 20:40:59 +0000 (20:40 +0000)]
Test shmat() with a non-NULL address, both failure and success
schwarze [Thu, 15 Jan 2015 20:37:36 +0000 (20:37 +0000)]
Use .An in the AUTHORS section where appropriate;
from Kaspars at Bankovskis dot net
millert [Thu, 15 Jan 2015 20:36:17 +0000 (20:36 +0000)]
The flags variable in shmat was not actually used. We need UVM_FLAG_*
flags, not mmap-style flags for UVM_MAPFLAG(). Remove the nonsensical
MAP_ANON|MAP_SHARED value and convert MAP_FIXED to UVM_FLAG_FIXED.
OK guenther@
tedu [Thu, 15 Jan 2015 19:55:58 +0000 (19:55 +0000)]
we don't have an alloca() symbol anywhere in libc, don't prototype it.
instead, #define to __builtin_alloca. if that doesn't work, you're hosed.
from an old discussion about the perils of alloca. (don't use alloca!)
schwarze [Thu, 15 Jan 2015 19:26:27 +0000 (19:26 +0000)]
use .In where appropriate; from Kaspars at Bankovskis dot net
schwarze [Thu, 15 Jan 2015 19:20:59 +0000 (19:20 +0000)]
typo; from Kaspars at Bankovskis dot net
espie [Thu, 15 Jan 2015 19:16:17 +0000 (19:16 +0000)]
oops, forgotten back-pointer to state for error messages
problem noticed by jca@
schwarze [Thu, 15 Jan 2015 19:06:31 +0000 (19:06 +0000)]
remove .Tn; from Jan Stary <hans at stare dot cz>
naddy [Thu, 15 Jan 2015 18:32:54 +0000 (18:32 +0000)]
handle UMAC128 initialization like UMAC; ok djm@ markus@
miod [Thu, 15 Jan 2015 17:54:14 +0000 (17:54 +0000)]
Fix subtle breakage for polled commands introduced during iopool conversion.
chl [Thu, 15 Jan 2015 17:34:15 +0000 (17:34 +0000)]
remove unused variable
ok tedu@
chl [Thu, 15 Jan 2015 17:32:43 +0000 (17:32 +0000)]
remove unused variable
ok tedu@
deraadt [Thu, 15 Jan 2015 17:14:04 +0000 (17:14 +0000)]
all modern systems can do this SUSPEND thing
deraadt [Thu, 15 Jan 2015 17:13:37 +0000 (17:13 +0000)]
NR_OF_EOFS is a festering boil, lance & drain.
ok millert
kettenis [Thu, 15 Jan 2015 16:31:19 +0000 (16:31 +0000)]
Map the sigcode page with MAP_INHERIT_COPY to make sure it isn't shared ater
a fork.
ok deraadt@
sf [Thu, 15 Jan 2015 15:30:17 +0000 (15:30 +0000)]
Don't include i82489 headers in cpu.h
Only pmap.c was not including them explicitly. Fix that.
"The direction is good" deraadt@
sf [Thu, 15 Jan 2015 13:58:55 +0000 (13:58 +0000)]
Define and print HV cpuid flag on i386.
This is set by many hypervisors, including kvm, vmware, hyper-v.
nicm [Thu, 15 Jan 2015 13:43:13 +0000 (13:43 +0000)]
Remove an unnecessary variable and shorten a line.
nicm [Thu, 15 Jan 2015 13:35:13 +0000 (13:35 +0000)]
Shorten some long lines.
bluhm [Thu, 15 Jan 2015 13:15:17 +0000 (13:15 +0000)]
Add a test for syslogd that reconnects to a TCP syslog server after
an established connection has been closed.
millert [Thu, 15 Jan 2015 13:05:59 +0000 (13:05 +0000)]
Use explicit_bzero instead of memset in hash Final and End functions.
OK deraadt@ djm@
sobrado [Thu, 15 Jan 2015 11:54:31 +0000 (11:54 +0000)]
tell the truth about DES.
joint work with djm@ and jsing@
ok djm@
bluhm [Thu, 15 Jan 2015 11:49:59 +0000 (11:49 +0000)]
When the connection to a TCP syslog server fails or the TCP connection
terminates, try to reconnect after an increasing timeout.
test and OK jasper@
djm [Thu, 15 Jan 2015 11:04:36 +0000 (11:04 +0000)]
fix regression reported by brad@ for passworded keys without
agent present
kettenis [Thu, 15 Jan 2015 10:04:26 +0000 (10:04 +0000)]
Map the sigcode page copy-on-write. This allows userland to put breakpoints
in the signal trampoline. Solves some long-standing issues with debugging
signal handlers in GDB.
ok deraadt@
djm [Thu, 15 Jan 2015 09:40:00 +0000 (09:40 +0000)]
sync ssh-keysign, ssh-keygen and some dependencies to the new
buffer/key API; mostly mechanical, ok markus@
ajacoutot [Thu, 15 Jan 2015 09:20:37 +0000 (09:20 +0000)]
Extend the description of _timeout.
gilles [Thu, 15 Jan 2015 09:05:37 +0000 (09:05 +0000)]
when enqueueing offline mails from within the daemon session, we should not
rely on getlogin() otherwise mail will end up enqueued as coming from user
who started smtpd.
bug spotted by deraadt@, diff ok todd@
djm [Thu, 15 Jan 2015 07:57:08 +0000 (07:57 +0000)]
remove commented-out test code now that it has moved to a
proper unit test
djm [Thu, 15 Jan 2015 07:36:28 +0000 (07:36 +0000)]
unit tests for KRL bitmap
deraadt [Thu, 15 Jan 2015 06:57:18 +0000 (06:57 +0000)]
back in september I did the large abstraction refactoring to allow these
other systems to fit into the same mold, so add copyright
schwarze [Thu, 15 Jan 2015 04:26:06 +0000 (04:26 +0000)]
Fatal errors no longer exist.
If a file can be opened, mandoc will produce some output;
at worst, the output may be almost empty.
Simplifies error handling and frees a message type for future use.
millert [Thu, 15 Jan 2015 03:54:28 +0000 (03:54 +0000)]
Sync with libc version.
millert [Thu, 15 Jan 2015 03:54:12 +0000 (03:54 +0000)]
Make strlcpy/strlcat slightly easier to read.
millert [Thu, 15 Jan 2015 03:19:43 +0000 (03:19 +0000)]
POSIX does not require an explicit inclusion of sys/types.h to get
uid_t or gid_t (and neither do we). OK deraadt@
schwarze [Thu, 15 Jan 2015 02:29:07 +0000 (02:29 +0000)]
downgrade .so failure from FATAL to ERROR
jsg [Thu, 15 Jan 2015 01:19:28 +0000 (01:19 +0000)]
Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.
Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.
ok matthieu@ shadchin@ kettenis@
deraadt [Thu, 15 Jan 2015 00:48:10 +0000 (00:48 +0000)]
I bet the reference to <sys/ttycom.h> near the ldisc list in tty(4)
led this program and the associated manual pages to including that
file directly, rather than the canonical include path of <sys/ioctl.h>
discussed with millert
deraadt [Thu, 15 Jan 2015 00:45:20 +0000 (00:45 +0000)]
do not be specific regarding which ioctl backend .h file; the list
is good enough, and we do not want to mislead. the file to include
is at the top of the file.
deraadt [Thu, 15 Jan 2015 00:40:23 +0000 (00:40 +0000)]
not supposed to include sys/ttycom.h (these may have rpcgen history)
deraadt [Thu, 15 Jan 2015 00:32:36 +0000 (00:32 +0000)]
wrong place to mention nmea. cua is different, that hints at how it
works to many.
deraadt [Thu, 15 Jan 2015 00:25:00 +0000 (00:25 +0000)]
delete overly-specific details that cause espie angst.
ok millert tedu
deraadt [Wed, 14 Jan 2015 23:36:15 +0000 (23:36 +0000)]
change _yp_domain[] to HOST_NAME_MAX+1, and re-arrange those who include
it to get limits.h early enough
deraadt [Wed, 14 Jan 2015 23:03:50 +0000 (23:03 +0000)]
these never needed sys/param.h
schwarze [Wed, 14 Jan 2015 22:57:57 +0000 (22:57 +0000)]
downgrade ".so with absolute path" from FATAL to ERROR;
allows to get rid of ROFF_ERR
schwarze [Wed, 14 Jan 2015 22:44:51 +0000 (22:44 +0000)]
simplify by getting rid of ROFF_ERR in tbl(7) parsing; no functional change
schwarze [Wed, 14 Jan 2015 22:02:00 +0000 (22:02 +0000)]
To get rid of SYSERR entries in enum mandocerr, downgrade problems with
missing and unreadable files from SYSERR to ERROR.
Needed for upcoming work.
As a bonus, this minimally simplifies code and documentation.
miod [Wed, 14 Jan 2015 21:35:43 +0000 (21:35 +0000)]
Don't forget to register event counter for VME interrupts.
schwarze [Wed, 14 Jan 2015 21:27:01 +0000 (21:27 +0000)]
if earlier files set a non-zero exit status,
do not allow later files to reset it to zero
deraadt [Wed, 14 Jan 2015 21:17:52 +0000 (21:17 +0000)]
This does not need <sys/param.h>. If we change some other stuff around,
it might not need <sys/types.h> either. Even further changes could
eliminate it. Anyone up for the exercise?
miod [Wed, 14 Jan 2015 21:17:09 +0000 (21:17 +0000)]
When a read or write operation fails on a sector found on the bad block table,
be sure to adjust the IOPB data pointer before redirecting the I/O for this
particular sector to the replacement location.
Otherwise, the data pointer still points to the first sector of the I/O, which
may not necessarily be the one which failed.
(This is yet another 19 years old bug, making your filesystems self-destruct
even faster than intended)