Needed for IE11.
Signed-off-by: Mohamad Al-Jaf mohamadaljaf@gmail.com --- dlls/advapi32/advapi32.spec | 2 +- dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/security.c | 26 ++++++++++++++++++++++++++ include/winbase.h | 1 + 4 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index cefc8dc2899..a720f43a7f1 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -9,7 +9,7 @@ @ stdcall -import AccessCheckAndAuditAlarmW(wstr ptr wstr wstr ptr long ptr long ptr ptr ptr) @ stdcall -import AccessCheckByType(ptr ptr long long ptr long ptr ptr ptr ptr ptr) # @ stub AccessCheckByTypeAndAuditAlarmA -# @ stub AccessCheckByTypeAndAuditAlarmW +@ stdcall -import AccessCheckByTypeAndAuditAlarmW(wstr ptr wstr wstr ptr ptr long long long ptr long ptr long ptr ptr ptr) # @ stub AccessCheckByTypeResultList # @ stub AccessCheckByTypeResultListAndAuditAlarmA # @ stub AccessCheckByTypeResultListAndAuditAlarmByHandleA diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index c1175af2f9f..8465d773851 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1,7 +1,7 @@ @ stdcall AccessCheck(ptr long long ptr ptr ptr ptr ptr) @ stdcall AccessCheckAndAuditAlarmW(wstr ptr wstr wstr ptr long ptr long ptr ptr ptr) @ stdcall AccessCheckByType(ptr ptr long long ptr long ptr ptr ptr ptr ptr) -@ stub AccessCheckByTypeAndAuditAlarmW +@ stdcall AccessCheckByTypeAndAuditAlarmW(wstr ptr wstr wstr ptr ptr long long long ptr long ptr long ptr ptr ptr) @ stub AccessCheckByTypeResultList @ stub AccessCheckByTypeResultListAndAuditAlarmByHandleW @ stub AccessCheckByTypeResultListAndAuditAlarmW diff --git a/dlls/kernelbase/security.c b/dlls/kernelbase/security.c index 26878982b6f..ee963a0f37d 100644 --- a/dlls/kernelbase/security.c +++ b/dlls/kernelbase/security.c @@ -1330,6 +1330,32 @@ BOOL WINAPI AccessCheckByType( PSECURITY_DESCRIPTOR descr, PSID sid, HANDLE toke return !*status; }
+/****************************************************************************** + * AccessCheckByTypeAndAuditAlarmW (kernelbase.@) + */ +BOOL WINAPI AccessCheckByTypeAndAuditAlarmW( LPCWSTR subsystem, LPVOID id, LPCWSTR type_name, + LPCWSTR name, PSECURITY_DESCRIPTOR descr, PSID sid, + DWORD access, AUDIT_EVENT_TYPE type, DWORD flags, + POBJECT_TYPE_LIST list, DWORD length, + PGENERIC_MAPPING mapping, BOOL creation, LPDWORD granted, + LPBOOL status, LPBOOL on_close ) +{ + UNICODE_STRING subsystemW, type_nameW, nameW; + NTSTATUS access_status; + BOOL ret; + + RtlInitUnicodeString( &subsystemW, subsystem ); + RtlInitUnicodeString( &type_nameW, type_name ); + RtlInitUnicodeString( &nameW, name ); + + ret = set_ntstatus( NtAccessCheckByTypeAndAuditAlarm( &subsystemW, id, &type_nameW, &nameW, descr, + sid, access, type, flags, list, length, + mapping, creation, granted, &access_status, + (PBOOLEAN)on_close )); + if (ret) *status = set_ntstatus( access_status ); + return ret; +} + /****************************************************************************** * AddAccessAllowedAce (kernelbase.@) */ diff --git a/include/winbase.h b/include/winbase.h index a0c62d710b9..ee1c1627a6b 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -1780,6 +1780,7 @@ WINADVAPI BOOL WINAPI AccessCheckAndAuditAlarmA(LPCSTR,LPVOID,LPSTR,LPST WINADVAPI BOOL WINAPI AccessCheckAndAuditAlarmW(LPCWSTR,LPVOID,LPWSTR,LPWSTR,PSECURITY_DESCRIPTOR,DWORD,PGENERIC_MAPPING,BOOL,LPDWORD,LPBOOL,LPBOOL); #define AccessCheckAndAuditAlarm WINELIB_NAME_AW(AccessCheckAndAuditAlarm) WINADVAPI BOOL WINAPI AccessCheckByType(PSECURITY_DESCRIPTOR,PSID,HANDLE,DWORD,POBJECT_TYPE_LIST,DWORD,PGENERIC_MAPPING,PPRIVILEGE_SET,LPDWORD,LPDWORD,LPBOOL); +WINADVAPI BOOL WINAPI AccessCheckByTypeAndAuditAlarmW(LPCWSTR,LPVOID,LPCWSTR,LPCWSTR,PSECURITY_DESCRIPTOR,PSID,DWORD,AUDIT_EVENT_TYPE,DWORD,POBJECT_TYPE_LIST,DWORD,PGENERIC_MAPPING,BOOL,LPDWORD,LPBOOL,LPBOOL); WINBASEAPI VOID WINAPI AcquireSRWLockExclusive(PSRWLOCK); WINBASEAPI VOID WINAPI AcquireSRWLockShared(PSRWLOCK); WINADVAPI BOOL WINAPI AdjustTokenPrivileges(HANDLE,BOOL,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);