2013-03-16 20:41:13 +00:00
|
|
|
/*
|
2000-08-12 19:33:23 +00:00
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS system libraries
|
|
|
|
* FILE: lib/secur32/lsa.c
|
|
|
|
* PURPOSE: Client-side LSA functions
|
|
|
|
* UPDATE HISTORY:
|
|
|
|
* Created 05/08/00
|
|
|
|
*/
|
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#include "precomp.h"
|
2000-08-12 19:33:23 +00:00
|
|
|
|
2014-09-25 12:37:19 +00:00
|
|
|
VOID LsapInitLsaPort(VOID);
|
|
|
|
VOID LsapCloseLsaPort(VOID);
|
|
|
|
|
2000-08-12 19:33:23 +00:00
|
|
|
/* GLOBALS *******************************************************************/
|
|
|
|
|
|
|
|
HANDLE Secur32Heap;
|
|
|
|
|
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
[SECUR32]: As an interim step towards a proper NTLM implementation that is done by Samuel Serapion, I temporarily commit Wine's NTLM code layer around Samba's "ntlm_auth" utility. In addition I add the kerberos & negotiate stubs too.
This is not a problem on Wine, because they run on Linux distributions, most of which have Samba available. But this is not the case on Windows / ReactOS, so few adaptations were needed: in the dispatcher.c code, the fork_helper function was partially rewritten around CreateProcess to start the ntlm_auth utility (I try to use maximally the CRT to not have to rewrite other functions). This works great.
But then, to make this NTLM layer working on ReactOS, one has to find a Windows build of Samba. Here is one: http://smithii.com/samba . This is a Samba 3.0.23c build. You need to follow *exactly* the manual installation steps to make it work (actually, everything up to "Step 6" included, i.e. running smbsetup.cmd). This means in particular to copy Samba into C:\Program Files\samba, as this path is also hardcoded into the executables.
As the Wine's NTLM layer expects Samba 3.0.25+, I manually downgraded the expected version, which appears to still work nice for the needs of Office 2010 installation.
You can now play with it and try to install Office 2010.
CORE-12601 #comment Wine's NTLM layer committed in r73868 as an interim step towards a proper implementation.
CORE-12279
svn path=/trunk/; revision=73868
2017-02-20 22:28:07 +00:00
|
|
|
#ifdef __REACTOS__
|
|
|
|
// See sspi.c
|
|
|
|
extern void SECUR32_freeProviders(void);
|
|
|
|
#endif
|
|
|
|
|
2013-10-13 11:14:08 +00:00
|
|
|
BOOL
|
|
|
|
WINAPI
|
|
|
|
DllMain(HINSTANCE hInstance,
|
|
|
|
ULONG Reason,
|
|
|
|
PVOID Reserved)
|
2000-08-12 19:33:23 +00:00
|
|
|
{
|
2013-10-13 11:14:08 +00:00
|
|
|
switch (Reason)
|
|
|
|
{
|
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
Secur32Heap = RtlCreateHeap(0, NULL, 0, 4096, NULL, NULL);
|
|
|
|
if (Secur32Heap == 0)
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
2014-09-25 12:37:19 +00:00
|
|
|
LsapInitLsaPort();
|
2013-10-13 11:14:08 +00:00
|
|
|
break;
|
2007-10-19 23:21:45 +00:00
|
|
|
|
2013-10-13 11:14:08 +00:00
|
|
|
case DLL_PROCESS_DETACH:
|
[SECUR32]: As an interim step towards a proper NTLM implementation that is done by Samuel Serapion, I temporarily commit Wine's NTLM code layer around Samba's "ntlm_auth" utility. In addition I add the kerberos & negotiate stubs too.
This is not a problem on Wine, because they run on Linux distributions, most of which have Samba available. But this is not the case on Windows / ReactOS, so few adaptations were needed: in the dispatcher.c code, the fork_helper function was partially rewritten around CreateProcess to start the ntlm_auth utility (I try to use maximally the CRT to not have to rewrite other functions). This works great.
But then, to make this NTLM layer working on ReactOS, one has to find a Windows build of Samba. Here is one: http://smithii.com/samba . This is a Samba 3.0.23c build. You need to follow *exactly* the manual installation steps to make it work (actually, everything up to "Step 6" included, i.e. running smbsetup.cmd). This means in particular to copy Samba into C:\Program Files\samba, as this path is also hardcoded into the executables.
As the Wine's NTLM layer expects Samba 3.0.25+, I manually downgraded the expected version, which appears to still work nice for the needs of Office 2010 installation.
You can now play with it and try to install Office 2010.
CORE-12601 #comment Wine's NTLM layer committed in r73868 as an interim step towards a proper implementation.
CORE-12279
svn path=/trunk/; revision=73868
2017-02-20 22:28:07 +00:00
|
|
|
#ifdef __REACTOS__
|
|
|
|
SECUR32_freeProviders();
|
|
|
|
#endif
|
2014-09-25 12:37:19 +00:00
|
|
|
LsapCloseLsaPort();
|
2013-10-13 11:14:08 +00:00
|
|
|
if (!RtlDestroyHeap(Secur32Heap))
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
2000-08-12 19:33:23 +00:00
|
|
|
}
|