Commit Graph

79 Commits

Author SHA1 Message Date
Rob Shearman 088ae3b81c secur32: Fix ntlm_GetCachedCredential to not call strlenW on a NULL pointer.
pszHost should just be set to pszTargetName if pszTargetName doesn't
contain any other information.
2008-03-10 19:12:54 +01:00
Rob Shearman 8a2125f932 secur32: Try to retrive credentials by using the credential manager to retrieve credentials saved for the target server in InitializeContextHandleW, if possible. 2008-02-04 11:10:50 +01:00
Rob Shearman 506ba701bb secur32: If using cached credentials failed in InitializeSecurityContext then fail with SEC_E_NO_CREDENTIALS instead of carrying on with a blank password. 2008-02-04 11:10:05 +01:00
Rob Shearman 72ffc3fad9 secur32: Move the detection of NULL credentials from AcquireCredentialsHandle to InitializeSecurityContext.
Only use cached credentials if the credentials were NULL. Don't pass a 
domain into ntlm_auth when using cached credentials as 
ntlm_auth/winbindd should be able to figure that out.
2008-02-04 11:10:01 +01:00
Andrew Talbot e4ca5c5647 secur32: Remove unneeded casts. 2008-01-21 11:38:45 +01:00
Michael Stefaniuc d117938f7a secur32: Remove the SECUR32_ALLOC() macro around HeapAlloc(). 2007-12-06 12:07:12 +01:00
Kai Blin fdfa760c85 secur32: ntlm_auth returns BH if the connection to winbindd fails. 2007-10-09 12:34:35 +02:00
Andrew Talbot 9b1082ef3b secur32: Fix some memory leaks. 2007-10-05 10:26:20 +02:00
Kai Blin 5afd341aec secur32: Remove hardcoded assumption that the SECBUFFER_DATA is always at index 1 for en/decrypting. 2007-10-02 11:42:10 +02:00
Kai Blin 78b047e4e4 secur32: Give a hint where to find ntlm_auth. 2007-08-30 11:57:18 +02:00
Rob Shearman 610a3b1ad2 secur32: Remove valid_session_key from NegoHelper since it is only ever set and not read. 2007-08-08 15:32:00 +02:00
Rob Shearman 888a8e27b8 secur32: Split the NTLM credential and context handles into separate objects.
This prevents races with two threads using the helper object at the same
time on two different context handles, eliminates the need to free the
credential handle after freeing the context handles and also prevents a
crash caused by not clearing session_key in DeleteSecurityContext.
2007-08-08 15:32:00 +02:00
Rob Shearman 2ede1370d3 secur32: Don't free the password in InitializeSecurityContextW to enable the credentials handle to be re-used in further InitializeSecurityContextW calls. 2007-07-03 12:29:19 +02:00
Kai Blin c1e724bc88 secur32: Downgrade WARN to TRACE, fix another TRACE. 2007-05-29 11:54:22 +02:00
Rob Shearman aa1be492cd secur32: Fix NTLM's InitializeSecurityContextA/W to be flexible with the index of the token buffer in both the input and output buffer descriptions. 2007-05-25 20:17:11 +02:00
Rob Shearman 4d275bcf10 secur32: Don't set the output buffer type in NTLM's IntializeSecurityContextA/W. 2007-05-25 20:16:58 +02:00
Rob Shearman 661b49785e secur32: Make the NTLM SSP cope with a NULL phCredential parameter when InitializeSecurityContext is called more than once. 2007-05-25 20:16:42 +02:00
Kai Blin 7e6c5aad3c secur32: Move NTLM debug output to a seperate "ntlm" channel. 2007-04-16 12:08:44 +02:00
Rob Shearman b814c45f00 secur32: NTLM's AcquireCredentialHandleA/W should accept domains and usernames with lengths of 0.
Add tests for these cases.
2007-03-06 21:59:39 +01:00
Rob Shearman d9229bd1c5 secur32: NTLM - don't bother nul terminating the password string as nothing relies on it being nul terminated. 2007-03-06 21:59:34 +01:00
Rob Shearman 3012038e73 secur32: NTLM - don't copy more data from User, Domain and Password
pointers in the SEC_WINNT_AUTH_IDENTITY structure than the
corresponding Length fields say the pointers hold.
2007-03-06 21:59:28 +01:00
Kai Blin 7325bbd127 secur32: Fix ntlm_auth version number check when registering the NTLM SSP. 2007-02-06 12:30:21 +01:00
Kai Blin 809e4124d7 secur32: Bump minimal required samba version to 3.0.25, 3.0.24 is a bugfix release. 2007-02-06 12:30:16 +01:00
Kai Blin 747ab4bf74 secur32: Fix off-by-one error in converting the password to unicode. 2007-01-24 12:56:33 +01:00
Kai Blin dc98ac1adb secur32: Fix off-by-one error when copying the password to the helper.
This fixes NTLM authentication with Outlook2003.
2007-01-24 12:07:41 +01:00
Francois Gouget aab5e5856e Don't put single quotes around '%s' when using the debugstr_*() functions. 2007-01-18 12:55:50 +01:00
Patrik Stridvall f46da1f985 secur32: Use constants instead of hardcoded values. 2006-12-24 15:12:34 +01:00
Dmitry Timoshkov 098e82d81e secur32: Make some data const. 2006-12-14 20:11:44 +01:00
Kai Blin 3dc6390e72 secur32: Improve version detection, move all the version detection to ntlm.c.
Also, as starting with Samba 3.0.24, ntlm_auth will have all the features
we need, require that as minimal version and remove odd old-version
compatibility hacks.
2006-11-29 12:37:20 +01:00
Kai Blin 1037e20bc7 secur32: Fix handling of ISC_REQ* flags in InitializeSecurityContext. 2006-11-14 11:34:19 +01:00
Kai Blin 48f934ee96 secur32: work around a bug in ntlm_auth that breaks RPC. 2006-11-10 11:34:41 +01:00
Kai Blin d5c0acd057 secur32: Implement NTLM2 encryption. 2006-11-09 14:33:31 +01:00
Kai Blin 1360339422 secur32: Implement ntlmv2 signing. 2006-11-09 10:39:20 +01:00
Kai Blin a51e02c5d6 secur32: Use a helper function for creating the signature as this simplifies implementing NTLM2 signing a lot. 2006-11-08 20:12:34 +01:00
Kai Blin 6720a129f3 secur32: Delete session key and arc4 context when the session based security context is deleted. 2006-11-08 20:08:09 +01:00
Kai Blin 3af72bec1e secur32: Test and fix DecryptMessage for multiple data buffers. 2006-11-06 13:47:29 +01:00
Kai Blin cd8332ae1c secur32: Fix handling of buffers that don't have the SECBUFFER_TOKEN as the first buffer.
Thanks to Robert Shearman for catching this one and providing some of the test code.
2006-11-04 12:07:05 +01:00
Kai Blin 0c3f45eda0 secur32: Avoid double HeapFree() of password and session key. 2006-11-04 12:02:01 +01:00
Rob Shearman 7be4853911 secur32: Make the path to ntlm_auth easier to change by moving the executable name to the top of ntlm.c. 2006-11-02 21:57:20 +01:00
Hans Leidekker 2638e9d467 secur32: Win64 printf format warning fixes. 2006-10-16 10:54:33 +02:00
Francois Gouget 8e38ac5911 secur32: Add missing '\n' in a Wine trace. 2006-10-13 11:20:53 +02:00
Kai Blin 640d87dfc6 secur32: Add support for cached client credentials. 2006-10-06 17:45:52 +02:00
Francois Gouget 82babbee0b Add missing '\n's to Wine traces. 2006-10-05 17:46:48 +02:00
Kai Blin 6ae83720dd secur32: Tell the user if ntlm_auth is not found or outdated. 2006-09-21 19:57:07 +02:00
Kai Blin 98aeac78fc secur32: Fix DecryptMessage for the dummy case. 2006-09-08 11:02:25 +02:00
Kai Blin 85655db106 secur32: Fix generation of the session key. 2006-09-08 11:02:17 +02:00
Kai Blin bfa5967366 secur32: Initial working implementation of EncryptMessage and DecryptMessage. 2006-08-21 12:08:30 +02:00
Kai Blin 2164502322 secur32: Gracefully handle ntlm_auth versions that don't support the new commands. 2006-08-18 11:45:52 +02:00
Kai Blin c4d5becd6f secur32: Add real signing / verifying to NTLM provider. 2006-08-17 11:38:05 +02:00
Kai Blin 92a86a03e2 secur32: Mask away NTLMv2 and key exchange flags so we never negotiate it for now. 2006-08-17 11:29:22 +02:00