Commit ed575f00 authored by Joe Orton's avatar Joe Orton
Browse files

* modules/loggers/mod_log_config.c, server/log.c (open_error_log,

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
parent be07cac3
Loading
Loading
Loading
Loading
+7 −4
Changes for CHANGES: 7 added lines, 4 removed lines.
Original line number Diff line number Diff line
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
+1 −14
Changes for STATUS: 1 added line, 14 removed lines.
Original line number Diff line number Diff line
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:

@@ -96,19 +96,6 @@ PATCHES TO BACKPORT FROM 2.1
       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
       +1: madhum, jorton, trawick
+4 −1
Changes for modules/loggers/mod_log_config.c: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -170,8 +170,11 @@

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,
+6 −2
Changes for server/log.c: 6 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -50,6 +50,10 @@
#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.",