registry

Jürgen Schmied juergenschmied at lycos.de
Thu May 9 04:45:52 CDT 2002


dlls/advapi32/registry.c
make use of accessmask MAXIMUM_ALLOWED possible
---
juergen.schmied at debitel.net



-------------- next part --------------
Index: wine/dlls/advapi32/registry.c
===================================================================
RCS file: /home/wine/wine/dlls/advapi32/registry.c,v
retrieving revision 1.34
diff -d -u -r1.34 registry.c
--- wine/dlls/advapi32/registry.c	2 Apr 2002 02:41:27 -0000	1.34
+++ wine/dlls/advapi32/registry.c	7 May 2002 18:57:57 -0000
@@ -53,6 +53,8 @@
     return !(GetVersion() & 0x80000000);
 }
 
+/* allowed bits for access mask */
+#define KEY_ACCESS_MASK (KEY_ALL_ACCESS| MAXIMUM_ALLOWED)
 /******************************************************************************
  *           RegCreateKeyExW   [ADVAPI32.@]
  *
@@ -69,6 +71,8 @@
  *
  * NOTES
  *  in case of failing retkey remains untouched
+ *
+ * FIXME MAXIMUM_ALLOWED in accessmask not supported by server
  */
 DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR class,
                               DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa, 
@@ -78,7 +82,8 @@
     UNICODE_STRING nameW, classW;
 
     if (reserved) return ERROR_INVALID_PARAMETER;
-    if (!(access & KEY_ALL_ACCESS) || (access & ~KEY_ALL_ACCESS)) return ERROR_ACCESS_DENIED;
+    if (!(access & KEY_ACCESS_MASK) || (access & ~KEY_ACCESS_MASK)) return ERROR_ACCESS_DENIED;
 
     attr.Length = sizeof(attr);
     attr.RootDirectory = hkey;
@@ -96,6 +102,8 @@
 
 /******************************************************************************
  *           RegCreateKeyExA   [ADVAPI32.@]
+ *
+ * FIXME MAXIMUM_ALLOWED in accessmask not supported by server
  */
 DWORD WINAPI RegCreateKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, LPSTR class,
                               DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa, 
@@ -106,9 +114,9 @@
     ANSI_STRING nameA, classA;
     NTSTATUS status;
 
     if (reserved) return ERROR_INVALID_PARAMETER; 
     if (!is_version_nt()) access = KEY_ALL_ACCESS;  /* Win95 ignores the access mask */
-    else if (!(access & KEY_ALL_ACCESS) || (access & ~KEY_ALL_ACCESS)) return ERROR_ACCESS_DENIED;
+    else if (!(access & KEY_ACCESS_MASK) || (access & ~KEY_ACCESS_MASK)) return ERROR_ACCESS_DENIED;
 
     attr.Length = sizeof(attr);
     attr.RootDirectory = hkey;



More information about the wine-patches mailing list