]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* support/suexec.c: Define AP_LOG_FACILITY.
authorJoe Orton <jorton@apache.org>
Thu, 31 May 2012 13:22:02 +0000 (13:22 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 31 May 2012 13:22:02 +0000 (13:22 +0000)
  (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

support/suexec.c

index 8d7fcfdd99001a6bc8bb8938dba4ac533fe14c4b..5b6b254cc81008968a2051a1f56d7adc5255cf30 100644 (file)
 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;
     }