Commit Graph

319 Commits

Author SHA1 Message Date
52ecea1e1e Fix overriding ExtendedStatus to "off" with mod_systemd loaded, and
give more feedback to systemd during a reload.

* modules/arch/unix/mod_systemd.c (systemd_pre_config): New
  function; tell systemd the service is reloading here.
  (systemd_pre_mpm): Don't set ap_extended_status here, do nothing
  if ExtendedStatus is off.
  (register_hooks): Register pre_config hook.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1802251 13f79535-47bb-0310-9956-ffa450edef68
2017-07-18 08:14:42 +00:00
d79b514c4b Fix spelling in comments and text files.
No functional change.
PR 59990


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756038 13f79535-47bb-0310-9956-ffa450edef68
2016-08-11 19:50:02 +00:00
690c6105f9 hostname: Test and log useragent_host per-request across various modules,
including the scoreboard, expression and rewrite engines, setenvif,
authz_host, access_compat, custom logging, ssl and REMOTE_HOST variables.
PR55348  [William Rowe]

This is the complete change set which applies cleanly to 2.4.x as well,
the server/scoreboard.c will follow, which does not apply due to drift.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729930 13f79535-47bb-0310-9956-ffa450edef68
2016-02-12 01:17:03 +00:00
af14d158a3 Added many log numbers to log statements that
had none.

Those were not detected by the coccinelle script.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725485 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 12:02:41 +00:00
44ce30494e Added many log numbers to log statements that
had none.

Handled all files in modules/.

