[shibboleth-sp2] 39/89: SSPCPP-696 - Config schema prevents use of SHIBSP_LISTENER_ADDRESS
Ferenc Wágner
wferi at moszumanska.debian.org
Thu Sep 1 09:24:07 UTC 2016
This is an automated email from the git hooks/post-receive script.
wferi pushed a commit to branch master
in repository shibboleth-sp2.
commit ec9581d70a5e31cfe8c6c29f7970b8efafe9b289
Author: Scott Cantor <cantor.2 at osu.edu>
Date: Wed Jun 1 17:58:41 2016 -0400
SSPCPP-696 - Config schema prevents use of SHIBSP_LISTENER_ADDRESS
https://issues.shibboleth.net/jira/browse/SSPCPP-696
---
schemas/shibboleth-2.0-native-sp-config.xsd | 6 +++---
shibsp/remoting/impl/TCPListener.cpp | 8 ++++++--
shibsp/remoting/impl/UnixListener.cpp | 4 +++-
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/schemas/shibboleth-2.0-native-sp-config.xsd b/schemas/shibboleth-2.0-native-sp-config.xsd
index 046dd66..13c4a98 100644
--- a/schemas/shibboleth-2.0-native-sp-config.xsd
+++ b/schemas/shibboleth-2.0-native-sp-config.xsd
@@ -785,14 +785,14 @@
<choice minOccurs="0">
<element name="UnixListener">
<complexType>
- <attribute name="address" type="conf:string" use="required"/>
+ <attribute name="address" type="conf:string"/>
<attribute name="stackSize" type="unsignedInt"/>
</complexType>
</element>
<element name="TCPListener">
<complexType>
- <attribute name="address" type="conf:string" use="required"/>
- <attribute name="port" type="unsignedInt" use="required"/>
+ <attribute name="address" type="conf:string"/>
+ <attribute name="port" type="unsignedInt"/>
<attribute name="acl" type="conf:listOfStrings"/>
<attribute name="stackSize" type="unsignedInt"/>
</complexType>
diff --git a/shibsp/remoting/impl/TCPListener.cpp b/shibsp/remoting/impl/TCPListener.cpp
index 5127cd7..f99fa41 100644
--- a/shibsp/remoting/impl/TCPListener.cpp
+++ b/shibsp/remoting/impl/TCPListener.cpp
@@ -112,15 +112,19 @@ TCPListener::TCPListener(const DOMElement* e)
m_address(XMLHelper::getAttrString(e, getenv("SHIBSP_LISTENER_ADDRESS"), address)),
m_port(XMLHelper::getAttrInt(e, 0, port))
{
- if (m_address.empty())
+ if (m_address.empty()) {
m_address = "127.0.0.1";
+ log->info("defaulting socket address to %s", m_address.c_str());
+ }
if (m_port == 0) {
const char* p = getenv("SHIBSP_LISTENER_PORT");
if (p && *p)
m_port = atoi(p);
- if (m_port == 0)
+ if (m_port == 0) {
m_port = 1600;
+ log->info("defaulting socket port to %u", m_port);
+ }
}
vector<string> rawacls;
diff --git a/shibsp/remoting/impl/UnixListener.cpp b/shibsp/remoting/impl/UnixListener.cpp
index 9fc5408..95dd28b 100644
--- a/shibsp/remoting/impl/UnixListener.cpp
+++ b/shibsp/remoting/impl/UnixListener.cpp
@@ -90,8 +90,10 @@ namespace shibsp {
UnixListener::UnixListener(const DOMElement* e)
: SocketListener(e), m_address(XMLHelper::getAttrString(e, getenv("SHIBSP_LISTENER_ADDRESS"), address)), m_bound(false)
{
- if (m_address.empty())
+ if (m_address.empty()) {
m_address = "shibd.sock";
+ m_log->info("defaulting socket address to %s", m_address.c_str());
+ }
XMLToolingConfig::getConfig().getPathResolver()->resolve(m_address, PathResolver::XMLTOOLING_RUN_FILE);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git
More information about the Pkg-shibboleth-devel
mailing list