Branch for 2.0 stream.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Sun, 30 Mar 2008 18:21:43 +0000 (18:21 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Sun, 30 Mar 2008 18:21:43 +0000 (18:21 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/branches/REL_2_0@2793 cb58f699-b61c-0410-a6fe-9272a202ed29

isapi_shib/isapi_shib.cpp
msi/scripts/shib_edit_config_files.vbs
shibsp/handler/impl/SAML2SessionInitiator.cpp

index 1f01f44..4dac1a7 100644 (file)
@@ -563,9 +563,8 @@ DWORD WriteClientError(PHTTP_FILTER_CONTEXT pfc, const char* msg)
 extern "C" DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc, DWORD notificationType, LPVOID pvNotification)
 {
     // Is this a log notification?
-    if (notificationType==SF_NOTIFY_LOG)
-    {
-        if (pfc->pFilterContext)
+    if (notificationType==SF_NOTIFY_LOG) {
+        if (pfc->pFilterContext && static_cast<context_t*>(pfc->pFilterContext)->m_user)
                ((PHTTP_FILTER_LOG)pvNotification)->pszClientUserName=static_cast<context_t*>(pfc->pFilterContext)->m_user;
         return SF_STATUS_REQ_NEXT_NOTIFICATION;
     }
index 1dbcd18..3ce7ad1 100644 (file)
@@ -35,7 +35,7 @@ Sub ReplaceInFile( filePath, lookForStr, replaceWithStr )
 End Sub
 
 
-Dim FileSystemObj, ConvertedDir, ConfigFile, XMLDir
+Dim FileSystemObj, ConvertedDir, ConfigFile, XMLDir, WshShell
 Dim customData, msiProperties, InstallDir, ShibdPort
 
 on error resume next
@@ -56,6 +56,10 @@ if (Err = 0) then
   ConfigDir = InstallDir & "\etc\shibboleth\"
   DistDir = ConfigDir & "dist\"
 
+  'Set ConvertedDir as the SHIBSP_PREFIX system variable.
+  Set WshShell = CreateObject("WScript.Shell")
+  WshShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\SHIBSP_PREFIX", ConvertedDir, "REG_SZ"
+
   'Perform actual Substitutions
   'Afterwards, if the config file doesn't already exist, copy up to etc/shibboleth
   'Also strip *.in for files in dist
index 9906907..0454e4d 100644 (file)
@@ -242,11 +242,9 @@ pair<bool,long> SAML2SessionInitiator::run(SPRequest& request, string& entityID,
         }
 
         option = request.getParameter("target");
-        if (option)
+        if (option) {
             target = option;
-        if (acsByIndex.first && !acsByIndex.second) {
-            // Since we're passing the ACS by value, we need to compute the return URL,
-            // so we'll need the target resource for real.
+            // Always need to recover target URL to compute handler below.
             recoverRelayState(request.getApplication(), request, request, target, false);
         }