Commit Graph

219 Commits

Author SHA1 Message Date
hannken 3576a6dafd With TLSv1.3 a client has to receive and process metadata.
Update dispatch_tls_eof() to check for metadata and
rearm on success.

Ok: christos@
2019-10-24 08:21:18 +00:00
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
mrg 21303c93e9 convert HAVE_GCC == 7 to HAVE_GCC >= 7. 2019-09-29 23:44:58 +00:00
mrg e3dd5b9e43 add parens around defines with expressions that could expand poorly
depending on the usage.
2019-02-11 19:45:54 +00:00
mrg 5e5bf48e2a use -Wno-error=format-truncation for code that seems particularly annoying
or unlikely to actually fail.  some of the syslogd ones are not too hard
to fix, but most remain.
2019-02-04 10:22:15 +00:00
mrg fbffadb9f8 - add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
  this case, and thus can't be marked __dead easily
2019-02-03 03:19:25 +00:00
martin f4ed83519c Revert previous - local merge mishap 2018-11-05 10:27:06 +00:00
wiz 4736bd2c39 Sort options. 2018-11-05 09:22:30 +00:00
martin 4a0babdb00 Make it compilable with gcc 2018-11-05 08:34:20 +00:00
roy 9adaa956c5 syslogd: allow the reporting of buffer overflows to be disabled.
This generally isn't a good thing, nothing should be discard silently.
However, for systems that don't want big syslogd buffers or are too slow
to log effectively this reporting can now be disabled.
2018-11-04 20:45:21 +00:00
roy 0402a70e1e syslogd: allow the receiving buffer size to be set.
This allows the admin to try and avoid buffer overflow when a log of
logging appears in bursts.
2018-11-04 20:23:08 +00:00
christos 2ed636d665 grow AF_UNIX receive buffer size 2018-05-06 19:16:36 +00:00
christos a00715fdd5 only set api compat for 1.0 2018-02-09 02:23:32 +00:00
jakllsch 57ef96115f define OPENSSL_API_COMPAT
(doesn't entirely unbreak build yet)
2018-02-08 18:28:42 +00:00
christos e569ada8da include dh.h in the right spot. 2018-02-08 17:45:29 +00:00
maya d17a36957e Correct misleading indentation. 2018-02-06 22:04:22 +00:00
christos 4d91e6767f Adjust to OpenSSL-1.1 2018-02-06 21:36:46 +00:00
ginsbach b68988e2c2 Use looked up remote host for remote message without a hostname
An incoming remote message may not necessarily have a hostname
between the timestamp and the message. The the source of the remote
sender is already looked up so use that hostname/IP address rather
than the local hostname.

XXX: pullup-8
XXX: pullup-7
XXX: pullup-6
2017-09-10 17:01:07 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
riastradh ef315f7931 Remove MKCRYPTO option.
Originally, MKCRYPTO was introduced because the United States
classified cryptography as a munition and restricted its export.  The
export controls were substantially relaxed fifteen years ago, and are
essentially irrelevant for software with published source code.

In the intervening time, nobody bothered to remove the option after
its motivation -- the US export restriction -- was eliminated.  I'm
not aware of any other operating system that has a similar option; I
expect it is mainly out of apathy for churn that we still have it.
Today, cryptography is an essential part of modern computing -- you
can't use the internet responsibly without cryptography.

The position of the TNF board of directors is that TNF makes no
representation that MKCRYPTO=no satisfies any country's cryptography
regulations.

My personal position is that the availability of cryptography is a
basic human right; that any local laws restricting it to a privileged
few are fundamentally immoral; and that it is wrong for developers to
spend effort crippling cryptography to work around such laws.

As proposed on tech-crypto, tech-security, and tech-userlevel to no
objections:

https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html
https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html
https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html

P.S.  Reviewing all the uses of MKCRYPTO in src revealed a lot of
*bad* crypto that was conditional on it, e.g. DES in telnet...  That
should probably be removed too, but on the grounds that it is bad,
not on the grounds that it is (nominally) crypto.
2017-05-21 15:28:36 +00:00
abhinav 11852aa12f Remove duplicate word from the sentence. 2017-02-21 18:36:39 +00:00
abhinav 901279cdf1 Fix typos. 2017-02-21 18:28:28 +00:00
christos 9009c648c6 need <sys/stat.h> 2017-01-10 21:04:06 +00:00
christos 069fe2afa8 PR/51234: Onno van der Linden: syslogd sometimes incorrectly handles iso to
bsd time conversion
2016-06-11 16:55:10 +00:00
christos e612b1d7f8 PR/50751: David Binderman: check bounds before dereferencing. 2016-02-03 05:34:21 +00:00
khorben 201849b330 Typo 2016-01-05 00:41:30 +00:00
plunky bd4132cd78 according to C99 6.5.15 in a conditional expression, both
operands should be of compatible types.

So, use ((void)0) here to match `void dbprintf()'
2015-09-08 18:33:12 +00:00
dholland 64fc2fa3fc tidy/fix printing of paths from sockaddr_un 2015-09-05 20:19:43 +00:00
joerg 6214f5f4d1 Format string annotation. 2015-02-15 14:51:57 +00:00
christos 7779d7745a - always set *to_buf to a timestamp, even if there was none reported/parseable
(Frank Kardel).
- merge the timestamp copying code to one place.
- factor out the debugging printf function.
2015-02-10 20:38:15 +00:00
jnemeth e0eccc7b53 - when checking hostname of incoming remote messages, fallback to checking
remote host if the message doesn't contain a hostname
- don't truncate IP addresses when reading syslogd.conf
2014-08-18 05:21:16 +00:00
christos fc0ed55151 CID 1132759: Abort on dehumanize_number error on constant built-in string. 2013-11-27 20:48:28 +00:00
christos ea5463304e CID 1128379: Fix TOCTOU, always open the file first with non-blocking I/O,
do that stat later and leave the file as non-blocking because it does not
make a difference for plain files.
2013-11-11 16:39:21 +00:00
wiz 130f1c4a78 Bump date for FIFO support. 2013-11-10 00:13:50 +00:00
christos d15656b177 add support for outputting to FIFO's (Anthony Mallet) 2013-11-09 19:00:18 +00:00
christos 06a74ca997 fix two bugs related to queues (Anthony Mallet)
- the default values are in humanized number form so strtol does not work
- fix reversed size tests
2013-11-09 18:58:22 +00:00
christos c68a8e00e8 PR/47861: Fredrik Pettai: keep track of the address family for each socket
opened and don't send the a message to the wrong family type.
2013-05-27 23:15:51 +00:00
christos dbf8567fb0 ut_line does not have /dev in front of it. Add it, from dholland@ 2013-01-17 18:54:28 +00:00
christos 14fb63db45 PR/47449: David Holland: Don't log to terminals with mesg n, unless it is a
wall message.
2013-01-15 22:37:04 +00:00
dholland 1cb1b27ac4 fix thinko 2013-01-14 03:05:41 +00:00
wiz 4aa4bc5963 Remove trailing whitespace. 2012-10-30 23:03:02 +00:00
rkujawa 6ee58bf1d4 Note enchancements that appeared in NetBSD 6.0. 2012-10-30 21:24:26 +00:00
msaitoh 8edba753e8 RFC 5848 2012-10-05 16:15:45 +00:00
christos 8565a6a499 remove dup O_NDELAY. 2012-06-20 01:39:34 +00:00
christos 0787d10414 - fix writev1() to pre-decrement count.
- always open ttys with O_NDELAY.
2012-06-19 13:44:35 +00:00
christos dafeb4b2c4 don't call isatty() to the fd before opening it. 2012-06-18 19:17:42 +00:00
christos 92dd06985f WARNS=4 2012-06-06 00:33:45 +00:00
christos a480a96956 Open and write to ttys using non-blocking I/O to prevent DoS when hardware
or software flow control prevents tty writes or when the tty line is too
slow to respond.
2012-06-05 19:33:17 +00:00
christos 99b3039fe6 improve error handling. 2012-05-15 01:22:50 +00:00
wiz 1ac719d147 Remove unnecessary Bk/Ek pairs from SYNOPSIS.
No effective change except where I used the opportunity to sort options
and/or option descriptions.
2012-04-08 22:00:37 +00:00