diff options
| author | 2016-07-01 15:00:48 +0000 | |
|---|---|---|
| committer | 2016-07-01 15:00:48 +0000 | |
| commit | cde8ab7f93670398400bef59219f9447e85da1af (patch) | |
| tree | 28dfe1528967c4f28027987b38f978e75a3c727c /usr.sbin/syslogd/syslogd.c | |
| parent | SolidRun's HummingBoards and CuBoxes are also available with (diff) | |
| download | wireguard-openbsd-cde8ab7f93670398400bef59219f9447e85da1af.tar.xz wireguard-openbsd-cde8ab7f93670398400bef59219f9447e85da1af.zip | |
Include errno string in log message when we fail to open a file.
The privileged process sends the errno value back when it cannot
open a file. OK gilles@
Diffstat (limited to 'usr.sbin/syslogd/syslogd.c')
| -rw-r--r-- | usr.sbin/syslogd/syslogd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index da917502a27..e916ef12e1c 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syslogd.c,v 1.205 2016/04/02 19:55:10 krw Exp $ */ +/* $OpenBSD: syslogd.c,v 1.206 2016/07/01 15:00:48 millert Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -1897,7 +1897,7 @@ fprintlog(struct filed *f, int flags, char *msg) retryonce = 1; if (f->f_file < 0) { f->f_type = F_UNUSED; - logerrorx(f->f_un.f_fname); + logerror(f->f_un.f_fname); } else goto again; } else if ((e == EPIPE || e == EBADF) && @@ -1906,7 +1906,7 @@ fprintlog(struct filed *f, int flags, char *msg) retryonce = 1; if (f->f_file < 0) { f->f_type = F_UNUSED; - logerrorx(f->f_un.f_fname); + logerror(f->f_un.f_fname); } else goto again; } else { @@ -1959,7 +1959,7 @@ wallmsg(struct filed *f, struct iovec *iov) if (reenter++) return; if ((uf = priv_open_utmp()) == NULL) { - logerrorx(_PATH_UTMP); + logerror(_PATH_UTMP); reenter = 0; return; } @@ -2638,7 +2638,7 @@ cfline(char *line, char *progblock, char *hostblock) f->f_file = priv_open_log(p); if (f->f_file < 0) { f->f_type = F_UNUSED; - logerrorx(p); + logerror(p); break; } if (isatty(f->f_file)) { |
