1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

Sync the severity of the syslog_* functions shared between identd, slowcgi,

tftp-proxy and tftpd to the severity used in log.c style loggers.
This also fixes an issue where syslog_err and syslog_errx logged with
different severities.

Sure deraadt@
This commit is contained in:
florian 2017-05-26 17:38:46 +00:00
parent c44d47c025
commit a52b97d159
4 changed files with 20 additions and 20 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: identd.c,v 1.35 2017/04/18 03:54:27 deraadt Exp $ */
/* $OpenBSD: identd.c,v 1.36 2017/05/26 17:38:46 florian Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
@ -1078,7 +1078,7 @@ syslog_err(int ecode, const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
syslog_vstrerror(errno, LOG_EMERG, fmt, ap);
syslog_vstrerror(errno, LOG_CRIT, fmt, ap);
va_end(ap);
exit(ecode);
}
@ -1089,7 +1089,7 @@ syslog_errx(int ecode, const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
vsyslog(LOG_WARNING, fmt, ap);
vsyslog(LOG_CRIT, fmt, ap);
va_end(ap);
exit(ecode);
}
@ -1100,7 +1100,7 @@ syslog_warn(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
syslog_vstrerror(errno, LOG_WARNING, fmt, ap);
syslog_vstrerror(errno, LOG_ERR, fmt, ap);
va_end(ap);
}
@ -1110,7 +1110,7 @@ syslog_warnx(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
vsyslog(LOG_WARNING, fmt, ap);
vsyslog(LOG_ERR, fmt, ap);
va_end(ap);
}

View File

@ -1,4 +1,4 @@
/* $OpenBSD: slowcgi.c,v 1.50 2016/09/04 14:40:34 florian Exp $ */
/* $OpenBSD: slowcgi.c,v 1.51 2017/05/26 17:38:46 florian Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
* Copyright (c) 2013 Florian Obser <florian@openbsd.org>
@ -1236,7 +1236,7 @@ syslog_err(int ecode, const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
syslog_vstrerror(errno, LOG_EMERG, fmt, ap);
syslog_vstrerror(errno, LOG_CRIT, fmt, ap);
va_end(ap);
exit(ecode);
}
@ -1247,7 +1247,7 @@ syslog_errx(int ecode, const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
vsyslog(LOG_WARNING, fmt, ap);
vsyslog(LOG_CRIT, fmt, ap);
va_end(ap);
exit(ecode);
}
@ -1258,7 +1258,7 @@ syslog_warn(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
syslog_vstrerror(errno, LOG_WARNING, fmt, ap);
syslog_vstrerror(errno, LOG_ERR, fmt, ap);
va_end(ap);
}
@ -1268,7 +1268,7 @@ syslog_warnx(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
vsyslog(LOG_WARNING, fmt, ap);
vsyslog(LOG_ERR, fmt, ap);
va_end(ap);
}

View File

@ -1,4 +1,4 @@
/* $OpenBSD: tftp-proxy.c,v 1.19 2016/09/04 14:41:16 florian Exp $
/* $OpenBSD: tftp-proxy.c,v 1.20 2017/05/26 17:38:46 florian Exp $
*
* Copyright (c) 2005 DLS Internet Services
* Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl>
@ -980,7 +980,7 @@ syslog_err(int ecode, const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
syslog_vstrerror(errno, LOG_EMERG, fmt, ap);
syslog_vstrerror(errno, LOG_CRIT, fmt, ap);
va_end(ap);
exit(ecode);
@ -992,7 +992,7 @@ syslog_errx(int ecode, const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
vsyslog(LOG_WARNING, fmt, ap);
vsyslog(LOG_CRIT, fmt, ap);
va_end(ap);
exit(ecode);
@ -1004,7 +1004,7 @@ syslog_warn(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
syslog_vstrerror(errno, LOG_WARNING, fmt, ap);
syslog_vstrerror(errno, LOG_ERR, fmt, ap);
va_end(ap);
}
@ -1014,7 +1014,7 @@ syslog_warnx(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
vsyslog(LOG_WARNING, fmt, ap);
vsyslog(LOG_ERR, fmt, ap);
va_end(ap);
}

View File

@ -1,4 +1,4 @@
/* $OpenBSD: tftpd.c,v 1.38 2016/09/26 17:15:19 jca Exp $ */
/* $OpenBSD: tftpd.c,v 1.39 2017/05/26 17:38:46 florian Exp $ */
/*
* Copyright (c) 2012 David Gwynne <dlg@uq.edu.au>
@ -1633,7 +1633,7 @@ syslog_err(int ecode, const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
syslog_vstrerror(errno, LOG_EMERG, fmt, ap);
syslog_vstrerror(errno, LOG_CRIT, fmt, ap);
va_end(ap);
exit(ecode);
@ -1645,7 +1645,7 @@ syslog_errx(int ecode, const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
vsyslog(LOG_WARNING, fmt, ap);
vsyslog(LOG_CRIT, fmt, ap);
va_end(ap);
exit(ecode);
@ -1657,7 +1657,7 @@ syslog_warn(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
syslog_vstrerror(errno, LOG_WARNING, fmt, ap);
syslog_vstrerror(errno, LOG_ERR, fmt, ap);
va_end(ap);
}
@ -1667,7 +1667,7 @@ syslog_warnx(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
vsyslog(LOG_WARNING, fmt, ap);
vsyslog(LOG_ERR, fmt, ap);
va_end(ap);
}