[cpp-sp] branch main updated: CPPSP-25 - Should pull XP/Server2003 workarounds from path resolver

Codeberg noreply at shibboleth.net
Tue Feb 17 19:05:46 UTC 2026


This is an automated email from the git hooks/post-receive script.

codeberg pushed a commit to branch main
in repository cpp-sp.

View the commit online:
https://codeberg.org/Shibboleth/cpp-sp/commit/ea7e8dbc829355d8d2b6dd6a3c7ebc677d7f3231

The following commit(s) were added to refs/heads/main by this push:
     new ea7e8dbc CPPSP-25 - Should pull XP/Server2003 workarounds from path resolver
ea7e8dbc is described below

commit ea7e8dbc829355d8d2b6dd6a3c7ebc677d7f3231
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Feb 17 14:05:16 2026 -0500

    CPPSP-25 - Should pull XP/Server2003 workarounds from path resolver
    
    https://shibboleth.atlassian.net/browse/CPPSP-25
---
 shibsp/util/PathResolver.cpp | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/shibsp/util/PathResolver.cpp b/shibsp/util/PathResolver.cpp
index 6663b7a1..e20a0a04 100644
--- a/shibsp/util/PathResolver.cpp
+++ b/shibsp/util/PathResolver.cpp
@@ -23,10 +23,6 @@
 
 #include <stdexcept>
 
-#ifdef WIN32
-# include <Shlobj.h>
-#endif
-
 using namespace shibsp;
 using namespace std;
 
@@ -97,13 +93,6 @@ const string& PathResolver::resolve(string& s, file_type_t filetype, const char*
 #ifdef WIN32
     // Check for possible environment variable(s).
     if (s.find('%') != string::npos) {
-        // This is an ugly workaround for Windows XP/2003, which don't support the PROGRAMDATA variable.
-        if (!getenv("PROGRAMDATA") && s.find("%PROGRAMDATA%") != string::npos) {
-            char appdatapath[MAX_PATH + 2];
-            if (SHGetFolderPathA(NULL, CSIDL_COMMON_APPDATA, NULL, SHGFP_TYPE_CURRENT, appdatapath) == S_OK) {
-                s.replace(s.find("%PROGRAMDATA%"), 13, appdatapath);
-            }
-        }
         char expbuf[MAX_PATH + 2];
         DWORD cnt = ExpandEnvironmentStringsA(s.c_str(), expbuf, sizeof(expbuf));
         if (cnt != 0 && cnt <= sizeof(expbuf))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list