ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

lsamode.c
Go to the documentation of this file.
00001 /*
00002  * LSA-mode functions of the SChannel security provider
00003  *
00004  * Copyright 2007 Yuval Fledel
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00019  */
00020 
00021 #include <stdarg.h>
00022 
00023 #include "ntstatus.h"
00024 #define WIN32_NO_STATUS
00025 #include "windef.h"
00026 #include "winbase.h"
00027 #include "sspi.h"
00028 #include "ntsecapi.h"
00029 #include "ntsecpkg.h"
00030 #include "schannel.h"
00031 
00032 #include "wine/debug.h"
00033 
00034 WINE_DEFAULT_DEBUG_CHANNEL(schannel);
00035 
00036 /***********************************************************************
00037  *              SpGetInfoUnified
00038  */
00039 static NTSTATUS WINAPI SpGetInfoUnified(PSecPkgInfoW PackageInfo)
00040 {
00041     TRACE("(%p)\n", PackageInfo);
00042 
00043     PackageInfo->fCapabilities = SECPKG_FLAG_MUTUAL_AUTH |
00044         SECPKG_FLAG_INTEGRITY | SECPKG_FLAG_PRIVACY |
00045         SECPKG_FLAG_CONNECTION | SECPKG_FLAG_MULTI_REQUIRED |
00046         SECPKG_FLAG_EXTENDED_ERROR | SECPKG_FLAG_IMPERSONATION |
00047         SECPKG_FLAG_ACCEPT_WIN32_NAME | SECPKG_FLAG_STREAM;
00048     PackageInfo->wVersion   = 1;
00049     PackageInfo->wRPCID     = UNISP_RPC_ID;
00050     PackageInfo->cbMaxToken = 0x4000;
00051     PackageInfo->Name       = (LPWSTR)UNISP_NAME_W;
00052     PackageInfo->Comment    = (LPWSTR)UNISP_NAME_W;
00053 
00054     return STATUS_SUCCESS;
00055 }
00056 
00057 static SEC_WCHAR schannelCommentW[] = { 'S','c','h','a','n','n','e','l',
00058      ' ','S','e','c','u','r','i','t','y',' ','P','a','c','k','a','g','e',0 };
00059 
00060 /***********************************************************************
00061  *              SpGetInfoSChannel
00062  */
00063 static NTSTATUS WINAPI SpGetInfoSChannel(PSecPkgInfoW PackageInfo)
00064 {
00065     TRACE("(%p)\n", PackageInfo);
00066 
00067     PackageInfo->fCapabilities = SECPKG_FLAG_MUTUAL_AUTH |
00068         SECPKG_FLAG_INTEGRITY | SECPKG_FLAG_PRIVACY |
00069         SECPKG_FLAG_CONNECTION | SECPKG_FLAG_MULTI_REQUIRED |
00070         SECPKG_FLAG_EXTENDED_ERROR | SECPKG_FLAG_IMPERSONATION |
00071         SECPKG_FLAG_ACCEPT_WIN32_NAME | SECPKG_FLAG_STREAM;
00072     PackageInfo->wVersion   = 1;
00073     PackageInfo->wRPCID     = UNISP_RPC_ID;
00074     PackageInfo->cbMaxToken = 0x4000;
00075     PackageInfo->Name       = (LPWSTR)SCHANNEL_NAME_W;
00076     PackageInfo->Comment    = schannelCommentW;
00077 
00078     return STATUS_SUCCESS;
00079 }
00080 
00081 static SECPKG_FUNCTION_TABLE secPkgFunctionTable[2] =
00082 { {
00083     NULL, /* InitializePackage */
00084     NULL, /* LsaLogonUser */
00085     NULL, /* CallPackage */
00086     NULL, /* LogonTerminated */
00087     NULL, /* CallPackageUntrusted */
00088     NULL, /* CallPackagePassthrough */
00089     NULL, /* LogonUserEx */
00090     NULL, /* LogonUserEx2 */
00091     NULL, /* Initialize */
00092     NULL, /* Shutdown */
00093     SpGetInfoUnified,
00094     NULL, /* AcceptCredentials */
00095     NULL, /* SpAcquireCredentialsHandle */
00096     NULL, /* SpQueryCredentialsAttributes */
00097     NULL, /* FreeCredentialsHandle */
00098     NULL, /* SaveCredentials */
00099     NULL, /* GetCredentials */
00100     NULL, /* DeleteCredentials */
00101     NULL, /* InitLsaModeContext */
00102     NULL, /* AcceptLsaModeContext */
00103     NULL, /* DeleteContext */
00104     NULL, /* ApplyControlToken */
00105     NULL, /* GetUserInfo */
00106     NULL, /* GetExtendedInformation */
00107     NULL, /* SpQueryContextAttributes */
00108     NULL, /* SpAddCredentials */
00109     NULL, /* SetExtendedInformation */
00110     NULL, /* SetContextAttributes */
00111     NULL, /* SetCredentialsAttributes */
00112     NULL, /* ChangeAccountPassword */
00113     NULL, /* QueryMetaData */
00114     NULL, /* ExchangeMetaData */
00115     NULL, /* GetCredUIContext */
00116     NULL, /* UpdateCredentials */
00117     NULL, /* ValidateTargetInfo */
00118   }, {
00119     NULL, /* InitializePackage */
00120     NULL, /* LsaLogonUser */
00121     NULL, /* CallPackage */
00122     NULL, /* LogonTerminated */
00123     NULL, /* CallPackageUntrusted */
00124     NULL, /* CallPackagePassthrough */
00125     NULL, /* LogonUserEx */
00126     NULL, /* LogonUserEx2 */
00127     NULL, /* Initialize */
00128     NULL, /* Shutdown */
00129     SpGetInfoSChannel,
00130     NULL, /* AcceptCredentials */
00131     NULL, /* SpAcquireCredentialsHandle */
00132     NULL, /* SpQueryCredentialsAttributes */
00133     NULL, /* FreeCredentialsHandle */
00134     NULL, /* SaveCredentials */
00135     NULL, /* GetCredentials */
00136     NULL, /* DeleteCredentials */
00137     NULL, /* InitLsaModeContext */
00138     NULL, /* AcceptLsaModeContext */
00139     NULL, /* DeleteContext */
00140     NULL, /* ApplyControlToken */
00141     NULL, /* GetUserInfo */
00142     NULL, /* GetExtendedInformation */
00143     NULL, /* SpQueryContextAttributes */
00144     NULL, /* SpAddCredentials */
00145     NULL, /* SetExtendedInformation */
00146     NULL, /* SetContextAttributes */
00147     NULL, /* SetCredentialsAttributes */
00148     NULL, /* ChangeAccountPassword */
00149     NULL, /* QueryMetaData */
00150     NULL, /* ExchangeMetaData */
00151     NULL, /* GetCredUIContext */
00152     NULL, /* UpdateCredentials */
00153     NULL, /* ValidateTargetInfo */
00154   }
00155 };
00156 
00157 /***********************************************************************
00158  *              SpLsaModeInitialize (SCHANNEL.@)
00159  */
00160 NTSTATUS WINAPI SpLsaModeInitialize(ULONG LsaVersion, PULONG PackageVersion,
00161                                     PSECPKG_FUNCTION_TABLE *ppTables, PULONG pcTables)
00162 {
00163     TRACE("(%u, %p, %p, %p)\n", LsaVersion, PackageVersion, ppTables, pcTables);
00164 
00165     *PackageVersion = SECPKG_INTERFACE_VERSION_6;
00166     *pcTables = 2;
00167     *ppTables = secPkgFunctionTable;
00168 
00169     return STATUS_SUCCESS;
00170 }

Generated on Sat May 26 2012 04:24:46 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.