From: William A. Rowe Jr Date: Tue, 21 Aug 2012 17:37:50 +0000 (+0000) Subject: * server/main.c (main): Bail out *before* signalling the server X-Git-Tag: 2.2.23~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e15e1e5a486c10bce63138b6002627c436b78ff8;p=thirdparty%2Fapache%2Fhttpd.git * server/main.c (main): Bail out *before* signalling the server if the config is bad. (as per the claim in the docs!) Backports: r1328345 Submitted by: jorton Reviewed by: rjung, trawick, wrowe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1375680 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 4db8d39c04a..4131948d5f9 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,9 @@ Changes with Apache 2.2.23 possible XSS for a site where untrusted users can upload files to a location with MultiViews enabled. [Niels Heinen ] + *) core: Prevent "httpd -k restart" from killing server in presence of + config error. [Joe Orton] + *) mod_ssl: when compiled against OpenSSL 1.0.1 or later, allow explicit control of TLSv1.1 and TLSv1.2 through the SSLProtocol directive, adding TLSv1.1 and TLSv1.2 support by default given 'SSLProtocol All'. diff --git a/STATUS b/STATUS index 5a0eb83d204..3a76f4e6c24 100644 --- a/STATUS +++ b/STATUS @@ -122,14 +122,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: 2.2.x patch: trunk patch applies +1: rjung, trawick, wrowe - * core: Bail out *before* signalling the server if the config is bad. - (as per the claim in the docs!) Prevents "httpd -k restart" from - killing server in presence of config error. - trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1328345 - 2.4.x patch: http://svn.apache.org/viewvc?view=revision&revision=1331847 - 2.2.x patch: trunk patch applies - +1: rjung, trawick, wrowe - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/server/main.c b/server/main.c index 224a10ef77a..0892b1f9ed0 100644 --- a/server/main.c +++ b/server/main.c @@ -661,6 +661,11 @@ int main(int argc, const char * const argv[]) } } + /* If our config failed, deal with that here. */ + if (rv != OK) { + destroy_and_exit_process(process, 1); + } + signal_server = APR_RETRIEVE_OPTIONAL_FN(ap_signal_server); if (signal_server) { int exit_status; @@ -670,11 +675,6 @@ int main(int argc, const char * const argv[]) } } - /* If our config failed, deal with that here. */ - if (rv != OK) { - destroy_and_exit_process(process, 1); - } - apr_pool_clear(plog); if ( ap_run_open_logs(pconf, plog, ptemp, server_conf) != OK) {