From 8d0a3775bda50733b566626b4ac0eb6d96be3e84 Mon Sep 17 00:00:00 2001
From: Zhenbo Li <litimetal@gmail.com>
Date: Thu, 17 Sep 2015 16:11:06 +0800
Subject: authz: Added additional stub functions.

---
 dlls/authz/authz.c    | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++
 dlls/authz/authz.spec |  8 +++----
 2 files changed, 70 insertions(+), 4 deletions(-)

diff --git a/dlls/authz/authz.c b/dlls/authz/authz.c
index 08ca8c3..5755ab2 100644
--- a/dlls/authz/authz.c
+++ b/dlls/authz/authz.c
@@ -25,6 +25,16 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(authz);
 
+DECLARE_HANDLE(AUTHZ_ACCESS_CHECK_RESULTS_HANDLE);
+DECLARE_HANDLE(AUTHZ_CLIENT_CONTEXT_HANDLE);
+DECLARE_HANDLE(AUTHZ_RESOURCE_MANAGER_HANDLE);
+DECLARE_HANDLE(AUTHZ_AUDIT_EVENT_HANDLE);
+
+typedef AUTHZ_ACCESS_CHECK_RESULTS_HANDLE *PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE;
+typedef AUTHZ_CLIENT_CONTEXT_HANDLE *PAUTHZ_CLIENT_CONTEXT_HANDLE;
+typedef struct _AUTHZ_ACCESS_REQUEST *PAUTHZ_ACCESS_REQUEST;
+typedef struct _AUTHZ_ACCESS_REPLY *PAUTHZ_ACCESS_REPLY;
+
 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 {
     TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
@@ -67,3 +77,59 @@ BOOL WINAPI AuthzInstallSecurityEventSource(DWORD dwFlags, LPVOID pRegistration)
     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
     return FALSE;
 }
+
+
+/***********************************************************************
+ *              AuthzAccessCheck (AUTHZ.@)
+ */
+BOOL WINAPI AuthzAccessCheck(DWORD flags, AUTHZ_CLIENT_CONTEXT_HANDLE client_context,
+        PAUTHZ_ACCESS_REQUEST request, AUTHZ_AUDIT_EVENT_HANDLE audit_event,
+        PSECURITY_DESCRIPTOR security, PSECURITY_DESCRIPTOR *optional_security,
+        DWORD optional_security_count, PAUTHZ_ACCESS_REPLY reply,
+        PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE access_check_result)
+{
+    FIXME("(0x%x,%p,%p,%p,%p,%p,0x%x,%p,%p): stub\n", flags, client_context,
+            request, audit_event, security, optional_security,
+            optional_security_count, reply, access_check_result);
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+
+/***********************************************************************
+ *              AuthzFreeContext (AUTHZ.@)
+ */
+BOOL WINAPI AuthzFreeContext(AUTHZ_CLIENT_CONTEXT_HANDLE client_context)
+{
+    FIXME("(%p): stub\n", client_context);
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+
+/***********************************************************************
+ *              AuthzInitializeContextFromSid (AUTHZ.@)
+ */
+BOOL WINAPI AuthzInitializeContextFromSid(DWORD flags, PSID sid,
+        AUTHZ_RESOURCE_MANAGER_HANDLE resource_manager, PLARGE_INTEGER expire_time,
+        LUID id, PVOID dynamic_group, PAUTHZ_CLIENT_CONTEXT_HANDLE client_context)
+{
+    FIXME("(0x%x,%p,%p,%p,%08x:%08x,%p,%p): stub\n", flags, sid, resource_manager,
+            expire_time, id.HighPart, id.LowPart, dynamic_group, client_context);
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+
+/***********************************************************************
+ *              AuthzInitializeContextFromToken (AUTHZ.@)
+ */
+BOOL WINAPI AuthzInitializeContextFromToken(DWORD flags, HANDLE token_handle,
+        AUTHZ_RESOURCE_MANAGER_HANDLE resource_manager, PLARGE_INTEGER expire_time,
+        LUID id, PVOID dynamic_group, PAUTHZ_CLIENT_CONTEXT_HANDLE client_context)
+{
+    FIXME("(0x%x,%p,%p,%p,%08x:%08x,%p,%p): stub\n", flags, token_handle, resource_manager,
+            expire_time, id.HighPart, id.LowPart, dynamic_group, client_context);
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
diff --git a/dlls/authz/authz.spec b/dlls/authz/authz.spec
index acf3228..eb9e044 100644
--- a/dlls/authz/authz.spec
+++ b/dlls/authz/authz.spec
@@ -1,16 +1,16 @@
-@ stub AuthzAccessCheck
+@ stdcall AuthzAccessCheck(long long ptr long ptr ptr long ptr ptr)
 @ stub AuthzAddSidsToContext
 @ stub AuthzCachedAccessCheck
 @ stub AuthzEnumerateSecurityEventSources
 @ stub AuthzEvaluateSacl
 @ stub AuthzFreeAuditEvent
-@ stub AuthzFreeContext
+@ stdcall AuthzFreeContext(long)
 @ stub AuthzFreeHandle
 @ stub AuthzFreeResourceManager
 @ stub AuthzGetInformationFromContext
 @ stub AuthzInitializeContextFromAuthzContext
-@ stub AuthzInitializeContextFromSid
-@ stub AuthzInitializeContextFromToken
+@ stdcall AuthzInitializeContextFromSid(long ptr long ptr int64 ptr ptr)
+@ stdcall AuthzInitializeContextFromToken(long long long ptr int64 ptr ptr)
 @ stub AuthzInitializeObjectAccessAuditEvent
 @ stub AuthzInitializeObjectAccessAuditEvent2
 @ stdcall AuthzInitializeResourceManager(long ptr ptr ptr wstr ptr)
-- 
2.5.1

