Set version to 9.
[wine/wine64.git] / dlls / advapi32 / security.c
bloba4614401d85d3b073eeef9db69a01aa781f01af0
1 /*
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()
21 #include <stdarg.h>
22 #include <string.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winerror.h"
27 #include "rpcnterr.h"
28 #include "winreg.h"
29 #include "winternl.h"
30 #include "ntstatus.h"
31 #include "ntsecapi.h"
32 #include "accctrl.h"
34 #include "wine/debug.h"
35 #include "wine/unicode.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(advapi);
39 #define CallWin32ToNt(func) \
40 { NTSTATUS ret; \
41 ret = (func); \
42 if (ret !=STATUS_SUCCESS) \
43 { SetLastError (RtlNtStatusToDosError(ret)); return FALSE; } \
44 return TRUE; \
47 static void dumpLsaAttributes( PLSA_OBJECT_ATTRIBUTES oa )
49 if (oa)
51 TRACE("\n\tlength=%lu, rootdir=%p, objectname=%s\n\tattr=0x%08lx, sid=%p qos=%p\n",
52 oa->Length, oa->RootDirectory,
53 oa->ObjectName?debugstr_w(oa->ObjectName->Buffer):"null",
54 oa->Attributes, oa->SecurityDescriptor, oa->SecurityQualityOfService);
58 /************************************************************
59 * ADVAPI_IsLocalComputer
61 * Checks whether the server name indicates local machine.
63 BOOL ADVAPI_IsLocalComputer(LPCWSTR ServerName)
65 if (!ServerName)
67 return TRUE;
69 else
71 DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1;
72 BOOL Result;
73 LPWSTR buf;
75 buf = HeapAlloc(GetProcessHeap(), 0, dwSize * sizeof(WCHAR));
76 Result = GetComputerNameW(buf, &dwSize);
77 if (Result && (ServerName[0] == '\\') && (ServerName[1] == '\\'))
78 ServerName += 2;
79 Result = Result && !lstrcmpW(ServerName, buf);
80 HeapFree(GetProcessHeap(), 0, buf);
82 return Result;
86 #define ADVAPI_ForceLocalComputer(ServerName, FailureCode) \
87 if (!ADVAPI_IsLocalComputer(ServerName)) \
88 { \
89 FIXME("Action Implemented for local computer only. " \
90 "Requested for server %s\n", debugstr_w(ServerName)); \
91 return FailureCode; \
94 /* ##############################
95 ###### TOKEN FUNCTIONS ######
96 ##############################
99 /******************************************************************************
100 * OpenProcessToken [ADVAPI32.@]
101 * Opens the access token associated with a process handle.
103 * PARAMS
104 * ProcessHandle [I] Handle to process
105 * DesiredAccess [I] Desired access to process
106 * TokenHandle [O] Pointer to handle of open access token
108 * RETURNS
109 * Success: TRUE. TokenHandle contains the access token.
110 * Failure: FALSE.
112 * NOTES
113 * See NtOpenProcessToken.
115 BOOL WINAPI
116 OpenProcessToken( HANDLE ProcessHandle, DWORD DesiredAccess,
117 HANDLE *TokenHandle )
119 CallWin32ToNt(NtOpenProcessToken( ProcessHandle, DesiredAccess, TokenHandle ));
122 /******************************************************************************
123 * OpenThreadToken [ADVAPI32.@]
125 * Opens the access token associated with a thread handle.
127 * PARAMS
128 * ThreadHandle [I] Handle to process
129 * DesiredAccess [I] Desired access to the thread
130 * OpenAsSelf [I] ???
131 * TokenHandle [O] Destination for the token handle
133 * RETURNS
134 * Success: TRUE. TokenHandle contains the access token.
135 * Failure: FALSE.
137 * NOTES
138 * See NtOpenThreadToken.
140 BOOL WINAPI
141 OpenThreadToken( HANDLE ThreadHandle, DWORD DesiredAccess,
142 BOOL OpenAsSelf, HANDLE *TokenHandle)
144 CallWin32ToNt (NtOpenThreadToken(ThreadHandle, DesiredAccess, OpenAsSelf, TokenHandle));
147 /******************************************************************************
148 * AdjustTokenPrivileges [ADVAPI32.@]
150 * Adjust the privileges of an open token handle.
152 * PARAMS
153 * TokenHandle [I] Handle from OpenProcessToken() or OpenThreadToken()
154 * DisableAllPrivileges [I] TRUE=Remove all privileges, FALSE=Use NewState
155 * NewState [I] Desired new privileges of the token
156 * BufferLength [I] Length of NewState
157 * PreviousState [O] Destination for the previous state
158 * ReturnLength [I/O] Size of PreviousState
161 * RETURNS
162 * Success: TRUE. Privileges are set to NewState and PreviousState is updated.
163 * Failure: FALSE.
165 * NOTES
166 * See NtAdjustPrivilegesToken.
168 BOOL WINAPI
169 AdjustTokenPrivileges( HANDLE TokenHandle, BOOL DisableAllPrivileges,
170 LPVOID NewState, DWORD BufferLength,
171 LPVOID PreviousState, LPDWORD ReturnLength )
173 CallWin32ToNt(NtAdjustPrivilegesToken(TokenHandle, DisableAllPrivileges, NewState, BufferLength, PreviousState, ReturnLength));
176 /******************************************************************************
177 * CheckTokenMembership [ADVAPI32.@]
179 * Determine if an access token is a member of a SID.
181 * PARAMS
182 * TokenHandle [I] Handle from OpenProcessToken() or OpenThreadToken()
183 * SidToCheck [I] SID that possibly contains the token
184 * IsMember [O] Destination for result.
186 * RETURNS
187 * Success: TRUE. IsMember is TRUE if TokenHandle is a member, FALSE otherwise.
188 * Failure: FALSE.
190 BOOL WINAPI
191 CheckTokenMembership( HANDLE TokenHandle, PSID SidToCheck,
192 PBOOL IsMember )
194 FIXME("(%p %p %p) stub!\n", TokenHandle, SidToCheck, IsMember);
196 *IsMember = TRUE;
197 return(TRUE);
200 /******************************************************************************
201 * GetTokenInformation [ADVAPI32.@]
203 * PARAMS
204 * token [I] Handle from OpenProcessToken() or OpenThreadToken()
205 * tokeninfoclass [I] A TOKEN_INFORMATION_CLASS from "winnt.h"
206 * tokeninfo [O] Destination for token information
207 * tokeninfolength [I] Length of tokeninfo
208 * retlen [O] Destination for returned token information length
210 * RETURNS
211 * Success: TRUE. tokeninfo contains retlen bytes of token information
212 * Failure: FALSE.
214 * NOTES
215 * See NtQueryInformationToken.
217 BOOL WINAPI
218 GetTokenInformation( HANDLE token, TOKEN_INFORMATION_CLASS tokeninfoclass,
219 LPVOID tokeninfo, DWORD tokeninfolength, LPDWORD retlen )
221 TRACE("(%p, %s, %p, %ld, %p): \n",
222 token,
223 (tokeninfoclass == TokenUser) ? "TokenUser" :
224 (tokeninfoclass == TokenGroups) ? "TokenGroups" :
225 (tokeninfoclass == TokenPrivileges) ? "TokenPrivileges" :
226 (tokeninfoclass == TokenOwner) ? "TokenOwner" :
227 (tokeninfoclass == TokenPrimaryGroup) ? "TokenPrimaryGroup" :
228 (tokeninfoclass == TokenDefaultDacl) ? "TokenDefaultDacl" :
229 (tokeninfoclass == TokenSource) ? "TokenSource" :
230 (tokeninfoclass == TokenType) ? "TokenType" :
231 (tokeninfoclass == TokenImpersonationLevel) ? "TokenImpersonationLevel" :
232 (tokeninfoclass == TokenStatistics) ? "TokenStatistics" :
233 (tokeninfoclass == TokenRestrictedSids) ? "TokenRestrictedSids" :
234 (tokeninfoclass == TokenSessionId) ? "TokenSessionId" :
235 (tokeninfoclass == TokenGroupsAndPrivileges) ? "TokenGroupsAndPrivileges" :
236 (tokeninfoclass == TokenSessionReference) ? "TokenSessionReference" :
237 (tokeninfoclass == TokenSandBoxInert) ? "TokenSandBoxInert" :
238 "Unknown",
239 tokeninfo, tokeninfolength, retlen);
240 CallWin32ToNt (NtQueryInformationToken( token, tokeninfoclass, tokeninfo, tokeninfolength, retlen));
243 /******************************************************************************
244 * SetTokenInformation [ADVAPI32.@]
246 * Set information for an access token.
248 * PARAMS
249 * token [I] Handle from OpenProcessToken() or OpenThreadToken()
250 * tokeninfoclass [I] A TOKEN_INFORMATION_CLASS from "winnt.h"
251 * tokeninfo [I] Token information to set
252 * tokeninfolength [I] Length of tokeninfo
254 * RETURNS
255 * Success: TRUE. The information for the token is set to tokeninfo.
256 * Failure: FALSE.
258 BOOL WINAPI
259 SetTokenInformation( HANDLE token, TOKEN_INFORMATION_CLASS tokeninfoclass,
260 LPVOID tokeninfo, DWORD tokeninfolength )
262 FIXME("(%p, %s, %p, %ld): stub\n",
263 token,
264 (tokeninfoclass == TokenUser) ? "TokenUser" :
265 (tokeninfoclass == TokenGroups) ? "TokenGroups" :
266 (tokeninfoclass == TokenPrivileges) ? "TokenPrivileges" :
267 (tokeninfoclass == TokenOwner) ? "TokenOwner" :
268 (tokeninfoclass == TokenPrimaryGroup) ? "TokenPrimaryGroup" :
269 (tokeninfoclass == TokenDefaultDacl) ? "TokenDefaultDacl" :
270 (tokeninfoclass == TokenSource) ? "TokenSource" :
271 (tokeninfoclass == TokenType) ? "TokenType" :
272 (tokeninfoclass == TokenImpersonationLevel) ? "TokenImpersonationLevel" :
273 (tokeninfoclass == TokenStatistics) ? "TokenStatistics" :
274 (tokeninfoclass == TokenRestrictedSids) ? "TokenRestrictedSids" :
275 (tokeninfoclass == TokenSessionId) ? "TokenSessionId" :
276 (tokeninfoclass == TokenGroupsAndPrivileges) ? "TokenGroupsAndPrivileges" :
277 (tokeninfoclass == TokenSessionReference) ? "TokenSessionReference" :
278 (tokeninfoclass == TokenSandBoxInert) ? "TokenSandBoxInert" :
279 "Unknown",
280 tokeninfo, tokeninfolength);
282 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
284 return FALSE;
287 /*************************************************************************
288 * SetThreadToken [ADVAPI32.@]
290 * Assigns an 'impersonation token' to a thread so it can assume the
291 * security privledges of another thread or process. Can also remove
292 * a previously assigned token.
294 * PARAMS
295 * thread [O] Handle to thread to set the token for
296 * token [I] Token to set
298 * RETURNS
299 * Success: TRUE. The threads access token is set to token
300 * Failure: FALSE.
302 * NOTES
303 * Only supported on NT or higher. On Win9X this function does nothing.
304 * See SetTokenInformation.
306 BOOL WINAPI SetThreadToken(PHANDLE thread, HANDLE token)
308 FIXME("(%p, %p): stub (NT impl. only)\n", thread, token);
310 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
312 return FALSE;
315 /* ##############################
316 ###### SID FUNCTIONS ######
317 ##############################
320 /******************************************************************************
321 * AllocateAndInitializeSid [ADVAPI32.@]
323 * PARAMS
324 * pIdentifierAuthority []
325 * nSubAuthorityCount []
326 * nSubAuthority0 []
327 * nSubAuthority1 []
328 * nSubAuthority2 []
329 * nSubAuthority3 []
330 * nSubAuthority4 []
331 * nSubAuthority5 []
332 * nSubAuthority6 []
333 * nSubAuthority7 []
334 * pSid []
336 BOOL WINAPI
337 AllocateAndInitializeSid( PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
338 BYTE nSubAuthorityCount,
339 DWORD nSubAuthority0, DWORD nSubAuthority1,
340 DWORD nSubAuthority2, DWORD nSubAuthority3,
341 DWORD nSubAuthority4, DWORD nSubAuthority5,
342 DWORD nSubAuthority6, DWORD nSubAuthority7,
343 PSID *pSid )
345 CallWin32ToNt (RtlAllocateAndInitializeSid(
346 pIdentifierAuthority, nSubAuthorityCount,
347 nSubAuthority0, nSubAuthority1, nSubAuthority2, nSubAuthority3,
348 nSubAuthority4, nSubAuthority5, nSubAuthority6, nSubAuthority7,
349 pSid ));
352 /******************************************************************************
353 * FreeSid [ADVAPI32.@]
355 * PARAMS
356 * pSid []
358 PVOID WINAPI
359 FreeSid( PSID pSid )
361 RtlFreeSid(pSid);
362 return NULL; /* is documented like this */
365 /******************************************************************************
366 * CopySid [ADVAPI32.@]
368 * PARAMS
369 * nDestinationSidLength []
370 * pDestinationSid []
371 * pSourceSid []
373 BOOL WINAPI
374 CopySid( DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid )
376 return RtlCopySid(nDestinationSidLength, pDestinationSid, pSourceSid);
379 /******************************************************************************
380 * IsValidSid [ADVAPI32.@]
382 * PARAMS
383 * pSid []
385 BOOL WINAPI
386 IsValidSid( PSID pSid )
388 return RtlValidSid( pSid );
391 /******************************************************************************
392 * EqualSid [ADVAPI32.@]
394 * PARAMS
395 * pSid1 []
396 * pSid2 []
398 BOOL WINAPI
399 EqualSid( PSID pSid1, PSID pSid2 )
401 return RtlEqualSid( pSid1, pSid2 );
404 /******************************************************************************
405 * EqualPrefixSid [ADVAPI32.@]
407 BOOL WINAPI EqualPrefixSid (PSID pSid1, PSID pSid2)
409 return RtlEqualPrefixSid(pSid1, pSid2);
412 /******************************************************************************
413 * GetSidLengthRequired [ADVAPI32.@]
415 * PARAMS
416 * nSubAuthorityCount []
418 DWORD WINAPI
419 GetSidLengthRequired( BYTE nSubAuthorityCount )
421 return RtlLengthRequiredSid(nSubAuthorityCount);
424 /******************************************************************************
425 * InitializeSid [ADVAPI32.@]
427 * PARAMS
428 * pIdentifierAuthority []
430 BOOL WINAPI
431 InitializeSid (
432 PSID pSid,
433 PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
434 BYTE nSubAuthorityCount)
436 return RtlInitializeSid(pSid, pIdentifierAuthority, nSubAuthorityCount);
439 /******************************************************************************
440 * GetSidIdentifierAuthority [ADVAPI32.@]
442 * PARAMS
443 * pSid []
445 PSID_IDENTIFIER_AUTHORITY WINAPI
446 GetSidIdentifierAuthority( PSID pSid )
448 return RtlIdentifierAuthoritySid(pSid);
451 /******************************************************************************
452 * GetSidSubAuthority [ADVAPI32.@]
454 * PARAMS
455 * pSid []
456 * nSubAuthority []
458 PDWORD WINAPI
459 GetSidSubAuthority( PSID pSid, DWORD nSubAuthority )
461 return RtlSubAuthoritySid(pSid, nSubAuthority);
464 /******************************************************************************
465 * GetSidSubAuthorityCount [ADVAPI32.@]
467 * PARAMS
468 * pSid []
470 PUCHAR WINAPI
471 GetSidSubAuthorityCount (PSID pSid)
473 return RtlSubAuthorityCountSid(pSid);
476 /******************************************************************************
477 * GetLengthSid [ADVAPI32.@]
479 * PARAMS
480 * pSid []
482 DWORD WINAPI
483 GetLengthSid (PSID pSid)
485 return RtlLengthSid(pSid);
488 /* ##############################################
489 ###### SECURITY DESCRIPTOR FUNCTIONS ######
490 ##############################################
493 /******************************************************************************
494 * InitializeSecurityDescriptor [ADVAPI32.@]
496 * PARAMS
497 * pDescr []
498 * revision []
500 BOOL WINAPI
501 InitializeSecurityDescriptor( SECURITY_DESCRIPTOR *pDescr, DWORD revision )
503 CallWin32ToNt (RtlCreateSecurityDescriptor(pDescr, revision ));
506 /******************************************************************************
507 * GetSecurityDescriptorLength [ADVAPI32.@]
509 DWORD WINAPI GetSecurityDescriptorLength( SECURITY_DESCRIPTOR *pDescr)
511 return (RtlLengthSecurityDescriptor(pDescr));
514 /******************************************************************************
515 * GetSecurityDescriptorOwner [ADVAPI32.@]
517 * PARAMS
518 * pOwner []
519 * lpbOwnerDefaulted []
521 BOOL WINAPI
522 GetSecurityDescriptorOwner( SECURITY_DESCRIPTOR *pDescr, PSID *pOwner,
523 LPBOOL lpbOwnerDefaulted )
525 CallWin32ToNt (RtlGetOwnerSecurityDescriptor( pDescr, pOwner, (PBOOLEAN)lpbOwnerDefaulted ));
528 /******************************************************************************
529 * SetSecurityDescriptorOwner [ADVAPI32.@]
531 * PARAMS
533 BOOL WINAPI SetSecurityDescriptorOwner( PSECURITY_DESCRIPTOR pSecurityDescriptor,
534 PSID pOwner, BOOL bOwnerDefaulted)
536 CallWin32ToNt (RtlSetOwnerSecurityDescriptor(pSecurityDescriptor, pOwner, bOwnerDefaulted));
538 /******************************************************************************
539 * GetSecurityDescriptorGroup [ADVAPI32.@]
541 BOOL WINAPI GetSecurityDescriptorGroup(
542 PSECURITY_DESCRIPTOR SecurityDescriptor,
543 PSID *Group,
544 LPBOOL GroupDefaulted)
546 CallWin32ToNt (RtlGetGroupSecurityDescriptor(SecurityDescriptor, Group, (PBOOLEAN)GroupDefaulted));
548 /******************************************************************************
549 * SetSecurityDescriptorGroup [ADVAPI32.@]
551 BOOL WINAPI SetSecurityDescriptorGroup ( PSECURITY_DESCRIPTOR SecurityDescriptor,
552 PSID Group, BOOL GroupDefaulted)
554 CallWin32ToNt (RtlSetGroupSecurityDescriptor( SecurityDescriptor, Group, GroupDefaulted));
557 /******************************************************************************
558 * IsValidSecurityDescriptor [ADVAPI32.@]
560 * PARAMS
561 * lpsecdesc []
563 BOOL WINAPI
564 IsValidSecurityDescriptor( PSECURITY_DESCRIPTOR SecurityDescriptor )
566 CallWin32ToNt (RtlValidSecurityDescriptor(SecurityDescriptor));
569 /******************************************************************************
570 * GetSecurityDescriptorDacl [ADVAPI32.@]
572 BOOL WINAPI GetSecurityDescriptorDacl(
573 IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
574 OUT LPBOOL lpbDaclPresent,
575 OUT PACL *pDacl,
576 OUT LPBOOL lpbDaclDefaulted)
578 CallWin32ToNt (RtlGetDaclSecurityDescriptor(pSecurityDescriptor, (PBOOLEAN)lpbDaclPresent,
579 pDacl, (PBOOLEAN)lpbDaclDefaulted));
582 /******************************************************************************
583 * SetSecurityDescriptorDacl [ADVAPI32.@]
585 BOOL WINAPI
586 SetSecurityDescriptorDacl (
587 PSECURITY_DESCRIPTOR lpsd,
588 BOOL daclpresent,
589 PACL dacl,
590 BOOL dacldefaulted )
592 CallWin32ToNt (RtlSetDaclSecurityDescriptor (lpsd, daclpresent, dacl, dacldefaulted ));
594 /******************************************************************************
595 * GetSecurityDescriptorSacl [ADVAPI32.@]
597 BOOL WINAPI GetSecurityDescriptorSacl(
598 IN PSECURITY_DESCRIPTOR lpsd,
599 OUT LPBOOL lpbSaclPresent,
600 OUT PACL *pSacl,
601 OUT LPBOOL lpbSaclDefaulted)
603 CallWin32ToNt (RtlGetSaclSecurityDescriptor(lpsd,
604 (PBOOLEAN)lpbSaclPresent, pSacl, (PBOOLEAN)lpbSaclDefaulted));
607 /**************************************************************************
608 * SetSecurityDescriptorSacl [ADVAPI32.@]
610 BOOL WINAPI SetSecurityDescriptorSacl (
611 PSECURITY_DESCRIPTOR lpsd,
612 BOOL saclpresent,
613 PACL lpsacl,
614 BOOL sacldefaulted)
616 CallWin32ToNt (RtlSetSaclSecurityDescriptor(lpsd, saclpresent, lpsacl, sacldefaulted));
618 /******************************************************************************
619 * MakeSelfRelativeSD [ADVAPI32.@]
621 * PARAMS
622 * lpabssecdesc []
623 * lpselfsecdesc []
624 * lpbuflen []
626 BOOL WINAPI
627 MakeSelfRelativeSD(
628 IN PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
629 IN PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
630 IN OUT LPDWORD lpdwBufferLength)
632 CallWin32ToNt (RtlMakeSelfRelativeSD(pAbsoluteSecurityDescriptor,pSelfRelativeSecurityDescriptor, lpdwBufferLength));
635 /******************************************************************************
636 * GetSecurityDescriptorControl [ADVAPI32.@]
639 BOOL WINAPI GetSecurityDescriptorControl ( PSECURITY_DESCRIPTOR pSecurityDescriptor,
640 PSECURITY_DESCRIPTOR_CONTROL pControl, LPDWORD lpdwRevision)
642 CallWin32ToNt (RtlGetControlSecurityDescriptor(pSecurityDescriptor,pControl,lpdwRevision));
645 /* ##############################
646 ###### ACL FUNCTIONS ######
647 ##############################
650 /*************************************************************************
651 * InitializeAcl [ADVAPI32.@]
653 DWORD WINAPI InitializeAcl(PACL acl, DWORD size, DWORD rev)
655 CallWin32ToNt (RtlCreateAcl(acl, size, rev));
658 /******************************************************************************
659 * AddAccessAllowedAce [ADVAPI32.@]
661 BOOL WINAPI AddAccessAllowedAce(
662 IN OUT PACL pAcl,
663 IN DWORD dwAceRevision,
664 IN DWORD AccessMask,
665 IN PSID pSid)
667 CallWin32ToNt(RtlAddAccessAllowedAce(pAcl, dwAceRevision, AccessMask, pSid));
670 /******************************************************************************
671 * AddAccessAllowedAceEx [ADVAPI32.@]
673 BOOL WINAPI AddAccessAllowedAceEx(
674 IN OUT PACL pAcl,
675 IN DWORD dwAceRevision,
676 IN DWORD AceFlags,
677 IN DWORD AccessMask,
678 IN PSID pSid)
680 CallWin32ToNt(RtlAddAccessAllowedAceEx(pAcl, dwAceRevision, AceFlags, AccessMask, pSid));
683 /******************************************************************************
684 * AddAccessDeniedAce [ADVAPI32.@]
686 BOOL WINAPI AddAccessDeniedAce(
687 IN OUT PACL pAcl,
688 IN DWORD dwAceRevision,
689 IN DWORD AccessMask,
690 IN PSID pSid)
692 CallWin32ToNt(RtlAddAccessDeniedAce(pAcl, dwAceRevision, AccessMask, pSid));
695 /******************************************************************************
696 * AddAccessDeniedAceEx [ADVAPI32.@]
698 BOOL WINAPI AddAccessDeniedAceEx(
699 IN OUT PACL pAcl,
700 IN DWORD dwAceRevision,
701 IN DWORD AceFlags,
702 IN DWORD AccessMask,
703 IN PSID pSid)
705 CallWin32ToNt(RtlAddAccessDeniedAceEx(pAcl, dwAceRevision, AceFlags, AccessMask, pSid));
708 /******************************************************************************
709 * AddAce [ADVAPI32.@]
711 BOOL WINAPI AddAce(
712 IN OUT PACL pAcl,
713 IN DWORD dwAceRevision,
714 IN DWORD dwStartingAceIndex,
715 LPVOID pAceList,
716 DWORD nAceListLength)
718 CallWin32ToNt(RtlAddAce(pAcl, dwAceRevision, dwStartingAceIndex, pAceList, nAceListLength));
721 /******************************************************************************
722 * FindFirstFreeAce [ADVAPI32.@]
724 BOOL WINAPI FindFirstFreeAce(IN PACL pAcl, LPVOID * pAce)
726 return RtlFirstFreeAce(pAcl, (PACE_HEADER *)pAce);
729 /******************************************************************************
730 * GetAce [ADVAPI32.@]
732 BOOL WINAPI GetAce(PACL pAcl,DWORD dwAceIndex,LPVOID *pAce )
734 CallWin32ToNt(RtlGetAce(pAcl, dwAceIndex, pAce));
737 /******************************************************************************
738 * GetAclInformation [ADVAPI32.@]
740 BOOL WINAPI GetAclInformation(
741 PACL pAcl,
742 LPVOID pAclInformation,
743 DWORD nAclInformationLength,
744 ACL_INFORMATION_CLASS dwAclInformationClass)
746 FIXME("(%p,%p,%ld,%d): stub\n",pAcl, pAclInformation,
747 nAclInformationLength, dwAclInformationClass);
748 return FALSE;
751 /******************************************************************************
752 * IsValidAcl [ADVAPI32.@]
754 BOOL WINAPI IsValidAcl(IN PACL pAcl)
756 return RtlValidAcl(pAcl);
759 /* ##############################
760 ###### MISC FUNCTIONS ######
761 ##############################
764 static const char * const DefaultPrivNames[] =
766 NULL, NULL,
767 "SeCreateTokenPrivilege", "SeAssignPrimaryTokenPrivilege",
768 "SeLockMemoryPrivilege", "SeIncreaseQuotaPrivilege",
769 "SeMachineAccountPrivilege", "SeTcbPrivilege",
770 "SeSecurityPrivilege", "SeTakeOwnershipPrivilege",
771 "SeLoadDriverPrivilege", "SeSystemProfilePrivilege",
772 "SeSystemtimePrivilege", "SeProfileSingleProcessPrivilege",
773 "SeIncreaseBasePriorityPrivilege", "SeCreatePagefilePrivilege",
774 "SeCreatePermanentPrivilege", "SeBackupPrivilege",
775 "SeRestorePrivilege", "SeShutdownPrivilege",
776 "SeDebugPrivilege", "SeAuditPrivilege",
777 "SeSystemEnvironmentPrivilege", "SeChangeNotifyPrivilege",
778 "SeRemoteShutdownPrivilege",
780 #define NUMPRIVS (sizeof DefaultPrivNames/sizeof DefaultPrivNames[0])
782 /******************************************************************************
783 * LookupPrivilegeValueW [ADVAPI32.@]
785 * See LookupPrivilegeValueA.
787 BOOL WINAPI
788 LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, PLUID lpLuid )
790 UINT i;
791 WCHAR priv[0x28];
793 TRACE("%s,%s,%p\n",debugstr_w(lpSystemName), debugstr_w(lpName), lpLuid);
795 for( i=0; i<NUMPRIVS; i++ )
797 if( !DefaultPrivNames[i] )
798 continue;
799 MultiByteToWideChar( CP_ACP, 0, DefaultPrivNames[i], -1,
800 priv, sizeof priv );
801 if( strcmpW( priv, lpName) )
802 continue;
803 lpLuid->LowPart = i;
804 lpLuid->HighPart = 0;
805 TRACE( "%s -> %08lx-%08lx\n",debugstr_w( lpSystemName ),
806 lpLuid->HighPart, lpLuid->LowPart );
807 return TRUE;
809 return FALSE;
812 /******************************************************************************
813 * LookupPrivilegeValueA [ADVAPI32.@]
815 * Retrieves LUID used on a system to represent the privilege name.
817 * PARAMS
818 * lpSystemName [I] Name of the system
819 * lpName [I] Name of the privilege
820 * pLuid [O] Destination for the resulting LUD
822 * RETURNS
823 * Success: TRUE. pLuid contains the requested LUID.
824 * Failure: FALSE.
826 BOOL WINAPI
827 LookupPrivilegeValueA( LPCSTR lpSystemName, LPCSTR lpName, PLUID lpLuid )
829 UNICODE_STRING lpSystemNameW;
830 UNICODE_STRING lpNameW;
831 BOOL ret;
833 RtlCreateUnicodeStringFromAsciiz(&lpSystemNameW, lpSystemName);
834 RtlCreateUnicodeStringFromAsciiz(&lpNameW,lpName);
835 ret = LookupPrivilegeValueW(lpSystemNameW.Buffer, lpNameW.Buffer, lpLuid);
836 RtlFreeUnicodeString(&lpNameW);
837 RtlFreeUnicodeString(&lpSystemNameW);
838 return ret;
842 /******************************************************************************
843 * LookupPrivilegeNameA [ADVAPI32.@]
845 BOOL WINAPI
846 LookupPrivilegeNameA( LPCSTR lpSystemName, PLUID lpLuid, LPSTR lpName, LPDWORD cchName)
848 FIXME("%s %p %p %p\n", debugstr_a(lpSystemName), lpLuid, lpName, cchName);
849 return FALSE;
852 /******************************************************************************
853 * LookupPrivilegeNameW [ADVAPI32.@]
855 BOOL WINAPI
856 LookupPrivilegeNameW( LPCWSTR lpSystemName, PLUID lpLuid, LPSTR lpName, LPDWORD cchName)
858 FIXME("%s %p %p %p\n", debugstr_w(lpSystemName), lpLuid, lpName, cchName);
859 return FALSE;
862 /******************************************************************************
863 * GetFileSecurityA [ADVAPI32.@]
865 * Obtains Specified information about the security of a file or directory.
867 * PARAMS
868 * lpFileName [I] Name of the file to get info for
869 * RequestedInformation [I] SE_ flags from "winnt.h"
870 * pSecurityDescriptor [O] Destination for security information
871 * nLength [I] Length of pSecurityDescriptor
872 * lpnLengthNeeded [O] Destination for length of returned security information
874 * RETURNS
875 * Success: TRUE. pSecurityDescriptor contains the requested information.
876 * Failure: FALSE. lpnLengthNeeded contains the required space to return the info.
878 * NOTES
879 * The information returned is constrained by the callers access rights and
880 * privileges.
882 BOOL WINAPI
883 GetFileSecurityA( LPCSTR lpFileName,
884 SECURITY_INFORMATION RequestedInformation,
885 PSECURITY_DESCRIPTOR pSecurityDescriptor,
886 DWORD nLength, LPDWORD lpnLengthNeeded )
888 FIXME("(%s) : stub\n", debugstr_a(lpFileName));
889 return TRUE;
892 /******************************************************************************
893 * GetFileSecurityW [ADVAPI32.@]
895 * See GetFileSecurityA.
897 BOOL WINAPI
898 GetFileSecurityW( LPCWSTR lpFileName,
899 SECURITY_INFORMATION RequestedInformation,
900 PSECURITY_DESCRIPTOR pSecurityDescriptor,
901 DWORD nLength, LPDWORD lpnLengthNeeded )
903 FIXME("(%s) : stub\n", debugstr_w(lpFileName) );
904 return TRUE;
908 /******************************************************************************
909 * LookupAccountSidA [ADVAPI32.@]
911 BOOL WINAPI
912 LookupAccountSidA(
913 IN LPCSTR system,
914 IN PSID sid,
915 OUT LPSTR account,
916 IN OUT LPDWORD accountSize,
917 OUT LPSTR domain,
918 IN OUT LPDWORD domainSize,
919 OUT PSID_NAME_USE name_use )
921 static const char ac[] = "Administrator";
922 static const char dm[] = "DOMAIN";
923 FIXME("(%s,sid=%p,%p,%p(%lu),%p,%p(%lu),%p): semi-stub\n",
924 debugstr_a(system),sid,
925 account,accountSize,accountSize?*accountSize:0,
926 domain,domainSize,domainSize?*domainSize:0,
927 name_use);
929 if (accountSize) *accountSize = strlen(ac)+1;
930 if (account && (*accountSize > strlen(ac)))
931 strcpy(account, ac);
933 if (domainSize) *domainSize = strlen(dm)+1;
934 if (domain && (*domainSize > strlen(dm)))
935 strcpy(domain,dm);
937 if (name_use) *name_use = SidTypeUser;
938 return TRUE;
941 /******************************************************************************
942 * LookupAccountSidW [ADVAPI32.@]
944 * PARAMS
945 * system []
946 * sid []
947 * account []
948 * accountSize []
949 * domain []
950 * domainSize []
951 * name_use []
953 BOOL WINAPI
954 LookupAccountSidW(
955 IN LPCWSTR system,
956 IN PSID sid,
957 OUT LPWSTR account,
958 IN OUT LPDWORD accountSize,
959 OUT LPWSTR domain,
960 IN OUT LPDWORD domainSize,
961 OUT PSID_NAME_USE name_use )
963 static const WCHAR ac[] = {'A','d','m','i','n','i','s','t','r','a','t','o','r',0};
964 static const WCHAR dm[] = {'D','O','M','A','I','N',0};
965 FIXME("(%s,sid=%p,%p,%p(%lu),%p,%p(%lu),%p): semi-stub\n",
966 debugstr_w(system),sid,
967 account,accountSize,accountSize?*accountSize:0,
968 domain,domainSize,domainSize?*domainSize:0,
969 name_use);
971 if (accountSize) *accountSize = strlenW(ac)+1;
972 if (account && (*accountSize > strlenW(ac)))
973 strcpyW(account, ac);
975 if (domainSize) *domainSize = strlenW(dm)+1;
976 if (domain && (*domainSize > strlenW(dm)))
977 strcpyW(domain,dm);
979 if (name_use) *name_use = SidTypeUser;
980 return TRUE;
983 /******************************************************************************
984 * SetFileSecurityA [ADVAPI32.@]
985 * Sets the security of a file or directory
987 BOOL WINAPI SetFileSecurityA( LPCSTR lpFileName,
988 SECURITY_INFORMATION RequestedInformation,
989 PSECURITY_DESCRIPTOR pSecurityDescriptor)
991 FIXME("(%s) : stub\n", debugstr_a(lpFileName));
992 return TRUE;
995 /******************************************************************************
996 * SetFileSecurityW [ADVAPI32.@]
997 * Sets the security of a file or directory
999 * PARAMS
1000 * lpFileName []
1001 * RequestedInformation []
1002 * pSecurityDescriptor []
1004 BOOL WINAPI
1005 SetFileSecurityW( LPCWSTR lpFileName,
1006 SECURITY_INFORMATION RequestedInformation,
1007 PSECURITY_DESCRIPTOR pSecurityDescriptor )
1009 FIXME("(%s) : stub\n", debugstr_w(lpFileName) );
1010 return TRUE;
1013 /******************************************************************************
1014 * QueryWindows31FilesMigration [ADVAPI32.@]
1016 * PARAMS
1017 * x1 []
1019 BOOL WINAPI
1020 QueryWindows31FilesMigration( DWORD x1 )
1022 FIXME("(%ld):stub\n",x1);
1023 return TRUE;
1026 /******************************************************************************
1027 * SynchronizeWindows31FilesAndWindowsNTRegistry [ADVAPI32.@]
1029 * PARAMS
1030 * x1 []
1031 * x2 []
1032 * x3 []
1033 * x4 []
1035 BOOL WINAPI
1036 SynchronizeWindows31FilesAndWindowsNTRegistry( DWORD x1, DWORD x2, DWORD x3,
1037 DWORD x4 )
1039 FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4);
1040 return TRUE;
1043 /******************************************************************************
1044 * LsaOpenPolicy [ADVAPI32.@]
1046 * PARAMS
1047 * x1 []
1048 * x2 []
1049 * x3 []
1050 * x4 []
1052 NTSTATUS WINAPI
1053 LsaOpenPolicy(
1054 IN PLSA_UNICODE_STRING SystemName,
1055 IN PLSA_OBJECT_ATTRIBUTES ObjectAttributes,
1056 IN ACCESS_MASK DesiredAccess,
1057 IN OUT PLSA_HANDLE PolicyHandle)
1059 FIXME("(%s,%p,0x%08lx,%p):stub\n",
1060 SystemName?debugstr_w(SystemName->Buffer):"null",
1061 ObjectAttributes, DesiredAccess, PolicyHandle);
1062 ADVAPI_ForceLocalComputer(SystemName ? SystemName->Buffer : NULL,
1063 STATUS_ACCESS_VIOLATION);
1064 dumpLsaAttributes(ObjectAttributes);
1065 if(PolicyHandle) *PolicyHandle = (LSA_HANDLE)0xcafe;
1066 return STATUS_SUCCESS;
1069 /******************************************************************************
1070 * LsaQueryInformationPolicy [ADVAPI32.@]
1072 NTSTATUS WINAPI
1073 LsaQueryInformationPolicy(
1074 IN LSA_HANDLE PolicyHandle,
1075 IN POLICY_INFORMATION_CLASS InformationClass,
1076 OUT PVOID *Buffer)
1078 FIXME("(%p,0x%08x,%p):stub\n",
1079 PolicyHandle, InformationClass, Buffer);
1081 if(!Buffer) return FALSE;
1082 switch (InformationClass)
1084 case PolicyAuditEventsInformation: /* 2 */
1086 PPOLICY_AUDIT_EVENTS_INFO p = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(POLICY_AUDIT_EVENTS_INFO));
1087 p->AuditingMode = FALSE; /* no auditing */
1088 *Buffer = p;
1090 break;
1091 case PolicyPrimaryDomainInformation: /* 3 */
1092 case PolicyAccountDomainInformation: /* 5 */
1094 struct di
1095 { POLICY_PRIMARY_DOMAIN_INFO ppdi;
1096 SID sid;
1098 SID_IDENTIFIER_AUTHORITY localSidAuthority = {SECURITY_NT_AUTHORITY};
1100 struct di * xdi = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(xdi));
1101 RtlCreateUnicodeStringFromAsciiz(&(xdi->ppdi.Name), "DOMAIN");
1103 xdi->ppdi.Sid = &(xdi->sid);
1104 xdi->sid.Revision = SID_REVISION;
1105 xdi->sid.SubAuthorityCount = 1;
1106 xdi->sid.IdentifierAuthority = localSidAuthority;
1107 xdi->sid.SubAuthority[0] = SECURITY_LOCAL_SYSTEM_RID;
1108 *Buffer = xdi;
1110 break;
1111 case PolicyAuditLogInformation:
1112 case PolicyPdAccountInformation:
1113 case PolicyLsaServerRoleInformation:
1114 case PolicyReplicaSourceInformation:
1115 case PolicyDefaultQuotaInformation:
1116 case PolicyModificationInformation:
1117 case PolicyAuditFullSetInformation:
1118 case PolicyAuditFullQueryInformation:
1119 case PolicyDnsDomainInformation:
1121 FIXME("category not implemented\n");
1122 return FALSE;
1125 return TRUE;
1128 /******************************************************************************
1129 * LsaLookupSids [ADVAPI32.@]
1131 typedef struct
1133 SID_NAME_USE Use;
1134 LSA_UNICODE_STRING Name;
1135 LONG DomainIndex;
1136 } LSA_TRANSLATED_NAME, *PLSA_TRANSLATED_NAME;
1138 typedef struct
1140 LSA_UNICODE_STRING Name;
1141 PSID Sid;
1142 } LSA_TRUST_INFORMATION, *PLSA_TRUST_INFORMATION;
1144 typedef struct
1146 ULONG Entries;
1147 PLSA_TRUST_INFORMATION Domains;
1148 } LSA_REFERENCED_DOMAIN_LIST, *PLSA_REFERENCED_DOMAIN_LIST;
1150 NTSTATUS WINAPI
1151 LsaLookupSids(
1152 IN LSA_HANDLE PolicyHandle,
1153 IN ULONG Count,
1154 IN PSID *Sids,
1155 OUT PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains,
1156 OUT PLSA_TRANSLATED_NAME *Names )
1158 FIXME("%p %lu %p %p %p\n",
1159 PolicyHandle, Count, Sids, ReferencedDomains, Names);
1160 return FALSE;
1163 /******************************************************************************
1164 * LsaFreeMemory [ADVAPI32.@]
1166 NTSTATUS WINAPI
1167 LsaFreeMemory(IN PVOID Buffer)
1169 TRACE("(%p)\n",Buffer);
1170 return HeapFree(GetProcessHeap(), 0, Buffer);
1172 /******************************************************************************
1173 * LsaClose [ADVAPI32.@]
1175 NTSTATUS WINAPI
1176 LsaClose(IN LSA_HANDLE ObjectHandle)
1178 FIXME("(%p):stub\n",ObjectHandle);
1179 return 0xc0000000;
1182 /******************************************************************************
1183 * LsaNtStatusToWinError [ADVAPI32.@]
1185 * PARAMS
1186 * Status [I]
1188 ULONG WINAPI
1189 LsaNtStatusToWinError(NTSTATUS Status)
1191 return RtlNtStatusToDosError(Status);
1194 /******************************************************************************
1195 * NotifyBootConfigStatus [ADVAPI32.@]
1197 * PARAMS
1198 * x1 []
1200 BOOL WINAPI
1201 NotifyBootConfigStatus( DWORD x1 )
1203 FIXME("(0x%08lx):stub\n",x1);
1204 return 1;
1207 /******************************************************************************
1208 * RevertToSelf [ADVAPI32.@]
1210 * PARAMS
1211 * void []
1213 BOOL WINAPI
1214 RevertToSelf( void )
1216 FIXME("(), stub\n");
1217 return TRUE;
1220 /******************************************************************************
1221 * ImpersonateSelf [ADVAPI32.@]
1223 BOOL WINAPI
1224 ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)
1226 return RtlImpersonateSelf(ImpersonationLevel);
1229 /******************************************************************************
1230 * ImpersonateLoggedOnUser [ADVAPI32.@]
1232 BOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken)
1234 FIXME("(%p):stub returning FALSE\n", hToken);
1235 return FALSE;
1238 /******************************************************************************
1239 * AccessCheck [ADVAPI32.@]
1241 * FIXME check cast LPBOOL to PBOOLEAN
1243 BOOL WINAPI
1244 AccessCheck(
1245 PSECURITY_DESCRIPTOR SecurityDescriptor,
1246 HANDLE ClientToken,
1247 DWORD DesiredAccess,
1248 PGENERIC_MAPPING GenericMapping,
1249 PPRIVILEGE_SET PrivilegeSet,
1250 LPDWORD PrivilegeSetLength,
1251 LPDWORD GrantedAccess,
1252 LPBOOL AccessStatus)
1254 CallWin32ToNt (NtAccessCheck(SecurityDescriptor, ClientToken, DesiredAccess,
1255 GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccess, (PBOOLEAN)AccessStatus));
1258 /*************************************************************************
1259 * SetKernelObjectSecurity [ADVAPI32.@]
1261 BOOL WINAPI SetKernelObjectSecurity (
1262 IN HANDLE Handle,
1263 IN SECURITY_INFORMATION SecurityInformation,
1264 IN PSECURITY_DESCRIPTOR SecurityDescriptor )
1266 CallWin32ToNt (NtSetSecurityObject (Handle, SecurityInformation, SecurityDescriptor));
1269 /******************************************************************************
1270 * LookupAccountNameA [ADVAPI32.@]
1272 BOOL WINAPI
1273 LookupAccountNameA(
1274 IN LPCSTR system,
1275 IN LPCSTR account,
1276 OUT PSID sid,
1277 OUT LPDWORD cbSid,
1278 LPSTR ReferencedDomainName,
1279 IN OUT LPDWORD cbReferencedDomainName,
1280 OUT PSID_NAME_USE name_use )
1282 FIXME("(%s,%s,%p,%p,%p,%p,%p), stub.\n",system,account,sid,cbSid,ReferencedDomainName,cbReferencedDomainName,name_use);
1283 return FALSE;
1286 /******************************************************************************
1287 * PrivilegeCheck [ADVAPI32.@]
1289 BOOL WINAPI PrivilegeCheck( HANDLE ClientToken, PPRIVILEGE_SET RequiredPrivileges, LPBOOL pfResult)
1291 FIXME("stub %p %p %p\n", ClientToken, RequiredPrivileges, pfResult);
1292 if (pfResult)
1293 *pfResult=TRUE;
1294 return TRUE;
1297 /******************************************************************************
1298 * AccessCheckAndAuditAlarmA [ADVAPI32.@]
1300 BOOL WINAPI AccessCheckAndAuditAlarmA(LPCSTR Subsystem, LPVOID HandleId, LPSTR ObjectTypeName,
1301 LPSTR ObjectName, PSECURITY_DESCRIPTOR SecurityDescriptor, DWORD DesiredAccess,
1302 PGENERIC_MAPPING GenericMapping, BOOL ObjectCreation, LPDWORD GrantedAccess,
1303 LPBOOL AccessStatus, LPBOOL pfGenerateOnClose)
1305 FIXME("stub (%s,%p,%s,%s,%p,%08lx,%p,%x,%p,%p,%p)\n", debugstr_a(Subsystem),
1306 HandleId, debugstr_a(ObjectTypeName), debugstr_a(ObjectName),
1307 SecurityDescriptor, DesiredAccess, GenericMapping,
1308 ObjectCreation, GrantedAccess, AccessStatus, pfGenerateOnClose);
1309 return TRUE;
1312 /******************************************************************************
1313 * AccessCheckAndAuditAlarmW [ADVAPI32.@]
1315 BOOL WINAPI AccessCheckAndAuditAlarmW(LPCWSTR Subsystem, LPVOID HandleId, LPWSTR ObjectTypeName,
1316 LPWSTR ObjectName, PSECURITY_DESCRIPTOR SecurityDescriptor, DWORD DesiredAccess,
1317 PGENERIC_MAPPING GenericMapping, BOOL ObjectCreation, LPDWORD GrantedAccess,
1318 LPBOOL AccessStatus, LPBOOL pfGenerateOnClose)
1320 FIXME("stub (%s,%p,%s,%s,%p,%08lx,%p,%x,%p,%p,%p)\n", debugstr_w(Subsystem),
1321 HandleId, debugstr_w(ObjectTypeName), debugstr_w(ObjectName),
1322 SecurityDescriptor, DesiredAccess, GenericMapping,
1323 ObjectCreation, GrantedAccess, AccessStatus, pfGenerateOnClose);
1324 return TRUE;
1328 /******************************************************************************
1329 * GetSecurityInfoExW [ADVAPI32.@]
1331 DWORD WINAPI GetSecurityInfoExW(
1332 HANDLE hObject, SE_OBJECT_TYPE ObjectType,
1333 SECURITY_INFORMATION SecurityInfo, LPCWSTR lpProvider,
1334 LPCWSTR lpProperty, PACTRL_ACCESSW *ppAccessList,
1335 PACTRL_AUDITW *ppAuditList, LPWSTR *lppOwner, LPWSTR *lppGroup
1338 FIXME("stub!\n");
1339 return ERROR_BAD_PROVIDER;
1342 /******************************************************************************
1343 * BuildTrusteeWithSidA [ADVAPI32.@]
1345 VOID WINAPI BuildTrusteeWithSidA(PTRUSTEEA pTrustee, PSID pSid)
1347 FIXME("%p %p\n", pTrustee, pSid);
1350 /******************************************************************************
1351 * BuildTrusteeWithSidW [ADVAPI32.@]
1353 VOID WINAPI BuildTrusteeWithSidW(PTRUSTEEW pTrustee, PSID pSid)
1355 FIXME("%p %p\n", pTrustee, pSid);
1358 /******************************************************************************
1359 * SetEntriesInAclA [ADVAPI32.@]
1361 DWORD WINAPI SetEntriesInAclA( ULONG count, PEXPLICIT_ACCESSA pEntries,
1362 PACL OldAcl, PACL* NewAcl )
1364 FIXME("%ld %p %p %p\n",count,pEntries,OldAcl,NewAcl);
1365 return ERROR_CALL_NOT_IMPLEMENTED;
1368 /******************************************************************************
1369 * SetEntriesInAclW [ADVAPI32.@]
1371 DWORD WINAPI SetEntriesInAclW( ULONG count, PEXPLICIT_ACCESSW pEntries,
1372 PACL OldAcl, PACL* NewAcl )
1374 FIXME("%ld %p %p %p\n",count,pEntries,OldAcl,NewAcl);
1375 return ERROR_CALL_NOT_IMPLEMENTED;
1378 /******************************************************************************
1379 * SetNamedSecurityInfoA [ADVAPI32.@]
1381 DWORD WINAPI SetNamedSecurityInfoA(LPSTR pObjectName,
1382 SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo,
1383 PSID psidOwner, PSID psidGroup, PACL pDacl, PACL pSacl)
1385 FIXME("%s %d %ld %p %p %p %p\n", debugstr_a(pObjectName), ObjectType,
1386 SecurityInfo, psidOwner, psidGroup, pDacl, pSacl);
1387 return ERROR_CALL_NOT_IMPLEMENTED;
1390 /******************************************************************************
1391 * SetNamedSecurityInfoW [ADVAPI32.@]
1393 DWORD WINAPI SetNamedSecurityInfoW(LPWSTR pObjectName,
1394 SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo,
1395 PSID psidOwner, PSID psidGroup, PACL pDacl, PACL pSacl)
1397 FIXME("%s %d %ld %p %p %p %p\n", debugstr_w(pObjectName), ObjectType,
1398 SecurityInfo, psidOwner, psidGroup, pDacl, pSacl);
1399 return ERROR_CALL_NOT_IMPLEMENTED;
1402 /******************************************************************************
1403 * GetExplicitEntriesFromAclA [ADVAPI32.@]
1405 DWORD WINAPI GetExplicitEntriesFromAclA( PACL pacl, PULONG pcCountOfExplicitEntries,
1406 PEXPLICIT_ACCESSA* pListOfExplicitEntries)
1408 FIXME("%p %p %p\n",pacl, pcCountOfExplicitEntries, pListOfExplicitEntries);
1409 return ERROR_CALL_NOT_IMPLEMENTED;
1412 /******************************************************************************
1413 * GetExplicitEntriesFromAclW [ADVAPI32.@]
1415 DWORD WINAPI GetExplicitEntriesFromAclW( PACL pacl, PULONG pcCountOfExplicitEntries,
1416 PEXPLICIT_ACCESSW* pListOfExplicitEntries)
1418 FIXME("%p %p %p\n",pacl, pcCountOfExplicitEntries, pListOfExplicitEntries);
1419 return ERROR_CALL_NOT_IMPLEMENTED;