Juan Lang : crypt32: Only open the read-only root store for the local machine location.

Alexandre Julliard julliard at winehq.org
Mon Jan 19 08:58:36 CST 2009


Module: wine
Branch: master
Commit: 56634dce7b0dddde8b4a3681c1bf7db3d3f123c6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=56634dce7b0dddde8b4a3681c1bf7db3d3f123c6

Author: Juan Lang <juan.lang at gmail.com>
Date:   Fri Jan 16 07:40:55 2009 -0800

crypt32: Only open the read-only root store for the local machine location.

---

 dlls/crypt32/store.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c
index 3b42893..602bd40 100644
--- a/dlls/crypt32/store.c
+++ b/dlls/crypt32/store.c
@@ -348,7 +348,14 @@ static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreW(HCRYPTPROV hCryptProv,
         SetLastError(E_INVALIDARG);
         return NULL;
     }
-    if (!lstrcmpiW(storeName, rootW))
+    /* FIXME:  In Windows, the root store (even the current user location) is
+     * protected:  adding to it or removing from it present a user interface,
+     * and the keys are owned by the system process, not the current user.
+     * Wine's registry doesn't implement access controls, so a similar
+     * mechanism isn't possible yet.
+     */
+    if ((dwFlags & CERT_SYSTEM_STORE_LOCATION_MASK) ==
+     CERT_SYSTEM_STORE_LOCAL_MACHINE && !lstrcmpiW(storeName, rootW))
         return CRYPT_RootOpenStore(hCryptProv, dwFlags);
 
     switch (dwFlags & CERT_SYSTEM_STORE_LOCATION_MASK)




More information about the wine-cvs mailing list