Path resolution for Unix socket.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 30 Jan 2008 18:25:05 +0000 (18:25 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 30 Jan 2008 18:25:05 +0000 (18:25 +0000)
Remove remaining absolute paths from config.
Change main config to an unbuilt file.

git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2712 cb58f699-b61c-0410-a6fe-9272a202ed29

configs/Makefile.am
configs/shibboleth2.xml [moved from configs/shibboleth2.xml.in with 97% similarity]
msi/scripts/shib_edit_config_files.vbs
shibsp/remoting/impl/UnixListener.cpp

index 6e70da7..fb6cd71 100644 (file)
@@ -22,7 +22,6 @@ pkgsysconf_DATA = \
 # installed as "foo" if "foo" does not already exist.  In other words,
 # the config files will not overwrite existing versions.
 BUILTCONFIGFILES = \
-       shibboleth2.xml \
        native.logger \
        shibd.logger \
        attribute-map.xml \
@@ -31,6 +30,7 @@ BUILTCONFIGFILES = \
 # While BUILTCONFIGFILES are processed, these are not; so we should pull
 # them from SRCDIR.
 CONFIGFILES = \
+    shibboleth2.xml \
     example-metadata.xml \
        console.logger \
        syslog.logger \
@@ -87,9 +87,6 @@ shibd.logger: ${srcdir}/shibd.logger.in Makefile ${top_builddir}/config.status
 native.logger: ${srcdir}/native.logger.in Makefile ${top_builddir}/config.status
        $(MAKE) do-build-file FILE=$@
 
-shibboleth2.xml: ${srcdir}/shibboleth2.xml.in Makefile ${top_builddir}/config.status
-       $(MAKE) do-build-file FILE=$@
-
 attribute-map.xml: ${srcdir}/attribute-map.xml.in Makefile ${top_builddir}/config.status
        $(MAKE) do-build-file FILE=$@
 
@@ -127,12 +124,10 @@ CLEANFILES = \
        shibd-osx.plist \
        shibd.logger \
        native.logger \
-       shibboleth2.xml \
        attribute-map.xml \
        attribute-policy.xml
 
 EXTRA_DIST = \
-       shibboleth2.xml.in \
        attribute-map.xml.in \
        attribute-policy.xml.in \
        native.logger.in \
similarity index 97%
rename from configs/shibboleth2.xml.in
rename to configs/shibboleth2.xml
index 4c4412f..d96e8d3 100644 (file)
@@ -3,12 +3,10 @@
     xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
     xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"    
     xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="urn:mace:shibboleth:2.0:native:sp:config @-PKGXMLDIR-@/shibboleth-2.0-native-sp-config.xsd"
-    logger="@-PKGSYSCONFDIR-@/syslog.logger" clockSkew="180">
+    logger="syslog.logger" clockSkew="180">
 
     <!-- The OutOfProcess section contains properties affecting the shibd daemon. -->
-    <OutOfProcess logger="@-PKGSYSCONFDIR-@/shibd.logger">
+    <OutOfProcess logger="shibd.logger">
         <!--
         <Extensions>
             <Library path="odbc-store.so" fatal="true"/>
@@ -17,7 +15,7 @@
     </OutOfProcess>
     
     <!-- The InProcess section conrains settings affecting web server modules/filters. -->
-    <InProcess logger="@-PKGSYSCONFDIR-@/native.logger">
+    <InProcess logger="native.logger">
         <ISAPI normalizeRequest="true">
             <!--
             Maps IIS Instance ID values to the host scheme/name/port/sslport. The name is
@@ -31,7 +29,7 @@
     </InProcess>
 
     <!-- Only one listener can be defined, to connect in process modules to shibd. -->
-    <UnixListener address="@-PKGRUNDIR-@/shibd.sock"/>
+    <UnixListener address="shibd.sock"/>
     <!-- <TCPListener address="127.0.0.1" port="12345" acl="127.0.0.1"/> -->
     
     <!-- This set of components stores sessions and other persistent data in daemon memory. -->
index 21c3bbf..2b10f67 100644 (file)
@@ -80,20 +80,6 @@ if (Err = 0) then
   End If
   FileSystemObj.MoveFile ConfigFile, DistDir & "attribute-policy.xml"
   
-  ConfigFile = DistDir & "shibboleth2.xml.in"
-  ReplaceInFile ConfigFile, "@-PKGXMLDIR-@", ConvertedDir & "/share/xml/shibboleth"
-  ReplaceInFile ConfigFile, "@-PKGSYSCONFDIR-@", ConvertedDir & "/etc/shibboleth"
-  ReplaceInFile ConfigFile, "@-PKGLIBDIR-@", ConvertedDir & "/lib/shibboleth"
-  ReplaceInFile ConfigFile, "   <UnixListener address=""@-PKGRUNDIR-@/shibd.sock""/>", "<!-- <UnixListener address=""@-PKGRUNDIR-@/shibd.sock""/> -->"
-  ReplaceInFile ConfigFile, "<!-- <TCPListener address=""127.0.0.1"" port=""12345"" acl=""127.0.0.1""/> -->", "<TCPListener address=""127.0.0.1"" port=""" & ShibdPort & """ acl=""127.0.0.1""/>"
-  If (NOT FileSystemObj.FileExists(ConfigDir & "shibboleth2.xml")) then
-    FileSystemObj.CopyFile ConfigFile, ConfigDir & "shibboleth2.xml", false
-  End If
-  If (FileSystemObj.FileExists(DistDir & "shibboleth2.xml")) then
-    FileSystemObj.DeleteFile DistDir & "shibboleth2.xml", true
-  End If
-  FileSystemObj.MoveFile ConfigFile, DistDir & "shibboleth2.xml"
-
   ConfigFile = DistDir & "shibd.logger.in"
   ReplaceInFile ConfigFile, "@-PKGLOGDIR-@", ConvertedDir & "/var/log/shibboleth"
   If (NOT FileSystemObj.FileExists(ConfigDir & "shibd.logger")) then
@@ -162,6 +148,13 @@ if (Err = 0) then
   End If
   FileSystemObj.MoveFile ConfigFile, DistDir & "apache22.config"
 
+  ConfigFile = DistDir & "shibboleth2.xml"
+  ReplaceInFile ConfigFile, "   <UnixListener address=""shibd.sock""/>", "<!-- <UnixListener address=""shibd.sock""/> -->"
+  ReplaceInFile ConfigFile, "<!-- <TCPListener address=""127.0.0.1"" port=""12345"" acl=""127.0.0.1""/> -->", "<TCPListener address=""127.0.0.1"" port=""" & ShibdPort & """ acl=""127.0.0.1""/>"
+  If (NOT FileSystemObj.FileExists(ConfigDir & "shibboleth2.xml")) then
+    FileSystemObj.CopyFile ConfigFile, ConfigDir & "shibboleth2.xml", false
+  End If
+
   'Now just copy the other non-edited files over as well (if possible)
 
   If (NOT FileSystemObj.FileExists(ConfigDir & "accessError.html")) then
index d9a9b8b..7004287 100644 (file)
@@ -25,6 +25,7 @@
 \r
 #include <xercesc/util/XMLUniDefs.hpp>\r
 #include <xmltooling/unicode.h>\r
+#include <xmltooling/util/PathResolver.h>\r
 \r
 #ifdef HAVE_UNISTD_H\r
 # include <sys/socket.h>\r
@@ -81,11 +82,11 @@ namespace shibsp {
 \r
 UnixListener::UnixListener(const DOMElement* e) : SocketListener(e), m_address("/var/run/shar-socket"), m_bound(false)\r
 {\r
-    // We're stateless, but we need to load the configuration.\r
     const XMLCh* tag=e->getAttributeNS(NULL,address);\r
     if (tag && *tag) {\r
         auto_ptr_char a(tag);\r
         m_address=a.get();\r
+        XMLToolingConfig::getConfig().getPathResolver()->resolve(m_address, PathResolver::XMLTOOLING_RUN_FILE);\r
     }\r
 }\r
 \r