Needed for IE11.
Signed-off-by: Mohamad Al-Jaf mohamadaljaf@gmail.com --- This is likely how Windows implements this function. --- dlls/advapi32/advapi32.spec | 2 +- dlls/advapi32/security.c | 27 +++++++++++++++++++++++++++ include/winbase.h | 2 ++ 3 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index a720f43a7f1..42760099881 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -8,7 +8,7 @@ @ stdcall AccessCheckAndAuditAlarmA(str ptr str str ptr long ptr long ptr ptr ptr) @ 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 +@ stdcall AccessCheckByTypeAndAuditAlarmA(str ptr str str ptr ptr long long long ptr long ptr long ptr ptr ptr) @ stdcall -import AccessCheckByTypeAndAuditAlarmW(wstr ptr wstr wstr ptr ptr long long long ptr long ptr long ptr ptr ptr) # @ stub AccessCheckByTypeResultList # @ stub AccessCheckByTypeResultListAndAuditAlarmA diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index e0f7b63aedb..c6ecc295c4f 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -1429,6 +1429,33 @@ BOOL WINAPI AccessCheckAndAuditAlarmA(LPCSTR Subsystem, LPVOID HandleId, LPSTR O return TRUE; }
+/****************************************************************************** + * AccessCheckByTypeAndAuditAlarmA [ADVAPI32.@] + */ +BOOL WINAPI AccessCheckByTypeAndAuditAlarmA( LPCSTR subsystem, LPVOID id, LPCSTR type_name, + LPCSTR 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; + BOOL ret; + + RtlCreateUnicodeStringFromAsciiz(&subsystemW, subsystem); + RtlCreateUnicodeStringFromAsciiz(&type_nameW, type_name); + RtlCreateUnicodeStringFromAsciiz(&nameW, name); + + ret = AccessCheckByTypeAndAuditAlarmW( subsystemW.Buffer, id, type_nameW.Buffer, nameW.Buffer, descr, + sid, access, type, flags, list, length, + mapping, creation, granted, status, on_close ); + + RtlFreeUnicodeString(&subsystemW); + RtlFreeUnicodeString(&type_nameW); + RtlFreeUnicodeString(&nameW); + return ret; +} + BOOL WINAPI ObjectCloseAuditAlarmA(LPCSTR SubsystemName, LPVOID HandleId, BOOL GenerateOnClose) { FIXME("stub (%s,%p,%x)\n", debugstr_a(SubsystemName), HandleId, GenerateOnClose); diff --git a/include/winbase.h b/include/winbase.h index ee1c1627a6b..ea48bc99ba7 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -1780,7 +1780,9 @@ 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 AccessCheckByTypeAndAuditAlarmA(LPCSTR,LPVOID,LPCSTR,LPCSTR,PSECURITY_DESCRIPTOR,PSID,DWORD,AUDIT_EVENT_TYPE,DWORD,POBJECT_TYPE_LIST,DWORD,PGENERIC_MAPPING,BOOL,LPDWORD,LPBOOL,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); +#define AccessCheckByTypeAndAuditAlarm WINELIB_NAME_AW(AccessCheckByTypeAndAuditAlarm) WINBASEAPI VOID WINAPI AcquireSRWLockExclusive(PSRWLOCK); WINBASEAPI VOID WINAPI AcquireSRWLockShared(PSRWLOCK); WINADVAPI BOOL WINAPI AdjustTokenPrivileges(HANDLE,BOOL,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);