From eee837e9314e8bb3eb2f8d27f280560996bf7714 Mon Sep 17 00:00:00 2001 From: Louis Lenders Date: Fri, 4 Mar 2016 08:40:39 +0100 Subject: [PATCH] ntdll: Add stub for RtlAddAccessDeniedObjectAce and forward to AddAccessDeniedObjectAce 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 bab9997fb0..c38e92e63f 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -19,7 +19,7 @@ @ stdcall AddAccessAllowedObjectAce(ptr long long long ptr ptr ptr) @ stdcall AddAccessDeniedAce(ptr long long ptr) @ stdcall AddAccessDeniedAceEx(ptr long long long ptr) -# @ stub AddAccessDeniedObjectAce +@ stdcall AddAccessDeniedObjectAce(ptr long long long ptr ptr ptr) @ stdcall AddAce(ptr long long ptr long) @ stdcall AddAuditAccessAce(ptr long long ptr long long) @ stdcall AddAuditAccessAceEx(ptr long long long ptr long long) diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index b74b1a1191..c8a6579ad2 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -1682,6 +1682,22 @@ BOOL WINAPI AddAccessDeniedAceEx( return set_ntstatus(RtlAddAccessDeniedAceEx(pAcl, dwAceRevision, AceFlags, AccessMask, pSid)); } +/****************************************************************************** + * AddAccessDeniedObjectAce [ADVAPI32.@] + */ +BOOL WINAPI AddAccessDeniedObjectAce( + 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( RtlAddAccessDeniedObjectAce(pAcl, dwAceRevision, dwAceFlags, dwAccessMask, + pObjectTypeGuid, pInheritedObjectTypeGuid, pSid) ); +} + /****************************************************************************** * AddAce [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 5bb0e55bee..80bc0ed738 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 @@ -10,7 +10,7 @@ @ 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 +@ stdcall AddAccessDeniedObjectAce(ptr long long long ptr ptr ptr) advapi32.AddAccessDeniedObjectAce @ stdcall AddAce(ptr long long ptr long) advapi32.AddAce @ stdcall AddAuditAccessAce(ptr long long ptr long long) advapi32.AddAuditAccessAce @ stdcall AddAuditAccessAceEx(ptr long long long ptr long long) advapi32.AddAuditAccessAceEx 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 1cc6206bb7..083c921b0b 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 @@ -10,7 +10,7 @@ @ 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 +@ stdcall AddAccessDeniedObjectAce(ptr long long long ptr ptr ptr) advapi32.AddAccessDeniedObjectAce @ stdcall AddAce(ptr long long ptr long) advapi32.AddAce @ stdcall AddAuditAccessAce(ptr long long ptr long long) advapi32.AddAuditAccessAce @ stdcall AddAuditAccessAceEx(ptr long long long ptr long long) advapi32.AddAuditAccessAceEx 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 83ecd50e65..fc3e5f475c 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 @@ -10,7 +10,7 @@ @ 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 +@ stdcall AddAccessDeniedObjectAce(ptr long long long ptr ptr ptr) advapi32.AddAccessDeniedObjectAce @ stdcall AddAce(ptr long long ptr long) advapi32.AddAce @ stdcall AddAuditAccessAce(ptr long long ptr long long) advapi32.AddAuditAccessAce @ stdcall AddAuditAccessAceEx(ptr long long long ptr long long) advapi32.AddAuditAccessAceEx diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index bbada48e39..0a68144fc0 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -410,7 +410,7 @@ @ stdcall RtlAddAccessAllowedObjectAce(ptr long long long ptr ptr ptr) @ stdcall RtlAddAccessDeniedAce(ptr long long ptr) @ stdcall RtlAddAccessDeniedAceEx(ptr long long long ptr) -# @ stub RtlAddAccessDeniedObjectAce +@ stdcall RtlAddAccessDeniedObjectAce(ptr long long long ptr ptr ptr) @ stdcall RtlAddAce(ptr long long ptr long) @ stub RtlAddActionToRXact @ stdcall RtlAddAtomToAtomTable(ptr wstr ptr) diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c index d4739d56ec..3bc52ac158 100644 --- a/dlls/ntdll/sec.c +++ b/dlls/ntdll/sec.c @@ -1304,6 +1304,23 @@ NTSTATUS WINAPI RtlAddAccessDeniedAceEx( AccessMask, pSid, ACCESS_DENIED_ACE_TYPE); } +/****************************************************************************** + * RtlAddAccessDeniedObjectAce [NTDLL.@] + */ +NTSTATUS WINAPI RtlAddAccessDeniedObjectAce( + 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; +} + /************************************************************************** * RtlAddAuditAccessAce [NTDLL.@] */ diff --git a/include/winternl.h b/include/winternl.h index 303f890233..dddf946d35 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2355,6 +2355,7 @@ 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 RtlAddAccessDeniedObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID); NTSYSAPI NTSTATUS WINAPI RtlAddAtomToAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_ATOM*); NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL); NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAceEx(PACL,DWORD,DWORD,DWORD,PSID,BOOL,BOOL);