[cpp-sp] 02/02: Apache module load fixes.
Scott Cantor
cantor.2 at osu.edu
Tue Jan 28 20:39:45 UTC 2025
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=0714a30279d8dbd970c577513c6c9d6c43f5f4a0
commit 0714a30279d8dbd970c577513c6c9d6c43f5f4a0
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jan 28 15:39:19 2025 -0500
Apache module load fixes.
---
apache/mod_shib_24.cpp | 21 +++++++++++++--------
configs/Makefile.am | 2 +-
configs/apache24.config.in | 11 -----------
3 files changed, 14 insertions(+), 20 deletions(-)
diff --git a/apache/mod_shib_24.cpp b/apache/mod_shib_24.cpp
index e3db898e..e6be10b7 100644
--- a/apache/mod_shib_24.cpp
+++ b/apache/mod_shib_24.cpp
@@ -98,8 +98,7 @@ extern "C" module AP_MODULE_DECLARE_DATA shib_module;
static int* const aplog_module_index = &(shib_module.module_index);
namespace {
- char* g_szSHIBConfig = nullptr;
- char* g_szSchemaDir = nullptr;
+ char* g_szConfigFile = nullptr;
char* g_szPrefix = nullptr;
AgentConfig* g_Config = nullptr;
string g_unsetHeaderValue,g_spoofKey;
@@ -1425,8 +1424,16 @@ apr_status_t shib_post_config(apr_pool_t* p, apr_pool_t*, apr_pool_t*, server_re
AgentConfig::getConfig().RequestMapperManager.registerFactory(NATIVE_REQUEST_MAPPER, &ApacheRequestMapFactory);
g_Config = &AgentConfig::getConfig();
- if (!g_Config->init(g_szSchemaDir, g_szPrefix)) {
- ap_log_error(APLOG_MARK, APLOG_CRIT|APLOG_NOERRNO, 0, s, "post_config: shib_module failed to initialize libraries");
+ try {
+ if (!g_Config->init(g_szPrefix, g_szConfigFile, true)) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT|APLOG_NOERRNO, 0, s, "post_config: shib_module failed to initialize libraries");
+ g_Config = nullptr;
+ return !OK;
+ }
+ }
+ catch (const exception& ex) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT|APLOG_NOERRNO, 0, s, "post_config: shib_module failed to initialize libraries: %s", ex.what());
+ g_Config = nullptr;
return !OK;
}
@@ -1572,10 +1579,8 @@ extern "C" {
static command_rec shib_cmds[] = {
AP_INIT_TAKE1("ShibPrefix", (config_fn_t)ap_set_global_string_slot, &g_szPrefix,
RSRC_CONF, "Shibboleth installation directory"),
- AP_INIT_TAKE1("ShibConfig", (config_fn_t)ap_set_global_string_slot, &g_szSHIBConfig,
- RSRC_CONF, "Path to shibboleth2.xml config file"),
- AP_INIT_TAKE1("ShibCatalogs", (config_fn_t)ap_set_global_string_slot, &g_szSchemaDir,
- RSRC_CONF, "Paths of XML schema catalogs"),
+ AP_INIT_TAKE1("ShibConfig", (config_fn_t)ap_set_global_string_slot, &g_szConfigFile,
+ RSRC_CONF, "Path to shibboleth.ini config file"),
AP_INIT_TAKE1("ShibURLScheme", (config_fn_t)shib_set_server_string_slot,
(void *) offsetof (shib_server_config, szScheme),
diff --git a/configs/Makefile.am b/configs/Makefile.am
index d9b48865..c2a5f03d 100644
--- a/configs/Makefile.am
+++ b/configs/Makefile.am
@@ -18,7 +18,7 @@ CONFIGFILES = \
localLogout.html \
globalLogout.html \
partialLogout.html \
- shiibboleth.ini \
+ shibboleth.ini \
handlers.ini \
request-map.xml
diff --git a/configs/apache24.config.in b/configs/apache24.config.in
index 11d68753..2354e09d 100644
--- a/configs/apache24.config.in
+++ b/configs/apache24.config.in
@@ -27,17 +27,6 @@ ShibCompatValidUser Off
Require all granted
</Location>
-#
-# Used for example style sheet in error templates.
-#
-<IfModule mod_alias.c>
- <Location /shibboleth-sp>
- AuthType None
- Require all granted
- </Location>
- Alias /shibboleth-sp/main.css @-PKGWEBDIR-@/main.css
-</IfModule>
-
#
# Configure the module for content.
#
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list