You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2012/01/31 22:50:03 UTC
svn commit: r1238824 - in /httpd/httpd/branches/2.4.x: ./ CHANGES
server/core.c
Author: sf
Date: Tue Jan 31 21:50:03 2012
New Revision: 1238824
URL: http://svn.apache.org/viewvc?rev=1238824&view=rev
Log:
Merge r1225199:
Check during configtest that the directories for error logs exist
PR: 29941
Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/CHANGES
httpd/httpd/branches/2.4.x/server/core.c
Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 31 21:50:03 2012
@@ -1,3 +1,3 @@
/httpd/httpd/branches/revert-ap-ldap:1150158-1150173
/httpd/httpd/branches/wombat-integration:723609-723841
-/httpd/httpd/trunk:1200496,1200556,1200702,1200955,1200968,1201032,1201042,1201111,1201194,1201198,1201202,1201450,1201956,1202236,1202453,1202456,1202886,1203400,1203714,1203859,1203980,1204630,1204968,1204990,1205061,1205075,1205379,1205885,1206291,1206472,1206587,1206850,1206940,1206978,1207719,1208753,1208835,1209053,1209085,1209417,1209432,1209461,1209601,1209603,1209618,1209623,1209741,1209754,1209766,1209776,1209797-1209798,1209811-1209812,1209814,1209908,1209910,1209913,1209916-1209917,1209947,1209952,1210067,1210080,1210120,1210124,1210130,1210148,1210219,1210221,1210252,1210284,1210336,1210378,1210725,1210892,1210951,1210954,1211351,1211364,1211490,1211495,1211528,1211663,1211680,1212872,1212883,1213338,1213381,1213391,1213567,1214003,1214005,1214015,1215514,1220462,1220467,1220493,1220524,1220570,1220768,1220794,1220826,1220846,1221292,1222335,1222370,1222473,1222915,1222917,1222921,1223048,1225060,1225197-1225198,1225380,1225476,1225478,1225791,1225795-1225796,12
26339,1226375,1227910,1228700,1228816,1229024,1229059,1229099,1229116,1229134,1229136,1229930,1230286,1231442,1231446,1231508,1231510,1231518,1232575,1232594,1232630,1232838,1234180,1234297,1234479,1234511,1234565,1234574,1234642-1234643,1234876,1234899,1236701,1237407,1238545,1238768
+/httpd/httpd/trunk:1200496,1200556,1200702,1200955,1200968,1201032,1201042,1201111,1201194,1201198,1201202,1201450,1201956,1202236,1202453,1202456,1202886,1203400,1203714,1203859,1203980,1204630,1204968,1204990,1205061,1205075,1205379,1205885,1206291,1206472,1206587,1206850,1206940,1206978,1207719,1208753,1208835,1209053,1209085,1209417,1209432,1209461,1209601,1209603,1209618,1209623,1209741,1209754,1209766,1209776,1209797-1209798,1209811-1209812,1209814,1209908,1209910,1209913,1209916-1209917,1209947,1209952,1210067,1210080,1210120,1210124,1210130,1210148,1210219,1210221,1210252,1210284,1210336,1210378,1210725,1210892,1210951,1210954,1211351,1211364,1211490,1211495,1211528,1211663,1211680,1212872,1212883,1213338,1213381,1213391,1213567,1214003,1214005,1214015,1215514,1220462,1220467,1220493,1220524,1220570,1220768,1220794,1220826,1220846,1221292,1222335,1222370,1222473,1222915,1222917,1222921,1223048,1225060,1225197-1225199,1225380,1225476,1225478,1225791,1225795-1225796,12
26339,1226375,1227910,1228700,1228816,1229024,1229059,1229099,1229116,1229134,1229136,1229930,1230286,1231442,1231446,1231508,1231510,1231518,1232575,1232594,1232630,1232838,1234180,1234297,1234479,1234511,1234565,1234574,1234642-1234643,1234876,1234899,1236701,1237407,1238545,1238768
Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1238824&r1=1238823&r2=1238824&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Tue Jan 31 21:50:03 2012
@@ -6,6 +6,9 @@ Changes with Apache 2.4.1
when no custom ErrorDocument is specified for status code 400.
[Eric Covener]
+ *) core: Check during configtest that the directories for error logs exist.
+ PR 29941 [Stefan Fritsch]
+
*) Core configuration: add AllowOverride option to treat syntax
errors in .htaccess as non-fatal. PR 52439 [Nick Kew, Jim Jagielski]
Modified: httpd/httpd/branches/2.4.x/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/core.c?rev=1238824&r1=1238823&r2=1238824&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/core.c (original)
+++ httpd/httpd/branches/2.4.x/server/core.c Tue Jan 31 21:50:03 2012
@@ -4353,6 +4353,44 @@ AP_DECLARE(int) ap_sys_privileges_handle
return sys_privileges;
}
+static int check_errorlog_dir(apr_pool_t *p, server_rec *s)
+{
+ if (s->error_fname[0] == '|' && strcmp(s->error_fname, "syslog") == 0) {
+ return APR_SUCCESS;
+ }
+ else {
+ char *abs = ap_server_root_relative(p, s->error_fname);
+ char *dir = ap_make_dirstr_parent(p, abs);
+ apr_finfo_t finfo;
+ apr_status_t rv = apr_stat(&finfo, dir, APR_FINFO_TYPE, p);
+ if (rv == APR_SUCCESS && finfo.filetype != APR_DIR)
+ rv = APR_ENOTDIR;
+ if (rv != APR_SUCCESS) {
+ const char *desc = "main error log";
+ if (s->defn_name)
+ desc = apr_psprintf(p, "error log of vhost defined at %s:%d",
+ s->defn_name, s->defn_line_number);
+ ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_EMERG, rv,
+ ap_server_conf, APLOGNO(02291)
+ "Cannot access directory '%s' for %s", dir, desc);
+ return !OK;
+ }
+ }
+ return OK;
+}
+
+static int core_check_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
+{
+ int rv = OK;
+ while (s) {
+ if (check_errorlog_dir(ptemp, s) != OK)
+ rv = !OK;
+ s = s->next;
+ }
+ return rv;
+}
+
+
static int core_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
{
ap_mutex_init(pconf);
@@ -4748,6 +4786,7 @@ static void register_hooks(apr_pool_t *p
ap_hook_pre_config(core_pre_config, NULL, NULL, APR_HOOK_REALLY_FIRST);
ap_hook_post_config(core_post_config,NULL,NULL,APR_HOOK_REALLY_FIRST);
+ ap_hook_check_config(core_check_config,NULL,NULL,APR_HOOK_FIRST);
ap_hook_test_config(core_dump_config,NULL,NULL,APR_HOOK_FIRST);
ap_hook_translate_name(ap_core_translate,NULL,NULL,APR_HOOK_REALLY_LAST);
ap_hook_map_to_storage(core_map_to_storage,NULL,NULL,APR_HOOK_REALLY_LAST);
Re: svn commit: r1238824 - in /httpd/httpd/branches/2.4.x: ./ CHANGES
server/core.c
Posted by Rainer Jung <ra...@kippdata.de>.
On 31.01.2012 22:50, sf@apache.org wrote:
> Author: sf
> Date: Tue Jan 31 21:50:03 2012
> New Revision: 1238824
>
> URL: http://svn.apache.org/viewvc?rev=1238824&view=rev
> Log:
> Merge r1225199:
> Check during configtest that the directories for error logs exist
>
> PR: 29941
I added r1238833:
Fix handling of piped, syslog, or inherited ErrorLog entries
Backport of r1225223 from trunk.
Hope that's OK.
Rainer