Checkout Tools
  • last updated 5 hours ago
Constraints: committers
Constraints: files
Constraints: dates
Add optional options= argument to Listen to add listener-specific

socket options.

Reimplement "use_specific_errors" listener flag under generic

ap_listen_rec flags field holding all listener-specific options.

* include/ap_listen.h: Add AP_LISTEN_* flags.

(ap_listen_rec): Rename use_specific_errors to flags.

* server/listen.c (make_sock): Set APR_SO_FREEBIND if

AP_LISTEN_FREEBIND flag is set on listener; set APR_SO_REUSEPORT

unconditionally if AP_LISTEN_REUSEPORT is set.

(alloc_listener): Take flags argument.

(ap_setup_listeners): Set AP_LISTEN_SPECIFIC_ERRORS flag here.

(ap_set_listener): Parse optional options=... argument, catch

typos and fail if protocol name contains a "=".

(ap_duplicate_listeners): Duplicate flags.

Submitted by: jkaluza, Lubos Uhliarik <luhliari>, jorton

PR: 61865

Github: closes #114

  1. … 5 more files in changeset.
Follow up to r1822537: replace static variable with pool userdata.

Also adds a comment and a CHANGES entry.

  1. … 1 more file in changeset.
mpm_unix(es): cleanup properly on exit in one_process mode.

We can't destroy ap_pglobal in the MPMs because clean_child_exit() runs in

a DSO which would be unloaded under us.

So we defer an ap_terminate() with atexit() in ap_unixd_mpm_set_signals(),

all this is static/builtin code in "os/unix/unixd.c".

Add "AcceptErrorsNonFatal" directive

This tweaks accept() failure processing by having ap_unixd_accept

pass more errors up, and having the MPM's check against a macro

to see if they are in a whitelist of non ENETDOWN/EMFILE kind

of potential process-wide errors.

Default behavior is still to exit.

edit: MMN bump in 1820099.

  1. … 8 more files in changeset.
Fix compilation failure :

unixd.c: In function ‘ap_unixd_mpm_set_signals’:

unixd.c:579:5: error: implicit declaration of function ‘apr_signal’; did you mean ‘strsignal’? [-Werror=implicit-function-declaration]

apr_signal(SIGPIPE, SIG_IGN);



Not sure where it comes from, maybe related to r1812301.

MPMs unix: follow up to r1809881 and r1809973.

unset_signals() is called when ap_pglobal is destroyed too.

core, MPMs unix: follow up to r1809881.

Deregister all hooks first (in pre_cleanup), by doing it last we could still

have had them run when DSOs were unloaded.

Likewise, avoid double faults when handling fatal signals by restoring the

default handler before pconf is cleared (we can't ap_log_error there).

Finally, we need to ignore sig_term/restart (do nothing) when the main

process is exiting (i.e. ap_pglobal is destroyed), since retained_data are


Aimed to fix all faults in PR 61558.

  1. … 6 more files in changeset.
MPMs unix: Place signals handlers and helpers out of DSOs to avoid

a possible crash if a signal is caught during (graceful) restart.

PR 60487.

  1. … 7 more files in changeset.
Save a few bytes in conf pool when parsing some directives. Use temp_pool when applicable.
  1. … 2 more files in changeset.
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.

  1. … 14 more files in changeset.
'ap_getword_conf' does not return NULL but an empty string if nothing could be got.

So the message 02173 can never trigger.

Actually, this is not a problem because all calls to 'ap_unixd_set_rlimit' are done in configuration parsing functions guarded with AP_INIT_TAKE12, so we are guaranteed to have something.

Fix valgrind warning about uninitialized memory in argument to semctl

PR: 53690

Submitted by: Mikhail T. <mi+apache aldan algebra com>

  1. … 1 more file in changeset.
Various code cleanup to avoid compiler, cppcheck, or clang warnings:

modules/debugging/mod_firehose.c: Make some internal functions static

(to do: logs_cleanup() is unused)

modules/filters/mod_charset_lite.c: Remove dead assignments

modules/filters/mod_include.c: likewise

modules/metadata/mod_usertrack.c: likewise

modules/proxy/mod_proxy_ftp.c: likewise

modules/ssl/ssl_engine_pphrase.c: likewise

modules/proxy/mod_proxy_balancer.c: likewise;

Remove NULL check that can never happen

modules/proxy/proxy_util.c: Axe NULL-check that can never happen and if it

would, it would just mask another bug

os/unix/unixd.c: likewise

modules/http/http_filters.c: Remove sub-condition that is always true

modules/lua/mod_lua.c: Add default cases to switch statements

modules/generators/mod_autoindex.c: Unsigned value can never be < 0

server/util_expr_eval.c: Fix compiler warnings with VC and on OS2

  1. … 12 more files in changeset.
Add lots of unique tags to error log messages

  1. … 172 more files in changeset.
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.

  1. … 10 more files in changeset.
More cleanup: Expand tabs and some more indentation fixes

No functional change

  1. … 49 more files in changeset.
Cleanup effort in prep for GA push:

Trim trailing whitespace... no func change

  1. … 63 more files in changeset.
We already have ap_str_tolower(), so also add ap_str_toupper() function and use

it where possible.

  1. … 6 more files in changeset.
fix some logging calls to include the server_rec

(and even the conn_rec in a couple of places)

  1. … 7 more files in changeset.
Per the existing comment and setrlimit() behavior -- only prevent attempts to

raise the hard limit, not to lower it, by nonroot users.

suEXEC: Add Suexec directive to disable suEXEC without renaming the

binary (Suexec Off), or force startup failure if suEXEC is required

but not supported (Suexec On). Change SuexecUserGroup to fail

startup instead of just printing a warning if suEXEC is disabled.

Additionally, ap_unixd_config.suexec_disabled_reason has a message,

suitable for logging/messaging, explaining why the feature isn't


  1. … 6 more files in changeset.
The directives "User", "Group" and "ChrootDir" have

been moved into mod_unixd.

The old macro UNIX_DAEMON_COMMANDS is no longer in use.

Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take

advantage of per-module loglevels

  1. … 169 more files in changeset.
generalize the existing (r589761) platform- and errno-specific

logic to suppress an error message if accept() fails after the

socket has been marked inactive

a message will still be logged, but at debug level instead of error

PR: 49058

revert 759711 and 759713... don't require apr2

Use apr-2 object perms setter
Core can specify a platform-specific rewrite args hook. Use that on Unix.

Windows continues to specify this in the MPM, at least until someone

can separate out the MPM-specific bits.

  1. … 7 more files in changeset.
remove TPF support
  1. … 15 more files in changeset.
use a local module header file to store the function prototype

for ap_unixd_setup_child() that is used outside this module.

  1. … 2 more files in changeset.