secur32: Clean up the helper in all cases where it was allocated.
[wine] / dlls / secur32 / lsa.c
1 /* Copyright (C) 2004 Juan Lang
2  * Copyright (C) 2007 Kai Blin
3  *
4  * Local Security Authority functions, as far as secur32 has them.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20
21 #include <stdarg.h>
22
23 #include "ntstatus.h"
24 #define WIN32_NO_STATUS
25 #include "windef.h"
26 #include "winbase.h"
27 #include "ntsecapi.h"
28
29 #include "wine/debug.h"
30
31 WINE_DEFAULT_DEBUG_CHANNEL(lsa);
32
33 NTSTATUS WINAPI LsaCallAuthenticationPackage(HANDLE LsaHandle,
34         ULONG AuthenticationPackage, PVOID ProtocolSubmitBuffer,
35         ULONG SubmitBufferLength, PVOID* ProtocolReturnBuffer,
36         PULONG ReturnBufferLength, PNTSTATUS ProtocolStatus)
37 {
38     FIXME("%p %d %p %d %p %p %p stub\n", LsaHandle, AuthenticationPackage,
39           ProtocolSubmitBuffer, SubmitBufferLength, ProtocolReturnBuffer,
40           ReturnBufferLength, ProtocolStatus);
41     return STATUS_SUCCESS;
42 }
43
44 NTSTATUS WINAPI LsaConnectUntrusted(PHANDLE LsaHandle)
45 {
46     FIXME("%p stub\n", LsaHandle);
47     return STATUS_SUCCESS;
48 }
49
50 NTSTATUS WINAPI LsaDeregisterLogonProcess(HANDLE LsaHandle)
51 {
52     FIXME("%p stub\n", LsaHandle);
53     return STATUS_SUCCESS;
54 }
55
56 NTSTATUS WINAPI LsaEnumerateLogonSessions(PULONG LogonSessionCount,
57         PLUID* LogonSessionList)
58 {
59     FIXME("%p %p stub\n", LogonSessionCount, LogonSessionList);
60     *LogonSessionCount = 0;
61     *LogonSessionList = NULL;
62
63     return STATUS_SUCCESS;
64 }
65
66 NTSTATUS WINAPI LsaFreeReturnBuffer(PVOID Buffer)
67 {
68     FIXME("%p stub\n", Buffer);
69     return STATUS_SUCCESS;
70 }
71
72 NTSTATUS WINAPI LsaGetLogonSessionData(PLUID LogonId,
73         PSECURITY_LOGON_SESSION_DATA* ppLogonSessionData)
74 {
75     FIXME("%p %p stub\n", LogonId, ppLogonSessionData);
76     *ppLogonSessionData = NULL;
77     return STATUS_NOT_IMPLEMENTED;
78 }
79
80 NTSTATUS WINAPI LsaLogonUser(HANDLE LsaHandle, PLSA_STRING OriginName,
81         SECURITY_LOGON_TYPE LogonType, ULONG AuthenticationPackage,
82         PVOID AuthenticationInformation, ULONG AuthenticationInformationLength,
83         PTOKEN_GROUPS LocalGroups, PTOKEN_SOURCE SourceContext,
84         PVOID* ProfileBuffer, PULONG ProfileBufferLength, PLUID LogonId,
85         PHANDLE Token, PQUOTA_LIMITS Quotas, PNTSTATUS SubStatus)
86 {
87     FIXME("%p %p %d %d %p %d %p %p %p %p %p %p %p %p stub\n", LsaHandle,
88             OriginName, LogonType, AuthenticationPackage,
89             AuthenticationInformation, AuthenticationInformationLength,
90             LocalGroups, SourceContext, ProfileBuffer, ProfileBufferLength,
91             LogonId, Token, Quotas, SubStatus);
92     return STATUS_SUCCESS;
93 }
94
95 NTSTATUS WINAPI LsaLookupAuthenticationPackage(HANDLE LsaHandle,
96         PLSA_STRING PackageName, PULONG AuthenticationPackage)
97 {
98     FIXME("%p %p %p stub\n", LsaHandle, PackageName, AuthenticationPackage);
99     AuthenticationPackage = NULL;
100     return STATUS_SUCCESS;
101 }
102
103 NTSTATUS WINAPI LsaRegisterLogonProcess(PLSA_STRING LogonProcessName,
104         PHANDLE LsaHandle, PLSA_OPERATIONAL_MODE SecurityMode)
105 {
106     FIXME("%p %p %p stub\n", LogonProcessName, LsaHandle, SecurityMode);
107     return STATUS_SUCCESS;
108 }