]> granicus.if.org Git - apache/commitdiff
ap_open(..,APR_OS_DEFAULT,..) uses perms 0666 instead of 0777 on
authorJeff Trawick <trawick@apache.org>
Sun, 23 Apr 2000 12:24:10 +0000 (12:24 +0000)
committerJeff Trawick <trawick@apache.org>
Sun, 23 Apr 2000 12:24:10 +0000 (12:24 +0000)
Unix; access_log and error_log now created with these perms; non-
Unix is unaffected

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

modules/loggers/mod_log_config.c

index 9dfe8d58dc35d8031ecca05e76c3c7cbbe233c79..f8cb50f11fc3d6eb772ae4a5c7121c02442e2e2e 100644 (file)
 module MODULE_VAR_EXPORT config_log_module;
 
 static int xfer_flags = (APR_WRITE | APR_APPEND | APR_CREATE);
-#if defined(OS2) || defined(WIN32)
-/* OS/2 dosen't support users and groups */
-static mode_t xfer_mode = (S_IREAD | S_IWRITE);
-#else
-static mode_t xfer_mode = (APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD);
-#endif
+static ap_fileperms_t xfer_perms = APR_OS_DEFAULT;
 
 /* POSIX.1 defines PIPE_BUF as the maximum number of bytes that is
  * guaranteed to be atomic when writing a pipe.  And PIPE_BUF >= 512
@@ -1028,7 +1023,7 @@ static config_log_state *open_config_log(server_rec *s, ap_pool_t *p,
     }
     else {
         const char *fname = ap_server_root_relative(p, cls->fname);
-        if ((status = ap_open(&cls->log_fd, fname, xfer_flags, xfer_mode, p)) 
+        if ((status = ap_open(&cls->log_fd, fname, xfer_flags, xfer_perms, p)) 
             != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_ERR, status, s,
                          "could not open transfer log file %s.", fname);