Subject: [Boost-bugs] [Boost C++ Libraries] #7506: unique_path Fails on Windows for Temporary User Profiles
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-15 13:35:13
#7506: unique_path Fails on Windows for Temporary User Profiles
------------------------------+---------------------------------------------
Reporter: steve@⦠| Owner: bemandawes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
Version: Boost 1.51.0 | Severity: Problem
Keywords: |
------------------------------+---------------------------------------------
boost::filesystem::unique_path is failing on Windows if the user has a
temporary (read-only) profile (e.g. guest account).
I have tracked the problem down to a failure in
libs/filesystem/src/unique_path.cpp when it calls CryptAcquireContextW.
CryptAcquireContextW is failing with the arguments used. It appears that
this is by design, for read-only profiles. See
[http://blogs.msdn.com/b/alejacma/archive/2007/10/23
/rsacryptoserviceprovider-fails-when-used-with-mandatory-profiles.aspx]
for some background information.
I have modified the dwFlags argument of both calls to
CryptAcquireContextW, adding CRYPT_VERIFYCONTEXT | CRYPT_SILENT and it is
now working for me.
I'm no expert on the Win32 crypto API so I'm not sure if this is a valid
solution in all contexts.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7506> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC