- New implementation of SendMessage, ReceiveMessage, ReplyMessage functions
[wine] / dlls / advapi32 / security.c
1 /*
2  * dlls/advapi32/security.c
3  */
4 #include "wintypes.h"
5 #include "winreg.h"
6 #include "winerror.h"
7 #include "heap.h"
8 #include "ntdll.h"
9 #include "debug.h"
10
11 /* FIXME: move it to a header */
12 BOOL32 WINAPI IsValidSid (PSID pSid);
13 BOOL32 WINAPI EqualSid (PSID pSid1, PSID pSid2);
14 BOOL32 WINAPI EqualPrefixSid (PSID pSid1, PSID pSid2);
15 DWORD  WINAPI GetSidLengthRequired (BYTE nSubAuthorityCount);
16 BOOL32 WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3,    DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid);
17 VOID*  WINAPI FreeSid(PSID pSid);
18 BOOL32 WINAPI InitializeSid (PSID pSid, PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount);
19 PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID pSid);
20 DWORD* WINAPI GetSidSubAuthority(PSID pSid, DWORD nSubAuthority);
21 BYTE*  WINAPI GetSidSubAuthorityCount(PSID pSid);
22 DWORD  WINAPI GetLengthSid(PSID pSid);
23 BOOL32 WINAPI CopySid(DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid);
24
25
26 /******************************************************************************
27  * OpenProcessToken                     [ADVAPI32.109]
28  * Opens the access token associated with a process
29  *
30  * PARAMS
31  *   ProcessHandle [I] Handle to process
32  *   DesiredAccess [I] Desired access to process
33  *   TokenHandle   [O] Pointer to handle of open access token
34  *
35  * RETURNS STD
36  */
37 BOOL32 WINAPI
38 OpenProcessToken( HANDLE32 ProcessHandle, DWORD DesiredAccess, 
39                   HANDLE32 *TokenHandle )
40 {
41         FIXME(advapi,"(%08x,%08lx,%p): stub\n",ProcessHandle,DesiredAccess,
42           TokenHandle);
43         SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
44         return FALSE;
45 }
46
47 /******************************************************************************
48  * OpenThreadToken [ADVAPI32.114]
49  *
50  * PARAMS
51  *   thread        []
52  *   desiredaccess []
53  *   openasself    []
54  *   thandle       []
55  */
56 BOOL32 WINAPI
57 OpenThreadToken( HANDLE32 thread, DWORD desiredaccess, BOOL32 openasself,
58                  HANDLE32 *thandle )
59 {
60         FIXME(advapi,"(%08x,%08lx,%d,%p): stub!\n",
61               thread,desiredaccess,openasself,thandle);
62         *thandle = 0; /* FIXME ... well, store something in there ;) */
63         return TRUE;
64 }
65
66
67 /******************************************************************************
68  * LookupPrivilegeValue32A                      [ADVAPI32.92]
69  */
70 BOOL32 WINAPI
71 LookupPrivilegeValue32A( LPCSTR lpSystemName, LPCSTR lpName, LPVOID lpLuid )
72 {
73     LPWSTR lpSystemNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpSystemName);
74     LPWSTR lpNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpName);
75     BOOL32 ret = LookupPrivilegeValue32W( lpSystemNameW, lpNameW, lpLuid);
76     HeapFree(GetProcessHeap(), 0, lpNameW);
77     HeapFree(GetProcessHeap(), 0, lpSystemNameW);
78     return ret;
79 }
80
81 /******************************************************************************
82  * LookupPrivilegeValue32W                      [ADVAPI32.93]
83  * Retrieves LUID used on a system to represent the privilege name.
84  *
85  * NOTES
86  *   lpLuid should be PLUID
87  *
88  * PARAMS
89  *   lpSystemName [I] Address of string specifying the system
90  *   lpName       [I] Address of string specifying the privilege
91  *   lpLuid       [I] Address of locally unique identifier
92  *
93  * RETURNS STD
94  */
95 BOOL32 WINAPI
96 LookupPrivilegeValue32W( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid )
97 {
98     FIXME(advapi,"(%s,%s,%p): stub\n",debugstr_w(lpSystemName), 
99                   debugstr_w(lpName), lpLuid);
100     return TRUE;
101 }
102 /******************************************************************************
103  * GetFileSecurity32A [ADVAPI32.45]
104  *
105  * Obtains Specified information about the security of a file or directory
106  * The information obtained is constrained by the callers access rights and
107  * privileges
108  */
109 BOOL32 WINAPI
110 GetFileSecurity32A( LPCSTR lpFileName, 
111                     SECURITY_INFORMATION RequestedInformation,
112                     PSECURITY_DESCRIPTOR pSecurityDescriptor,
113                     DWORD nLength, LPDWORD lpnLengthNeeded )
114 {
115   FIXME(advapi, "(%s) : stub\n", debugstr_a(lpFileName));
116   return TRUE;
117 }
118
119 /******************************************************************************
120  * GetFileSecurity32W [ADVAPI32.46]
121  *
122  * Obtains Specified information about the security of a file or directory
123  * The information obtained is constrained by the callers access rights and
124  * privileges
125  *
126  * PARAMS
127  *   lpFileName           []
128  *   RequestedInformation []
129  *   pSecurityDescriptor  []
130  *   nLength              []
131  *   lpnLengthNeeded      []
132  */
133 BOOL32 WINAPI
134 GetFileSecurity32W( LPCWSTR lpFileName, 
135                     SECURITY_INFORMATION RequestedInformation,
136                     PSECURITY_DESCRIPTOR pSecurityDescriptor,
137                     DWORD nLength, LPDWORD lpnLengthNeeded )
138 {
139   FIXME(advapi, "(%s) : stub\n", debugstr_w(lpFileName) ); 
140   return TRUE;
141 }
142
143
144 /******************************************************************************
145  * AdjustTokenPrivileges [ADVAPI32.10]
146  *
147  * PARAMS
148  *   TokenHandle          []
149  *   DisableAllPrivileges []
150  *   NewState             []
151  *   BufferLength         []
152  *   PreviousState        []
153  *   ReturnLength         []
154  */
155 BOOL32 WINAPI
156 AdjustTokenPrivileges( HANDLE32 TokenHandle, BOOL32 DisableAllPrivileges,
157                        LPVOID NewState, DWORD BufferLength, 
158                        LPVOID PreviousState, LPDWORD ReturnLength )
159 {       FIXME(advapi, "stub\n"); 
160         SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
161         return FALSE;
162 }
163
164 /******************************************************************************
165  * CopySid [ADVAPI32.24]
166  *
167  * PARAMS
168  *   nDestinationSidLength []
169  *   pDestinationSid       []
170  *   pSourceSid            []
171  */
172 BOOL32 WINAPI
173 CopySid( DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid )
174 {
175
176     if (!IsValidSid(pSourceSid))
177         return FALSE;
178
179     if (nDestinationSidLength < GetLengthSid(pSourceSid))
180         return FALSE;
181
182     memcpy(pDestinationSid, pSourceSid, GetLengthSid(pSourceSid));
183
184     return TRUE;
185 }
186
187 /******************************************************************************
188  * IsValidSid [ADVAPI32.80]
189  *
190  * PARAMS
191  *   pSid []
192  */
193 BOOL32 WINAPI
194 IsValidSid( PSID pSid )
195 {
196     if (!pSid || pSid->Revision != SID_REVISION)
197         return FALSE;
198
199     return TRUE;
200 }
201
202 /******************************************************************************
203  * EqualSid [ADVAPI32.40]
204  *
205  * PARAMS
206  *   pSid1 []
207  *   pSid2 []
208  */
209 BOOL32 WINAPI
210 EqualSid( PSID pSid1, PSID pSid2 )
211 {
212     if (!IsValidSid(pSid1) || !IsValidSid(pSid2))
213         return FALSE;
214
215     if (*GetSidSubAuthorityCount(pSid1) != *GetSidSubAuthorityCount(pSid2))
216         return FALSE;
217
218     if (memcmp(pSid1, pSid2, GetLengthSid(pSid1)) != 0)
219         return FALSE;
220
221     return TRUE;
222 }
223
224 /******************************************************************************
225  * EqualPrefixSid [ADVAPI32.39]
226  */
227 BOOL32 WINAPI EqualPrefixSid (PSID pSid1, PSID pSid2) {
228     if (!IsValidSid(pSid1) || !IsValidSid(pSid2))
229         return FALSE;
230
231     if (*GetSidSubAuthorityCount(pSid1) != *GetSidSubAuthorityCount(pSid2))
232         return FALSE;
233
234     if (memcmp(pSid1, pSid2, GetSidLengthRequired(pSid1->SubAuthorityCount - 1))
235  != 0)
236         return FALSE;
237
238     return TRUE;
239 }
240
241 /******************************************************************************
242  * GetSidLengthRequired [ADVAPI32.63]
243  *
244  * PARAMS
245  *   nSubAuthorityCount []
246  */
247 DWORD WINAPI
248 GetSidLengthRequired( BYTE nSubAuthorityCount )
249 {
250     return sizeof (SID) + (nSubAuthorityCount - 1) * sizeof (DWORD);
251 }
252
253 /******************************************************************************
254  * GetTokenInformation [ADVAPI32.66]
255  *
256  * PARAMS
257  *   token           []
258  *   tokeninfoclass  []
259  *   tokeninfo       []
260  *   tokeninfolength []
261  *   retlen          []
262  *
263  * FIXME
264  *   tokeninfoclas should be TOKEN_INFORMATION_CLASS
265  */
266 BOOL32 WINAPI
267 GetTokenInformation( HANDLE32 token, DWORD tokeninfoclass, LPVOID tokeninfo,
268                      DWORD tokeninfolength, LPDWORD retlen )
269 {
270         FIXME(advapi,"(%08x,%ld,%p,%ld,%p): stub\n",
271               token,tokeninfoclass,tokeninfo,tokeninfolength,retlen);
272         return FALSE;
273 }
274
275 /******************************************************************************
276  * AllocateAndInitializeSid [ADVAPI32.11]
277  *
278  * PARAMS
279  *   pIdentifierAuthority []
280  *   nSubAuthorityCount   []
281  *   nSubAuthority0       []
282  *   nSubAuthority1       []
283  *   nSubAuthority2       []
284  *   nSubAuthority3       []
285  *   nSubAuthority4       []
286  *   nSubAuthority5       []
287  *   nSubAuthority6       []
288  *   nSubAuthority7       []
289  *   pSid                 []
290  */
291 BOOL32 WINAPI
292 AllocateAndInitializeSid( PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
293                           BYTE nSubAuthorityCount,
294                           DWORD nSubAuthority0, DWORD nSubAuthority1,
295                           DWORD nSubAuthority2, DWORD nSubAuthority3,
296                           DWORD nSubAuthority4, DWORD nSubAuthority5,
297                           DWORD nSubAuthority6, DWORD nSubAuthority7,
298                           PSID *pSid )
299 {
300     if (!(*pSid = HeapAlloc( GetProcessHeap(), 0,
301                              GetSidLengthRequired(nSubAuthorityCount))))
302         return FALSE;
303     (*pSid)->Revision = SID_REVISION;
304     if (pIdentifierAuthority)
305         memcpy(&(*pSid)->IdentifierAuthority, pIdentifierAuthority,
306                sizeof (SID_IDENTIFIER_AUTHORITY));
307     *GetSidSubAuthorityCount(*pSid) = nSubAuthorityCount;
308
309     if (nSubAuthorityCount > 0)
310         *GetSidSubAuthority(*pSid, 0) = nSubAuthority0;
311     if (nSubAuthorityCount > 1)
312         *GetSidSubAuthority(*pSid, 1) = nSubAuthority1;
313     if (nSubAuthorityCount > 2)
314         *GetSidSubAuthority(*pSid, 2) = nSubAuthority2;
315     if (nSubAuthorityCount > 3)
316         *GetSidSubAuthority(*pSid, 3) = nSubAuthority3;
317     if (nSubAuthorityCount > 4)
318         *GetSidSubAuthority(*pSid, 4) = nSubAuthority4;
319     if (nSubAuthorityCount > 5)
320         *GetSidSubAuthority(*pSid, 5) = nSubAuthority5;
321     if (nSubAuthorityCount > 6)
322         *GetSidSubAuthority(*pSid, 6) = nSubAuthority6;
323     if (nSubAuthorityCount > 7)
324         *GetSidSubAuthority(*pSid, 7) = nSubAuthority7;
325
326     return TRUE;
327 }
328
329 /******************************************************************************
330  * FreeSid [ADVAPI32.42]
331  *
332  * PARAMS
333  *   pSid []
334  */
335 VOID* WINAPI
336 FreeSid( PSID pSid )
337 {
338     HeapFree( GetProcessHeap(), 0, pSid );
339     return NULL;
340 }
341
342 /******************************************************************************
343  * InitializeSecurityDescriptor [ADVAPI32.73]
344  *
345  * PARAMS
346  *   pDescr   []
347  *   revision []
348  */
349 BOOL32 WINAPI
350 InitializeSecurityDescriptor( SECURITY_DESCRIPTOR *pDescr,
351                               DWORD revision )
352 {
353     TRACE (security, "(%p,%lx): stub\n", pDescr, revision);
354     ZeroMemory (pDescr, sizeof (SECURITY_DESCRIPTOR));
355     pDescr->Revision = revision;
356     return TRUE;
357 }
358
359 /******************************************************************************
360  * GetSecurityDescriptorLength [ADVAPI32.55]
361  */
362 DWORD WINAPI GetSecurityDescriptorLength( SECURITY_DESCRIPTOR *pDescr)
363 {
364     FIXME(security, "(%p), stub\n", pDescr);
365     return 0;
366 }
367
368 /******************************************************************************
369  * GetSecurityDescriptorOwner [ADVAPI32.56]
370  *
371  * PARAMS
372  *   pOwner            []
373  *   lpbOwnerDefaulted []
374  */
375 BOOL32 WINAPI
376 GetSecurityDescriptorOwner( SECURITY_DESCRIPTOR *pDescr, PSID *pOwner,
377                             LPBOOL32 lpbOwnerDefaulted )
378 {
379     FIXME(security, "(%p,%p,%p), stub\n", pDescr,pOwner,lpbOwnerDefaulted);
380     *lpbOwnerDefaulted = TRUE;
381     return 0;
382 }
383
384 /******************************************************************************
385  * GetSecurityDescriptorGroup [ADVAPI32.54]
386  *
387  * PARAMS
388  *   pGroup            []
389  *   lpbOwnerDefaulted []
390  */
391 BOOL32 WINAPI
392 GetSecurityDescriptorGroup( SECURITY_DESCRIPTOR *pDescr, PSID *pGroup,
393                             LPBOOL32 lpbOwnerDefaulted )
394 {
395     FIXME(security, "(%p,%p,%p), stub\n", pDescr,pGroup,lpbOwnerDefaulted);
396     *lpbOwnerDefaulted = TRUE;
397     return 0;
398 }
399
400 /******************************************************************************
401  * InitializeSid [ADVAPI32.74]
402  *
403  * PARAMS
404  *   pIdentifierAuthority []
405  */
406 BOOL32 WINAPI
407 InitializeSid (PSID pSid, PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
408                     BYTE nSubAuthorityCount)
409 {
410     int i;
411
412     pSid->Revision = SID_REVISION;
413     if (pIdentifierAuthority)
414         memcpy(&pSid->IdentifierAuthority, pIdentifierAuthority,
415                sizeof (SID_IDENTIFIER_AUTHORITY));
416     *GetSidSubAuthorityCount(pSid) = nSubAuthorityCount;
417
418     for (i = 0; i < nSubAuthorityCount; i++)
419         *GetSidSubAuthority(pSid, i) = 0;
420
421     return TRUE;
422 }
423
424 /******************************************************************************
425  * GetSidIdentifierAuthority [ADVAPI32.62]
426  *
427  * PARAMS
428  *   pSid []
429  */
430 PSID_IDENTIFIER_AUTHORITY WINAPI
431 GetSidIdentifierAuthority( PSID pSid )
432 {
433     return &pSid->IdentifierAuthority;
434 }
435
436 /******************************************************************************
437  * GetSidSubAuthority [ADVAPI32.64]
438  *
439  * PARAMS
440  *   pSid          []
441  *   nSubAuthority []
442  */
443 DWORD * WINAPI
444 GetSidSubAuthority( PSID pSid, DWORD nSubAuthority )
445 {
446     return &pSid->SubAuthority[nSubAuthority];
447 }
448
449 /******************************************************************************
450  * GetSidSubAuthorityCount [ADVAPI32.65]
451  *
452  * PARAMS
453  *   pSid []
454  */
455 BYTE * WINAPI
456 GetSidSubAuthorityCount (PSID pSid)
457 {
458     return &pSid->SubAuthorityCount;
459 }
460
461 /******************************************************************************
462  * GetLengthSid [ADVAPI32.48]
463  *
464  * PARAMS
465  *   pSid []
466  */
467 DWORD WINAPI
468 GetLengthSid (PSID pSid)
469 {
470     return GetSidLengthRequired( * GetSidSubAuthorityCount(pSid) );
471 }
472
473 /******************************************************************************
474  * IsValidSecurityDescriptor [ADVAPI32.79]
475  *
476  * PARAMS
477  *   lpsecdesc []
478  */
479 BOOL32 WINAPI
480 IsValidSecurityDescriptor( PSECURITY_DESCRIPTOR lpsecdesc )
481 {
482         FIXME(advapi,"(%p):stub\n",lpsecdesc);
483         return TRUE;
484 }
485
486 /******************************************************************************
487  * LookupAccountSid32A [ADVAPI32.86]
488  */
489 BOOL32 WINAPI
490 LookupAccountSid32A( LPCSTR system, PSID sid, LPCSTR account,
491                      LPDWORD accountSize, LPCSTR domain, LPDWORD domainSize,
492                      PSID_NAME_USE name_use )
493 {
494         FIXME(security,"(%s,%p,%p,%p,%p,%p,%p): stub\n",
495               system,sid,account,accountSize,domain,domainSize,name_use);
496         SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
497         return FALSE;
498 }
499
500 /******************************************************************************
501  * LookupAccountSid32W [ADVAPI32.87]
502  *
503  * PARAMS
504  *   system      []
505  *   sid         []
506  *   account     []
507  *   accountSize []
508  *   domain      []
509  *   domainSize  []
510  *   name_use    []
511  */
512 BOOL32 WINAPI
513 LookupAccountSid32W( LPCWSTR system, PSID sid, LPCWSTR account, 
514                      LPDWORD accountSize, LPCWSTR domain, LPDWORD domainSize,
515                      PSID_NAME_USE name_use )
516 {
517         FIXME(security,"(%p,%p,%p,%p,%p,%p,%p): stub\n",
518               system,sid,account,accountSize,domain,domainSize,name_use);
519         SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
520         return FALSE;
521 }
522
523 /******************************************************************************
524  * SetFileSecurity32A [ADVAPI32.182]
525  * Sets the security of a file or directory
526  */
527 BOOL32 WINAPI SetFileSecurity32A( LPCSTR lpFileName,
528                                 SECURITY_INFORMATION RequestedInformation,
529                                 PSECURITY_DESCRIPTOR pSecurityDescriptor)
530 {
531   FIXME(advapi, "(%s) : stub\n", debugstr_a(lpFileName));
532   return TRUE;
533 }
534
535 /******************************************************************************
536  * SetFileSecurity32W [ADVAPI32.183]
537  * Sets the security of a file or directory
538  *
539  * PARAMS
540  *   lpFileName           []
541  *   RequestedInformation []
542  *   pSecurityDescriptor  []
543  */
544 BOOL32 WINAPI
545 SetFileSecurity32W( LPCWSTR lpFileName, 
546                     SECURITY_INFORMATION RequestedInformation,
547                     PSECURITY_DESCRIPTOR pSecurityDescriptor )
548 {
549   FIXME(advapi, "(%s) : stub\n", debugstr_w(lpFileName) ); 
550   return TRUE;
551 }
552
553 /******************************************************************************
554  * MakeSelfRelativeSD [ADVAPI32.95]
555  *
556  * PARAMS
557  *   lpabssecdesc  []
558  *   lpselfsecdesc []
559  *   lpbuflen      []
560  */
561 BOOL32 WINAPI
562 MakeSelfRelativeSD( PSECURITY_DESCRIPTOR lpabssecdesc,
563                     PSECURITY_DESCRIPTOR lpselfsecdesc, LPDWORD lpbuflen )
564 {
565         FIXME(advapi,"(%p,%p,%p),stub!\n",lpabssecdesc,lpselfsecdesc,lpbuflen);
566         return TRUE;
567 }
568
569 /******************************************************************************
570  * QueryWindows31FilesMigration [ADVAPI32.266]
571  *
572  * PARAMS
573  *   x1 []
574  */
575 BOOL32 WINAPI
576 QueryWindows31FilesMigration( DWORD x1 )
577 {
578         FIXME(advapi,"(%ld):stub\n",x1);
579         return TRUE;
580 }
581
582 /******************************************************************************
583  * SynchronizeWindows31FilesAndWindowsNTRegistry [ADVAPI32.265]
584  *
585  * PARAMS
586  *   x1 []
587  *   x2 []
588  *   x3 []
589  *   x4 []
590  */
591 BOOL32 WINAPI
592 SynchronizeWindows31FilesAndWindowsNTRegistry( DWORD x1, DWORD x2, DWORD x3,
593                                                DWORD x4 )
594 {
595         FIXME(advapi,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4);
596         return TRUE;
597 }
598
599 /******************************************************************************
600  * LsaOpenPolicy [ADVAPI32.200]
601  *
602  * PARAMS
603  *   x1 []
604  *   x2 []
605  *   x3 []
606  *   x4 []
607  */
608 BOOL32 WINAPI
609 LsaOpenPolicy( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
610 {
611         FIXME(advapi,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4);
612         return 0xc0000000; /* generic error */
613 }
614
615 /******************************************************************************
616  * NotifyBootConfigStatus [ADVAPI32.97]
617  *
618  * PARAMS
619  *   x1 []
620  */
621 BOOL32 WINAPI
622 NotifyBootConfigStatus( DWORD x1 )
623 {
624         FIXME(advapi,"(0x%08lx):stub\n",x1);
625         return 1;
626 }
627
628 /******************************************************************************
629  * GetSecurityDescriptorControl32                       [ADVAPI32]
630  */
631
632 BOOL32 GetSecurityDescriptorControl32 ( PSECURITY_DESCRIPTOR  pSecurityDescriptor,
633                  /* fixme: PSECURITY_DESCRIPTOR_CONTROL*/ LPVOID pControl, LPDWORD lpdwRevision)
634 {       FIXME(advapi,"(%p,%p,%p),stub!\n",pSecurityDescriptor,pControl,lpdwRevision);
635         return 1;
636 }               
637
638 /******************************************************************************
639  * RevertToSelf [ADVAPI32.180]
640  *
641  * PARAMS
642  *   void []
643  */
644 BOOL32 WINAPI
645 RevertToSelf( void )
646 {
647         FIXME(advapi,"(), stub\n");
648         return TRUE;
649 }
650
651 /******************************************************************************
652  * ImpersonateSelf [ADVAPI32.71]
653  */
654 BOOL32 WINAPI
655 ImpersonateSelf32(DWORD/*SECURITY_IMPERSONATION_LEVEL*/ ImpersonationLevel)
656 {
657     FIXME(advapi, "(%08lx), stub\n", ImpersonationLevel);
658     return TRUE;
659 }
660
661 BOOL32 WINAPI
662 AccessCheck32(PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE32 ClientToken, DWORD DesiredAccess, LPVOID/*LPGENERIC_MAPPING*/ GenericMapping, LPVOID/*LPPRIVILEGE_SET*/ PrivilegeSet, LPDWORD PrivilegeSetLength, LPDWORD GrantedAccess, LPBOOL32 AccessStatus)
663 {
664     FIXME(advapi, "(%p, %04x, %08lx, %p, %p, %p, %p, %p), stub\n", pSecurityDescriptor, ClientToken, DesiredAccess, GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccess, AccessStatus);
665     *AccessStatus = TRUE;
666     return TRUE;
667 }