advapi32 security patch

Andreas Mohr andi at rhlx01.fht-esslingen.de
Sun Dec 15 07:18:46 CST 2002


Hi all,

- actually use PLUID
- initialize the outbound lpLuid variable with bogus values

Index: dlls/advapi32/security.c
===================================================================
RCS file: /home/wine/wine/dlls/advapi32/security.c,v
retrieving revision 1.46
diff -u -r1.46 security.c
--- dlls/advapi32/security.c	25 Oct 2002 19:17:33 -0000	1.46
+++ dlls/advapi32/security.c	15 Dec 2002 13:22:10 -0000
@@ -610,9 +610,6 @@
  * LookupPrivilegeValueW			[ADVAPI32.@]
  * Retrieves LUID used on a system to represent the privilege name.
  *
- * NOTES
- *   lpLuid should be PLUID
- *
  * PARAMS
  *   lpSystemName [I] Address of string specifying the system
  *   lpName       [I] Address of string specifying the privilege
@@ -621,10 +618,12 @@
  * RETURNS STD
  */
 BOOL WINAPI
-LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid )
+LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, PLUID lpLuid )
 {
     FIXME("(%s,%s,%p): stub\n",debugstr_w(lpSystemName),
         debugstr_w(lpName), lpLuid);
+    lpLuid->LowPart = 0x12345678;
+    lpLuid->HighPart = 0x87654321;
     return TRUE;
 }
 
@@ -632,7 +631,7 @@
  * LookupPrivilegeValueA			[ADVAPI32.@]
  */
 BOOL WINAPI
-LookupPrivilegeValueA( LPCSTR lpSystemName, LPCSTR lpName, LPVOID lpLuid )
+LookupPrivilegeValueA( LPCSTR lpSystemName, LPCSTR lpName, PLUID lpLuid )
 {
     LPWSTR lpSystemNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpSystemName);
     LPWSTR lpNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpName);
Index: include/winbase.h
===================================================================
RCS file: /home/wine/wine/include/winbase.h,v
retrieving revision 1.172
diff -u -r1.172 winbase.h
--- include/winbase.h	13 Dec 2002 20:53:04 -0000	1.172
+++ include/winbase.h	15 Dec 2002 13:22:12 -0000
@@ -1379,8 +1380,8 @@
 BOOL        WINAPI LocalFileTimeToFileTime(const FILETIME*,LPFILETIME);
 BOOL        WINAPI LockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
 BOOL        WINAPI LockFileEx(HANDLE, DWORD, DWORD, DWORD, DWORD, LPOVERLAPPED);
-BOOL        WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,LPVOID);
-BOOL        WINAPI LookupPrivilegeValueW(LPCWSTR,LPCWSTR,LPVOID);
+BOOL        WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,PLUID);
+BOOL        WINAPI LookupPrivilegeValueW(LPCWSTR,LPCWSTR,PLUID);
 #define     LookupPrivilegeValue WINELIB_NAME_AW(LookupPrivilegeValue)
 BOOL        WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD);
 HMODULE     WINAPI MapHModuleSL(WORD);

-- 
Andreas Mohr                        Stauferstr. 6, D-71272 Renningen, Germany



More information about the wine-patches mailing list