From: Joe Orton Date: Thu, 31 May 2012 13:22:02 +0000 (+0000) Subject: * support/suexec.c: Define AP_LOG_FACILITY. X-Git-Tag: 2.5.0-alpha~6772 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63b24c308910daaa66d5f32638a3bb8b956333e5;p=thirdparty%2Fapache%2Fhttpd.git * support/suexec.c: Define AP_LOG_FACILITY. (err_output): Use AP_LOG_FACILITY for syslog facility. Suggested by: kbrand git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1344712 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/suexec.c b/support/suexec.c index 8d7fcfdd990..5b6b254cc81 100644 --- a/support/suexec.c +++ b/support/suexec.c @@ -75,8 +75,16 @@ extern char **environ; #ifdef AP_LOG_SYSLOG +/* Syslog support. */ +#if !defined(AP_LOG_FACILITY) && defined(LOG_AUTHPRIV) +#define AP_LOG_FACILITY LOG_AUTHPRIV +#elif !defined(AP_LOG_FACILITY) +#define AP_LOG_FACILITY LOG_AUTH +#endif + static int log_open; #else +/* Non-syslog support. */ static FILE *log = NULL; #endif @@ -148,7 +156,7 @@ static void err_output(int is_error, const char *fmt, va_list ap) { #if defined(AP_LOG_SYSLOG) if (!log_open) { - openlog("suexec", LOG_PID, LOG_DAEMON); + openlog("suexec", LOG_PID, AP_LOG_FACILITY); log_open = 1; }