From d37b3f59e9e1df6523ac77bf628b7220b97713ee Mon Sep 17 00:00:00 2001 From: Louis Lenders Date: Thu, 25 Feb 2016 09:10:32 +0100 Subject: [PATCH] ntdll: Add stub for RtlAddAuditAccessObjectAce and forward to AddAuditAccessObjectAce in advapi32. Signed-off-by: Louis Lenders Signed-off-by: Alexandre Julliard --- dlls/advapi32/advapi32.spec | 2 +- dlls/advapi32/security.c | 18 ++++++++++++++++ .../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 | 21 ++++++++++++++++++- include/winternl.h | 1 + 8 files changed, 44 insertions(+), 6 deletions(-) diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index 08f799df49..1058935cac 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -23,7 +23,7 @@ @ stdcall AddAce(ptr long long ptr long) @ stdcall AddAuditAccessAce(ptr long long ptr long long) @ stdcall AddAuditAccessAceEx(ptr long long long ptr long long) -# @ stub AddAuditAccessObjectAce +@ stdcall AddAuditAccessObjectAce(ptr long long long ptr ptr ptr long long) # @ stub AddConditionalAce @ stdcall AddMandatoryAce(ptr long long long ptr) # @ stub AddUsersToEncryptedFileEx diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index 08f88c09f9..574621866f 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -2671,6 +2671,24 @@ BOOL WINAPI AddAuditAccessAceEx( bAuditSuccess, bAuditFailure) ); } +/****************************************************************************** + * AddAuditAccessObjectAce [ADVAPI32.@] + */ +BOOL WINAPI AddAuditAccessObjectAce( + IN OUT PACL pAcl, + IN DWORD dwAceRevision, + IN DWORD dwAceFlags, + IN DWORD dwAccessMask, + IN GUID* pObjectTypeGuid, + IN GUID* pInheritedObjectTypeGuid, + IN PSID pSid, + IN BOOL bAuditSuccess, + IN BOOL bAuditFailure) +{ + return set_ntstatus( RtlAddAuditAccessObjectAce(pAcl, dwAceRevision, dwAceFlags, dwAccessMask, + pObjectTypeGuid, pInheritedObjectTypeGuid, pSid, bAuditSuccess, bAuditFailure) ); +} + /****************************************************************************** * LookupAccountNameA [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 e1b4663800..e5280b5423 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 @@ -14,7 +14,7 @@ @ 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 -@ stub AddAuditAccessObjectAce +@ stdcall AddAuditAccessObjectAce(ptr long long long ptr ptr ptr long long) advapi32.AddAuditAccessObjectAce @ stdcall AddMandatoryAce(ptr long long long ptr) advapi32.AddMandatoryAce @ stdcall AdjustTokenGroups(long long ptr long ptr ptr) advapi32.AdjustTokenGroups @ stdcall AdjustTokenPrivileges(long long ptr long ptr ptr) advapi32.AdjustTokenPrivileges 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 a44f5b8417..d1fdff4773 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 @@ -14,7 +14,7 @@ @ 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 -@ stub AddAuditAccessObjectAce +@ stdcall AddAuditAccessObjectAce(ptr long long long ptr ptr ptr long long) advapi32.AddAuditAccessObjectAce @ stdcall AddMandatoryAce(ptr long long long ptr) advapi32.AddMandatoryAce @ stdcall AdjustTokenGroups(long long ptr long ptr ptr) advapi32.AdjustTokenGroups @ stdcall AdjustTokenPrivileges(long long ptr long ptr ptr) advapi32.AdjustTokenPrivileges 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 02e3b9a644..01c7c0158b 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 @@ -14,7 +14,7 @@ @ 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 -@ stub AddAuditAccessObjectAce +@ stdcall AddAuditAccessObjectAce(ptr long long long ptr ptr ptr long long) advapi32.AddAuditAccessObjectAce @ stdcall AddMandatoryAce(ptr long long long ptr) advapi32.AddMandatoryAce @ stub AddResourceAttributeAce @ stub AddScopedPolicyIDAce diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 0ccd79fdcf..9b64023b48 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -417,7 +417,7 @@ @ stub RtlAddAttributeActionToRXact @ stdcall RtlAddAuditAccessAce(ptr long long ptr long long) @ stdcall RtlAddAuditAccessAceEx(ptr long long long ptr long long) -# @ stub RtlAddAuditAccessObjectAce +@ stdcall RtlAddAuditAccessObjectAce(ptr long long long ptr ptr ptr long long) # @ stub RtlAddCompoundAce # @ stub RtlAddRange @ cdecl -arch=arm,x86_64 RtlAddFunctionTable(ptr long long) diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c index 125c86eb86..34de33b369 100644 --- a/dlls/ntdll/sec.c +++ b/dlls/ntdll/sec.c @@ -1325,7 +1325,26 @@ NTSTATUS WINAPI RtlAddAuditAccessAce( { return RtlAddAuditAccessAceEx(pAcl, dwAceRevision, 0, dwAccessMask, pSid, bAuditSuccess, bAuditFailure); } - + +/****************************************************************************** + * RtlAddAuditAccessObjectAce [NTDLL.@] + */ +NTSTATUS WINAPI RtlAddAuditAccessObjectAce( + IN OUT PACL pAcl, + IN DWORD dwAceRevision, + IN DWORD dwAceFlags, + IN DWORD dwAccessMask, + IN GUID* pObjectTypeGuid, + IN GUID* pInheritedObjectTypeGuid, + IN PSID pSid, + IN BOOL bAuditSuccess, + IN BOOL bAuditFailure) +{ + FIXME("%p %x %x %x %p %p %p %d %d - stub\n", pAcl, dwAceRevision, dwAceFlags, dwAccessMask, + pObjectTypeGuid, pInheritedObjectTypeGuid, pSid, bAuditSuccess, bAuditFailure); + return STATUS_NOT_IMPLEMENTED; +} + /****************************************************************************** * RtlValidAcl [NTDLL.@] */ diff --git a/include/winternl.h b/include/winternl.h index 9b40fd426e..a861aa7a13 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2357,6 +2357,7 @@ NTSYSAPI NTSTATUS WINAPI RtlAddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,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); +NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID,BOOL,BOOL); NTSYSAPI void WINAPI RtlAddRefActivationContext(HANDLE); NTSYSAPI PVOID WINAPI RtlAddVectoredExceptionHandler(ULONG,PVECTORED_EXCEPTION_HANDLER); NTSYSAPI NTSTATUS WINAPI RtlAdjustPrivilege(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN);