summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorDan McDonald <danmcd@joyent.com>2021-01-22 12:36:10 -0500
committerDan McDonald <danmcd@joyent.com>2021-01-22 12:36:10 -0500
commite05887f4dd19afc4c565b1a121b48a9b06038831 (patch)
treede4316c9ad233dcc60478a6ffc7267fb246e1681 /usr/src
parentc85996c970d16f2bbde7e025b3f18fdaef5a2e71 (diff)
parent4efb20e81cede837b887da28bb6284155a828dab (diff)
downloadillumos-joyent-e05887f4dd19afc4c565b1a121b48a9b06038831.tar.gz
[illumos-gate merge]
commit 4efb20e81cede837b887da28bb6284155a828dab 13456 remove umem check_rtime exception commit 986778a303c760bb2204efc52ea9eba748546342 13356 syslog(3c) should not open syslog_door without LOG_CONS
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/libc/port/gen/syslog.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr/src/lib/libc/port/gen/syslog.c b/usr/src/lib/libc/port/gen/syslog.c
index 9c4e7b9443..99c2be2030 100644
--- a/usr/src/lib/libc/port/gen/syslog.c
+++ b/usr/src/lib/libc/port/gen/syslog.c
@@ -25,7 +25,7 @@
*/
/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
@@ -86,10 +86,10 @@
#define PRIMASK(p) (1 << ((p) & LOG_PRIMASK))
#define PRIFAC(p) (((p) & LOG_FACMASK) >> 3)
-#define IMPORTANT LOG_ERR
+#define IMPORTANT LOG_ERR
#ifndef FALSE
-#define FALSE 0
+#define FALSE 0
#endif
#ifndef TRUE
@@ -190,6 +190,7 @@ vsyslog(int pri, const char *fmt, va_list ap)
uint32_t msgid;
char *msgid_start, *msgid_end;
int nowait;
+ int ret;
/*
* Maximum tag length is 256 (the pad in outline) minus the size of the
@@ -338,10 +339,11 @@ vsyslog(int pri, const char *fmt, va_list ap)
dat.buf = outline;
/* output the message to the local logger */
- if ((putmsg(LogFile, &ctl, &dat, 0) >= 0) && syslogd_ok())
- return;
+ ret = putmsg(LogFile, &ctl, &dat, 0);
if (!(LogStat & LOG_CONS))
return;
+ if ((ret >= 0) && syslogd_ok())
+ return;
/*
* Output the message to the console directly. To reduce visual