From: Joe Orton Date: Tue, 1 Jun 2004 15:30:16 +0000 (+0000) Subject: * modules/loggers/mod_log_config.c, server/log.c (open_error_log, X-Git-Tag: 2.0.50~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a62427e0bc4b080fb4b1e0cccfbeda55d407dd8;p=thirdparty%2Fapache%2Fhttpd.git * 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 --- diff --git a/CHANGES b/CHANGES index 042cd29299b..ee4d1def143 100644 --- 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 ] @@ -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 ] + is NULL. PR 28250. [Jari Ahonen ] *) 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 ] + PR 24437. [Jess Holle ] *) 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 a80e478986c..854bf154e9a 100644 --- 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 diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index 3c9fe413e4a..4e22279b746 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -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, diff --git a/server/log.c b/server/log.c index ba491148ca6..424555bc25e 100644 --- a/server/log.c +++ b/server/log.c @@ -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.",