[cpp-sp] branch master updated: SSPCPP-696 - Config schema prevents use of SHIBSP_LISTENER_ADDRESS
Scott Cantor
cantor.2 at osu.edu
Wed Jun 1 17:59:55 EDT 2016
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-sp.
The following commit(s) were added to refs/heads/master by this push:
new ec9581d SSPCPP-696 - Config schema prevents use of SHIBSP_LISTENER_ADDRESS
ec9581d is described below
commit ec9581d70a5e31cfe8c6c29f7970b8efafe9b289
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: 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);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list