Commit Graph

63 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
d4d90bdf0a 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
available.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1033519 13f79535-47bb-0310-9956-ffa450edef68
2010-11-10 15:34:43 +00:00
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
33e15a38e8 more configure-time support for dynamically loadable MPMs:
. axe --with-mpm="shared" hack, replace with --enable-mpms-shared={all|list}
. replace singular MPM_NAME with access to the list of enabled MPMs
. replace singular MPM_SUBDIR with list MPM_SUBDIRS
. enable OS/2 MPM in same manner as others with configure support instead of
  hard-coding in configure.in

Current state: MPMs are built as static archives (but not linked to httpd) with
--enable-mpms-shared, so they still have to be built with apxs to load 
dynamically.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832228 13f79535-47bb-0310-9956-ffa450edef68
2009-11-03 00:38:06 +00:00
96c72f1063 Treat gid's identically to uid's for purposes of numeric formatting.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@816388 13f79535-47bb-0310-9956-ffa450edef68
2009-09-17 21:35:04 +00:00
5181635ab3 Always make mod_*.h files available where they exist, modpath by modpath
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@808722 13f79535-47bb-0310-9956-ffa450edef68
2009-08-28 01:27:46 +00:00
60fbe11de1 Bring back OS/2 support.
Reverses r758929 with a little bit of conflict resolution.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@807930 13f79535-47bb-0310-9956-ffa450edef68
2009-08-26 08:56:13 +00:00
777f02ed58 Correctly set suexec_enabled when httpd is run by non-root
PR 42175


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@791337 13f79535-47bb-0310-9956-ffa450edef68
2009-07-05 23:10:30 +00:00
10f788c851 - use apr_strerror() instead of strerror()
- log errno via param when using ap_log_*


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@773968 13f79535-47bb-0310-9956-ffa450edef68
2009-05-12 16:30:55 +00:00
9c47ca1438 Whoops! cleanup r771144, which had some local/dev stuff left in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@771145 13f79535-47bb-0310-9956-ffa450edef68
2009-05-03 23:04:02 +00:00
40361e60f3 mod_privileges: introduce PrivilegesMode: fast mode as before vs secure
mode to fork an unprivileged child per-request in the manner of MPM-ITK
anwhere there's a risk of running malicious code.
Documentation to follow.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@771144 13f79535-47bb-0310-9956-ffa450edef68
2009-05-03 23:02:35 +00:00
a1908585a8 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759699 13f79535-47bb-0310-9956-ffa450edef68
2009-03-29 14:41:02 +00:00
301f0404f5 axe unmaintained 1.3-era code to support AUX, SunOS, IRIX, Next, Tandem, MPE,
LynxOS, QNX, and UnixWare


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758944 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 00:32:22 +00:00
cb8a82faed remove TPF support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758936 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 00:05:18 +00:00
ee32468a33 remove OS/2 platform support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758929 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 23:47:52 +00:00
c7266edf61 The rewrite-args hook isn't available to MPM DSOs. Piggy-back on the
linked-in mod_unixd.c to handle that.

(The set of MPMs modified is the same set for which mod_unixd is enabled,
which is approximately equivalent to the set of Unix MPMs which anybody has
tried to maintain in recent memory.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758278 13f79535-47bb-0310-9956-ffa450edef68
2009-03-25 14:50:24 +00:00
7720a70dc4 axe the remaining checks of AP_MPM_WANT_foo to see what code to generate
MPMs no longer provide those definitions

(the signal server support is an interesting problem, since it has to be known before loading
loading the MPM)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758014 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:52:10 +00:00
076514f3ac Allow building httpd without a built-in MPM by specifying
--with-mpm=shared

on configure.  When built thusly, an MPM should be loaded via LoadModule.

(Currently you need to build the MPM with apxs.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@757999 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:23:42 +00:00
736d659de0 use a local module header file to store the function prototype
for ap_unixd_setup_child() that is used outside this module.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@739487 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 01:46:56 +00:00
2288718073 name protect unixd_setup_child and restore its prototype to unixd.h
If someone wants to find a better place for it, then feel free to
so so only if you compile with -Werror before committing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@739151 13f79535-47bb-0310-9956-ffa450edef68
2009-01-30 02:51:32 +00:00
7061cf0770 Match up formats with args in error messages.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@738526 13f79535-47bb-0310-9956-ffa450edef68
2009-01-28 16:23:11 +00:00
391993515f Silence compiler warning about unused variable cfg.
dtrace_enabled is static, so no need for using
the configuration at the moment.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@731251 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 13:11:04 +00:00
5aea845c62 vi broke event ;)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@731073 13f79535-47bb-0310-9956-ffa450edef68
2009-01-03 19:52:34 +00:00
59b02aa75b Prevent empty test statement.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@730800 13f79535-47bb-0310-9956-ffa450edef68
2009-01-02 17:40:55 +00:00
e5a4be062e Add a header check for priv.h to mod_privileges.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@730718 13f79535-47bb-0310-9956-ffa450edef68
2009-01-02 13:55:52 +00:00
1691affda8 unixd_config/ap_unixd_config rename for mod_privileges
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@723078 13f79535-47bb-0310-9956-ffa450edef68
2008-12-03 21:14:50 +00:00
a73acf02f6 API Cleanup in preperation for 2.4.x, make sure all exported functions or variables contain an ap_ prefix.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722399 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 08:13:36 +00:00
993bbf6f45 Remove c99 style comment.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@721763 13f79535-47bb-0310-9956-ffa450edef68
2008-11-30 05:49:23 +00:00
68512c237c Note that the current mishmash is ugly... hope to
find time to restart working on the cleanup I started
at ACUS, but got sidetracked with confusion on where the
divisions actually were...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@720017 13f79535-47bb-0310-9956-ffa450edef68
2008-11-23 17:55:32 +00:00
2d7ef4c7e5 * Don't build mod_privileges by default.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@714007 13f79535-47bb-0310-9956-ffa450edef68
2008-11-14 14:02:59 +00:00
466af3e421 Introduce mod_privileges: a platform-specific module offering enhanced
security and a (limited) solution to the "perchild" problem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@713961 13f79535-47bb-0310-9956-ffa450edef68
2008-11-14 09:48:39 +00:00