[cpp-sp] branch main updated: More work to get II& loading
Rod Widdowson
rdw at steadingsoftware.com
Thu Jan 23 16:54:44 UTC 2025
This is an automated email from the git hooks/post-receive script.
rdw 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=d5c91bdd0175245f4bc89b85b60f2ed418bea21d
The following commit(s) were added to refs/heads/main by this push:
new d5c91bdd More work to get II& loading
d5c91bdd is described below
commit d5c91bdd0175245f4bc89b85b60f2ed418bea21d
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Jan 23 16:37:34 2025 +0000
More work to get II& loading
Fix Silly bug is RepoerEventA paramerization
Declare entry point correctly
Use resolved_ppath nt pah when loading the module
---
iis7_shib/register.cpp | 7 ++++---
shibsp/platform/iis/ModuleConfig.cpp | 6 +++---
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/iis7_shib/register.cpp b/iis7_shib/register.cpp
index d5a6cc9c..4e106ab6 100644
--- a/iis7_shib/register.cpp
+++ b/iis7_shib/register.cpp
@@ -71,6 +71,7 @@ public:
extern "C"
HRESULT
+__declspec(dllexport)
__stdcall
RegisterModule(
DWORD dwServerVersion,
@@ -84,8 +85,6 @@ RegisterModule(
return S_OK;
}
- Category& log = Category::getInstance(SHIBSP_LOGCAT ".IIS");
-
g_Config = &AgentConfig::getConfig();
if (!g_Config->init()) {
//
@@ -93,12 +92,14 @@ RegisterModule(
//
HANDLE eventSource = ::RegisterEventSourceA(NULL, SHIB_EVENT_SOURCE_NAME);
const char* msgs[2]{ "II7 Initialization" ,"IIS module failed during library initialization"};
- ::ReportEventA(eventSource, EVENTLOG_ERROR_TYPE, (WORD)SHIBSP_CATEGORY_CRIT, SHIBSP_LOG_CRIT);
+ ::ReportEventA(eventSource, EVENTLOG_ERROR_TYPE, (WORD)SHIBSP_CATEGORY_CRIT, SHIBSP_LOG_CRIT, NULL, 2, 0, msgs, NULL);
::DeregisterEventSource(eventSource);
g_Config=nullptr;
return E_FAIL;
}
+ Category& log = Category::getInstance(SHIBSP_LOGCAT ".IIS");
+
// Access implementation-specifics and create site mappings.
const Agent& agent = g_Config->getAgent();
diff --git a/shibsp/platform/iis/ModuleConfig.cpp b/shibsp/platform/iis/ModuleConfig.cpp
index bdc7ea6f..f58f5292 100644
--- a/shibsp/platform/iis/ModuleConfig.cpp
+++ b/shibsp/platform/iis/ModuleConfig.cpp
@@ -199,15 +199,15 @@ unique_ptr<ModuleConfig> ModuleConfig::newModuleConfig(const char* path)
unique_ptr<ptree> config_root(new ptree());
bool xml = false;
- if (boost::ends_with(path, ".xml")) {
- xml_parser::read_xml(path, *config_root, xml_parser::trim_whitespace | xml_parser::no_comments);
+ if (boost::ends_with(resolved_path, ".xml")) {
+ xml_parser::read_xml(resolved_path, *config_root, xml_parser::trim_whitespace | xml_parser::no_comments);
xml = true;
if (config_root->size() != 1) {
throw xml_parser_error("XML-based IIS module config did not contain a root element?", path, 1);
}
}
else {
- ini_parser::read_ini(path, *config_root);
+ ini_parser::read_ini(resolved_path, *config_root);
}
return unique_ptr<ModuleConfig>(new ModuleConfigImpl(std::move(config_root), xml));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list