I used the coccinelle script provided by Stefan.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725392 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 00:03:18 +00:00
c8b02a8c0a Save a few bytes in conf pool when processing 'NWSSLTrustedCerts'.
*Untested* as I don't have the corresponding system.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1721313 13f79535-47bb-0310-9956-ffa450edef68
2015-12-22 07:42:21 +00:00
c3bc5ac552 Silent a sparse Warning.
cid->ecb->lpszLogData can not be NULL.
It is defined in mod_isapi.h as:
typedef struct EXTENSION_CONTROL_BLOCK {
...
    char           lpszLogData[80];
...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1717086 13f79535-47bb-0310-9956-ffa450edef68
2015-11-29 16:06:28 +00:00
68131d85a4 Fix some style issues on files that can easily be synch'ed with 2.4.x
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705983 13f79535-47bb-0310-9956-ffa450edef68
2015-09-30 08:35:35 +00:00
a0274a45d0 Hmmm... why did git miss this?
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664456 13f79535-47bb-0310-9956-ffa450edef68
2015-03-05 18:56:05 +00:00
a9c4c3a37d Concat string at compile time when possible.
Doing so, sometimes also give the opportunity to turn a 'ap_fputstrs' into a 'ap_fputs'.
PR 53741

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1626050 13f79535-47bb-0310-9956-ffa450edef68
2014-09-18 19:06:52 +00:00
89b58e8552 Follow up r1617201:
Return EPERM if the uid is not root on chroot-ing.

Pointed out by trawick on
<CAKUrXK6EGmG1ZD4+UFZ05yznTe6twOU3n57YeO-Ney-_VV_dCQ@mail.gmail.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1618778 13f79535-47bb-0310-9956-ffa450edef68
2014-08-19 01:27:38 +00:00
1a3f433294 mod_systemd: Use AP_SIG_GRACEFUL instead of SIGWINCH.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1618588 13f79535-47bb-0310-9956-ffa450edef68
2014-08-18 11:51:01 +00:00
c14c0ab2c7 mod_systemd: Add IdleShutdown - number of seconds in idle-state after which
httpd is shutdown. This is useful in a combination with socket activation.
Add mod_systemd documentation.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1618579 13f79535-47bb-0310-9956-ffa450edef68
2014-08-18 10:48:41 +00:00
cd503763ee geteuid is always successful,
so remove errno reference.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1617201 13f79535-47bb-0310-9956-ffa450edef68
2014-08-11 05:06:50 +00:00
4e5e8a3b0b unixd_drop_privileges and ap_unixd_setup_child are almost the same,
so let's remove the redundant code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1617196 13f79535-47bb-0310-9956-ffa450edef68
2014-08-11 03:04:21 +00:00
56d0c25725 Add missing APLOGNO.
Refactor some lines to keep APLOGNO on the same line as ap_log_error, when applicable.
Split lines longer than 80.
Improve alignment.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1612068 13f79535-47bb-0310-9956-ffa450edef68
2014-07-20 09:32:58 +00:00
089d2e0373 Do not use deprecated define.
No change in generated code because MODULE_MAGIC_NUMBER is defined as:
   #define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1611871 13f79535-47bb-0310-9956-ffa450edef68
2014-07-19 09:46:20 +00:00
af7096d97d s/equivalant/equivalent/ in comments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1550828 13f79535-47bb-0310-9956-ffa450edef68
2013-12-13 19:56:41 +00:00
f6f568d30c * configure.in: Simplify/fix systemd detection: move later to fix
autoconf warnings; define HAVE_SYSTEMD rather than using CPPFLAGS.

* server/listen.c: Use HAVE_SYSTEMD for systemd #define.

* modules/arch/unix/config5.m4: Update systemd headers check.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1528032 13f79535-47bb-0310-9956-ffa450edef68
2013-10-01 10:15:12 +00:00
ba9ab903c4 Add support for systemd socket activation to listener sockets.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1511033 13f79535-47bb-0310-9956-ffa450edef68
2013-08-06 16:51:15 +00:00
ee439edcb1 gratuitous 8-bit char in a comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1498200 13f79535-47bb-0310-9956-ffa450edef68
2013-07-01 00:18:56 +00:00
ce89a22dff fix typo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1491610 13f79535-47bb-0310-9956-ffa450edef68
2013-06-10 21:31:35 +00:00
bf4e43b340 Fixed a potential NULL pointer deference.
This was brought up on dev list by Christophe Jaillet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1443558 13f79535-47bb-0310-9956-ffa450edef68
2013-02-07 15:35:31 +00:00
3798f3bcfc Style fixes - no code changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1443547 13f79535-47bb-0310-9956-ffa450edef68
2013-02-07 15:19:53 +00:00
d8ba1cbcfa required by eventopt
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1409295 13f79535-47bb-0310-9956-ffa450edef68
2012-11-14 18:45:43 +00:00
864d3d0d87 Follow on to r1393976 and r1396424:
mod_systemd: Specify "all" instead of "yes" (on Unix) so that APACHE_MODULE doesn't
             act as if the user requested it.

General: Fix APACHE_MODULE so that failed prereqs will disable a module unless the
         user requested it explicitly.

Result: By default systemd will be enabled where it actually works and disabled otherwise,
        but if the user requests it and the prereqs fail then configure will halt.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1396440 13f79535-47bb-0310-9956-ffa450edef68
2012-10-10 01:04:36 +00:00
1e4dc5deb4 Follow up r1393976: Fix typo in enablement of mod_systemd that caused it to be enabled on non-Unix
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1396424 13f79535-47bb-0310-9956-ffa450edef68
2012-10-10 00:01:21 +00:00
ca9bd8eb67 * modules/arch/unix/mod_systemd.c (systemd_pre_mpm): Simplify code
slightly; no functional change.  
  Use AP_DECLARE_MODULE.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1393997 13f79535-47bb-0310-9956-ffa450edef68
2012-10-04 11:44:34 +00:00
7414006ae9 * modules/arch/unix/mod_systemd.c: New module.
Submitted by: Jan Kaluza <jkaluza redhat.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1393976 13f79535-47bb-0310-9956-ffa450edef68
2012-10-04 10:12:41 +00:00
a5d3387329 Clarify code comment.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1375009 13f79535-47bb-0310-9956-ffa450edef68
2012-08-20 13:22:42 +00:00
8ec0c56b02 Code clean up (remove useless memory allocation)
Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 52648


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1361803 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 21:19:54 +00:00
beaee8f4e3 suexec: Support use of setgid/setuid capability bits on Linux, a
weaker set of privileges than the full setuid/setgid root binary.

* configure.in: Add --enable-suexec-capabilites flag.

* Makefile.in: If configured, use setcap instead of chmod 7555 on
  installed suexec binary.

* modules/arch/unix/mod_unixd.c (unixd_pre_config): Drop test for
  setuid bit if capability bits are used.

* docs/manual/: Add docs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1342065 13f79535-47bb-0310-9956-ffa450edef68
2012-05-23 21:38:39 +00:00
2af2fa44ad Further clarify the naming of the entity that originates the request by
calling that entity a useragent instead of a client.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214003 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 00:31:51 +00:00
47b58a49e0 definAtely
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1213381 13f79535-47bb-0310-9956-ffa450edef68
2011-12-12 19:21:37 +00:00
92e366007c Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
2a12b17862 Fix apr_status_t being passed as loglevel
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209741 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 22:22:51 +00:00
b4ec041ba7 Remove more log message prefixes that are now redundant as the
the error log format includes the module name.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1208110 13f79535-47bb-0310-9956-ffa450edef68
2011-11-29 22:28:21 +00:00
394e5594d6 Introduce a per connection "peer_ip" and a per request "client_ip" to
distinguish between the raw IP address of the connection and the effective
IP address of the request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1206291 13f79535-47bb-0310-9956-ffa450edef68
2011-11-25 19:42:04 +00:00
4ee7eea4cf Introduce a per request version of the remote IP address, which can be
optionally modified by a module when the effective IP of the client
is not the same as the real IP of the client (such as a load balancer).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204968 13f79535-47bb-0310-9956-ffa450edef68
2011-11-22 13:10:39 +00:00
ae843193ea Only dump User/Group if DUMP_RUN_CFG is defined
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180719 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 21:30:20 +00:00
0ddfb3e6cc Add -D DUMP_RUN_CFG option to dump some configuration items
from the parsed (or default) config. This is useful for init scripts that
need to setup temporary directories and permissions, for example if those
temporary directories are located on a ram disk.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180681 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 18:35:23 +00:00
1951a037bf More cleanup: Expand tabs and some more indentation fixes
No functional change


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
103f776c25 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174748 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:38:09 +00:00
481fac5ce2 Make the SERVER_NAME variable include [ ] for literal IPv6 addresses, as
mandated by RFC 3875

PR: 26005


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147614 13f79535-47bb-0310-9956-ffa450edef68
2011-07-17 13:56:28 +00:00
beb3ea9c11 Add more (trace) logging to the ap_scan_script_header*() functions
Add ap_scan_script_header*_ex() functions that take a module index for
logging.
Make mod_cgi, mod_cgid, mod_proxy_fcgi, mod_proxy_scgi, mod_isapi use the
new functions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147493 13f79535-47bb-0310-9956-ffa450edef68
2011-07-16 21:53:18 +00:00
8def8313ec Invert logic for env var utf-8 fixing.
Now we exclude a list of vars which we know for sure they
dont hold utf-8 chars; all other vars will be fixed. This
has the benefit that now also all vars from 3rd-party
modules will be fixed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1146932 13f79535-47bb-0310-9956-ffa450edef68
2011-07-15 00:28:39 +00:00
6b72d583d1 Fixed some more env vars which make problems.
This fix is based on BZ 13029 / 34985, and includes
now the SSL_ and GEOIP_ vars; otherwise its impossible
to run CGIs when mod_ssl and/or mod_geoip are loaded
and those mods return UTF-8 chars in any var during a
request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1145647 13f79535-47bb-0310-9956-ffa450edef68
2011-07-12 16:13:28 +00:00
67dd4b3f9c Fix a few warnings about use of uninitialized values.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1143193 13f79535-47bb-0310-9956-ffa450edef68
2011-07-05 20:24:33 +00:00
f66af00c19 Avoid some memory allocations by using apr_table_setn where the string
arguments are const.

Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 51357


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1135083 13f79535-47bb-0310-9956-ffa450edef68
2011-06-13 10:58:10 +00:00