]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* modules/loggers/mod_log_config.c, server/log.c (open_error_log,
authorJoe Orton <jorton@apache.org>
Tue, 1 Jun 2004 15:30:16 +0000 (15:30 +0000)
committerJoe Orton <jorton@apache.org>
Tue, 1 Jun 2004 15:30:16 +0000 (15:30 +0000)
ap_replace_stderr_log): Use APR_LARGEFILE when opening log files, to
allow log files to exceed the 2Gb limit if necessary.

PR: 13511
Reviewed by: Jeff Trawick, Andr�� Malo

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

CHANGES
STATUS
modules/loggers/mod_log_config.c
server/log.c

diff --git a/CHANGES b/CHANGES
index 042cd29299b1285bce09d5b788ac297927fb3035..ee4d1def143ca05306b1229aaa9f160a2379272a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.50
 
+  *) Remove 2Gb log file size restriction on some 32-bit platforms.
+     PR 13511.  [Joe Orton]
+
   *) mod_logio no longer removes the EOS bucket. PR 27928.
      [Bojan Smojver <bojan rexursive.com>]
 
@@ -21,24 +24,24 @@ Changes with Apache 2.0.50
 
   *) Fix a segfault when requests for shared memory fails and returns
      NULL. Fix a segfault caused by a lack of bounds checking on the
-     cache. PR 24801 [Graham Leggett]
+     cache.  PR 24801.  [Graham Leggett]
 
   *) Throw an error message if an attempt is made to use the LDAPTrustedCA
      or LDAPTrustedCAType directives in a VirtualHost. PR 26390
      [Brad Nicholes]
 
   *) Fix a potential segfault if the bind password in the LDAP cache
-     is NULL. PR 28250 [Jari Ahonen <jah@progress.com>]
+     is NULL.  PR 28250.  [Jari Ahonen <jah progress.com>]
 
   *) Quotes cannot be used around require group and require dn
      directives, update the documentation to reflect this. Also add
      quotes around the dn and group within debug messages, to make it
      more obvious why authentication is failing if quotes are used in
-     error. PR 19304 [Graham Leggett]
+     error.  PR 19304.  [Graham Leggett]
 
   *) The Microsoft LDAP SDK escapes filters for us, stop util_ldap
      from escaping filters twice when the backslash character is used.
-     PR 24437 [Jess Holle <jessh@ptc.com>]
+     PR 24437.  [Jess Holle <jessh ptc.com>]
 
   *) Overhaul handling of LDAP error conditions, so that the util_ldap_*
      functions leave the connections in a sane state after errors have
diff --git a/STATUS b/STATUS
index a80e478986c380a0e77987d0bfa8560ce2651c7a..854bf154e9adc83d3fb7c58878b69b45d7ff9b6d 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2004/05/31 09:47:50 $]
+Last modified at [$Date: 2004/06/01 15:30:15 $]
 
 Release:
 
@@ -95,19 +95,6 @@ PATCHES TO BACKPORT FROM 2.1
        instead of db3. Fixed complaints about unpackaged files.
        build/rpm/httpd.spec.in: r1.5
        +1: minfrin, nd
-    *) Use APR_LARGEFILE when opening log files, and not APR_WRITE,
-       allowing >2Gb log files on some platforms with a 32-bit off_t
-       http://www.apache.org/~jorton/largelog.diff
-       
-       which is:
-       http://cvs.apache.org/viewcvs.cgi/httpd-2.0/server/log.c?r1=1.143&r2=1.144
-       http://cvs.apache.org/viewcvs.cgi/httpd-2.0/server/log.c?r1=1.134&r2=1.135
-       http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/loggers/mod_log_config.c?r1=1.116&r2=1.117
-       with conditional use of APR_LARGEFILE
-
-       PR: 13511
-       +1: jorton, trawick, nd
 
     *) mod_ssl: Fix potential SEGV in 'shmcb' session cache.
        modules/ssl/ssl_scache_shmcb.c: r1.26
index 3c9fe413e4a120979c3e4d536e0fdd88fc8ebf47..4e22279b74689ca48f796a72806fe9c79f171b28 100644 (file)
 
 module AP_MODULE_DECLARE_DATA log_config_module;
 
+#ifndef APR_LARGEFILE
+#define APR_LARGEFILE 0
+#endif
 
-static int xfer_flags = (APR_WRITE | APR_APPEND | APR_CREATE);
+static int xfer_flags = (APR_WRITE | APR_APPEND | APR_CREATE | APR_LARGEFILE);
 static apr_fileperms_t xfer_perms = APR_OS_DEFAULT;
 static apr_hash_t *log_hash;
 static apr_status_t ap_default_log_writer(request_rec *r,
index ba491148ca6395816529315bfddc9e0630c9c365..424555bc25e050893f4dcd1850819380d5a8d905 100644 (file)
 #include "util_time.h"
 #include "ap_mpm.h"
 
+#ifndef APR_LARGEFILE
+#define APR_LARGEFILE 0
+#endif
+
 typedef struct {
     char    *t_name;
     int      t_val;
@@ -158,7 +162,7 @@ AP_DECLARE(apr_status_t) ap_replace_stderr_log(apr_pool_t *p,
         return APR_EBADPATH;
     }
     if ((rc = apr_file_open(&stderr_file, filename,
-                            APR_APPEND | APR_READ | APR_WRITE | APR_CREATE,
+                            APR_APPEND | APR_WRITE | APR_CREATE | APR_LARGEFILE,
                             APR_OS_DEFAULT, p)) != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_STARTUP, rc, NULL,
                      "%s: could not open error log file %s.",
@@ -271,7 +275,7 @@ static int open_error_log(server_rec *s, apr_pool_t *p)
             return DONE;
         }
         if ((rc = apr_file_open(&s->error_log, fname,
-                               APR_APPEND | APR_READ | APR_WRITE | APR_CREATE,
+                               APR_APPEND | APR_WRITE | APR_CREATE | APR_LARGEFILE,
                                APR_OS_DEFAULT, p)) != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_STARTUP, rc, NULL,
                          "%s: could not open error log file %s.",