summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-08-08 14:23:24 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-08-08 14:23:24 +0000
commitd9ae936fcd6c3400510bd7c9feb84cfd54259f05 (patch)
tree2696d0fe2b860fcf823639153bcb6f1b6f58b655 /sys/kern
parent5af320ef68b9c1f9153d5de2529d154ce91b8659 (diff)
Kernel sendsyslog(2), libc syslog(3), and syslogd(8) restrict and
truncate the length of a syslog message to 8192 bytes. Use one global define LOG_MAXLINE for all of them. OK deraadt@ millert@
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c
index 1eee7715a25..6fbab42b352 100644
--- a/sys/kern/subr_log.c
+++ b/sys/kern/subr_log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_log.c,v 1.51 2017/07/18 22:22:19 bluhm Exp $ */
+/* $OpenBSD: subr_log.c,v 1.52 2017/08/08 14:23:23 bluhm Exp $ */
/* $NetBSD: subr_log.c,v 1.11 1996/03/30 22:24:44 christos Exp $ */
/*
@@ -418,8 +418,8 @@ dosendsyslog(struct proc *p, const char *buf, size_t nbyte, int flags,
size_t i, len;
int error;
- if (nbyte > 8192)
- nbyte = 8192;
+ if (nbyte > LOG_MAXLINE)
+ nbyte = LOG_MAXLINE;
/* Global variable syslogf may change during sleep, use local copy. */
fp = syslogf;