summaryrefslogtreecommitdiffstats
path: root/usr.sbin/httpd
diff options
context:
space:
mode:
authorkn <kn@openbsd.org>2019-05-02 22:32:34 +0000
committerkn <kn@openbsd.org>2019-05-02 22:32:34 +0000
commit58443515df2b23e07803f731b9901655c0b84d70 (patch)
treede4d6be126bc04ce07c0ab32d7137d095575cffa /usr.sbin/httpd
parentAdd a print function to mainbus(4) such that it prints unconfigured devices (diff)
downloadwireguard-openbsd-58443515df2b23e07803f731b9901655c0b84d70.tar.xz
wireguard-openbsd-58443515df2b23e07803f731b9901655c0b84d70.zip
Avoid opening log files on "no log"
When not logging anything, do not open files in the first place. This prevents startup failures on configurations where the log/ directory is missing but logging is disabled anyway. OK aja solene reyk
Diffstat (limited to 'usr.sbin/httpd')
-rw-r--r--usr.sbin/httpd/logger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/httpd/logger.c b/usr.sbin/httpd/logger.c
index fdf3bfbb7d4..6a45f04c03d 100644
--- a/usr.sbin/httpd/logger.c
+++ b/usr.sbin/httpd/logger.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: logger.c,v 1.21 2018/02/07 03:28:05 florian Exp $ */
+/* $OpenBSD: logger.c,v 1.22 2019/05/02 22:32:34 kn Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
@@ -197,7 +197,7 @@ logger_open(struct server *srv, struct server_config *srv_conf, void *arg)
{
struct log_file *log, *logfile = NULL, *errfile = NULL;
- if (srv_conf->flags & SRVFLAG_SYSLOG)
+ if (srv_conf->flags & (SRVFLAG_SYSLOG | SRVFLAG_NO_LOG))
return (0);
/* disassociate */