2 * Copyright 1999, 2000 Juergen Schmied <juergen.schmied@debitel.net>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * FIXME: for all functions thunking down to Rtl* functions: implement SetLastError()
28 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(advapi);
32 #define CallWin32ToNt(func) \
35 if (ret !=STATUS_SUCCESS) \
36 { SetLastError (RtlNtStatusToDosError(ret)); return FALSE; } \
40 static void dumpLsaAttributes( PLSA_OBJECT_ATTRIBUTES oa )
44 TRACE("\n\tlength=%lu, rootdir=0x%08x, objectname=%s\n\tattr=0x%08lx, sid=%p qos=%p\n",
45 oa->Length, oa->RootDirectory,
46 oa->ObjectName?debugstr_w(oa->ObjectName->Buffer):"null",
47 oa->Attributes, oa->SecurityDescriptor, oa->SecurityQualityOfService);
51 /* ##############################
52 ###### TOKEN FUNCTIONS ######
53 ##############################
56 /******************************************************************************
57 * OpenProcessToken [ADVAPI32.@]
58 * Opens the access token associated with a process
61 * ProcessHandle [I] Handle to process
62 * DesiredAccess [I] Desired access to process
63 * TokenHandle [O] Pointer to handle of open access token
68 OpenProcessToken( HANDLE ProcessHandle, DWORD DesiredAccess,
71 CallWin32ToNt(NtOpenProcessToken( ProcessHandle, DesiredAccess, TokenHandle ));
74 /******************************************************************************
75 * OpenThreadToken [ADVAPI32.@]
84 OpenThreadToken( HANDLE ThreadHandle, DWORD DesiredAccess,
85 BOOL OpenAsSelf, HANDLE *TokenHandle)
87 CallWin32ToNt (NtOpenThreadToken(ThreadHandle, DesiredAccess, OpenAsSelf, TokenHandle));
90 /******************************************************************************
91 * AdjustTokenPrivileges [ADVAPI32.@]
95 * DisableAllPrivileges []
102 AdjustTokenPrivileges( HANDLE TokenHandle, BOOL DisableAllPrivileges,
103 LPVOID NewState, DWORD BufferLength,
104 LPVOID PreviousState, LPDWORD ReturnLength )
106 CallWin32ToNt(NtAdjustPrivilegesToken(TokenHandle, DisableAllPrivileges, NewState, BufferLength, PreviousState, ReturnLength));
109 /******************************************************************************
110 * CheckTokenMembership [ADVAPI32.@]
118 CheckTokenMembership( HANDLE TokenHandle, PSID SidToCheck,
121 FIXME("(0x%08x %p %p) stub!\n", TokenHandle, SidToCheck, IsMember);
127 /******************************************************************************
128 * GetTokenInformation [ADVAPI32.@]
139 GetTokenInformation( HANDLE token, TOKEN_INFORMATION_CLASS tokeninfoclass,
140 LPVOID tokeninfo, DWORD tokeninfolength, LPDWORD retlen )
142 CallWin32ToNt (NtQueryInformationToken( token, tokeninfoclass, tokeninfo, tokeninfolength, retlen));
145 /*************************************************************************
146 * SetThreadToken [ADVAPI32.@]
148 * Assigns an "impersonation token" to a thread so it can assume the
149 * security privledges of another thread or process. Can also remove
150 * a previously assigned token. Only supported on NT - it's a stub
151 * exactly like this one on Win9X.
155 BOOL WINAPI SetThreadToken(PHANDLE thread, HANDLE token)
157 FIXME("(%p, %x): stub (NT impl. only)\n", thread, token);
159 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
164 /* ##############################
165 ###### SID FUNCTIONS ######
166 ##############################
169 /******************************************************************************
170 * AllocateAndInitializeSid [ADVAPI32.@]
173 * pIdentifierAuthority []
174 * nSubAuthorityCount []
186 AllocateAndInitializeSid( PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
187 BYTE nSubAuthorityCount,
188 DWORD nSubAuthority0, DWORD nSubAuthority1,
189 DWORD nSubAuthority2, DWORD nSubAuthority3,
190 DWORD nSubAuthority4, DWORD nSubAuthority5,
191 DWORD nSubAuthority6, DWORD nSubAuthority7,
194 CallWin32ToNt (RtlAllocateAndInitializeSid(
195 pIdentifierAuthority, nSubAuthorityCount,
196 nSubAuthority0, nSubAuthority1, nSubAuthority2, nSubAuthority3,
197 nSubAuthority4, nSubAuthority5, nSubAuthority6, nSubAuthority7,
201 /******************************************************************************
202 * FreeSid [ADVAPI32.@]
211 return NULL; /* is documented like this */
214 /******************************************************************************
215 * CopySid [ADVAPI32.@]
218 * nDestinationSidLength []
223 CopySid( DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid )
225 return RtlCopySid(nDestinationSidLength, pDestinationSid, pSourceSid);
228 /******************************************************************************
229 * IsValidSid [ADVAPI32.@]
235 IsValidSid( PSID pSid )
237 return RtlValidSid( pSid );
240 /******************************************************************************
241 * EqualSid [ADVAPI32.@]
248 EqualSid( PSID pSid1, PSID pSid2 )
250 return RtlEqualSid( pSid1, pSid2 );
253 /******************************************************************************
254 * EqualPrefixSid [ADVAPI32.@]
256 BOOL WINAPI EqualPrefixSid (PSID pSid1, PSID pSid2)
258 return RtlEqualPrefixSid(pSid1, pSid2);
261 /******************************************************************************
262 * GetSidLengthRequired [ADVAPI32.@]
265 * nSubAuthorityCount []
268 GetSidLengthRequired( BYTE nSubAuthorityCount )
270 return RtlLengthRequiredSid(nSubAuthorityCount);
273 /******************************************************************************
274 * InitializeSid [ADVAPI32.@]
277 * pIdentifierAuthority []
282 PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
283 BYTE nSubAuthorityCount)
285 return RtlInitializeSid(pSid, pIdentifierAuthority, nSubAuthorityCount);
288 /******************************************************************************
289 * GetSidIdentifierAuthority [ADVAPI32.@]
294 PSID_IDENTIFIER_AUTHORITY WINAPI
295 GetSidIdentifierAuthority( PSID pSid )
297 return RtlIdentifierAuthoritySid(pSid);
300 /******************************************************************************
301 * GetSidSubAuthority [ADVAPI32.@]
308 GetSidSubAuthority( PSID pSid, DWORD nSubAuthority )
310 return RtlSubAuthoritySid(pSid, nSubAuthority);
313 /******************************************************************************
314 * GetSidSubAuthorityCount [ADVAPI32.@]
320 GetSidSubAuthorityCount (PSID pSid)
322 return RtlSubAuthorityCountSid(pSid);
325 /******************************************************************************
326 * GetLengthSid [ADVAPI32.@]
332 GetLengthSid (PSID pSid)
334 return RtlLengthSid(pSid);
337 /* ##############################################
338 ###### SECURITY DESCRIPTOR FUNCTIONS ######
339 ##############################################
342 /******************************************************************************
343 * InitializeSecurityDescriptor [ADVAPI32.@]
350 InitializeSecurityDescriptor( SECURITY_DESCRIPTOR *pDescr, DWORD revision )
352 CallWin32ToNt (RtlCreateSecurityDescriptor(pDescr, revision ));
355 /******************************************************************************
356 * GetSecurityDescriptorLength [ADVAPI32.@]
358 DWORD WINAPI GetSecurityDescriptorLength( SECURITY_DESCRIPTOR *pDescr)
360 return (RtlLengthSecurityDescriptor(pDescr));
363 /******************************************************************************
364 * GetSecurityDescriptorOwner [ADVAPI32.@]
368 * lpbOwnerDefaulted []
371 GetSecurityDescriptorOwner( SECURITY_DESCRIPTOR *pDescr, PSID *pOwner,
372 LPBOOL lpbOwnerDefaulted )
374 CallWin32ToNt (RtlGetOwnerSecurityDescriptor( pDescr, pOwner, (PBOOLEAN)lpbOwnerDefaulted ));
377 /******************************************************************************
378 * SetSecurityDescriptorOwner [ADVAPI32.@]
382 BOOL WINAPI SetSecurityDescriptorOwner( PSECURITY_DESCRIPTOR pSecurityDescriptor,
383 PSID pOwner, BOOL bOwnerDefaulted)
385 CallWin32ToNt (RtlSetOwnerSecurityDescriptor(pSecurityDescriptor, pOwner, bOwnerDefaulted));
387 /******************************************************************************
388 * GetSecurityDescriptorGroup [ADVAPI32.@]
390 BOOL WINAPI GetSecurityDescriptorGroup(
391 PSECURITY_DESCRIPTOR SecurityDescriptor,
393 LPBOOL GroupDefaulted)
395 CallWin32ToNt (RtlGetGroupSecurityDescriptor(SecurityDescriptor, Group, (PBOOLEAN)GroupDefaulted));
397 /******************************************************************************
398 * SetSecurityDescriptorGroup [ADVAPI32.@]
400 BOOL WINAPI SetSecurityDescriptorGroup ( PSECURITY_DESCRIPTOR SecurityDescriptor,
401 PSID Group, BOOL GroupDefaulted)
403 CallWin32ToNt (RtlSetGroupSecurityDescriptor( SecurityDescriptor, Group, GroupDefaulted));
406 /******************************************************************************
407 * IsValidSecurityDescriptor [ADVAPI32.@]
413 IsValidSecurityDescriptor( PSECURITY_DESCRIPTOR SecurityDescriptor )
415 CallWin32ToNt (RtlValidSecurityDescriptor(SecurityDescriptor));
418 /******************************************************************************
419 * GetSecurityDescriptorDacl [ADVAPI32.@]
421 BOOL WINAPI GetSecurityDescriptorDacl(
422 IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
423 OUT LPBOOL lpbDaclPresent,
425 OUT LPBOOL lpbDaclDefaulted)
427 CallWin32ToNt (RtlGetDaclSecurityDescriptor(pSecurityDescriptor, (PBOOLEAN)lpbDaclPresent,
428 pDacl, (PBOOLEAN)lpbDaclDefaulted));
431 /******************************************************************************
432 * SetSecurityDescriptorDacl [ADVAPI32.@]
435 SetSecurityDescriptorDacl (
436 PSECURITY_DESCRIPTOR lpsd,
441 CallWin32ToNt (RtlSetDaclSecurityDescriptor (lpsd, daclpresent, dacl, dacldefaulted ));
443 /******************************************************************************
444 * GetSecurityDescriptorSacl [ADVAPI32.@]
446 BOOL WINAPI GetSecurityDescriptorSacl(
447 IN PSECURITY_DESCRIPTOR lpsd,
448 OUT LPBOOL lpbSaclPresent,
450 OUT LPBOOL lpbSaclDefaulted)
452 CallWin32ToNt (RtlGetSaclSecurityDescriptor(lpsd,
453 (PBOOLEAN)lpbSaclPresent, pSacl, (PBOOLEAN)lpbSaclDefaulted));
456 /**************************************************************************
457 * SetSecurityDescriptorSacl [ADVAPI32.@]
459 BOOL WINAPI SetSecurityDescriptorSacl (
460 PSECURITY_DESCRIPTOR lpsd,
465 CallWin32ToNt (RtlSetSaclSecurityDescriptor(lpsd, saclpresent, lpsacl, sacldefaulted));
467 /******************************************************************************
468 * MakeSelfRelativeSD [ADVAPI32.@]
477 IN PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
478 IN PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
479 IN OUT LPDWORD lpdwBufferLength)
481 CallWin32ToNt (RtlMakeSelfRelativeSD(pAbsoluteSecurityDescriptor,pSelfRelativeSecurityDescriptor, lpdwBufferLength));
484 /******************************************************************************
485 * GetSecurityDescriptorControl [ADVAPI32.@]
488 BOOL WINAPI GetSecurityDescriptorControl ( PSECURITY_DESCRIPTOR pSecurityDescriptor,
489 PSECURITY_DESCRIPTOR_CONTROL pControl, LPDWORD lpdwRevision)
491 CallWin32ToNt (RtlGetControlSecurityDescriptor(pSecurityDescriptor,pControl,lpdwRevision));
494 /* ##############################
495 ###### ACL FUNCTIONS ######
496 ##############################
499 /*************************************************************************
500 * InitializeAcl [ADVAPI32.@]
502 DWORD WINAPI InitializeAcl(PACL acl, DWORD size, DWORD rev)
504 CallWin32ToNt (RtlCreateAcl(acl, size, rev));
507 /* ##############################
508 ###### MISC FUNCTIONS ######
509 ##############################
512 /******************************************************************************
513 * LookupPrivilegeValueW [ADVAPI32.@]
514 * Retrieves LUID used on a system to represent the privilege name.
517 * lpLuid should be PLUID
520 * lpSystemName [I] Address of string specifying the system
521 * lpName [I] Address of string specifying the privilege
522 * lpLuid [I] Address of locally unique identifier
527 LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, LPVOID lpLuid )
529 FIXME("(%s,%s,%p): stub\n",debugstr_w(lpSystemName),
530 debugstr_w(lpName), lpLuid);
534 /******************************************************************************
535 * LookupPrivilegeValueA [ADVAPI32.@]
538 LookupPrivilegeValueA( LPCSTR lpSystemName, LPCSTR lpName, LPVOID lpLuid )
540 LPWSTR lpSystemNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpSystemName);
541 LPWSTR lpNameW = HEAP_strdupAtoW(GetProcessHeap(), 0, lpName);
544 ret = LookupPrivilegeValueW( lpSystemNameW, lpNameW, lpLuid);
545 HeapFree(GetProcessHeap(), 0, lpNameW);
546 HeapFree(GetProcessHeap(), 0, lpSystemNameW);
550 /******************************************************************************
551 * GetFileSecurityA [ADVAPI32.@]
553 * Obtains Specified information about the security of a file or directory
554 * The information obtained is constrained by the callers access rights and
558 GetFileSecurityA( LPCSTR lpFileName,
559 SECURITY_INFORMATION RequestedInformation,
560 PSECURITY_DESCRIPTOR pSecurityDescriptor,
561 DWORD nLength, LPDWORD lpnLengthNeeded )
563 FIXME("(%s) : stub\n", debugstr_a(lpFileName));
567 /******************************************************************************
568 * GetFileSecurityW [ADVAPI32.@]
570 * Obtains Specified information about the security of a file or directory
571 * The information obtained is constrained by the callers access rights and
576 * RequestedInformation []
577 * pSecurityDescriptor []
582 GetFileSecurityW( LPCWSTR lpFileName,
583 SECURITY_INFORMATION RequestedInformation,
584 PSECURITY_DESCRIPTOR pSecurityDescriptor,
585 DWORD nLength, LPDWORD lpnLengthNeeded )
587 FIXME("(%s) : stub\n", debugstr_w(lpFileName) );
592 /******************************************************************************
593 * LookupAccountSidA [ADVAPI32.@]
600 IN OUT LPDWORD accountSize,
602 IN OUT LPDWORD domainSize,
603 OUT PSID_NAME_USE name_use )
605 static const char ac[] = "Administrator";
606 static const char dm[] = "DOMAIN";
607 FIXME("(%s,sid=%p,%p,%p(%lu),%p,%p(%lu),%p): semi-stub\n",
608 debugstr_a(system),sid,
609 account,accountSize,accountSize?*accountSize:0,
610 domain,domainSize,domainSize?*domainSize:0,
613 if (accountSize) *accountSize = strlen(ac)+1;
614 if (account && (*accountSize > strlen(ac)))
617 if (domainSize) *domainSize = strlen(dm)+1;
618 if (domain && (*domainSize > strlen(dm)))
621 if (name_use) *name_use = SidTypeUser;
625 /******************************************************************************
626 * LookupAccountSidW [ADVAPI32.@]
642 IN OUT LPDWORD accountSize,
644 IN OUT LPDWORD domainSize,
645 OUT PSID_NAME_USE name_use )
647 static const WCHAR ac[] = {'A','d','m','i','n','i','s','t','r','a','t','o','r',0};
648 static const WCHAR dm[] = {'D','O','M','A','I','N',0};
649 FIXME("(%s,sid=%p,%p,%p(%lu),%p,%p(%lu),%p): semi-stub\n",
650 debugstr_w(system),sid,
651 account,accountSize,accountSize?*accountSize:0,
652 domain,domainSize,domainSize?*domainSize:0,
655 if (accountSize) *accountSize = strlenW(ac)+1;
656 if (account && (*accountSize > strlenW(ac)))
657 strcpyW(account, ac);
659 if (domainSize) *domainSize = strlenW(dm)+1;
660 if (domain && (*domainSize > strlenW(dm)))
663 if (name_use) *name_use = SidTypeUser;
667 /******************************************************************************
668 * SetFileSecurityA [ADVAPI32.@]
669 * Sets the security of a file or directory
671 BOOL WINAPI SetFileSecurityA( LPCSTR lpFileName,
672 SECURITY_INFORMATION RequestedInformation,
673 PSECURITY_DESCRIPTOR pSecurityDescriptor)
675 FIXME("(%s) : stub\n", debugstr_a(lpFileName));
679 /******************************************************************************
680 * SetFileSecurityW [ADVAPI32.@]
681 * Sets the security of a file or directory
685 * RequestedInformation []
686 * pSecurityDescriptor []
689 SetFileSecurityW( LPCWSTR lpFileName,
690 SECURITY_INFORMATION RequestedInformation,
691 PSECURITY_DESCRIPTOR pSecurityDescriptor )
693 FIXME("(%s) : stub\n", debugstr_w(lpFileName) );
697 /******************************************************************************
698 * QueryWindows31FilesMigration [ADVAPI32.@]
704 QueryWindows31FilesMigration( DWORD x1 )
706 FIXME("(%ld):stub\n",x1);
710 /******************************************************************************
711 * SynchronizeWindows31FilesAndWindowsNTRegistry [ADVAPI32.@]
720 SynchronizeWindows31FilesAndWindowsNTRegistry( DWORD x1, DWORD x2, DWORD x3,
723 FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4);
727 /******************************************************************************
728 * LsaOpenPolicy [ADVAPI32.@]
738 IN PLSA_UNICODE_STRING SystemName,
739 IN PLSA_OBJECT_ATTRIBUTES ObjectAttributes,
740 IN ACCESS_MASK DesiredAccess,
741 IN OUT PLSA_HANDLE PolicyHandle)
743 FIXME("(%s,%p,0x%08lx,%p):stub\n",
744 SystemName?debugstr_w(SystemName->Buffer):"null",
745 ObjectAttributes, DesiredAccess, PolicyHandle);
746 dumpLsaAttributes(ObjectAttributes);
747 if(PolicyHandle) *PolicyHandle = (LSA_HANDLE)0xcafe;
751 /******************************************************************************
752 * LsaQueryInformationPolicy [ADVAPI32.@]
755 LsaQueryInformationPolicy(
756 IN LSA_HANDLE PolicyHandle,
757 IN POLICY_INFORMATION_CLASS InformationClass,
760 FIXME("(%p,0x%08x,%p):stub\n",
761 PolicyHandle, InformationClass, Buffer);
763 if(!Buffer) return FALSE;
764 switch (InformationClass)
766 case PolicyAuditEventsInformation: /* 2 */
768 PPOLICY_AUDIT_EVENTS_INFO p = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(POLICY_AUDIT_EVENTS_INFO));
769 p->AuditingMode = FALSE; /* no auditing */
773 case PolicyPrimaryDomainInformation: /* 3 */
774 case PolicyAccountDomainInformation: /* 5 */
777 { POLICY_PRIMARY_DOMAIN_INFO ppdi;
780 SID_IDENTIFIER_AUTHORITY localSidAuthority = {SECURITY_NT_AUTHORITY};
782 struct di * xdi = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(xdi));
783 RtlInitUnicodeString(&(xdi->ppdi.Name), HEAP_strdupAtoW(GetProcessHeap(),0,"DOMAIN"));
784 xdi->ppdi.Sid = &(xdi->sid);
785 xdi->sid.Revision = SID_REVISION;
786 xdi->sid.SubAuthorityCount = 1;
787 xdi->sid.IdentifierAuthority = localSidAuthority;
788 xdi->sid.SubAuthority[0] = SECURITY_LOCAL_SYSTEM_RID;
792 case PolicyAuditLogInformation:
793 case PolicyPdAccountInformation:
794 case PolicyLsaServerRoleInformation:
795 case PolicyReplicaSourceInformation:
796 case PolicyDefaultQuotaInformation:
797 case PolicyModificationInformation:
798 case PolicyAuditFullSetInformation:
799 case PolicyAuditFullQueryInformation:
800 case PolicyDnsDomainInformation:
802 FIXME("category not implemented\n");
809 /******************************************************************************
810 * LsaLookupSids [ADVAPI32.@]
815 LSA_UNICODE_STRING Name;
817 } LSA_TRANSLATED_NAME, *PLSA_TRANSLATED_NAME;
821 LSA_UNICODE_STRING Name;
823 } LSA_TRUST_INFORMATION, *PLSA_TRUST_INFORMATION;
828 PLSA_TRUST_INFORMATION Domains;
829 } LSA_REFERENCED_DOMAIN_LIST, *PLSA_REFERENCED_DOMAIN_LIST;
833 IN LSA_HANDLE PolicyHandle,
836 OUT PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains,
837 OUT PLSA_TRANSLATED_NAME *Names )
839 FIXME("%p %lu %p %p %p\n",
840 PolicyHandle, Count, Sids, ReferencedDomains, Names);
844 /******************************************************************************
845 * LsaFreeMemory [ADVAPI32.@]
848 LsaFreeMemory(IN PVOID Buffer)
850 TRACE("(%p)\n",Buffer);
851 return HeapFree(GetProcessHeap(), 0, Buffer);
853 /******************************************************************************
854 * LsaClose [ADVAPI32.@]
857 LsaClose(IN LSA_HANDLE ObjectHandle)
859 FIXME("(%p):stub\n",ObjectHandle);
862 /******************************************************************************
863 * NotifyBootConfigStatus [ADVAPI32.@]
869 NotifyBootConfigStatus( DWORD x1 )
871 FIXME("(0x%08lx):stub\n",x1);
875 /******************************************************************************
876 * RevertToSelf [ADVAPI32.@]
888 /******************************************************************************
889 * ImpersonateSelf [ADVAPI32.@]
892 ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)
894 return RtlImpersonateSelf(ImpersonationLevel);
897 /******************************************************************************
898 * ImpersonateLoggedOnUser [ADVAPI32.@]
900 BOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken)
902 FIXME("(%08x):stub returning FALSE\n", hToken);
906 /******************************************************************************
907 * AccessCheck [ADVAPI32.@]
909 * FIXME check cast LPBOOL to PBOOLEAN
913 PSECURITY_DESCRIPTOR SecurityDescriptor,
916 PGENERIC_MAPPING GenericMapping,
917 PPRIVILEGE_SET PrivilegeSet,
918 LPDWORD PrivilegeSetLength,
919 LPDWORD GrantedAccess,
922 CallWin32ToNt (NtAccessCheck(SecurityDescriptor, ClientToken, DesiredAccess,
923 GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccess, (PBOOLEAN)AccessStatus));
926 /*************************************************************************
927 * SetKernelObjectSecurity [ADVAPI32.@]
929 BOOL WINAPI SetKernelObjectSecurity (
931 IN SECURITY_INFORMATION SecurityInformation,
932 IN PSECURITY_DESCRIPTOR SecurityDescriptor )
934 CallWin32ToNt (NtSetSecurityObject (Handle, SecurityInformation, SecurityDescriptor));
937 /******************************************************************************
938 * AddAccessAllowedAce [ADVAPI32.@]
940 BOOL WINAPI AddAccessAllowedAce(
942 IN DWORD dwAceRevision,
946 return RtlAddAccessAllowedAce(pAcl, dwAceRevision, AccessMask, pSid);
949 /******************************************************************************
950 * LookupAccountNameA [ADVAPI32.@]
958 LPSTR ReferencedDomainName,
959 IN OUT LPDWORD cbReferencedDomainName,
960 OUT PSID_NAME_USE name_use )
962 FIXME("(%s,%s,%p,%p,%p,%p,%p), stub.\n",system,account,sid,cbSid,ReferencedDomainName,cbReferencedDomainName,name_use);
966 /******************************************************************************
967 * GetAce [ADVAPI32.@]
969 BOOL WINAPI GetAce(PACL pAcl,DWORD dwAceIndex,LPVOID *pAce )
971 CallWin32ToNt(RtlGetAce(pAcl, dwAceIndex, pAce));
974 /******************************************************************************
975 * PrivilegeCheck [ADVAPI32.@]
977 BOOL WINAPI PrivilegeCheck( HANDLE ClientToken, PPRIVILEGE_SET RequiredPrivileges, LPBOOL pfResult)
979 FIXME("stub %d %p %p\n", ClientToken, RequiredPrivileges, pfResult);