From c63d417222fd9093c3162469ca64feb6c41b6cb1 Mon Sep 17 00:00:00 2001 From: Louis Lenders Date: Tue, 1 Mar 2016 22:34:05 +0100 Subject: [PATCH] ntdll: Add stub for RtlAddAccessAllowedObjectAce and forward to AddAccessAllowedObjectAce in advapi32. Signed-off-by: Louis Lenders Signed-off-by: Alexandre Julliard --- dlls/advapi32/advapi32.spec | 2 +- dlls/advapi32/security.c | 16 ++++++++++++++++ .../api-ms-win-downlevel-advapi32-l1-1-0.spec | 2 +- .../api-ms-win-security-base-l1-1-0.spec | 2 +- .../api-ms-win-security-base-l1-2-0.spec | 2 +- dlls/ntdll/ntdll.spec | 2 +- dlls/ntdll/sec.c | 17 +++++++++++++++++ include/winternl.h | 1 + 8 files changed, 39 insertions(+), 5 deletions(-) diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index 1058935cac3..bab9997fb0f 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -16,7 +16,7 @@ # @ stub AccessCheckByTypeResultListAndAuditAlarmW @ stdcall AddAccessAllowedAce (ptr long long ptr) @ stdcall AddAccessAllowedAceEx (ptr long long long ptr) -# @ stub AddAccessAllowedObjectAce +@ stdcall AddAccessAllowedObjectAce(ptr long long long ptr ptr ptr) @ stdcall AddAccessDeniedAce(ptr long long ptr) @ stdcall AddAccessDeniedAceEx(ptr long long long ptr) # @ stub AddAccessDeniedObjectAce diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index 574621866f9..b74b1a1191d 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -1641,6 +1641,22 @@ BOOL WINAPI AddAccessAllowedAceEx( return set_ntstatus(RtlAddAccessAllowedAceEx(pAcl, dwAceRevision, AceFlags, AccessMask, pSid)); } +/****************************************************************************** + * AddAccessAllowedObjectAce [ADVAPI32.@] + */ +BOOL WINAPI AddAccessAllowedObjectAce( + IN OUT PACL pAcl, + IN DWORD dwAceRevision, + IN DWORD dwAceFlags, + IN DWORD dwAccessMask, + IN GUID* pObjectTypeGuid, + IN GUID* pInheritedObjectTypeGuid, + IN PSID pSid) +{ + return set_ntstatus(RtlAddAccessAllowedObjectAce(pAcl, dwAceRevision, dwAceFlags, dwAccessMask, + pObjectTypeGuid, pInheritedObjectTypeGuid, pSid)); +} + /****************************************************************************** * AddAccessDeniedAce [ADVAPI32.@] */ diff --git a/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec b/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec index e5280b54232..5bb0e55beea 100644 --- a/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec +++ b/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec @@ -7,7 +7,7 @@ @ stub AccessCheckByTypeResultListAndAuditAlarmW @ stdcall AddAccessAllowedAce(ptr long long ptr) advapi32.AddAccessAllowedAce @ stdcall AddAccessAllowedAceEx(ptr long long long ptr) advapi32.AddAccessAllowedAceEx -@ stub AddAccessAllowedObjectAce +@ stdcall AddAccessAllowedObjectAce(ptr long long long ptr ptr ptr) advapi32.AddAccessAllowedObjectAce @ stdcall AddAccessDeniedAce(ptr long long ptr) advapi32.AddAccessDeniedAce @ stdcall AddAccessDeniedAceEx(ptr long long long ptr) advapi32.AddAccessDeniedAceEx @ stub AddAccessDeniedObjectAce diff --git a/dlls/api-ms-win-security-base-l1-1-0/api-ms-win-security-base-l1-1-0.spec b/dlls/api-ms-win-security-base-l1-1-0/api-ms-win-security-base-l1-1-0.spec index d1fdff4773d..1cc6206bb75 100644 --- a/dlls/api-ms-win-security-base-l1-1-0/api-ms-win-security-base-l1-1-0.spec +++ b/dlls/api-ms-win-security-base-l1-1-0/api-ms-win-security-base-l1-1-0.spec @@ -7,7 +7,7 @@ @ stub AccessCheckByTypeResultListandAuditAlarmW @ stdcall AddAccessAllowedAce(ptr long long ptr) advapi32.AddAccessAllowedAce @ stdcall AddAccessAllowedAceEx(ptr long long long ptr) advapi32.AddAccessAllowedAceEx -@ stub AddAccessAllowedObjectAce +@ stdcall AddAccessAllowedObjectAce(ptr long long long ptr ptr ptr) advapi32.AddAccessAllowedObjectAce @ stdcall AddAccessDeniedAce(ptr long long ptr) advapi32.AddAccessDeniedAce @ stdcall AddAccessDeniedAceEx(ptr long long long ptr) advapi32.AddAccessDeniedAceEx @ stub AddAccessDeniedObjectAce diff --git a/dlls/api-ms-win-security-base-l1-2-0/api-ms-win-security-base-l1-2-0.spec b/dlls/api-ms-win-security-base-l1-2-0/api-ms-win-security-base-l1-2-0.spec index 01c7c0158b3..83ecd50e651 100644 --- a/dlls/api-ms-win-security-base-l1-2-0/api-ms-win-security-base-l1-2-0.spec +++ b/dlls/api-ms-win-security-base-l1-2-0/api-ms-win-security-base-l1-2-0.spec @@ -7,7 +7,7 @@ @ stub AccessCheckByTypeResultListAndAuditAlarmW @ stdcall AddAccessAllowedAce(ptr long long ptr) advapi32.AddAccessAllowedAce @ stdcall AddAccessAllowedAceEx(ptr long long long ptr) advapi32.AddAccessAllowedAceEx -@ stub AddAccessAllowedObjectAce +@ stdcall AddAccessAllowedObjectAce(ptr long long long ptr ptr ptr) advapi32.AddAccessAllowedObjectAce @ stdcall AddAccessDeniedAce(ptr long long ptr) advapi32.AddAccessDeniedAce @ stdcall AddAccessDeniedAceEx(ptr long long long ptr) advapi32.AddAccessDeniedAceEx @ stub AddAccessDeniedObjectAce diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 9b64023b489..bbada48e391 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -407,7 +407,7 @@ @ stub RtlActivateActivationContextUnsafeFast @ stdcall RtlAddAccessAllowedAce(ptr long long ptr) @ stdcall RtlAddAccessAllowedAceEx(ptr long long long ptr) -# @ stub RtlAddAccessAllowedObjectAce +@ stdcall RtlAddAccessAllowedObjectAce(ptr long long long ptr ptr ptr) @ stdcall RtlAddAccessDeniedAce(ptr long long ptr) @ stdcall RtlAddAccessDeniedAceEx(ptr long long long ptr) # @ stub RtlAddAccessDeniedObjectAce diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c index 34de33b369d..d4739d56ec4 100644 --- a/dlls/ntdll/sec.c +++ b/dlls/ntdll/sec.c @@ -1259,6 +1259,23 @@ NTSTATUS WINAPI RtlAddAccessAllowedAceEx( AccessMask, pSid, ACCESS_ALLOWED_ACE_TYPE); } +/****************************************************************************** + * RtlAddAccessAllowedObjectAce [NTDLL.@] + */ +NTSTATUS WINAPI RtlAddAccessAllowedObjectAce( + IN OUT PACL pAcl, + IN DWORD dwAceRevision, + IN DWORD dwAceFlags, + IN DWORD dwAccessMask, + IN GUID* pObjectTypeGuid, + IN GUID* pInheritedObjectTypeGuid, + IN PSID pSid) +{ + FIXME("%p %x %x %x %p %p %p - stub\n", pAcl, dwAceRevision, dwAceFlags, dwAccessMask, + pObjectTypeGuid, pInheritedObjectTypeGuid, pSid); + return STATUS_NOT_IMPLEMENTED; +} + /****************************************************************************** * RtlAddAccessDeniedAce [NTDLL.@] */ diff --git a/include/winternl.h b/include/winternl.h index a861aa7a135..303f8902332 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2352,6 +2352,7 @@ NTSYSAPI NTSTATUS WINAPI RtlActivateActivationContext(DWORD,HANDLE,ULONG_PTR*); NTSYSAPI NTSTATUS WINAPI RtlAddAce(PACL,DWORD,DWORD,PACE_HEADER,DWORD); NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL,DWORD,DWORD,PSID); NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID); +NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID); NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAce(PACL,DWORD,DWORD,PSID); NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,PSID); NTSYSAPI NTSTATUS WINAPI RtlAddAtomToAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*);