[shibboleth-sp2] 57/82: SSPCPP-750 chart16_t isn't wchar_t

Etienne Dysli Metref edm-guest at moszumanska.debian.org
Thu Nov 16 08:16:25 UTC 2017


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

edm-guest pushed a commit to branch master
in repository shibboleth-sp2.

commit 314fbf44bdb1f709cfe39272110cdcb85960d851
Author: Rod Widdowson <rdw at steadingsoftware.com>
Date:   Wed Aug 30 16:59:09 2017 +0100

    SSPCPP-750 chart16_t isn't wchar_t
    
    https://issues.shibboleth.net/jira/browse/SSPCPP-750
    
    as a temporary measure cast the one to the other
---
 iis7_shib/NativeRequest.cpp | 4 ++--
 iis7_shib/ShibUser.cpp      | 4 ++--
 iis7_shib/register.cpp      | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/iis7_shib/NativeRequest.cpp b/iis7_shib/NativeRequest.cpp
index 2aa3178..6ec655c 100644
--- a/iis7_shib/NativeRequest.cpp
+++ b/iis7_shib/NativeRequest.cpp
@@ -158,7 +158,7 @@ void NativeRequest::setHeader(const char* name, const char* value)
     }
     if (m_useVariables) {
         const auto_ptr_XMLCh widen(value); // TODO : use a converter?
-        const HRESULT hr(m_ctx->SetServerVariable(const_cast<char*>(name), widen.get()));
+        const HRESULT hr(m_ctx->SetServerVariable(const_cast<char*>(name), reinterpret_cast<PCWSTR>(widen.get())));
         if (FAILED(hr)) {
             throwError("setHeader (Variable)", hr);
         }
@@ -169,7 +169,7 @@ void NativeRequest::setHeader(const char* name, const char* value)
                 tokenizer<escaped_list_separator<char>> tok(str, escaped_list_separator<char>('\\', ';', '"'));
                 for (tokenizer<escaped_list_separator<char>>::iterator it = tok.begin(); it != tok.end(); ++it) {
                     const xmltooling::auto_ptr_XMLCh widen(it->c_str());
-                    m_roles.insert(widen.get());
+                    m_roles.insert(reinterpret_cast<PCWSTR>(widen.get()));
                 }
             }
         }
diff --git a/iis7_shib/ShibUser.cpp b/iis7_shib/ShibUser.cpp
index d15b4ab..ff1a57b 100644
--- a/iis7_shib/ShibUser.cpp
+++ b/iis7_shib/ShibUser.cpp
@@ -29,13 +29,13 @@ ShibUser::ShibUser(std::string name, set<wstring> roles) : m_refCount(1), m_wide
 PCWSTR
 ShibUser::GetRemoteUserName(VOID)
 {
-    return m_widen.get();
+    return reinterpret_cast<PCWSTR>(m_widen.get());
 }
 
 PCWSTR
 ShibUser::GetUserName(VOID)
 {
-    return m_widen.get();
+    return reinterpret_cast<PCWSTR>(m_widen.get());
 }
 
 PCWSTR
diff --git a/iis7_shib/register.cpp b/iis7_shib/register.cpp
index 565ed0d..3b23de9 100644
--- a/iis7_shib/register.cpp
+++ b/iis7_shib/register.cpp
@@ -192,7 +192,7 @@ RegisterModule(
             if (roles) {
                 const pair<bool, const char*> authNRoleFlag = roles->getString("authNRole");
                 xmltooling::auto_ptr_XMLCh rolestr(authNRoleFlag.first? authNRoleFlag.second : "ShibbolethAuthN");
-                g_authNRole = rolestr.get();
+                g_authNRole = reinterpret_cast<PCWSTR>(rolestr.get());
 
                 const pair<bool, const char*> theRoles = roles->getString("roleAttributes");
                 if (theRoles.first) {

-- 
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