[cpp-sp] branch master updated: SSPCPP-806 - Message Catalog missing FATAL error mesage
Scott Cantor
cantor.2 at osu.edu
Wed May 30 15:00:00 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=7c85ad03a1bc6e8cedcbd32157432232825457d2
The following commit(s) were added to refs/heads/master by this push:
new 7c85ad0 SSPCPP-806 - Message Catalog missing FATAL error mesage
7c85ad0 is described below
commit 7c85ad03a1bc6e8cedcbd32157432232825457d2
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed May 30 14:59:05 2018 -0400
SSPCPP-806 - Message Catalog missing FATAL error mesage
https://issues.shibboleth.net/jira/browse/SSPCPP-806
Replace explicit Windows logging with log4shib calls.
---
Projects/vc15/Shibboleth.sln | 23 ---
Projects/vc15/apache/mod_shib22.vcxproj | 2 -
Projects/vc15/apache/mod_shib24.vcxproj | 2 -
Projects/vc15/iis7_shib/iis7_shib.vcxproj | 10 +-
Projects/vc15/isapi_shib/isapi_shib.vcxproj | 10 +-
Projects/vc15/nsapi_shib/nsapi_shib.vcxproj | 2 -
Projects/vc15/shibd/shibd.vcxproj | 9 +-
Projects/vc15/shibsp/shibsp-lite.vcxproj | 2 -
Projects/vc15/shibsp/shibsp.vcxproj | 2 -
Projects/vc15/util/mdquery.vcxproj | 2 -
Projects/vc15/util/resolvertest.vcxproj | 2 -
iis7_shib/IIS7Request.cpp | 10 +-
iis7_shib/headers/IIS7Request.hpp | 1 -
iis7_shib/headers/IIS7_shib.hpp | 2 -
iis7_shib/register.cpp | 28 ++--
isapi_shib/isapi_shib.cpp | 86 ++++-------
msi/WiX/ShibbolethSP-main-x64.wxs | 21 +--
msi/WiX/ShibbolethSP-main-x86.wxs | 21 +--
shibd/shibd.cpp | 12 +-
shibd/shibd_win32.cpp | 32 +---
shibsp/base.h | 3 -
util/Makefile.am | 4 +-
util/message.mc | 219 ----------------------------
util/messageResource.rc | Bin 1466 -> 0 bytes
24 files changed, 80 insertions(+), 425 deletions(-)
diff --git a/Projects/vc15/Shibboleth.sln b/Projects/vc15/Shibboleth.sln
index 035b2d9..a24df33 100644
--- a/Projects/vc15/Shibboleth.sln
+++ b/Projects/vc15/Shibboleth.sln
@@ -109,18 +109,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Doc", "Doc", "{6ED5E3E7-1B0
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "isapi_shib", "isapi_shib\isapi_shib.vcxproj", "{87C25D4E-8D19-4513-B0BA-BC668BC2DEE3}"
- ProjectSection(ProjectDependencies) = postProject
- {303291A1-C542-49E4-80B3-9304B7B6F8BC} = {303291A1-C542-49E4-80B3-9304B7B6F8BC}
- EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "odbc-store", "odbc-store\odbc-store.vcxproj", "{666A63A7-983F-4C19-8411-207F24305197}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shibsp", "shibsp\shibsp.vcxproj", "{81F0F7A6-DC36-46EF-957F-F9E81D4403F6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shibd", "shibd\shibd.vcxproj", "{F13141B5-6C87-40BB-8D4E-5CC56EBB4C59}"
- ProjectSection(ProjectDependencies) = postProject
- {303291A1-C542-49E4-80B3-9304B7B6F8BC} = {303291A1-C542-49E4-80B3-9304B7B6F8BC}
- EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shibsp-lite", "shibsp\shibsp-lite.vcxproj", "{81F0F7A6-DC36-46EF-957F-F9E81D4403F7}"
EndProject
@@ -132,9 +126,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adfs-lite", "adfs\adfs-lite
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mdquery", "util\mdquery.vcxproj", "{F13141B6-6C87-40BB-8D4E-5CC56EBB4C5A}"
- ProjectSection(ProjectDependencies) = postProject
- {303291A1-C542-49E4-80B3-9304B7B6F8BC} = {303291A1-C542-49E4-80B3-9304B7B6F8BC}
- EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "resolvertest", "util\resolvertest.vcxproj", "{F13141B6-6C87-40BB-8D4E-5CC56EBB4C59}"
ProjectSection(ProjectDependencies) = postProject
@@ -177,14 +168,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Installer", "Wix\Installer.
{26D4FABF-ACDE-4947-9C4A-7AE1B50CD83B} = {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83B}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "messages", "util\messages.vcxproj", "{303291A1-C542-49E4-80B3-9304B7B6F8BC}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_shib_22", "apache\mod_shib22.vcxproj", "{B44C0852-83B8-4FB2-A86E-097C9C8256D0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iis7_shib", "iis7_shib\iis7_shib.vcxproj", "{CEE84E04-6A19-4F93-8FE5-98F9D22526DD}"
- ProjectSection(ProjectDependencies) = postProject
- {303291A1-C542-49E4-80B3-9304B7B6F8BC} = {303291A1-C542-49E4-80B3-9304B7B6F8BC}
- EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTests", "UnitTests\UnitTests.vcxproj", "{9212963D-AB04-4CA1-A856-735993246076}"
ProjectSection(ProjectDependencies) = postProject
@@ -321,14 +307,6 @@ Global
{C2B1BB79-C88B-42B4-9AEC-170F91910F70}.Release|Win32.Build.0 = Release|Win32
{C2B1BB79-C88B-42B4-9AEC-170F91910F70}.Release|x64.ActiveCfg = Release|x64
{C2B1BB79-C88B-42B4-9AEC-170F91910F70}.Release|x64.Build.0 = Release|x64
- {303291A1-C542-49E4-80B3-9304B7B6F8BC}.Debug|Win32.ActiveCfg = Debug|Win32
- {303291A1-C542-49E4-80B3-9304B7B6F8BC}.Debug|Win32.Build.0 = Debug|Win32
- {303291A1-C542-49E4-80B3-9304B7B6F8BC}.Debug|x64.ActiveCfg = Debug|x64
- {303291A1-C542-49E4-80B3-9304B7B6F8BC}.Debug|x64.Build.0 = Debug|x64
- {303291A1-C542-49E4-80B3-9304B7B6F8BC}.Release|Win32.ActiveCfg = Release|Win32
- {303291A1-C542-49E4-80B3-9304B7B6F8BC}.Release|Win32.Build.0 = Release|Win32
- {303291A1-C542-49E4-80B3-9304B7B6F8BC}.Release|x64.ActiveCfg = Release|x64
- {303291A1-C542-49E4-80B3-9304B7B6F8BC}.Release|x64.Build.0 = Release|x64
{B44C0852-83B8-4FB2-A86E-097C9C8256D0}.Debug|Win32.ActiveCfg = Debug|Win32
{B44C0852-83B8-4FB2-A86E-097C9C8256D0}.Debug|Win32.Build.0 = Debug|Win32
{B44C0852-83B8-4FB2-A86E-097C9C8256D0}.Debug|x64.ActiveCfg = Debug|x64
@@ -378,7 +356,6 @@ Global
{A2140D6E-C2C6-4329-84E3-2F530CEBE442} = {96AE4FC9-45EF-4C18-9F3B-EDA439E26E4C}
{EFF65B5B-85AB-4FD5-A217-7E6CA4219951} = {BF389E01-8F97-4ECA-8C62-2DBB8F0480DD}
{C2B1BB79-C88B-42B4-9AEC-170F91910F70} = {BF389E01-8F97-4ECA-8C62-2DBB8F0480DD}
- {303291A1-C542-49E4-80B3-9304B7B6F8BC} = {FED80230-119E-4B2F-9F53-D2660A5F022B}
{B44C0852-83B8-4FB2-A86E-097C9C8256D0} = {26BA8F84-6E42-41FA-9B13-5D3F4B5B2050}
{CEE84E04-6A19-4F93-8FE5-98F9D22526DD} = {26BA8F84-6E42-41FA-9B13-5D3F4B5B2050}
{1396D80A-8672-4224-9B02-95F3F4207CDB} = {26BA8F84-6E42-41FA-9B13-5D3F4B5B2050}
diff --git a/Projects/vc15/apache/mod_shib22.vcxproj b/Projects/vc15/apache/mod_shib22.vcxproj
index 05e9e69..c6913cf 100644
--- a/Projects/vc15/apache/mod_shib22.vcxproj
+++ b/Projects/vc15/apache/mod_shib22.vcxproj
@@ -190,7 +190,6 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
@@ -226,7 +225,6 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
diff --git a/Projects/vc15/apache/mod_shib24.vcxproj b/Projects/vc15/apache/mod_shib24.vcxproj
index 855cd06..c6b7b40 100644
--- a/Projects/vc15/apache/mod_shib24.vcxproj
+++ b/Projects/vc15/apache/mod_shib24.vcxproj
@@ -163,7 +163,6 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
@@ -190,7 +189,6 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
diff --git a/Projects/vc15/iis7_shib/iis7_shib.vcxproj b/Projects/vc15/iis7_shib/iis7_shib.vcxproj
index 9d721a9..650acf9 100644
--- a/Projects/vc15/iis7_shib/iis7_shib.vcxproj
+++ b/Projects/vc15/iis7_shib/iis7_shib.vcxproj
@@ -100,7 +100,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>..\..\..\iis7_shib\headers;..\..\..\;..\..\..\..\cpp-xmltooling;$(OutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\iis7_shib\headers;..\..\..\;..\..\..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -128,7 +128,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>..\..\..\iis7_shib\headers\;..\..\..\;..\..\..\..\cpp-xmltooling;$(OutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\iis7_shib\headers;..\..\..\;..\..\..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -155,11 +155,10 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\iis7_shib\headers\;..\..\..\;..\..\..\..\cpp-xmltooling;$(OutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\iis7_shib\headers\;..\..\..\;..\..\..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDOWS;WIN32;_DEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
</ClCompile>
<ResourceCompile>
@@ -181,11 +180,10 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\iis7_shib\headers\;..\..\..\;..\..\..\..\cpp-xmltooling;$(OutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\iis7_shib\headers\;..\..\..\;..\..\..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDOWS;WIN32;_DEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
</ClCompile>
<ResourceCompile>
diff --git a/Projects/vc15/isapi_shib/isapi_shib.vcxproj b/Projects/vc15/isapi_shib/isapi_shib.vcxproj
index ca2acf4..fd0dc02 100644
--- a/Projects/vc15/isapi_shib/isapi_shib.vcxproj
+++ b/Projects/vc15/isapi_shib/isapi_shib.vcxproj
@@ -109,7 +109,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>..\..\..\isapi_shib\;..\..\..\;..\..\..\..\cpp-xmltooling;$(OutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\isapi_shib\;..\..\..\;..\..\..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -145,7 +145,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>..\..\..\isapi_shib\;..\..\..\;..\..\..\..\cpp-xmltooling;$(OutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\isapi_shib\;..\..\..\;..\..\..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -180,11 +180,10 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\isapi_shib\;..\..\..\;..\..\..\..\cpp-xmltooling;$(OutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\isapi_shib\;..\..\..\;..\..\..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDOWS;WIN32;_DEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
@@ -214,11 +213,10 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\isapi_shib\;..\..\..\;..\..\..\..\cpp-xmltooling;$(OutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\isapi_shib\;..\..\..\;..\..\..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDOWS;WIN32;_DEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
diff --git a/Projects/vc15/nsapi_shib/nsapi_shib.vcxproj b/Projects/vc15/nsapi_shib/nsapi_shib.vcxproj
index 32c7031..d3d5fa0 100644
--- a/Projects/vc15/nsapi_shib/nsapi_shib.vcxproj
+++ b/Projects/vc15/nsapi_shib/nsapi_shib.vcxproj
@@ -180,7 +180,6 @@
<PreprocessorDefinitions>_WINDOWS;WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
@@ -212,7 +211,6 @@
<PreprocessorDefinitions>_WINDOWS;WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
diff --git a/Projects/vc15/shibd/shibd.vcxproj b/Projects/vc15/shibd/shibd.vcxproj
index 6169054..4706eea 100644
--- a/Projects/vc15/shibd/shibd.vcxproj
+++ b/Projects/vc15/shibd/shibd.vcxproj
@@ -103,7 +103,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>..\..\..\shibd\;..\..\..\;..\..\..\..\cpp-opensaml;..\..\..\..\cpp-xmltooling;$(OutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\shibd\;..\..\..\;..\..\..\..\cpp-opensaml;..\..\..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -134,7 +134,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>..\..\..\shibd\;..\..\..\;..\..\..\..\cpp-opensaml;..\..\..\..\cpp-xmltooling;$(OutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\shibd\;..\..\..\;..\..\..\..\cpp-opensaml;..\..\..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -163,12 +163,11 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\shibd\;..\..\..\;..\..\..\..\cpp-opensaml;..\..\..\..\cpp-xmltooling;$(OutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\shibd\;..\..\..\;..\..\..\..\cpp-opensaml;..\..\..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CONSOLE;WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
@@ -193,7 +192,7 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\shibd\;..\..\..\;..\..\..\..\cpp-opensaml;..\..\..\..\cpp-xmltooling;$(OutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\..\shibd\;..\..\..\;..\..\..\..\cpp-opensaml;..\..\..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CONSOLE;WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
diff --git a/Projects/vc15/shibsp/shibsp-lite.vcxproj b/Projects/vc15/shibsp/shibsp-lite.vcxproj
index 5c95f10..0d1c2e5 100644
--- a/Projects/vc15/shibsp/shibsp-lite.vcxproj
+++ b/Projects/vc15/shibsp/shibsp-lite.vcxproj
@@ -103,7 +103,6 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;SHIBSP_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
@@ -130,7 +129,6 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;SHIBSP_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
diff --git a/Projects/vc15/shibsp/shibsp.vcxproj b/Projects/vc15/shibsp/shibsp.vcxproj
index 29a1294..c5f4122 100644
--- a/Projects/vc15/shibsp/shibsp.vcxproj
+++ b/Projects/vc15/shibsp/shibsp.vcxproj
@@ -107,7 +107,6 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
@@ -134,7 +133,6 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
diff --git a/Projects/vc15/util/mdquery.vcxproj b/Projects/vc15/util/mdquery.vcxproj
index 6efbc74..c70ddac 100644
--- a/Projects/vc15/util/mdquery.vcxproj
+++ b/Projects/vc15/util/mdquery.vcxproj
@@ -167,7 +167,6 @@
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<BrowseInformation>false</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<ResourceCompile>
@@ -197,7 +196,6 @@
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<BrowseInformation>false</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<ResourceCompile>
diff --git a/Projects/vc15/util/resolvertest.vcxproj b/Projects/vc15/util/resolvertest.vcxproj
index 0f7c59c..40aa215 100644
--- a/Projects/vc15/util/resolvertest.vcxproj
+++ b/Projects/vc15/util/resolvertest.vcxproj
@@ -171,7 +171,6 @@
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<BrowseInformation>false</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
@@ -202,7 +201,6 @@
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<BrowseInformation>false</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4275</DisableSpecificWarnings>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
diff --git a/iis7_shib/IIS7Request.cpp b/iis7_shib/IIS7Request.cpp
index 31c57be..553b5fc 100644
--- a/iis7_shib/IIS7Request.cpp
+++ b/iis7_shib/IIS7Request.cpp
@@ -252,13 +252,6 @@ long IIS7Request::returnOK()
return RQ_NOTIFICATION_CONTINUE;
}
-void IIS7Request::log(SPLogLevel level, const string& msg) const
-{
- AbstractSPRequest::log(level, msg);
- if (level >= SPCrit)
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_NATIVE_CRITICAL, Priority::CRIT, msg.c_str());
-}
-
string IIS7Request::getRemoteAddr() const
{
string ret = AbstractSPRequest::getRemoteAddr();
@@ -444,11 +437,10 @@ string IIS7Request::makeSafeHeader(const char* rawname) const
return hdr;
}
-// TODO We need a strategy for what is logged, what is fatal and how.
void IIS7Request::logFatal(const string& operation, HRESULT hr) const
{
string msg(operation + " failed: " + lexical_cast<string>(hr));
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_NATIVE_CRITICAL, Priority::FATAL, msg.c_str());
+ log(SPRequest::SPCrit, msg.c_str());
if (m_response) {
m_response->SetStatus(static_cast<USHORT>(XMLTOOLING_HTTP_STATUS_ERROR), "Fatal Server Error", 0, hr);
}
diff --git a/iis7_shib/headers/IIS7Request.hpp b/iis7_shib/headers/IIS7Request.hpp
index 6656e31..e844b67 100644
--- a/iis7_shib/headers/IIS7Request.hpp
+++ b/iis7_shib/headers/IIS7Request.hpp
@@ -61,7 +61,6 @@ protected:
void clearHeader(const char* rawname, const char* cginame);
long returnDecline();
long returnOK();
- void log(SPLogLevel level, const string& msg) const;
string getRemoteAddr() const;
string getSecureHeader(const char* name) const;
//
diff --git a/iis7_shib/headers/IIS7_shib.hpp b/iis7_shib/headers/IIS7_shib.hpp
index b9d19be..68d37dd 100644
--- a/iis7_shib/headers/IIS7_shib.hpp
+++ b/iis7_shib/headers/IIS7_shib.hpp
@@ -50,8 +50,6 @@
#include <xmltooling/util/XMLHelper.h>
#include <shibsp/exceptions.h>
-#include <message.h>
-
using namespace shibsp;
using namespace xmltooling;
using namespace xercesc;
diff --git a/iis7_shib/register.cpp b/iis7_shib/register.cpp
index dc6de4d..9f7e808 100644
--- a/iis7_shib/register.cpp
+++ b/iis7_shib/register.cpp
@@ -31,6 +31,7 @@
#include <codecvt> // 16 bit to 8 bit and vice versa chars
#include <boost/algorithm/string.hpp>
+using xmltooling::logging::Category;
using xmltooling::logging::Priority;
namespace Config {
@@ -79,6 +80,7 @@ public:
virtual VOID Terminate()
{
+ Category::getInstance(SHIBSP_LOGCAT ".IISNative").info("IIS module is terminating");
delete this;
}
};
@@ -92,8 +94,10 @@ RegisterModule(
IHttpServer * pHttpServer
)
{
+ Category& log = Category::getInstance(SHIBSP_LOGCAT ".IISNative");
+
if (g_Config) {
- LogEvent(EVENTLOG_WARNING_TYPE, SHIB_NATIVE_REENTRANT_INIT, Priority::WARN, "SHIB_NATIVE_REENTRANT_INIT");
+ log.warn("reentrant IIS module initialization, ignoring...");
return S_OK;
}
@@ -108,7 +112,7 @@ RegisterModule(
);
if (!g_Config->init()) {
g_Config = nullptr;
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_NATIVE_STARTUP_FAILED, Priority::FATAL, "SHIB_NATIVE_STARTUP_FAILED");
+ log.fatal("IIS module failed during library initialization, check native log for help");
return E_FAIL;
}
@@ -116,9 +120,9 @@ RegisterModule(
if (!g_Config->instantiate(nullptr, true))
throw runtime_error("unknown error");
} catch (const std::exception& ex) {
+ log.fatal("IIS module failed during library initialization: %s", ex.what());
g_Config->term();
g_Config=nullptr;
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_NATIVE_STARTUP_FAILED_EXCEPTION, Priority::FATAL, ex.what());
return E_FAIL;
}
@@ -149,7 +153,7 @@ RegisterModule(
}
else {
_set_invalid_parameter_handler(old);
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_NATIVE_CANNOT_CREATE_ANTISPOOF, Priority::FATAL, "SHIB_NATIVE_CANNOT_CREATE_ANTISPOOF");
+ log.fatal("IIS module failed to generate a random anti-spoofing key");
locker.assign(); // pops lock on SP config
g_Config->term();
g_Config = nullptr;
@@ -201,21 +205,7 @@ RegisterModule(
HRESULT hr = pModuleInfo->SetRequestNotifications(new ShibModuleFactory(), RQ_BEGIN_REQUEST | RQ_AUTHENTICATE_REQUEST, 0);
if (SUCCEEDED(hr))
- LogEvent(EVENTLOG_INFORMATION_TYPE, SHIB_NATIVE_INITIALIZED, Priority::INFO, "SHIB_NATIVE_INITIALIZED");
+ log.info("IIS module initialized");
return hr;
}
-
-BOOL LogEvent(
- WORD wType,
- DWORD dwEventID,
- Priority::PriorityLevel priority,
- LPCSTR message)
-{
- LPCSTR messages[] ={ message, nullptr };
- DWORD gle = ::GetLastError();
-
- HANDLE hElog = ::RegisterEventSource(nullptr, SHIBSP_EVENTLOGSOURCE);
- BOOL res = ::ReportEvent(hElog, wType, (priority / 100) + 1, dwEventID, nullptr, 1, sizeof(DWORD), messages, &gle);
- return (::DeregisterEventSource(hElog) && res);
-}
diff --git a/isapi_shib/isapi_shib.cpp b/isapi_shib/isapi_shib.cpp
index c696e36..fabaaa0 100644
--- a/isapi_shib/isapi_shib.cpp
+++ b/isapi_shib/isapi_shib.cpp
@@ -54,7 +54,6 @@
#include <windows.h>
#include <httpfilt.h>
#include <httpext.h>
-#include <message.h>
using namespace shibsp;
using namespace xmltooling;
@@ -110,20 +109,6 @@ namespace {
vector<string> g_NoCerts;
}
-BOOL LogEvent(
- WORD wType,
- DWORD dwEventID,
- Priority::PriorityLevel priority,
- LPCSTR message)
-{
- LPCSTR messages[] = {message, nullptr};
- DWORD gle = ::GetLastError();
-
- HANDLE hElog = ::RegisterEventSource(nullptr, SHIBSP_EVENTLOGSOURCE);
- BOOL res = ::ReportEvent(hElog, wType, (priority / 100) + 1, dwEventID, nullptr, 1, sizeof(DWORD), messages, &gle);
- return (::DeregisterEventSource(hElog) && res);
-}
-
void _my_invalid_parameter_handler(
const wchar_t * expression,
const wchar_t * function,
@@ -148,12 +133,12 @@ extern "C" BOOL WINAPI GetExtensionVersion(HSE_VERSION_INFO* pVer)
return FALSE;
if (!g_Config) {
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_ISAPI_CANNOT_LOAD, Priority::FATAL, "SHIB_ISAPI_CANNOT_LOAD");
+ Category::getInstance(SHIBSP_LOGCAT ".ISAPI").fatal("extension mode startup not possible, is the DLL loaded as a filter?");
return FALSE;
}
pVer->dwExtensionVersion = HSE_VERSION;
- strncpy(pVer->lpszExtensionDesc,"Shibboleth ISAPI Extension",HSE_MAX_EXT_DLL_NAME_LEN-1);
+ strncpy(pVer->lpszExtensionDesc, "Shibboleth ISAPI Extension", HSE_MAX_EXT_DLL_NAME_LEN-1);
return TRUE;
}
@@ -164,10 +149,12 @@ extern "C" BOOL WINAPI TerminateExtension(DWORD)
extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer)
{
+ Category& log = Category::getInstance(SHIBSP_LOGCAT ".ISAPI");
+
if (!pVer)
return FALSE;
else if (g_Config) {
- LogEvent(EVENTLOG_WARNING_TYPE, SHIB_ISAPI_REENTRANT_INIT, Priority::WARN, "SHIB_ISAPI_REENTRANT_INIT");
+ log.warn("reentrant ISAPI filter initialization, ignoring...");
return TRUE;
}
@@ -182,7 +169,7 @@ extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer)
);
if (!g_Config->init()) {
g_Config = nullptr;
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_ISAPI_STARTUP_FAILED, Priority::FATAL, "SHIB_ISAPI_STARTUP_FAILED");
+ log.fatal("ISAPI filter startup failed during library initialization, check native log for help");
return FALSE;
}
@@ -191,9 +178,9 @@ extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer)
throw runtime_error("unknown error");
}
catch (const std::exception& ex) {
+ log.fatal("ISAPI filter startup failed: %s", ex.what());
g_Config->term();
g_Config=nullptr;
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_ISAPI_STARTUP_FAILED_EXCEPTION, Priority::FATAL, ex.what());
return FALSE;
}
@@ -224,7 +211,7 @@ extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer)
}
else {
_set_invalid_parameter_handler(old);
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_ISAPI_CANNOT_CREATE_ANTISPOOF, Priority::FATAL, "SHIB_ISAPI_CANNOT_CREATE_ANTISPOOF");
+ log.fatal("ISAPI filter failed to generate a random anti-spoofing key");
locker.assign(); // pops lock on SP config
g_Config->term();
g_Config = nullptr;
@@ -240,9 +227,9 @@ extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer)
flag = props->getBool("safeHeaderNames");
g_bSafeHeaderNames = flag.first && flag.second;
if (props->getString("useHeaders").first)
- Category::getInstance(SHIBSP_LOGCAT ".ISAPI").warn("useHeaders attribute not valid for this filter");
+ log.warn("useHeaders attribute not valid for this filter");
if (props->getString("useVariables").first)
- Category::getInstance(SHIBSP_LOGCAT ".ISAPI").warn("useVariables attribute not valid for this filter");
+ log.warn("useVariables attribute not valid for this filter");
const DOMElement* child = XMLHelper::getFirstChildElement(props->getElement(), Site);
while (child) {
@@ -250,15 +237,15 @@ extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer)
if (!id.empty()) {
g_Sites.insert(make_pair(id, site_t(child)));
if (!XMLHelper::getAttrString(child, "", useHeaders).empty())
- Category::getInstance(SHIBSP_LOGCAT ".ISAPI").warn("useHeaders attribute not valid for this filter");
+ log.warn("useHeaders attribute not valid for this filter");
if (!XMLHelper::getAttrString(child, "", useVariables).empty())
- Category::getInstance(SHIBSP_LOGCAT ".ISAPI").warn("useVariables attribute not valid for this filter");
+ log.warn("useVariables attribute not valid for this filter");
}
child = XMLHelper::getNextSiblingElement(child, Site);
}
if (nullptr != props->getPropertySet("Roles"))
- Category::getInstance(SHIBSP_LOGCAT ".ISAPI").warn("<Roles> element not valid for this filter");
+ log.warn("<Roles> element not valid for this filter");
}
}
@@ -269,7 +256,7 @@ extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer)
SF_NOTIFY_NONSECURE_PORT |
SF_NOTIFY_PREPROC_HEADERS |
SF_NOTIFY_LOG);
- LogEvent(EVENTLOG_INFORMATION_TYPE, SHIB_ISAPI_INITIALIZED, Priority::INFO, "SHIB_ISAPI_INITIALIZED");
+ log.info("ISAPI filter initialized");
return TRUE;
}
@@ -278,7 +265,7 @@ extern "C" BOOL WINAPI TerminateFilter(DWORD)
if (g_Config)
g_Config->term();
g_Config = nullptr;
- LogEvent(EVENTLOG_INFORMATION_TYPE, SHIB_ISAPI_SHUTDOWN, Priority::INFO, "SHIB_ISAPI_SHUTDOWN");
+ Category::getInstance(SHIBSP_LOGCAT ".ISAPI").info("ISAPI filter shutting down");
return TRUE;
}
@@ -450,11 +437,6 @@ public:
}
return m_remote_addr;
}
- void log(SPLogLevel level, const string& msg) const {
- AbstractSPRequest::log(level,msg);
- if (level >= SPCrit)
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_ISAPI_CRITICAL, Priority::CRIT, msg.c_str());
- }
string makeSafeHeader(const char* rawname) const {
string hdr;
for (; *rawname; ++rawname) {
@@ -616,12 +598,9 @@ public:
}
};
-DWORD WriteClientError(PHTTP_FILTER_CONTEXT pfc, const char* msg, DWORD eventID=SHIB_ISAPI_CLIENT_ERROR)
+DWORD WriteClientError(PHTTP_FILTER_CONTEXT pfc, const char* msg)
{
static char _status[] = "200 OK";
-
- if (eventID)
- LogEvent(EVENTLOG_ERROR_TYPE, eventID, Priority::ERROR, msg);
static char ctype[] = "Connection: close\r\nContent-Type: text/html\r\n\r\n";
pfc->ServerSupportFunction(pfc,SF_REQ_SEND_RESPONSE_HEADER,_status,(ULONG_PTR)ctype,0);
static char xmsg[] = "<HTML><HEAD><TITLE>Shibboleth Filter Error</TITLE></HEAD><BODY>"
@@ -651,7 +630,7 @@ void GetServerVariable(PHTTP_FILTER_CONTEXT pfc, LPSTR lpszVariable, dynabuf& s,
break;
}
if (bRequired && s.empty()) {
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_ISAPI_MISSING_VARIABLE, Priority::ERROR, lpszVariable);
+ Category::getInstance(SHIBSP_LOGCAT ".ISAPI").error("missing server variable: %s", lpszVariable);
}
}
@@ -710,13 +689,13 @@ extern "C" DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc, DWORD notificat
return WriteClientError(pfc, "Shibboleth Filter detected unexpected IIS error.");
}
catch (const std::exception& e) {
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_ISAPI_EXCEPTION, Priority::ERROR, e.what());
- return WriteClientError(pfc, "Shibboleth Filter caught an exception, check Event Log for details.", 0);
+ Category::getInstance(SHIBSP_LOGCAT ".ISAPI").error("ISAPI filter caught an exception: %s", e.what());
+ return WriteClientError(pfc, "Shibboleth Filter caught an exception, check Event Log for details.");
}
catch(...) {
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_ISAPI_UNKNOWN_EXCEPTION, Priority::ERROR, "SHIB_ISAPI_UNKNOWN_EXCEPTION");
+ Category::getInstance(SHIBSP_LOGCAT ".ISAPI").crit("ISAPI extension caught an unknown exception");
if (g_catchAll)
- return WriteClientError(pfc, "Shibboleth Filter threw an unknown exception.", 0);
+ return WriteClientError(pfc, "Shibboleth Filter threw an unknown exception.");
throw;
}
return WriteClientError(pfc, "Shibboleth Filter reached unreachable code, save my walrus!");
@@ -726,12 +705,9 @@ extern "C" DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc, DWORD notificat
/****************************************************************************/
// ISAPI Extension
-DWORD WriteClientError(LPEXTENSION_CONTROL_BLOCK lpECB, const char* msg, DWORD eventID=SHIB_ISAPI_CLIENT_ERROR)
+DWORD WriteClientError(LPEXTENSION_CONTROL_BLOCK lpECB, const char* msg)
{
static char _status[] = "200 OK";
-
- if (eventID)
- LogEvent(EVENTLOG_ERROR_TYPE, eventID, Priority::ERROR, msg);
static char ctype[] = "Connection: close\r\nContent-Type: text/html\r\n\r\n";
lpECB->ServerSupportFunction(lpECB->ConnID,HSE_REQ_SEND_RESPONSE_HEADER,_status,0,(LPDWORD)ctype);
static char xmsg[] = "<HTML><HEAD><TITLE>Shibboleth Error</TITLE></HEAD><BODY><H1>Shibboleth Error</H1>";
@@ -891,11 +867,6 @@ public:
}
return m_remote_addr;
}
- void log(SPLogLevel level, const string& msg) const {
- AbstractSPRequest::log(level,msg);
- if (level >= SPCrit)
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_ISAPI_CRITICAL, Priority::CRIT, msg.c_str());
- }
string getHeader(const char* name) const {
string hdr("HTTP_");
for (; *name; ++name) {
@@ -1056,8 +1027,9 @@ public:
else
break;
}
- if (bRequired && s.empty())
+ if (bRequired && s.empty()) {
log(SPRequest::SPError, string("missing required server variable: ") + lpszVariable);
+ }
}
};
@@ -1076,7 +1048,7 @@ void GetServerVariable(LPEXTENSION_CONTROL_BLOCK lpECB, LPSTR lpszVariable, dyna
break;
}
if (bRequired && s.empty()) {
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_ISAPI_MISSING_VARIABLE, Priority::ERROR, lpszVariable);
+ Category::getInstance(SHIBSP_LOGCAT ".ISAPI").error("missing required server variable: %s", lpszVariable);
}
}
@@ -1117,13 +1089,13 @@ extern "C" DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
return WriteClientError(lpECB, "Server detected unexpected IIS error.");
}
catch (const std::exception& e) {
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_ISAPI_EXCEPTION, Priority::ERROR, e.what());
- return WriteClientError(lpECB, "Shibboleth Extension caught an exception, check Event Log for details.", 0);
+ Category::getInstance(SHIBSP_LOGCAT ".ISAPI").error("ISAPI extension caught an exception: %s", e.what());
+ return WriteClientError(lpECB, "Shibboleth Extension caught an exception, check native log for details.");
}
catch(...) {
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_ISAPI_UNKNOWN_EXCEPTION, Priority::ERROR, "SHIB_ISAPI_UNKNOWN_EXCEPTION");
+ Category::getInstance(SHIBSP_LOGCAT ".ISAPI").crit("ISAPI filter caught an unknown exception");
if (g_catchAll)
- return WriteClientError(lpECB, "Shibboleth Extension threw an unknown exception.", 0);
+ return WriteClientError(lpECB, "Shibboleth Extension threw an unknown exception.");
throw;
}
diff --git a/msi/WiX/ShibbolethSP-main-x64.wxs b/msi/WiX/ShibbolethSP-main-x64.wxs
index eff59cf..70c151b 100644
--- a/msi/WiX/ShibbolethSP-main-x64.wxs
+++ b/msi/WiX/ShibbolethSP-main-x64.wxs
@@ -183,20 +183,6 @@
<?include ShibbolethSP-defs-x86.wxi ?>
- <!--
- We put the messages for IIS7 and Shibd in this module since all others are shared with x86
- -->
- <Component Id="messageFile" Guid="{3FF89632-9F39-4B1B-AA3E-3AF6C8155B92}" Win64="yes" Directory="lib64">
- <File Id="Messages" KeyPath="yes" Source="$(var.SPBuildDirectory)\cpp-sp\Build\$(var.MsVCVersion)\x64\Release\messages.dll" />
- <RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\Shibboleth\Shibboleth Service Provider">
- <RegistryValue Name="CategoryCount" Type="integer" Value="8" />
- <RegistryValue Name="TypesSupported" Type="integer" Value="7" />
- <RegistryValue Name="CategoryMessageFile" Type="string" Value="[ProgramFiles64Folder]Shibboleth\SP\lib\NTEventLogAppender.dll" />
- <RegistryValue Name="EventMessageFile" Type="string" Value="[ProgramFiles64Folder]Shibboleth\SP\lib\NTEventLogAppender.dll;[#Messages]" />
- <RegistryValue Name="ParameterMessageFile" Type="string" Value="[#Messages]" />
- </RegistryKey>
- </Component>
-
<Component Id="shibd.exe" Guid="{2476BB80-9384-4026-86F5-E1569A685187}" Directory="sbin">
<File KeyPath="yes" Checksum="yes" Source="$(var.SPBuildDirectory)\cpp-sp\Build\$(var.MsVCVersion)\Release\shibd.exe" />
</Component>
@@ -206,6 +192,13 @@
<!-- NOTE - whether this actually happens is predicated in noarch on whether this is an upgrade or not -->
<ServiceInstall Id="shibd" Name="shibd_Default" DisplayName="Shibboleth 2 Daemon (Default)" Description="Manages shared state and offloads SAML processing from Shibboleth web server modules." Arguments="-stdout "[INSTALLDIR]var\log\shibboleth\stdout.log" -stderr "[INSTALLDIR]var\log\shibboleth\stderr.log"" Type="ownProcess" Start="auto" ErrorControl="ignore" />
<ServiceControl Id="shibd_Default" Name="shibd_Default" Stop="both" Remove="uninstall" Start="install" Wait="no" />
+ <!-- We put in the messages for Isapi and Shibd in this module since all others are shared with x64 -->
+ <RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\Shibboleth\Shibboleth Service Provider">
+ <RegistryValue Name="CategoryCount" Type="integer" Value="8" />
+ <RegistryValue Name="TypesSupported" Type="integer" Value="7" />
+ <RegistryValue Name="CategoryMessageFile" Type="string" Value="[ProgramFiles64Folder]Shibboleth\SP\lib\NTEventLogAppender.dll" />
+ <RegistryValue Name="EventMessageFile" Type="string" Value="[ProgramFiles64Folder]Shibboleth\SP\lib\NTEventLogAppender.dll" />
+ </RegistryKey>
</Component>
</Feature>
diff --git a/msi/WiX/ShibbolethSP-main-x86.wxs b/msi/WiX/ShibbolethSP-main-x86.wxs
index b2270e9..06d3543 100644
--- a/msi/WiX/ShibbolethSP-main-x86.wxs
+++ b/msi/WiX/ShibbolethSP-main-x86.wxs
@@ -97,25 +97,18 @@
<?include ShibbolethSP-defs-x86.wxi ?>
- <!--
- We put in the messages for Isapi and Shibd in this module since all others are shared with x64
- -->
- <Component Id="messageFile" Guid="{7B81ACC5-B79C-426B-ACB8-346A52E5FF60}" Win64="no" Directory="lib">
- <File Id="Messages" KeyPath="yes" Source="$(var.SPBuildDirectory)\cpp-sp\Build\$(var.MsVCVersion)\Release\messages.dll" />
- <RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\Shibboleth\Shibboleth Service Provider">
- <RegistryValue Name="CategoryCount" Type="integer" Value="8" />
- <RegistryValue Name="TypesSupported" Type="integer" Value="7" />
- <RegistryValue Name="CategoryMessageFile" Type="string" Value="[ProgramFilesFolder]Shibboleth\SP\lib\NTEventLogAppender.dll" />
- <RegistryValue Name="EventMessageFile" Type="string" Value="[ProgramFilesFolder]Shibboleth\SP\lib\NTEventLogAppender.dll;[#Messages]" />
- <RegistryValue Name="ParameterMessageFile" Type="string" Value="[#Messages]" />
- </RegistryKey>
- </Component>
-
<Component Id="shibd.exe" Guid="{2476BB80-9384-4026-86F5-E1569A685187}" Directory="sbin">
<File KeyPath="yes" Checksum="yes" Source="$(var.SPBuildDirectory)\cpp-sp\Build\$(var.MsVCVersion)\Release\shibd.exe" />
<!-- NOTE - whether this actually happens is predicated in noarch on whether this is an upgrade or not -->
<ServiceInstall Id="shibd" Name="shibd_Default" DisplayName="Shibboleth 2 Daemon (Default)" Description="Manages shared state and offloads SAML processing from Shibboleth web server modules." Arguments="-stdout "[INSTALLDIR]var\log\shibboleth\stdout.log" -stderr "[INSTALLDIR]var\log\shibboleth\stderr.log"" Type="ownProcess" Start="auto" ErrorControl="ignore" />
<ServiceControl Id="shibd_Default" Name="shibd_Default" Stop="both" Remove="uninstall" Start="install" Wait="no" />
+ <!-- We put in the messages for Isapi and Shibd in this module since all others are shared with x64 -->
+ <RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\Shibboleth\Shibboleth Service Provider">
+ <RegistryValue Name="CategoryCount" Type="integer" Value="8" />
+ <RegistryValue Name="TypesSupported" Type="integer" Value="7" />
+ <RegistryValue Name="CategoryMessageFile" Type="string" Value="[ProgramFilesFolder]Shibboleth\SP\lib\NTEventLogAppender.dll" />
+ <RegistryValue Name="EventMessageFile" Type="string" Value="[ProgramFilesFolder]Shibboleth\SP\lib\NTEventLogAppender.dll" />
+ </RegistryKey>
</Component>
</Feature>
diff --git a/shibd/shibd.cpp b/shibd/shibd.cpp
index e8afdea..5a31f7e 100644
--- a/shibd/shibd.cpp
+++ b/shibd/shibd.cpp
@@ -144,19 +144,19 @@ int real_main(int preinit)
(shar_checkonly ? SPConfig::RequestMapping : SPConfig::Logging)
);
if (!conf.init(shar_schemadir, shar_prefix)) {
- fprintf(stderr, "configuration is invalid, see console for specific problems\n");
+ fprintf(stderr, "configuration is invalid, see console or log for specific problems\n");
return -1;
}
if (!conf.instantiate(shar_config)) {
- fprintf(stderr, "configuration is invalid, check console for specific problems\n");
+ fprintf(stderr, "configuration is invalid, check console or log for specific problems\n");
conf.term();
return -2;
}
// If just a test run, bail.
if (shar_checkonly) {
- fprintf(stdout, "overall configuration is loadable, check console for non-fatal problems\n");
+ fprintf(stdout, "overall configuration is loadable, check console or log for non-fatal problems\n");
return 0;
}
}
@@ -393,7 +393,7 @@ int main(int argc, char *argv[])
(shar_checkonly ? SPConfig::RequestMapping : SPConfig::Logging)
);
if (!conf.init(shar_schemadir, shar_prefix)) {
- fprintf(stderr, SD_ERR "configuration is invalid, check console for specific problems\n");
+ fprintf(stderr, SD_ERR "configuration is invalid, check console or log for specific problems\n");
return -1;
}
@@ -413,13 +413,13 @@ int main(int argc, char *argv[])
}
if (!conf.instantiate(shar_config)) {
- fprintf(stderr, SD_ERR "configuration is invalid, check console for specific problems\n");
+ fprintf(stderr, SD_ERR "configuration is invalid, check console or log for specific problems\n");
conf.term();
return -2;
}
if (shar_checkonly)
- fprintf(stderr, "overall configuration is loadable, check console for non-fatal problems\n");
+ fprintf(stderr, "overall configuration is loadable, check console or log for non-fatal problems\n");
else {
// Init the listener.
ListenerService* listener = conf.getServiceProvider()->getListenerService();
diff --git a/shibd/shibd_win32.cpp b/shibd/shibd_win32.cpp
index 9478474..4d88a57 100644
--- a/shibd/shibd_win32.cpp
+++ b/shibd/shibd_win32.cpp
@@ -30,14 +30,13 @@
#include <shibsp/base.h>
#include <xmltooling/logging.h>
-#include <message.h>
-
#include <string>
#include <windows.h>
using namespace std;
using xmltooling::logging::Priority;
+using xmltooling::logging::Category;
extern bool shibd_shutdown; // signals shutdown to Unix side
extern const char* shar_schemadir;
@@ -162,8 +161,7 @@ int main(int argc, char *argv[])
SetConsoleCtrlHandler(&BreakHandler,TRUE);
if ((i=real_main(1))!=0)
{
- LogEvent(EVENTLOG_ERROR_TYPE, Priority::FATAL, SHIBD_STARTUP_FAILED,
- "shibd startup failed, check shibd.log for further details");
+ Category::getInstance(SHIBSP_LOGCAT ".shibd").fatal("daemon startup failed, check log for details");
return i;
}
return real_main(0);
@@ -206,7 +204,7 @@ int main(int argc, char *argv[])
};
if (!StartServiceCtrlDispatcher(dispatchTable))
- LogEvent(EVENTLOG_ERROR_TYPE, Priority::FATAL, SHIBD_SERVICE_START_FAILED, "SHIBD_SERVICE_START_FAILED");
+ Category::getInstance(SHIBSP_LOGCAT ".shibd").fatal("StartServiceCtrlDispatcher failed");
return 0;
}
@@ -221,11 +219,11 @@ VOID ServiceStart (DWORD dwArgc, LPSTR *lpszArgv)
if (real_main(1)!=0)
{
- LogEvent(EVENTLOG_ERROR_TYPE, Priority::FATAL, SHIBD_STARTUP_FAILED, "SHIBD_STARTUP_FAILED");
+ Category::getInstance(SHIBSP_LOGCAT ".shibd").fatal("daemon startup failed, check log for details");
return;
}
- LogEvent(EVENTLOG_INFORMATION_TYPE, Priority::INFO, SHIBD_SERVICE_STARTED, "SHIBD_SERVICE_STARTED");
+ Category::getInstance(SHIBSP_LOGCAT ".shibd").info("daemon service startup complete");
if (!ReportStatusToSCMgr(SERVICE_RUNNING, NO_ERROR, 0))
return;
@@ -242,7 +240,7 @@ VOID ServiceStart (DWORD dwArgc, LPSTR *lpszArgv)
VOID ServiceStop()
{
if (!bConsole)
- LogEvent(EVENTLOG_INFORMATION_TYPE, Priority::INFO, SHIBD_SERVICE_STOPPING, "SHIBD_SERVICE_STOPPING");
+ Category::getInstance(SHIBSP_LOGCAT ".shibd").info("daemon service stopping...");
shibd_shutdown=true;
}
@@ -369,7 +367,7 @@ BOOL ReportStatusToSCMgr(DWORD dwCurrentState,
// Report the status of the service to the service control manager.
//
if (!(fResult = SetServiceStatus(sshStatusHandle, &ssStatus)))
- LogEvent(EVENTLOG_ERROR_TYPE, Priority::ERROR, SHIBD_SET_SERVICE_STATUS_FAILED, "SHIBD_SET_SERVICE_STATUS_FAILED");
+ Category::getInstance(SHIBSP_LOGCAT ".shibd").error("SetServiceStatus failed");
}
return fResult;
}
@@ -393,7 +391,7 @@ void CmdInstallService(LPCSTR name)
return;
}
- string dispName = string("Shibboleth 2 Daemon (") + name + ")";
+ string dispName = string("Shibboleth SP Daemon (") + name + ")";
string realName = string("shibd_") + name;
string cmd(szPath);
if (shar_prefix)
@@ -550,17 +548,3 @@ LPTSTR GetLastErrorText( LPSTR lpszBuf, DWORD dwSize )
return lpszBuf;
}
-
-BOOL LogEvent(
- WORD wType,
- Priority::PriorityLevel priority,
- DWORD dwEventID,
- LPCSTR message)
-{
- LPCSTR messages[] = {message, nullptr};
- DWORD gle = ::GetLastError();
-
- HANDLE hElog = ::RegisterEventSource(nullptr, SHIBSP_EVENTLOGSOURCE);
- BOOL res = ::ReportEvent(hElog, wType, (priority / 100) + 1, dwEventID, nullptr, 1, sizeof(DWORD), messages, &gle);
- return (::DeregisterEventSource(hElog) && res);
-}
diff --git a/shibsp/base.h b/shibsp/base.h
index 10841e8..0b2c521 100644
--- a/shibsp/base.h
+++ b/shibsp/base.h
@@ -99,9 +99,6 @@
#ifdef WIN32
-/** Name of source to register with Windows Event Log. */
-#define SHIBSP_EVENTLOGSOURCE "Shibboleth Service Provider"
-
/** Default catalog path on Windows. */
# define SHIBSP_SCHEMAS "%PROGRAMDATA%/Shibboleth/SP/xml/xmltooling/catalog.xml;%PROGRAMDATA%/Shibboleth/SP/xml/opensaml/saml20-catalog.xml;%PROGRAMDATA%/Shibboleth/SP/xml/opensaml/saml11-catalog.xml;%PROGRAMDATA%/Shibboleth/SP/xml/shibboleth/catalog.xml"
diff --git a/util/Makefile.am b/util/Makefile.am
index 1306a7b..0817963 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -15,6 +15,4 @@ mdquery_LDADD = $(XMLSEC_LIBS) \
EXTRA_DIST = \
resource.h \
mdquery.rc \
- resolvertest.rc \
- messageResource.rc \
- message.mc
+ resolvertest.rc
diff --git a/util/message.mc b/util/message.mc
deleted file mode 100644
index 1261fc1..0000000
--- a/util/message.mc
+++ /dev/null
@@ -1,219 +0,0 @@
-LanguageNames=(Neutral=0x0:MSG00)
-
-MessageIdTypedef=DWORD
-
-SeverityNames=(Success=0x0
- Informational=0x1
- Warning=0x2
- Error=0x3
- )
-
-FacilityNames=(Shibboleth=0x231
- ShibbolethISAPI=0x232
- ShibbolethNative=0x233
- )
-
-
-MessageId=100
-Severity=Error
-Facility=Shibboleth
-SymbolicName=SHIBD_GENERIC_MESSAGE
-Language=Neutral
-Shibboleth Daemon: %1!s!
-.
-
-MessageId=
-Severity=Error
-Facility=Shibboleth
-SymbolicName=SHIBD_STARTUP_FAILED
-Language=Neutral
-Shibboleth Daemon startup failed.
-.
-
-MessageId=
-Severity=Error
-Facility=Shibboleth
-SymbolicName=SHIBD_SERVICE_START_FAILED
-Language=Neutral
-Shibboleth Daemon startup: StartServiceCtrlDispatcher failed.
-.
-
-MessageId=
-Severity=Error
-Facility=Shibboleth
-SymbolicName=SHIBD_SET_SERVICE_STATUS_FAILED
-Language=Neutral
-Shibboleth Daemon startup: SetServiceStatus failed.
-.
-
-MessageId=
-Severity=Informational
-Facility=Shibboleth
-SymbolicName=SHIBD_SERVICE_STARTED
-Language=Neutral
-Shibboleth Daemon started successfully.
-.
-
-MessageId=
-Severity=Informational
-Facility=Shibboleth
-SymbolicName=SHIBD_SERVICE_STOPPING
-Language=Neutral
-Shibboleth Daemon stopping...
-.
-
-
-MessageId=200
-Severity=Error
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_GENERIC_MESSAGE
-Language=Neutral
-Shibboleth ISAPI filter: %1
-.
-
-MessageId=
-Severity=Error
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_CANNOT_LOAD
-Language=Neutral
-Shibboleth ISAPI filter: Extension mode startup not possible, is the DLL loaded as a filter?
-.
-
-MessageId=
-Severity=Warning
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_REENTRANT_INIT
-Language=Neutral
-Shibboleth ISAPI filter: Reentrant filter initialization, ignoring...
-.
-
-MessageId=
-Severity=Error
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_STARTUP_FAILED
-Language=Neutral
-Shibboleth ISAPI filter: Startup failed during library initialization, check native log for help.
-.
-
-MessageId=
-Severity=Error
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_STARTUP_FAILED_EXCEPTION
-Language=Neutral
-Shibboleth ISAPI filter: Startup failed during library initialization: %1!s!, check native log for help.
-.
-
-MessageId=
-Severity=Error
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_CANNOT_CREATE_ANTISPOOF
-Language=Neutral
-Shibboleth ISAPI filter: Failed to generate a random anti-spoofing key (if this is Windows 2000 set one manually).
-.
-
-MessageId=
-Severity=Informational
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_INITIALIZED
-Language=Neutral
-Shibboleth ISAPI filter: Initialized...
-.
-
-MessageId=
-Severity=Informational
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_SHUTDOWN
-Language=Neutral
-Shibboleth ISAPI filter: Shutdown...
-.
-
-
-MessageId=
-Severity=Error
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_CRITICAL
-Language=Neutral
-Shibboleth ISAPI filter: Critical Error: %0!s!
-.
-
-MessageId=
-Severity=Error
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_CLIENT_ERROR
-Language=Neutral
-Shibboleth ISAPI filter: Client Error: %0!s!
-.
-
-MessageId=
-Severity=Error
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_MISSING_VARIABLE
-Language=Neutral
-Shibboleth ISAPI filter: Missing Variable %0!s!
-.
-
-MessageId=
-Severity=Error
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_EXCEPTION
-Language=Neutral
-Shibboleth ISAPI filter: Caught an Exception %0!s!
-.
-
-MessageId=
-Severity=Error
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_UNKNOWN_EXCEPTION
-Language=Neutral
-Shibboleth ISAPI filter: Caught an Unknown Exception.
-.
-
-
-MessageId=300
-Severity=Warning
-Facility=ShibbolethNative
-SymbolicName=SHIB_NATIVE_REENTRANT_INIT
-Language=Neutral
-Shibboleth Native filter: Reentrant filter initialization, ignoring...
-.
-
-MessageId=
-Severity=Error
-Facility=ShibbolethNative
-SymbolicName=SHIB_NATIVE_STARTUP_FAILED
-Language=Neutral
-Shibboleth Native filter: Startup failed during library initialization, check native log for help.
-.
-
-MessageId=
-Severity=Error
-Facility=ShibbolethNative
-SymbolicName=SHIB_NATIVE_STARTUP_FAILED_EXCEPTION
-Language=Neutral
-Shibboleth Native filter: Startup failed during library initialization: %1!s!, check native log for help.
-.
-
-MessageId=
-Severity=Error
-Facility=ShibbolethNative
-SymbolicName=SHIB_NATIVE_CANNOT_CREATE_ANTISPOOF
-Language=Neutral
-Shibboleth Native filter: Failed to generate a random anti-spoofing key (if this is Windows 2000 set one manually).
-.
-
-MessageId=
-Severity=Informational
-Facility=ShibbolethNative
-SymbolicName=SHIB_NATIVE_INITIALIZED
-Language=Neutral
-Shibboleth Native filter: Initialized...
-.
-
-MessageId=
-Severity=Error
-Facility=ShibbolethNative
-SymbolicName=SHIB_NATIVE_CRITICAL
-Language=Neutral
-Shibboleth Native filter: Critical Error: %0!s!
-.
-
diff --git a/util/messageResource.rc b/util/messageResource.rc
deleted file mode 100644
index e6640c1..0000000
Binary files a/util/messageResource.rc and /dev/null differ
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list