]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Merge r1511033, r1528032, r1608686, r1608694, r1608703, r1899784, r1916312, r1916344...
authorRuediger Pluem <rpluem@apache.org>
Wed, 4 Jun 2025 09:41:25 +0000 (09:41 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 4 Jun 2025 09:41:25 +0000 (09:41 +0000)
commit22ce169f2c46fb5372482d31c56ac7120b8fb17d
tree0224481690fbd03ef7f9f0130cb747684736f314
parentf722b63ba7b908dacbd1dcda3df452cd5a6dca4e
Merge r1511033, r1528032, r1608686, r1608694, r1608703, r1899784, r1916312, r1916344, r1838271, r1926091 from trunk:

Add support for systemd socket activation to listener sockets.

* 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.

* server/listen.c: duplicate sockets correctly when using systemd socket
activation, fix addrlen in getsockname() call.

Follow up r1608686, pass process to alloc_systemd_listener.

* server/listen.c: detect systemd socket activation using sd_listen_fds(),
drop the support for "Listen systemd" and use standard Listen syntax instead.

This allows using the same configuration file with or without socket activation
and allows setting protocol when using socket activation.

Remove libsystemd dependency from main httpd binary

Until this change httpd was linking libsystemd to the main httpd binary. If you want to run lightweight version of httpd in container, sometimes you just want to install
httpd binary with as little dependencies as possible to make container small in size and do not pull uncencessary dependencies and libraries.

This change will move all systemd library calls from listen.c to mod_systemd module and remove systemd linking from the main httpd bin.
Fixed mixed declaration and wrongly declared variable.

Submitted by: Luboš Uhliarik <luhliari redhat.com>

mod_systemd: Axe APR_OPTIONAL_FN redeclarations to avoid compiler warning.

ap_find_systemd_socket() and ap_systemd_listen_fds() are already declared in
"ap_listen.h", so just include them.

mod_systemd: if SELinux is available and enabled, log the SELinux
context at startup, since this may vary when httpd is started via
systemd vs being started directly.

* modules/arch/unix/mod_systemd.c (systemd_post_config):
  Do nothing for the pre-config iteration.
  Log the SELinux context if available.

* modules/arch/unix/config5.m4: Detect libselinux.

Have at least one CI job build mod_systemd.

Fix a cppcheck warning.

Remove some dead code. Updating 'last' is pointless here.

Ensure that ALL fields of the ap_listen_rec structure are initialized

alloc_listener initializes more fields in the created ap_listen_rec structure
than alloc_systemd_listener as it has more data to add to this structure.
Ensure that all fields of the ap_listen_rec structure are initialized at
least with 0 as later code using this structure depends on this.

Reviewed by: rpluem, jorton, ylavic

Github: closes #515

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1926113 13f79535-47bb-0310-9956-ffa450edef68
16 files changed:
CHANGES
STATUS
changes-entries/dav-get-base-path.txt [deleted file]
changes-entries/github 310.txt [deleted file]
changes-entries/h2_v2.0.30.txt [deleted file]
changes-entries/h2_v2.0.32.txt [deleted file]
changes-entries/md_v2.5.1.txt [deleted file]
changes-entries/md_v2.5.2.txt [deleted file]
changes-entries/pr69443.txt [deleted file]
changes-entries/pr69579.txt [deleted file]
changes-entries/pr69590.txt [deleted file]
changes-entries/pr69624.txt [deleted file]
include/ap_listen.h
modules/arch/unix/config5.m4
modules/arch/unix/mod_systemd.c
server/listen.c