wined3d: Fix missing break inside switch in SetAutoGenFilterType.
[wine.git] / dlls / schannel / lsamode.c
blob23d85994cc4d0fa3a2bbe8025c1715fe0b67b0a0
1 /*
2 * LSA-mode functions of the SChannel security provider
4 * Copyright 2007 Yuval Fledel
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.
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.
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
21 #include <stdarg.h>
23 #include "ntstatus.h"
24 #define WIN32_NO_STATUS
25 #include "windef.h"
26 #include "winbase.h"
27 #include "sspi.h"
28 #include "ntsecapi.h"
29 #include "ntsecpkg.h"
30 #include "schannel.h"
32 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(schannel);
36 /***********************************************************************
37 * SpGetInfoUnified
39 static NTSTATUS WINAPI SpGetInfoUnified(PSecPkgInfoW PackageInfo)
41 TRACE("(%p)\n", PackageInfo);
43 PackageInfo->fCapabilities = SECPKG_FLAG_MUTUAL_AUTH |
44 SECPKG_FLAG_INTEGRITY | SECPKG_FLAG_PRIVACY |
45 SECPKG_FLAG_CONNECTION | SECPKG_FLAG_MULTI_REQUIRED |
46 SECPKG_FLAG_EXTENDED_ERROR | SECPKG_FLAG_IMPERSONATION |
47 SECPKG_FLAG_ACCEPT_WIN32_NAME | SECPKG_FLAG_STREAM;
48 PackageInfo->wVersion = 1;
49 PackageInfo->wRPCID = UNISP_RPC_ID;
50 PackageInfo->cbMaxToken = 0x4000;
51 PackageInfo->Name = (LPWSTR)UNISP_NAME_W;
52 PackageInfo->Comment = (LPWSTR)UNISP_NAME_W;
54 return STATUS_SUCCESS;
57 static SEC_WCHAR schannelCommentW[] = { 'S','c','h','a','n','n','e','l',
58 ' ','S','e','c','u','r','i','t','y',' ','P','a','c','k','a','g','e',0 };
60 /***********************************************************************
61 * SpGetInfoSChannel
63 static NTSTATUS WINAPI SpGetInfoSChannel(PSecPkgInfoW PackageInfo)
65 TRACE("(%p)\n", PackageInfo);
67 PackageInfo->fCapabilities = SECPKG_FLAG_MUTUAL_AUTH |
68 SECPKG_FLAG_INTEGRITY | SECPKG_FLAG_PRIVACY |
69 SECPKG_FLAG_CONNECTION | SECPKG_FLAG_MULTI_REQUIRED |
70 SECPKG_FLAG_EXTENDED_ERROR | SECPKG_FLAG_IMPERSONATION |
71 SECPKG_FLAG_ACCEPT_WIN32_NAME | SECPKG_FLAG_STREAM;
72 PackageInfo->wVersion = 1;
73 PackageInfo->wRPCID = UNISP_RPC_ID;
74 PackageInfo->cbMaxToken = 0x4000;
75 PackageInfo->Name = (LPWSTR)SCHANNEL_NAME_W;
76 PackageInfo->Comment = schannelCommentW;
78 return STATUS_SUCCESS;
81 static SECPKG_FUNCTION_TABLE secPkgFunctionTable[2] =
82 { {
83 NULL, /* InitializePackage */
84 NULL, /* LsaLogonUser */
85 NULL, /* CallPackage */
86 NULL, /* LogonTerminated */
87 NULL, /* CallPackageUntrusted */
88 NULL, /* CallPackagePassthrough */
89 NULL, /* LogonUserEx */
90 NULL, /* LogonUserEx2 */
91 NULL, /* Initialize */
92 NULL, /* Shutdown */
93 SpGetInfoUnified,
94 NULL, /* AcceptCredentials */
95 NULL, /* SpAcquireCredentialsHandle */
96 NULL, /* SpQueryCredentialsAttributes */
97 NULL, /* FreeCredentialsHandle */
98 NULL, /* SaveCredentials */
99 NULL, /* GetCredentials */
100 NULL, /* DeleteCredentials */
101 NULL, /* InitLsaModeContext */
102 NULL, /* AcceptLsaModeContext */
103 NULL, /* DeleteContext */
104 NULL, /* ApplyControlToken */
105 NULL, /* GetUserInfo */
106 NULL, /* GetExtendedInformation */
107 NULL, /* SpQueryContextAttributes */
108 NULL, /* SpAddCredentials */
109 NULL, /* SetExtendedInformation */
110 NULL, /* SetContextAttributes */
111 NULL, /* SetCredentialsAttributes */
112 }, {
113 NULL, /* InitializePackage */
114 NULL, /* LsaLogonUser */
115 NULL, /* CallPackage */
116 NULL, /* LogonTerminated */
117 NULL, /* CallPackageUntrusted */
118 NULL, /* CallPackagePassthrough */
119 NULL, /* LogonUserEx */
120 NULL, /* LogonUserEx2 */
121 NULL, /* Initialize */
122 NULL, /* Shutdown */
123 SpGetInfoSChannel,
124 NULL, /* AcceptCredentials */
125 NULL, /* SpAcquireCredentialsHandle */
126 NULL, /* SpQueryCredentialsAttributes */
127 NULL, /* FreeCredentialsHandle */
128 NULL, /* SaveCredentials */
129 NULL, /* GetCredentials */
130 NULL, /* DeleteCredentials */
131 NULL, /* InitLsaModeContext */
132 NULL, /* AcceptLsaModeContext */
133 NULL, /* DeleteContext */
134 NULL, /* ApplyControlToken */
135 NULL, /* GetUserInfo */
136 NULL, /* GetExtendedInformation */
137 NULL, /* SpQueryContextAttributes */
138 NULL, /* SpAddCredentials */
139 NULL, /* SetExtendedInformation */
140 NULL, /* SetContextAttributes */
141 NULL, /* SetCredentialsAttributes */
145 /***********************************************************************
146 * SpLsaModeInitialize (SCHANNEL.@)
148 NTSTATUS WINAPI SpLsaModeInitialize(ULONG LsaVersion, PULONG PackageVersion,
149 PSECPKG_FUNCTION_TABLE *ppTables, PULONG pcTables)
151 TRACE("(%u, %p, %p, %p)\n", LsaVersion, PackageVersion, ppTables, pcTables);
153 *PackageVersion = SECPKG_INTERFACE_VERSION_3;
154 *pcTables = 2;
155 *ppTables = secPkgFunctionTable;
157 return STATUS_SUCCESS;