]> granicus.if.org Git - apache/commitdiff
Create the pidfile world readable by adding APR_FPROT_WREAD. Use
authorGraham Leggett <minfrin@apache.org>
Sat, 27 Feb 2010 18:23:08 +0000 (18:23 +0000)
committerGraham Leggett <minfrin@apache.org>
Sat, 27 Feb 2010 18:23:08 +0000 (18:23 +0000)
non-deprecated versions of the APR constants.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@917005 13f79535-47bb-0310-9956-ffa450edef68

support/htcacheclean.c

index 44f6d60113cc26c2a7a523760d916ad05438bb28..469e2ad130175781869f04f0c4affbc2a7be7044 100644 (file)
@@ -764,9 +764,10 @@ static void log_pid(apr_pool_t *pool, const char *pidfilename, apr_file_t **pidf
     char errmsg[120];
     pid_t mypid = getpid();
 
-    if (APR_SUCCESS == (status = apr_file_open(pidfile, pidfilename, APR_WRITE
-                | APR_CREATE | APR_TRUNCATE | APR_DELONCLOSE,
-                APR_UREAD | APR_UWRITE | APR_GREAD, pool))) {
+    if (APR_SUCCESS == (status = apr_file_open(pidfile, pidfilename,
+                APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_TRUNCATE |
+                APR_FOPEN_DELONCLOSE, APR_FPROT_UREAD | APR_FPROT_UWRITE |
+                APR_FPROT_GREAD | APR_FPROT_WREAD, pool))) {
         apr_file_printf(*pidfile, "%" APR_PID_T_FMT APR_EOL_STR, mypid);
     }
     else {