Commit 736ff985 authored by 's avatar Committed by Alexandre Julliard

Added AddAccessAllowdAceEx, AddAccessDeniedAceEx, GetAclInformation.

parent c203d68e
......@@ -5,8 +5,9 @@
@ stdcall AccessCheckAndAuditAlarmW(wstr ptr wstr wstr ptr long ptr long ptr ptr ptr)
@ stub AccessCheckByType #(ptr ptr long long ptr long ptr ptr ptr ptr ptr) AccessCheckByType
@ stdcall AddAccessAllowedAce (ptr long long ptr)
@ stub AddAccessAllowedAceEx #(ptr long long long ptr) AddAccessAllowedAceEx
@ stdcall AddAccessAllowedAceEx (ptr long long long ptr)
@ stdcall AddAccessDeniedAce(ptr long long ptr)
@ stdcall AddAccessDeniedAceEx(ptr long long long ptr)
@ stdcall AddAce(ptr long long ptr long)
@ stub AddAuditAccessAce
@ stub AdjustTokenGroups
......@@ -90,7 +91,7 @@
@ stdcall FindFirstFreeAce(ptr ptr)
@ stdcall FreeSid(ptr)
@ stdcall GetAce(ptr long ptr)
@ stub GetAclInformation
@ stdcall GetAclInformation(ptr ptr long long)
@ stdcall GetCurrentHwProfileA(ptr)
@ stub GetEffectiveRightsFromAclA
@ stdcall GetFileSecurityA(str long ptr long ptr)
......
......@@ -664,6 +664,19 @@ BOOL WINAPI AddAccessAllowedAce(
}
/******************************************************************************
* AddAccessAllowedAceEx [ADVAPI32.@]
*/
BOOL WINAPI AddAccessAllowedAceEx(
IN OUT PACL pAcl,
IN DWORD dwAceRevision,
IN DWORD AceFlags,
IN DWORD AccessMask,
IN PSID pSid)
{
CallWin32ToNt(RtlAddAccessAllowedAceEx(pAcl, dwAceRevision, AceFlags, AccessMask, pSid));
}
/******************************************************************************
* AddAccessDeniedAce [ADVAPI32.@]
*/
BOOL WINAPI AddAccessDeniedAce(
......@@ -676,7 +689,20 @@ BOOL WINAPI AddAccessDeniedAce(
}
/******************************************************************************
* AddAccessDeniedAce [ADVAPI32.@]
* AddAccessDeniedAceEx [ADVAPI32.@]
*/
BOOL WINAPI AddAccessDeniedAceEx(
IN OUT PACL pAcl,
IN DWORD dwAceRevision,
IN DWORD AceFlags,
IN DWORD AccessMask,
IN PSID pSid)
{
CallWin32ToNt(RtlAddAccessDeniedAceEx(pAcl, dwAceRevision, AceFlags, AccessMask, pSid));
}
/******************************************************************************
* AddAce [ADVAPI32.@]
*/
BOOL WINAPI AddAce(
IN OUT PACL pAcl,
......@@ -705,6 +731,20 @@ BOOL WINAPI GetAce(PACL pAcl,DWORD dwAceIndex,LPVOID *pAce )
}
/******************************************************************************
* GetAclInformation [ADVAPI32.@]
*/
BOOL WINAPI GetAclInformation(
PACL pAcl,
LPVOID pAclInformation,
DWORD nAclInformationLength,
ACL_INFORMATION_CLASS dwAclInformationClass)
{
FIXME("(%p,%p,%ld,%d): stub\n",pAcl, pAclInformation,
nAclInformationLength, dwAclInformationClass);
return FALSE;
}
/******************************************************************************
* IsValidAcl [ADVAPI32.@]
*/
BOOL WINAPI IsValidAcl(IN PACL pAcl)
......
......@@ -269,7 +269,9 @@
@ stdcall RtlAcquireResourceExclusive(ptr long)
@ stdcall RtlAcquireResourceShared(ptr long)
@ stdcall RtlAddAccessAllowedAce(ptr long long ptr)
@ stdcall RtlAddAccessAllowedAceEx(ptr long long long ptr)
@ stdcall RtlAddAccessDeniedAce(ptr long long ptr)
@ stdcall RtlAddAccessDeniedAceEx(ptr long long long ptr)
@ stdcall RtlAddAce(ptr long long ptr long)
@ stub RtlAddActionToRXact
@ stub RtlAddAttributeActionToRXact
......
......@@ -716,6 +716,19 @@ NTSTATUS WINAPI RtlAddAccessAllowedAce(
IN DWORD AccessMask,
IN PSID pSid)
{
return RtlAddAccessAllowedAceEx( pAcl, dwAceRevision, 0, AccessMask, pSid);
}
/******************************************************************************
* RtlAddAccessAllowedAceEx [NTDLL.@]
*/
NTSTATUS WINAPI RtlAddAccessAllowedAceEx(
IN OUT PACL pAcl,
IN DWORD dwAceRevision,
IN DWORD AceFlags,
IN DWORD AccessMask,
IN PSID pSid)
{
DWORD dwLengthSid;
ACCESS_ALLOWED_ACE * pAaAce;
DWORD dwSpaceLeft;
......@@ -740,7 +753,7 @@ NTSTATUS WINAPI RtlAddAccessAllowedAce(
return STATUS_ALLOTTED_SPACE_EXCEEDED;
pAaAce->Header.AceType = ACCESS_ALLOWED_ACE_TYPE;
pAaAce->Header.AceFlags = 0;
pAaAce->Header.AceFlags = AceFlags;
pAaAce->Header.AceSize = sizeof(*pAaAce) - sizeof(pAaAce->SidStart) + dwLengthSid;
pAaAce->Mask = AccessMask;
pAcl->AceCount++;
......@@ -757,6 +770,19 @@ NTSTATUS WINAPI RtlAddAccessDeniedAce(
IN DWORD AccessMask,
IN PSID pSid)
{
return RtlAddAccessDeniedAceEx( pAcl, dwAceRevision, 0, AccessMask, pSid);
}
/******************************************************************************
* RtlAddAccessDeniedAceEx [NTDLL.@]
*/
NTSTATUS WINAPI RtlAddAccessDeniedAceEx(
IN OUT PACL pAcl,
IN DWORD dwAceRevision,
IN DWORD AceFlags,
IN DWORD AccessMask,
IN PSID pSid)
{
DWORD dwLengthSid;
DWORD dwSpaceLeft;
ACCESS_DENIED_ACE * pAdAce;
......@@ -781,7 +807,7 @@ NTSTATUS WINAPI RtlAddAccessDeniedAce(
return STATUS_ALLOTTED_SPACE_EXCEEDED;
pAdAce->Header.AceType = ACCESS_DENIED_ACE_TYPE;
pAdAce->Header.AceFlags = 0;
pAdAce->Header.AceFlags = AceFlags;
pAdAce->Header.AceSize = sizeof(*pAdAce) - sizeof(pAdAce->SidStart) + dwLengthSid;
pAdAce->Mask = AccessMask;
pAcl->AceCount++;
......
......@@ -2763,6 +2763,12 @@ typedef struct _ACL {
WORD Sbz2;
} ACL, *PACL;
typedef enum _ACL_INFORMATION_CLASS
{
AclRevisionInformation = 1,
AclSizeInformation
} ACL_INFORMATION_CLASS;
/* SECURITY_DESCRIPTOR */
#define SECURITY_DESCRIPTOR_REVISION 1
#define SECURITY_DESCRIPTOR_REVISION1 1
......
......@@ -993,8 +993,9 @@ BYTE WINAPI RtlAcquireResourceExclusive(LPRTL_RWLOCK,BYTE);
BYTE WINAPI RtlAcquireResourceShared(LPRTL_RWLOCK,BYTE);
NTSTATUS WINAPI RtlAddAce(PACL,DWORD,DWORD,PACE_HEADER,DWORD);
NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
BOOL WINAPI RtlAddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
NTSTATUS WINAPI RtlAddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
NTSTATUS WINAPI RtlAddAccessDeniedAce(PACL,DWORD,DWORD,PSID);
NTSTATUS WINAPI RtlAddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
DWORD WINAPI RtlAdjustPrivilege(DWORD,DWORD,DWORD,DWORD);
BOOLEAN WINAPI RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID *);
PVOID WINAPI RtlAllocateHeap(HANDLE,ULONG,ULONG);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment