[cpp-sp] branch master updated: Revert rename of primary config file.
Scott Cantor
cantor.2 at osu.edu
Thu May 3 19:51:34 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=9492ba2e1a30ffed9849c3f73d87915acd93ad79
The following commit(s) were added to refs/heads/master by this push:
new 9492ba2 Revert rename of primary config file.
9492ba2 is described below
commit 9492ba2e1a30ffed9849c3f73d87915acd93ad79
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu May 3 19:51:29 2018 -0400
Revert rename of primary config file.
---
Projects/vc15/Shibboleth.sln | 6 ++---
configs/Makefile.am | 29 ++++++++--------------
...ple-shibboleth3.xml => example-shibboleth2.xml} | 0
configs/{shibboleth3.xml => shibboleth2.xml} | 0
.../{win-shibboleth3.xml => win-shibboleth2.xml} | 0
msi/WiX/ShibbolethSP-noarch.wxs | 8 +++---
msi/scripts/shib_edit_config_files.vbs-wix | 6 ++---
shibboleth.spec.in | 19 ++++++--------
shibsp/SPConfig.cpp | 13 ++--------
shibsp/base.h | 5 +---
10 files changed, 29 insertions(+), 57 deletions(-)
diff --git a/Projects/vc15/Shibboleth.sln b/Projects/vc15/Shibboleth.sln
index 19bdecf..c3ce77d 100644
--- a/Projects/vc15/Shibboleth.sln
+++ b/Projects/vc15/Shibboleth.sln
@@ -53,7 +53,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Config", "Config", "{2543BC
..\..\configs\console.logger = ..\..\configs\console.logger
..\..\configs\discoveryTemplate.html = ..\..\configs\discoveryTemplate.html
..\..\configs\example-metadata.xml = ..\..\configs\example-metadata.xml
- ..\..\configs\example-shibboleth3.xml = ..\..\configs\example-shibboleth3.xml
+ ..\..\configs\example-shibboleth2.xml = ..\..\configs\example-shibboleth2.xml
..\..\configs\globalLogout.html = ..\..\configs\globalLogout.html
..\..\configs\keygen.bat = ..\..\configs\keygen.bat
..\..\configs\keygen.sh = ..\..\configs\keygen.sh
@@ -67,7 +67,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Config", "Config", "{2543BC
..\..\configs\protocols.xml = ..\..\configs\protocols.xml
..\..\configs\seckeygen.bat = ..\..\configs\seckeygen.bat
..\..\configs\security-policy.xml = ..\..\configs\security-policy.xml
- ..\..\configs\shibboleth3.xml = ..\..\configs\shibboleth3.xml
+ ..\..\configs\shibboleth2.xml = ..\..\configs\shibboleth2.xml
..\..\configs\shibd-debian.in = ..\..\configs\shibd-debian.in
..\..\configs\shibd-osx.plist.in = ..\..\configs\shibd-osx.plist.in
..\..\configs\shibd-redhat.in = ..\..\configs\shibd-redhat.in
@@ -75,7 +75,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Config", "Config", "{2543BC
..\..\configs\shibd.logger.in = ..\..\configs\shibd.logger.in
..\..\configs\sslError.html = ..\..\configs\sslError.html
..\..\configs\win-native.logger = ..\..\configs\win-native.logger
- ..\..\configs\win-shibboleth3.xml = ..\..\configs\win-shibboleth3.xml
+ ..\..\configs\win-shibboleth2.xml = ..\..\configs\win-shibboleth2.xml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{31B171C1-E06C-464F-A541-38724AB52D79}"
diff --git a/configs/Makefile.am b/configs/Makefile.am
index cbfb912..9493bb1 100644
--- a/configs/Makefile.am
+++ b/configs/Makefile.am
@@ -1,10 +1,7 @@
-## $Id$
-
AUTOMAKE_OPTIONS = foreign
pkglibdir = ${libdir}/@PACKAGE_NAME@
pkglogdir = ${localstatedir}/log/@PACKAGE_NAME@
-shirelogdir = ${localstatedir}/log/@PACKAGE_NAME at -www
pkgxmldir = $(datadir)/xml/@PACKAGE_NAME@
pkgwebdir = $(datadir)/@PACKAGE_NAME@
pkgrundir = $(localstatedir)/run/@PACKAGE_NAME@
@@ -36,12 +33,13 @@ BUILTCONFIGFILES = \
# While BUILTCONFIGFILES are processed, these are not; so we should pull
# them from SRCDIR.
CONFIGFILES = \
+ shibboleth2.xml \
attribute-map.xml \
attribute-policy.xml \
protocols.xml \
security-policy.xml \
example-metadata.xml \
- example-shibboleth3.xml \
+ example-shibboleth2.xml \
console.logger \
native.logger \
accessError.html \
@@ -68,7 +66,6 @@ do-build-file:
-e 's:@-PKGXMLDIR-@:${pkgxmldir}:g' \
-e 's:@-PKGWEBDIR-@:${pkgwebdir}:g' \
-e 's:@-PKGLOGDIR-@:${pkglogdir}:g' \
- -e 's:@-SHIRELOGDIR-@:${shirelogdir}:g' \
-e 's:@-PKGRUNDIR-@:${pkgrundir}:g' \
-e 's:@-PKGCACHEDIR-@:${pkgcachedir}:g'
cmp -s ${FILE} ${FILE}.tmp || mv ${FILE}.tmp ${FILE}
@@ -111,7 +108,6 @@ all-data-local: $(BUILTCONFIGFILES)
install-data-local: all-data-local
$(mkinstalldirs) $(DESTDIR)$(pkglogdir)
- $(mkinstalldirs) $(DESTDIR)$(shirelogdir)
$(mkinstalldirs) $(DESTDIR)$(pkgrundir)
$(mkinstalldirs) $(DESTDIR)$(pkgcachedir)
$(mkinstalldirs) $(DESTDIR)$(pkgxmldir)
@@ -121,27 +117,23 @@ install-data-local: all-data-local
$(INSTALL_DATA) $$f $(DESTDIR)${pkgsysconfdir}; \
fi; \
$(INSTALL_DATA) $$f $(DESTDIR)${pkgsysconfdir}/$$f.dist; \
- done
+ done
for f in $(CONFIGFILES); do \
if test ! -f $(DESTDIR)${pkgsysconfdir}/$$f; then \
$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)${pkgsysconfdir}; \
fi; \
$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)${pkgsysconfdir}/$$f.dist; \
- done
- if test ! -f $(DESTDIR)${pkgsysconfdir}/shibboleth3.xml; then \
- if test ! -f $(DESTDIR)${pkgsysconfdir}/shibboleth2.xml; then \
- $(INSTALL_DATA) $(srcdir)/shibboleth3.xml $(DESTDIR)${pkgsysconfdir}; \
- fi; \
- fi; \
- $(INSTALL_DATA) $(srcdir)/shibboleth3.xml $(DESTDIR)${pkgsysconfdir}/shibboleth3.xml.dist
+ done
install-data-hook:
chmod +x $(DESTDIR)$(pkgsysconfdir)/keygen.sh
chmod +x $(DESTDIR)$(pkgsysconfdir)/metagen.sh
if test -z "$(NOKEYGEN)"; then \
- cd $(DESTDIR)$(pkgsysconfdir); \
- /bin/sh ./keygen.sh -b -n sp-signing ; \
- /bin/sh ./keygen.sh -b -n sp-encrypt ; \
+ if test ! -f $(DESTDIR)$(pkgsysconfdir)/sp-key.gen; then \
+ cd $(DESTDIR)$(pkgsysconfdir); \
+ /bin/sh ./keygen.sh -b -n sp-signing ; \
+ /bin/sh ./keygen.sh -b -n sp-encrypt ; \
+ fi; \
fi
CLEANFILES = \
@@ -174,7 +166,6 @@ EXTRA_DIST = \
keygen.sh \
metagen.sh \
seckeygen.sh \
- shibboleth3.xml \
- win-shibboleth3.xml \
+ win-shibboleth2.xml \
win-native.logger \
$(CONFIGFILES)
diff --git a/configs/example-shibboleth3.xml b/configs/example-shibboleth2.xml
similarity index 100%
rename from configs/example-shibboleth3.xml
rename to configs/example-shibboleth2.xml
diff --git a/configs/shibboleth3.xml b/configs/shibboleth2.xml
similarity index 100%
rename from configs/shibboleth3.xml
rename to configs/shibboleth2.xml
diff --git a/configs/win-shibboleth3.xml b/configs/win-shibboleth2.xml
similarity index 100%
rename from configs/win-shibboleth3.xml
rename to configs/win-shibboleth2.xml
diff --git a/msi/WiX/ShibbolethSP-noarch.wxs b/msi/WiX/ShibbolethSP-noarch.wxs
index 42284d7..994a210 100644
--- a/msi/WiX/ShibbolethSP-noarch.wxs
+++ b/msi/WiX/ShibbolethSP-noarch.wxs
@@ -60,8 +60,8 @@
<Component Id="example_metadata.xml" Guid="{D9852008-249D-405D-8059-5DAD307D2723}" Permanent="yes">
<File KeyPath="yes" Name="example-metadata.xml" />
</Component>
- <Component Id="example_shibboleth3.xml" Guid="{BD582026-0DB4-4664-A36F-0AC646596641}" Permanent="yes">
- <File KeyPath="yes" Name="example-shibboleth3.xml" />
+ <Component Id="example_shibboleth2.xml" Guid="{85415A41-2B4E-406F-9CFC-63CFC360A9C7}" Permanent="yes">
+ <File KeyPath="yes" Name="example-shibboleth2.xml" />
</Component>
<Component Id="keygen.bat" Guid="{A5BBCB8B-42B3-4402-B66D-66D2971F509F}">
<File KeyPath="yes" Name="keygen.bat" />
@@ -100,8 +100,8 @@
<Component Id="attribute_policy.xml" Guid="{55B88F7B-E2EA-4B70-87B7-33C566B9F992}">
<File KeyPath="yes" Name="attribute-policy.xml" />
</Component>
- <Component Id="shibboleth3.xml" Guid="{E7AA9D74-4A67-4FED-BEAB-6DCD2B2EB9FA}">
- <File KeyPath="yes" Name="shibboleth3.xml" Source="$(var.SPBuildDirectory)\cpp-sp\configs\win-shibboleth3.xml" />
+ <Component Id="shibboleth2.xml" Guid="{E520FEDE-3F0E-47C6-9345-47223B82825A}">
+ <File KeyPath="yes" Name="shibboleth2.xml" Source="$(var.SPBuildDirectory)\cpp-sp\configs\win-shibboleth2.xml" />
</Component>
<Component Id="console.logger" Guid="{8AC85980-32B9-4EA2-9245-167FB1AB2570}">
<File KeyPath="yes" Name="console.logger" />
diff --git a/msi/scripts/shib_edit_config_files.vbs-wix b/msi/scripts/shib_edit_config_files.vbs-wix
index e172c83..0adf209 100644
--- a/msi/scripts/shib_edit_config_files.vbs-wix
+++ b/msi/scripts/shib_edit_config_files.vbs-wix
@@ -134,10 +134,8 @@ if (Err = 0) then
'Now just copy the other non-edited files over as well (if possible)
- If (NOT FileSystemObj.FileExists(ConfigDir & "shibboleth3.xml")) then
- If (NOT FileSystemObj.FileExists(ConfigDir & "shibboleth2.xml")) then
- FileSystemObj.CopyFile DistDir & "shibboleth3.xml", ConfigDir, false
- End If
+ If (NOT FileSystemObj.FileExists(ConfigDir & "shibboleth2.xml")) then
+ FileSystemObj.CopyFile DistDir & "shibboleth2.xml", ConfigDir, false
End If
If (NOT FileSystemObj.FileExists(ConfigDir & "native.logger")) then
diff --git a/shibboleth.spec.in b/shibboleth.spec.in
index 01aa2a3..6d4b6d2 100644
--- a/shibboleth.spec.in
+++ b/shibboleth.spec.in
@@ -284,15 +284,11 @@ fi
# Fix ownership of log files (even on new installs, if they're left from an older one).
%{__chown} %{runuser}:%{runuser} %{_localstatedir}/log/shibboleth/* 2>/dev/null || :
-# Install config file and generate new keys if no existing config is found.
-# Note we have to copy from the .dist version because of RPM exclusion below.
-if [ ! -f %{_sysconfdir}/shibboleth/shibboleth3.xml ] ; then
- if [ ! -f %{_sysconfdir}/shibboleth/shibboleth2.xml ] ; then
- install -m 0644 $RPM_BUILD_ROOT%{_sysconfdir}/shibboleth/shibboleth3.xml.dist %{_sysconfdir}/shibboleth/shibboleth3.xml
- cd %{_sysconfdir}/shibboleth
- /bin/sh ./keygen.sh -b -n sp-signing -u %{runuser} -g %{runuser}
- /bin/sh ./keygen.sh -b -n sp-encrypt -u %{runuser} -g %{runuser}
- fi
+# Generate two keys on new installs.
+if [ $1 -eq 1 ] ; then
+ cd %{_sysconfdir}/shibboleth
+ /bin/sh ./keygen.sh -b -n sp-signing -u %{runuser} -g %{runuser}
+ /bin/sh ./keygen.sh -b -n sp-encrypt -u %{runuser} -g %{runuser}
fi
%if "%{_vendor}" == "redhat" || "%{_vendor}" == "amazon"
@@ -425,10 +421,10 @@ exit 0
%dir %{_datadir}/shibboleth
%{_datadir}/shibboleth/*
%dir %{_sysconfdir}/shibboleth
+%config(missingok, noreplace) %{_sysconfdir}/shibboleth/shibboleth2.xml
%config(noreplace) %{_sysconfdir}/shibboleth/attribute-map.xml
%config(noreplace) %{_sysconfdir}/shibboleth/attribute-policy.xml
%config(noreplace) %{_sysconfdir}/shibboleth/example-metadata.xml
-%config(noreplace) %{_sysconfdir}/shibboleth/example-shibboleth3.xml
%config(noreplace) %{_sysconfdir}/shibboleth/protocols.xml
%config(noreplace) %{_sysconfdir}/shibboleth/security-policy.xml
%config(noreplace) %{_sysconfdir}/shibboleth/*.html
@@ -449,10 +445,10 @@ exit 0
%if 0%{?suse_version} >= 1210 || 0%{?rhel} >= 7 || 0%{?centos_version} >= 700
%{_tmpfilesdir}/%{name}.conf
%endif
+%{_sysconfdir}/shibboleth/example-shibboleth2.xml
%{_sysconfdir}/shibboleth/*.dist
%{_sysconfdir}/shibboleth/apache*.config
%{_sysconfdir}/shibboleth/shibd-*
-%exclude %{_sysconfdir}/shibboleth/shibboleth3.xml
%attr(0755,root,root) %{_sysconfdir}/shibboleth/keygen.sh
%attr(0755,root,root) %{_sysconfdir}/shibboleth/metagen.sh
%attr(0755,root,root) %{_sysconfdir}/shibboleth/seckeygen.sh
@@ -470,7 +466,6 @@ exit 0
* Mon Apr 30 2018 Scott Cantor <cantor.2 at osu.edu> - 3.0.0-1
- Bump dependency versions
- Require updated libraries across the board
-- Add logic to handle new config outside of RPM scope
- Generate two keys on new installs
* Tue May 03 2016 Scott Cantor <cantor.2 at osu.edu> - 2.6.0-1
diff --git a/shibsp/SPConfig.cpp b/shibsp/SPConfig.cpp
index c4bd28a..ba1c952 100644
--- a/shibsp/SPConfig.cpp
+++ b/shibsp/SPConfig.cpp
@@ -405,13 +405,10 @@ bool SPConfig::instantiate(const char* config, bool rethrow)
NDC ndc("instantiate");
#endif
- bool retry = false;
-
if (!config)
config = getenv("SHIBSP_CONFIG");
if (!config) {
config = SHIBSP_CONFIG;
- retry = true;
}
try {
xercesc::DOMDocument* dummydoc;
@@ -451,14 +448,8 @@ bool SPConfig::instantiate(const char* config, bool rethrow)
getServiceProvider()->init();
return true;
}
- catch (std::exception& ex) {
- if (retry) {
- Category::getInstance(SHIBSP_LOGCAT ".Config").warn(
- "failed to load default configuration (%s), retrying with legacy default (%s)", config, SHIBSP2_CONFIG
- );
- return instantiate(SHIBSP2_CONFIG, rethrow);
- }
- else if (rethrow) {
+ catch (const std::exception& ex) {
+ if (rethrow) {
throw;
}
else {
diff --git a/shibsp/base.h b/shibsp/base.h
index c228678..10841e8 100644
--- a/shibsp/base.h
+++ b/shibsp/base.h
@@ -95,10 +95,7 @@
#define SHIBSP_TX_LOGCAT "Shibboleth-TRANSACTION"
/** Default name of configuration file. */
-# define SHIBSP_CONFIG "shibboleth3.xml"
-
-/** Default name of configuration file. */
-# define SHIBSP2_CONFIG "shibboleth2.xml"
+# define SHIBSP_CONFIG "shibboleth2.xml"
#ifdef WIN32
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list