From 61171a5f11a1e631c3075f1415ddc0bf8f4c31ff Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Wed, 18 Apr 2018 12:53:57 +0200 Subject: [PATCH] secur32: Return a handle from LsaRegisterLogonProcess. Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/secur32/lsa.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/dlls/secur32/lsa.c b/dlls/secur32/lsa.c index 779d67a3a0f..5fe6f3a8f21 100644 --- a/dlls/secur32/lsa.c +++ b/dlls/secur32/lsa.c @@ -88,18 +88,34 @@ NTSTATUS WINAPI LsaCallAuthenticationPackage(HANDLE lsa_handle, ULONG package_id return STATUS_INVALID_PARAMETER; } +struct lsa_connection *alloc_lsa_connection(void) +{ + struct lsa_connection *ret; + if (!(ret = heap_alloc(sizeof(*ret)))) return NULL; + ret->magic = LSA_MAGIC; + return ret; +} + NTSTATUS WINAPI LsaConnectUntrusted(PHANDLE LsaHandle) { struct lsa_connection *lsa_conn; TRACE("%p\n", LsaHandle); - lsa_conn = heap_alloc(sizeof(*lsa_conn)); - if (!lsa_conn) return STATUS_NO_MEMORY; - - lsa_conn->magic = LSA_MAGIC; + if (!(lsa_conn = alloc_lsa_connection())) return STATUS_NO_MEMORY; *LsaHandle = lsa_conn; + return STATUS_SUCCESS; +} + +NTSTATUS WINAPI LsaRegisterLogonProcess(PLSA_STRING LogonProcessName, + PHANDLE LsaHandle, PLSA_OPERATIONAL_MODE SecurityMode) +{ + struct lsa_connection *lsa_conn; + + FIXME("%s %p %p stub\n", debugstr_as(LogonProcessName), LsaHandle, SecurityMode); + if (!(lsa_conn = alloc_lsa_connection())) return STATUS_NO_MEMORY; + *LsaHandle = lsa_conn; return STATUS_SUCCESS; } @@ -923,10 +939,3 @@ NTSTATUS WINAPI LsaLookupAuthenticationPackage(HANDLE lsa_handle, return STATUS_UNSUCCESSFUL; /* FIXME */ } - -NTSTATUS WINAPI LsaRegisterLogonProcess(PLSA_STRING LogonProcessName, - PHANDLE LsaHandle, PLSA_OPERATIONAL_MODE SecurityMode) -{ - FIXME("%p %p %p stub\n", LogonProcessName, LsaHandle, SecurityMode); - return STATUS_SUCCESS; -} -- 2.11.4.GIT