From 0b910c31274a87f065bcc5b9224a5dc5944772b3 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sat, 6 Apr 2024 13:39:16 +0000 Subject: automatic import of httpd --- backport-httpd-2.4.25-selinux.patch | 63 ------------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 backport-httpd-2.4.25-selinux.patch (limited to 'backport-httpd-2.4.25-selinux.patch') diff --git a/backport-httpd-2.4.25-selinux.patch b/backport-httpd-2.4.25-selinux.patch deleted file mode 100644 index 0db1e45..0000000 --- a/backport-httpd-2.4.25-selinux.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff --git a/configure.in b/configure.in -index c5896c1..96cd4a6 100644 ---- a/configure.in -+++ b/configure.in -@@ -508,6 +508,11 @@ getloadavg - dnl confirm that a void pointer is large enough to store a long integer - APACHE_CHECK_VOID_PTR_LEN - -+AC_CHECK_LIB(selinux, is_selinux_enabled, [ -+ AC_DEFINE(HAVE_SELINUX, 1, [Defined if SELinux is supported]) -+ APR_ADDTO(HTTPD_LIBS, [-lselinux]) -+]) -+ - AC_CACHE_CHECK([for gettid()], ac_cv_gettid, - [AC_TRY_RUN(#define _GNU_SOURCE - #include -diff --git a/server/core.c b/server/core.c -index 4da7209..515047b 100644 ---- a/server/core.c -+++ b/server/core.c -@@ -65,6 +65,10 @@ - #include - #endif - -+#ifdef HAVE_SELINUX -+#include -+#endif -+ - /* LimitRequestBody handling */ - #define AP_LIMIT_REQ_BODY_UNSET ((apr_off_t) -1) - #define AP_DEFAULT_LIMIT_REQ_BODY ((apr_off_t) 1<<30) /* 1GB */ -@@ -5126,6 +5130,28 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte - } - #endif - -+#ifdef HAVE_SELINUX -+ { -+ static int already_warned = 0; -+ int is_enabled = is_selinux_enabled() > 0; -+ -+ if (is_enabled && !already_warned) { -+ security_context_t con; -+ -+ if (getcon(&con) == 0) { -+ -+ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL, -+ "SELinux policy enabled; " -+ "httpd running as context %s", con); -+ -+ already_warned = 1; -+ -+ freecon(con); -+ } -+ } -+ } -+#endif -+ - return OK; - } - --- -2.27.0 - -- cgit v1.2.3