You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2012/05/31 15:22:03 UTC

svn commit: r1344712 - /httpd/httpd/trunk/support/suexec.c

Author: jorton
Date: Thu May 31 13:22:02 2012
New Revision: 1344712

URL: http://svn.apache.org/viewvc?rev=1344712&view=rev
Log:
* support/suexec.c: Define AP_LOG_FACILITY.
  (err_output): Use AP_LOG_FACILITY for syslog facility.

Suggested by: kbrand

Modified:
    httpd/httpd/trunk/support/suexec.c

Modified: httpd/httpd/trunk/support/suexec.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/suexec.c?rev=1344712&r1=1344711&r2=1344712&view=diff
==============================================================================
--- httpd/httpd/trunk/support/suexec.c (original)
+++ httpd/httpd/trunk/support/suexec.c Thu May 31 13:22:02 2012
@@ -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, con
 {
 #if defined(AP_LOG_SYSLOG)
     if (!log_open) {
-        openlog("suexec", LOG_PID, LOG_DAEMON);
+        openlog("suexec", LOG_PID, AP_LOG_FACILITY);
         log_open = 1;
     }