New debug scheme with explicit debug channels declaration.
[wine/hacks.git] / dlls / advapi32 / security.c
blob5f605f343ba4b30444dfa296fe0caca29746731c
1 /*
2 * dlls/advapi32/security.c
3 * FIXME: for all functions thunking down to Rtl* functions: implement SetLastError()
4 */
5 #include <string.h>
7 #include "windef.h"
8 #include "winreg.h"
9 #include "winerror.h"
10 #include "heap.h"
11 #include "ntddk.h"
12 #include "debug.h"
14 DECLARE_DEBUG_CHANNEL(advapi)
15 DECLARE_DEBUG_CHANNEL(security)
17 #define CallWin32ToNt(func) \
18 { NTSTATUS ret; \
19 ret = (func); \
20 if (ret !=STATUS_SUCCESS) \
21 { SetLastError (RtlNtStatusToDosError(ret)); return FALSE; } \
22 return TRUE; \
25 /* FIXME: move it to a header */
26 BOOL WINAPI IsValidSid (PSID pSid);
27 BOOL WINAPI EqualSid (PSID pSid1, PSID pSid2);
28 BOOL WINAPI EqualPrefixSid (PSID pSid1, PSID pSid2);
29 DWORD WINAPI GetSidLengthRequired (BYTE nSubAuthorityCount);
30 BOOL 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);
31 VOID* WINAPI FreeSid(PSID pSid);
32 BOOL WINAPI InitializeSid (PSID pSid, PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount);
33 PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID pSid);
34 DWORD* WINAPI GetSidSubAuthority(PSID pSid, DWORD nSubAuthority);
35 BYTE* WINAPI GetSidSubAuthorityCount(PSID pSid);
36 DWORD WINAPI GetLengthSid(PSID pSid);
37 BOOL WINAPI CopySid(DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid);
39 /* ##############################
40 ###### TOKEN FUNCTIONS ######
41 ##############################
44 /******************************************************************************
45 * OpenProcessToken [ADVAPI32.109]
46 * Opens the access token associated with a process
48 * PARAMS
49 * ProcessHandle [I] Handle to process
50 * DesiredAccess [I] Desired access to process
51 * TokenHandle [O] Pointer to handle of open access token
53 * RETURNS STD
55 BOOL WINAPI
56 OpenProcessToken( HANDLE ProcessHandle, DWORD DesiredAccess,
57 HANDLE *TokenHandle )
59 CallWin32ToNt(NtOpenProcessToken( ProcessHandle, DesiredAccess, TokenHandle ));
62 /******************************************************************************
63 * OpenThreadToken [ADVAPI32.114]
65 * PARAMS
66 * thread []
67 * desiredaccess []
68 * openasself []
69 * thandle []
71 BOOL WINAPI
72 OpenThreadToken( HANDLE ThreadHandle, DWORD DesiredAccess,
73 BOOL OpenAsSelf, HANDLE *TokenHandle)
75 CallWin32ToNt (NtOpenThreadToken(ThreadHandle, DesiredAccess, OpenAsSelf, TokenHandle));
78 /******************************************************************************
79 * AdjustTokenPrivileges [ADVAPI32.10]
81 * PARAMS
82 * TokenHandle []
83 * DisableAllPrivileges []
84 * NewState []
85 * BufferLength []
86 * PreviousState []
87 * ReturnLength []
89 BOOL WINAPI
90 AdjustTokenPrivileges( HANDLE TokenHandle, BOOL DisableAllPrivileges,
91 LPVOID NewState, DWORD BufferLength,
92 LPVOID PreviousState, LPDWORD ReturnLength )
94 CallWin32ToNt(NtAdjustPrivilegesToken(TokenHandle, DisableAllPrivileges, NewState, BufferLength, PreviousState, ReturnLength));
97 /******************************************************************************
98 * GetTokenInformation [ADVAPI32.66]
100 * PARAMS
101 * token []
102 * tokeninfoclass []
103 * tokeninfo []
104 * tokeninfolength []
105 * retlen []
108 BOOL WINAPI
109 GetTokenInformation( HANDLE token, TOKEN_INFORMATION_CLASS tokeninfoclass,
110 LPVOID tokeninfo, DWORD tokeninfolength, LPDWORD retlen )
112 CallWin32ToNt (NtQueryInformationToken( token, tokeninfoclass, tokeninfo, tokeninfolength, retlen));
115 /* ##############################
116 ###### SID FUNCTIONS ######
117 ##############################
120 /******************************************************************************
121 * AllocateAndInitializeSid [ADVAPI32.11]
123 * PARAMS
124 * pIdentifierAuthority []
125 * nSubAuthorityCount []
126 * nSubAuthority0 []
127 * nSubAuthority1 []
128 * nSubAuthority2 []
129 * nSubAuthority3 []
130 * nSubAuthority4 []
131 * nSubAuthority5 []
132 * nSubAuthority6 []
133 * nSubAuthority7 []
134 * pSid []
136 BOOL WINAPI
137 AllocateAndInitializeSid( PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
138 BYTE nSubAuthorityCount,
139 DWORD nSubAuthority0, DWORD nSubAuthority1,
140 DWORD nSubAuthority2, DWORD nSubAuthority3,
141 DWORD nSubAuthority4, DWORD nSubAuthority5,
142 DWORD nSubAuthority6, DWORD nSubAuthority7,
143 PSID *pSid )
145 if (!(*pSid = HeapAlloc( GetProcessHeap(), 0,
146 GetSidLengthRequired(nSubAuthorityCount))))
147 return FALSE;
148 (*pSid)->Revision = SID_REVISION;
149 if (pIdentifierAuthority)
150 memcpy(&(*pSid)->IdentifierAuthority, pIdentifierAuthority,
151 sizeof (SID_IDENTIFIER_AUTHORITY));
152 *GetSidSubAuthorityCount(*pSid) = nSubAuthorityCount;
154 if (nSubAuthorityCount > 0)
155 *GetSidSubAuthority(*pSid, 0) = nSubAuthority0;
156 if (nSubAuthorityCount > 1)
157 *GetSidSubAuthority(*pSid, 1) = nSubAuthority1;
158 if (nSubAuthorityCount > 2)
159 *GetSidSubAuthority(*pSid, 2) = nSubAuthority2;
160 if (nSubAuthorityCount > 3)
161 *GetSidSubAuthority(*pSid, 3) = nSubAuthority3;
162 if (nSubAuthorityCount > 4)
163 *GetSidSubAuthority(*pSid, 4) = nSubAuthority4;
164 if (nSubAuthorityCount > 5)
165 *GetSidSubAuthority(*pSid, 5) = nSubAuthority5;
166 if (nSubAuthorityCount > 6)
167 *GetSidSubAuthority(*pSid, 6) = nSubAuthority6;
168 if (nSubAuthorityCount > 7)
169 *GetSidSubAuthority(*pSid, 7) = nSubAuthority7;
171 return TRUE;
174 /******************************************************************************
175 * FreeSid [ADVAPI32.42]
177 * PARAMS
178 * pSid []
180 VOID* WINAPI
181 FreeSid( PSID pSid )
183 HeapFree( GetProcessHeap(), 0, pSid );
184 return NULL;
187 /******************************************************************************
188 * CopySid [ADVAPI32.24]
190 * PARAMS
191 * nDestinationSidLength []
192 * pDestinationSid []
193 * pSourceSid []
195 BOOL WINAPI
196 CopySid( DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid )
199 if (!IsValidSid(pSourceSid))
200 return FALSE;
202 if (nDestinationSidLength < GetLengthSid(pSourceSid))
203 return FALSE;
205 memcpy(pDestinationSid, pSourceSid, GetLengthSid(pSourceSid));
207 return TRUE;
210 /******************************************************************************
211 * IsValidSid [ADVAPI32.80]
213 * PARAMS
214 * pSid []
216 BOOL WINAPI
217 IsValidSid( PSID pSid )
219 if (!pSid || pSid->Revision != SID_REVISION)
220 return FALSE;
222 return TRUE;
225 /******************************************************************************
226 * EqualSid [ADVAPI32.40]
228 * PARAMS
229 * pSid1 []
230 * pSid2 []
232 BOOL WINAPI
233 EqualSid( PSID pSid1, PSID pSid2 )
235 if (!IsValidSid(pSid1) || !IsValidSid(pSid2))
236 return FALSE;
238 if (*GetSidSubAuthorityCount(pSid1) != *GetSidSubAuthorityCount(pSid2))
239 return FALSE;
241 if (memcmp(pSid1, pSid2, GetLengthSid(pSid1)) != 0)
242 return FALSE;
244 return TRUE;
247 /******************************************************************************
248 * EqualPrefixSid [ADVAPI32.39]
250 BOOL WINAPI EqualPrefixSid (PSID pSid1, PSID pSid2) {
251 if (!IsValidSid(pSid1) || !IsValidSid(pSid2))
252 return FALSE;
254 if (*GetSidSubAuthorityCount(pSid1) != *GetSidSubAuthorityCount(pSid2))
255 return FALSE;
257 if (memcmp(pSid1, pSid2, GetSidLengthRequired(pSid1->SubAuthorityCount - 1))
258 != 0)
259 return FALSE;
261 return TRUE;
264 /******************************************************************************
265 * GetSidLengthRequired [ADVAPI32.63]
267 * PARAMS
268 * nSubAuthorityCount []
270 DWORD WINAPI
271 GetSidLengthRequired( BYTE nSubAuthorityCount )
273 return sizeof (SID) + (nSubAuthorityCount - 1) * sizeof (DWORD);
276 /******************************************************************************
277 * InitializeSid [ADVAPI32.74]
279 * PARAMS
280 * pIdentifierAuthority []
282 BOOL WINAPI
283 InitializeSid (PSID pSid, PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
284 BYTE nSubAuthorityCount)
286 int i;
288 pSid->Revision = SID_REVISION;
289 if (pIdentifierAuthority)
290 memcpy(&pSid->IdentifierAuthority, pIdentifierAuthority,
291 sizeof (SID_IDENTIFIER_AUTHORITY));
292 *GetSidSubAuthorityCount(pSid) = nSubAuthorityCount;
294 for (i = 0; i < nSubAuthorityCount; i++)
295 *GetSidSubAuthority(pSid, i) = 0;
297 return TRUE;
300 /******************************************************************************
301 * GetSidIdentifierAuthority [ADVAPI32.62]
303 * PARAMS
304 * pSid []
306 PSID_IDENTIFIER_AUTHORITY WINAPI
307 GetSidIdentifierAuthority( PSID pSid )
309 return &pSid->IdentifierAuthority;
312 /******************************************************************************
313 * GetSidSubAuthority [ADVAPI32.64]
315 * PARAMS
316 * pSid []
317 * nSubAuthority []
319 DWORD * WINAPI
320 GetSidSubAuthority( PSID pSid, DWORD nSubAuthority )
322 return &pSid->SubAuthority[nSubAuthority];
325 /******************************************************************************
326 * GetSidSubAuthorityCount [ADVAPI32.65]
328 * PARAMS
329 * pSid []
331 BYTE * WINAPI
332 GetSidSubAuthorityCount (PSID pSid)
334 return &pSid->SubAuthorityCount;
337 /******************************************************************************
338 * GetLengthSid [ADVAPI32.48]
340 * PARAMS
341 * pSid []
343 DWORD WINAPI
344 GetLengthSid (PSID pSid)
346 return GetSidLengthRequired( * GetSidSubAuthorityCount(pSid) );
349 /* ##############################################
350 ###### SECURITY DESCRIPTOR FUNCTIONS ######
351 ##############################################
354 /******************************************************************************
355 * InitializeSecurityDescriptor [ADVAPI32.73]
357 * PARAMS
358 * pDescr []
359 * revision []
361 BOOL WINAPI
362 InitializeSecurityDescriptor( SECURITY_DESCRIPTOR *pDescr, DWORD revision )
364 CallWin32ToNt (RtlCreateSecurityDescriptor(pDescr, revision ));
367 /******************************************************************************
368 * GetSecurityDescriptorLength [ADVAPI32.55]
370 DWORD WINAPI GetSecurityDescriptorLength( SECURITY_DESCRIPTOR *pDescr)
372 return (RtlLengthSecurityDescriptor(pDescr));
375 /******************************************************************************
376 * GetSecurityDescriptorOwner [ADVAPI32.56]
378 * PARAMS
379 * pOwner []
380 * lpbOwnerDefaulted []
382 BOOL WINAPI
383 GetSecurityDescriptorOwner( SECURITY_DESCRIPTOR *pDescr, PSID *pOwner,
384 LPBOOL lpbOwnerDefaulted )
386 CallWin32ToNt (RtlGetOwnerSecurityDescriptor( pDescr, pOwner, (PBOOLEAN)lpbOwnerDefaulted ));
389 /******************************************************************************
390 * SetSecurityDescriptorOwner [ADVAPI32]
392 * PARAMS
394 BOOL SetSecurityDescriptorOwner( PSECURITY_DESCRIPTOR pSecurityDescriptor,
395 PSID pOwner, BOOL bOwnerDefaulted)
397 CallWin32ToNt (RtlSetOwnerSecurityDescriptor(pSecurityDescriptor, pOwner, bOwnerDefaulted));
399 /******************************************************************************
400 * GetSecurityDescriptorGroup [ADVAPI32.54]
402 BOOL WINAPI GetSecurityDescriptorGroup(
403 PSECURITY_DESCRIPTOR SecurityDescriptor,
404 PSID *Group,
405 LPBOOL GroupDefaulted)
407 CallWin32ToNt (RtlGetGroupSecurityDescriptor(SecurityDescriptor, Group, (PBOOLEAN)GroupDefaulted));
409 /******************************************************************************
410 * SetSecurityDescriptorGroup
412 BOOL WINAPI SetSecurityDescriptorGroup ( PSECURITY_DESCRIPTOR SecurityDescriptor,
413 PSID Group, BOOL GroupDefaulted)
415 CallWin32ToNt (RtlSetGroupSecurityDescriptor( SecurityDescriptor, Group, GroupDefaulted));
418 /******************************************************************************
419 * IsValidSecurityDescriptor [ADVAPI32.79]
421 * PARAMS
422 * lpsecdesc []
424 BOOL WINAPI
425 IsValidSecurityDescriptor( PSECURITY_DESCRIPTOR SecurityDescriptor )
427 CallWin32ToNt (RtlValidSecurityDescriptor(SecurityDescriptor));
430 /******************************************************************************
431 * GetSecurityDescriptorDacl [ADVAPI.91]
433 BOOL WINAPI GetSecurityDescriptorDacl(
434 IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
435 OUT LPBOOL lpbDaclPresent,
436 OUT PACL *pDacl,
437 OUT LPBOOL lpbDaclDefaulted)
439 CallWin32ToNt (RtlGetDaclSecurityDescriptor(pSecurityDescriptor, (PBOOLEAN)lpbDaclPresent,
440 pDacl, (PBOOLEAN)lpbDaclDefaulted));
443 /******************************************************************************
444 * SetSecurityDescriptorDacl [ADVAPI.224]
446 BOOL WINAPI
447 SetSecurityDescriptorDacl (
448 PSECURITY_DESCRIPTOR lpsd,
449 BOOL daclpresent,
450 PACL dacl,
451 BOOL dacldefaulted )
453 CallWin32ToNt (RtlSetDaclSecurityDescriptor (lpsd, daclpresent, dacl, dacldefaulted ));
455 /******************************************************************************
456 * GetSecurityDescriptorSacl [ADVAPI.]
458 BOOL WINAPI GetSecurityDescriptorSacl(
459 IN PSECURITY_DESCRIPTOR lpsd,
460 OUT LPBOOL lpbSaclPresent,
461 OUT PACL *pSacl,
462 OUT LPBOOL lpbSaclDefaulted)
464 CallWin32ToNt (RtlGetSaclSecurityDescriptor(lpsd, (PBOOLEAN)lpbSaclPresent,
465 pSacl, (PBOOLEAN)lpbSaclDefaulted));
468 /**************************************************************************
469 * SetSecurityDescriptorSacl [NTDLL.488]
471 BOOL WINAPI SetSecurityDescriptorSacl (
472 PSECURITY_DESCRIPTOR lpsd,
473 BOOL saclpresent,
474 PACL lpsacl,
475 BOOL sacldefaulted)
477 CallWin32ToNt (RtlSetSaclSecurityDescriptor(lpsd, saclpresent, lpsacl, sacldefaulted));
479 /******************************************************************************
480 * MakeSelfRelativeSD [ADVAPI32.95]
482 * PARAMS
483 * lpabssecdesc []
484 * lpselfsecdesc []
485 * lpbuflen []
487 BOOL WINAPI
488 MakeSelfRelativeSD( PSECURITY_DESCRIPTOR lpabssecdesc,
489 PSECURITY_DESCRIPTOR lpselfsecdesc, LPDWORD lpbuflen )
491 FIXME(advapi,"(%p,%p,%p),stub!\n",lpabssecdesc,lpselfsecdesc,lpbuflen);
492 return TRUE;
495 /******************************************************************************
496 * GetSecurityDescriptorControl32 [ADVAPI32]
499 BOOL GetSecurityDescriptorControl ( PSECURITY_DESCRIPTOR pSecurityDescriptor,
500 /* fixme: PSECURITY_DESCRIPTOR_CONTROL*/ LPVOID pControl, LPDWORD lpdwRevision)
501 { FIXME(advapi,"(%p,%p,%p),stub!\n",pSecurityDescriptor,pControl,lpdwRevision);
502 return 1;
505 /* ##############################
506 ###### MISC FUNCTIONS ######
507 ##############################
510 /******************************************************************************
511 * LookupPrivilegeValue32W [ADVAPI32.93]
512 * Retrieves LUID used on a system to represent the privilege name.
514 * NOTES
515 * lpLuid should be PLUID
517 * PARAMS
518 * lpSystemName [I] Address of string specifying the system
519 * lpName [I] Address of string specifying the privilege
520 * lpLuid [I] Address of locally unique identifier
522 * RETURNS STD
524 BOOL WINAPI
525 LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid )
527 FIXME(advapi,"(%s,%s,%p): stub\n",debugstr_w(lpSystemName),
528 debugstr_w(lpName), lpLuid);
529 return TRUE;
532 /******************************************************************************
533 * LookupPrivilegeValue32A [ADVAPI32.92]
535 BOOL WINAPI
536 LookupPrivilegeValueA( LPCSTR lpSystemName, LPCSTR lpName, LPVOID lpLuid )
538 LPWSTR lpSystemNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpSystemName);
539 LPWSTR lpNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpName);
540 BOOL ret = LookupPrivilegeValueW( lpSystemNameW, lpNameW, lpLuid);
541 HeapFree(GetProcessHeap(), 0, lpNameW);
542 HeapFree(GetProcessHeap(), 0, lpSystemNameW);
543 return ret;
546 /******************************************************************************
547 * GetFileSecurity32A [ADVAPI32.45]
549 * Obtains Specified information about the security of a file or directory
550 * The information obtained is constrained by the callers access rights and
551 * privileges
553 BOOL WINAPI
554 GetFileSecurityA( LPCSTR lpFileName,
555 SECURITY_INFORMATION RequestedInformation,
556 PSECURITY_DESCRIPTOR pSecurityDescriptor,
557 DWORD nLength, LPDWORD lpnLengthNeeded )
559 FIXME(advapi, "(%s) : stub\n", debugstr_a(lpFileName));
560 return TRUE;
563 /******************************************************************************
564 * GetFileSecurity32W [ADVAPI32.46]
566 * Obtains Specified information about the security of a file or directory
567 * The information obtained is constrained by the callers access rights and
568 * privileges
570 * PARAMS
571 * lpFileName []
572 * RequestedInformation []
573 * pSecurityDescriptor []
574 * nLength []
575 * lpnLengthNeeded []
577 BOOL WINAPI
578 GetFileSecurityW( LPCWSTR lpFileName,
579 SECURITY_INFORMATION RequestedInformation,
580 PSECURITY_DESCRIPTOR pSecurityDescriptor,
581 DWORD nLength, LPDWORD lpnLengthNeeded )
583 FIXME(advapi, "(%s) : stub\n", debugstr_w(lpFileName) );
584 return TRUE;
588 /******************************************************************************
589 * LookupAccountSid32A [ADVAPI32.86]
591 BOOL WINAPI
592 LookupAccountSidA( LPCSTR system, PSID sid, LPCSTR account,
593 LPDWORD accountSize, LPCSTR domain, LPDWORD domainSize,
594 PSID_NAME_USE name_use )
596 FIXME(security,"(%s,%p,%p,%p,%p,%p,%p): stub\n",
597 system,sid,account,accountSize,domain,domainSize,name_use);
598 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
599 return FALSE;
602 /******************************************************************************
603 * LookupAccountSid32W [ADVAPI32.87]
605 * PARAMS
606 * system []
607 * sid []
608 * account []
609 * accountSize []
610 * domain []
611 * domainSize []
612 * name_use []
614 BOOL WINAPI
615 LookupAccountSidW( LPCWSTR system, PSID sid, LPCWSTR account,
616 LPDWORD accountSize, LPCWSTR domain, LPDWORD domainSize,
617 PSID_NAME_USE name_use )
619 FIXME(security,"(%p,%p,%p,%p,%p,%p,%p): stub\n",
620 system,sid,account,accountSize,domain,domainSize,name_use);
621 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
622 return FALSE;
625 /******************************************************************************
626 * SetFileSecurity32A [ADVAPI32.182]
627 * Sets the security of a file or directory
629 BOOL WINAPI SetFileSecurityA( LPCSTR lpFileName,
630 SECURITY_INFORMATION RequestedInformation,
631 PSECURITY_DESCRIPTOR pSecurityDescriptor)
633 FIXME(advapi, "(%s) : stub\n", debugstr_a(lpFileName));
634 return TRUE;
637 /******************************************************************************
638 * SetFileSecurity32W [ADVAPI32.183]
639 * Sets the security of a file or directory
641 * PARAMS
642 * lpFileName []
643 * RequestedInformation []
644 * pSecurityDescriptor []
646 BOOL WINAPI
647 SetFileSecurityW( LPCWSTR lpFileName,
648 SECURITY_INFORMATION RequestedInformation,
649 PSECURITY_DESCRIPTOR pSecurityDescriptor )
651 FIXME(advapi, "(%s) : stub\n", debugstr_w(lpFileName) );
652 return TRUE;
655 /******************************************************************************
656 * QueryWindows31FilesMigration [ADVAPI32.266]
658 * PARAMS
659 * x1 []
661 BOOL WINAPI
662 QueryWindows31FilesMigration( DWORD x1 )
664 FIXME(advapi,"(%ld):stub\n",x1);
665 return TRUE;
668 /******************************************************************************
669 * SynchronizeWindows31FilesAndWindowsNTRegistry [ADVAPI32.265]
671 * PARAMS
672 * x1 []
673 * x2 []
674 * x3 []
675 * x4 []
677 BOOL WINAPI
678 SynchronizeWindows31FilesAndWindowsNTRegistry( DWORD x1, DWORD x2, DWORD x3,
679 DWORD x4 )
681 FIXME(advapi,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4);
682 return TRUE;
685 /******************************************************************************
686 * LsaOpenPolicy [ADVAPI32.200]
688 * PARAMS
689 * x1 []
690 * x2 []
691 * x3 []
692 * x4 []
694 BOOL WINAPI
695 LsaOpenPolicy( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
697 FIXME(advapi,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4);
698 return 0xc0000000; /* generic error */
701 /******************************************************************************
702 * NotifyBootConfigStatus [ADVAPI32.97]
704 * PARAMS
705 * x1 []
707 BOOL WINAPI
708 NotifyBootConfigStatus( DWORD x1 )
710 FIXME(advapi,"(0x%08lx):stub\n",x1);
711 return 1;
714 /******************************************************************************
715 * RevertToSelf [ADVAPI32.180]
717 * PARAMS
718 * void []
720 BOOL WINAPI
721 RevertToSelf( void )
723 FIXME(advapi,"(), stub\n");
724 return TRUE;
727 /******************************************************************************
728 * ImpersonateSelf [ADVAPI32.71]
730 BOOL WINAPI
731 ImpersonateSelf(DWORD/*SECURITY_IMPERSONATION_LEVEL*/ ImpersonationLevel)
733 FIXME(advapi, "(%08lx), stub\n", ImpersonationLevel);
734 return TRUE;
737 /******************************************************************************
738 * AccessCheck32 [ADVAPI32.71]
740 BOOL WINAPI
741 AccessCheck(PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE ClientToken, DWORD DesiredAccess, LPVOID/*LPGENERIC_MAPPING*/ GenericMapping, LPVOID/*LPPRIVILEGE_SET*/ PrivilegeSet, LPDWORD PrivilegeSetLength, LPDWORD GrantedAccess, LPBOOL AccessStatus)
743 FIXME(advapi, "(%p, %04x, %08lx, %p, %p, %p, %p, %p), stub\n", pSecurityDescriptor, ClientToken, DesiredAccess, GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccess, AccessStatus);
744 *AccessStatus = TRUE;
745 return TRUE;