From: Scott Cantor Date: Wed, 4 Mar 2015 23:31:37 +0000 (+0000) Subject: Work around Solaris issue X-Git-Tag: 2.5.4~7 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-sp.git;a=commitdiff_plain;h=806829d1015250a4357914af3093c79aff81cc39 Work around Solaris issue --- diff --git a/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp b/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp index d37720d..37e77dd 100644 --- a/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp +++ b/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp @@ -320,12 +320,16 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log) format = &chNull; // ignore default Format/Namespace values // Fetch/create the map entry and see if it's a duplicate rule. - // Trim the format and the name only if the format is the default (URI). - pair entryKey(name,format); + // Trim the format, or the name only if the format is the default (URI). + pair entryKey; if (*format == chNull) { - trim(entryKey.first); + auto_ptr_XMLCh copyName(name); + entryKey.first = copyName.get(); + } else { + entryKey.first = name; + auto_ptr_XMLCh copyFormat(format); + entryKey.second = copyFormat.get(); } - trim(entryKey.second); pair< boost::shared_ptr,vector >& decl = m_attrMap[entryKey]; if (decl.first) { m_log.warn("skipping duplicate Attribute mapping (same name and nameFormat)"); @@ -355,7 +359,6 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log) m_log.warn("attribute mapping rule (%s) uses deprecated aliases feature, consider revising", id.get()); auto_ptr_char aliases(name); string dup(aliases.get()); - trim(dup); set new_aliases; split(new_aliases, dup, is_space(), algorithm::token_compress_on); set::iterator ru = new_aliases.find("REMOTE_USER");