extern "C" module MODULE_VAR_EXPORT mod_shib;
namespace {
- char* g_szSHIBConfig = SHIBSP_CONFIG;
- char* g_szSchemaDir = SHIBSP_SCHEMAS;
+ char* g_szSHIBConfig = NULL;
+ char* g_szSchemaDir = NULL;
+ char* g_szPrefix = NULL;
SPConfig* g_Config = NULL;
string g_unsetHeaderValue;
bool g_checkSpoofing = true;
shib_server_config* m_sc;
shib_request_config* m_rc;
- ShibTargetApache(request_rec* req, bool handler) : m_handler(handler), m_gotBody(false) {
+ ShibTargetApache(request_rec* req, bool handler) : AbstractSPRequest(SHIBSP_LOGCAT".Apache"), m_handler(handler), m_gotBody(false) {
m_sc = (shib_server_config*)ap_get_module_config(req->server->module_config, &mod_shib);
m_dc = (shib_dir_config*)ap_get_module_config(req->per_dir_config, &mod_shib);
m_rc = (shib_request_config*)ap_get_module_config(req->request_config, &mod_shib);
in.read(buf,1024);
ap_rwrite(buf,in.gcount(),m_req);
}
- if (status!=XMLTOOLING_HTTP_STATUS_OK)
- return m_req->status = status;
+ if (status != XMLTOOLING_HTTP_STATUS_OK) {
+ m_req->status = status;
+ if (status != XMLTOOLING_HTTP_STATUS_ERROR)
+ return status;
+ }
return DONE;
}
long sendRedirect(const char* url) {
SPConfig::Logging |
SPConfig::Handlers
);
- if (!g_Config->init(g_szSchemaDir)) {
+ if (!g_Config->init(g_szSchemaDir, g_szPrefix)) {
ap_log_error(APLOG_MARK,APLOG_CRIT|APLOG_NOERRNO,SH_AP_R(s),"shib_child_init() failed to initialize libraries");
exit(1);
}
g_Config->AccessControlManager.registerFactory(HT_ACCESS_CONTROL,&htAccessFactory);
g_Config->RequestMapperManager.registerFactory(NATIVE_REQUEST_MAPPER,&ApacheRequestMapFactory);
+
+ if (!g_szSHIBConfig)
+ g_szSHIBConfig=getenv("SHIBSP_CONFIG");
+ if (!g_szSHIBConfig)
+ g_szSHIBConfig=SHIBSP_CONFIG;
try {
xercesc::DOMDocument* dummydoc=XMLToolingConfig::getConfig().getParser().newDocument();
// SHIB Module commands
static command_rec shire_cmds[] = {
+ {"ShibPrefix", (config_fn_t)ap_set_global_string_slot, &g_szPrefix,
+ RSRC_CONF, TAKE1, "Shibboleth installation directory"},
{"ShibConfig", (config_fn_t)ap_set_global_string_slot, &g_szSHIBConfig,
RSRC_CONF, TAKE1, "Path to shibboleth.xml config file"},
{"ShibCatalogs", (config_fn_t)ap_set_global_string_slot, &g_szSchemaDir,
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 shibboleth.xml config file"),
AP_INIT_TAKE1("ShibCatalogs", (config_fn_t)ap_set_global_string_slot, &g_szSchemaDir,