Commit Graph

240 Commits

Author SHA1 Message Date
uwe c82ff6065d syslog.conf(5): add back .Pp lost in previous 2023-12-31 23:39:27 +00:00
uwe dd903ef4d6 syslog.conf(5): improve markup
Use tagged lists, mark up literals, be consistent about options
(global): vs parameters (of a TLS action), fold TLS authentication
description into the TLS options section.
2023-12-31 19:41:22 +00:00
uwe e30c599423 syslogd.c: fix a typo in a comment 2023-10-11 23:22:13 +00:00
lukem c4b7a9e794 bsd.own.mk: rename GCC_NO_* to CC_WNO_*
Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
2023-06-03 09:09:01 +00:00
christos 8499346dc4 Handle OpenSSL-3.x 2023-05-09 20:02:59 +00:00
andvar ff46982a78 s/betwen/between/ and s/singed/signed/. 2023-05-01 11:57:53 +00:00
uwe b983a092c6 syslogd: make -d accept an optional argument
Make it possible to specify the debug message categories with an
optional numeric argument.  You'll have to read the fine source to
find out what they are.  The number can be specified as the usual
decimal, hex (0x), or octal (0) literal with an optional ~negation.

Since syslogd uses getopt(3), not getopt_long(3), do a bit of
gymnastics so that both -d42 and -d 42 are accepted (I'm not inventing
long names for all the existing options just to support an optional
argument to -d).

-d without an argument still uses the old D_DEFAULT selection just in
case someone really relies on that.  You can disable all debug
messages with -d0 but still get syslogd not daemonized.
2022-11-08 01:43:09 +00:00
uwe b1c7adf12f tls.c: wrap debug-only data in #ifndef NDEBUG 2022-11-08 01:05:10 +00:00
uwe 4497207b84 sign.c: mark a variable used only in asserts as __diagused 2022-11-08 01:03:27 +00:00
andvar 7ba300a976 s/auxillary/auxiliary/ in comments. 2022-05-20 19:34:22 +00:00
andvar a5c1e39951 s/wich/which in comments. 2022-05-15 20:37:50 +00:00
rillig 6f4965e060 usr.sbin: remove unnecessary CONSTCOND, lint no longer needs it
Since 2021-01-31, lint no longer requires a CONSTCOND comment in a
do-while-0 statement since this is a common code pattern, especially in
statement-like macros.

sed -i -E 's,} while \(/\* ?CONSTCOND ?\*/ ?0\),} while (0),' */*.[ch]
2021-11-27 22:30:25 +00:00
andvar b58602814f fix typos in word "successful". 2021-09-16 22:19:10 +00:00
andvar 3b732a4cd9 s/optons/options/ 2021-09-01 13:44:02 +00:00
andvar 6e3ee785e2 s/bacause/because/ 2021-08-13 20:19:13 +00:00
christos d54a6e0c5d Add blocklist support to libwrap which enables all programs using libwrap
to block access from hosts we deny. (libwrap support from Greg A. Woods)
2021-03-07 15:09:12 +00:00
dholland 5f378fab42 syslogd: in die(), don't call die() again recursively.
Particularly not for something as immaterial as close failing.

PR 55795
2020-11-08 01:12:46 +00:00
christos cab1687af0 make the buffer fit any 32 bit number. 2020-11-07 17:46:56 +00:00
christos 8cb1641ff6 PR/55794: Jan Schaumann: Eliminate unchecked malloc 2020-11-07 16:16:33 +00:00
gson fe093d7595 When reporting an error before daemonizing, prefix the error message
with the program name.
2020-09-29 14:08:43 +00:00
msaitoh 40064e2457 s/lenght/length/ 2019-12-26 04:53:11 +00:00
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