summaryrefslogtreecommitdiffstats
path: root/fs/cifs/ntlmssp.h
Commit message (Collapse)AuthorAgeFilesLines
* cifs NTLMv2/NTLMSSP ntlmv2 within ntlmssp autentication codeShirish Pargaonkar2010-09-291-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attribue Value (AV) pairs or Target Info (TI) pairs are part of ntlmv2 authentication. Structure ntlmv2_resp had only definition for two av pairs. So removed it, and now allocation of av pairs is dynamic. For servers like Windows 7/2008, av pairs sent by server in challege packet (type 2 in the ntlmssp exchange/negotiation) can vary. Server sends them during ntlmssp negotiation. So when ntlmssp is used as an authentication mechanism, type 2 challenge packet from server has this information. Pluck it and use the entire blob for authenticaiton purpose. If user has not specified, extract (netbios) domain name from the av pairs which is used to calculate ntlmv2 hash. Servers like Windows 7 are particular about the AV pair blob. Servers like Windows 2003, are not very strict about the contents of av pair blob used during ntlmv2 authentication. So when security mechanism such as ntlmv2 is used (not ntlmv2 in ntlmssp), there is no negotiation and so genereate a minimal blob that gets used in ntlmv2 authentication as well as gets sent. Fields tilen and tilbob are session specific. AV pair values are defined. To calculate ntlmv2 response we need ti/av pair blob. For sec mech like ntlmssp, the blob is plucked from type 2 response from the server. From this blob, netbios name of the domain is retrieved, if user has not already provided, to be included in the Target String as part of ntlmv2 hash calculations. For sec mech like ntlmv2, create a minimal, two av pair blob. The allocated blob is freed in case of error. In case there is no error, this blob is used in calculating ntlmv2 response (in CalcNTLMv2_response) and is also copied on the response to the server, and then freed. The type 3 ntlmssp response is prepared on a buffer, 5 * sizeof of struct _AUTHENTICATE_MESSAGE, an empirical value large enough to hold _AUTHENTICATE_MESSAGE plus a blob with max possible 10 values as part of ntlmv2 response and lmv2 keys and domain, user, workstation names etc. Also, kerberos gets selected as a default mechanism if server supports it, over the other security mechanisms. Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* Revert "[CIFS] Fix ntlmv2 auth with ntlmssp"Steve French2010-09-081-13/+0
| | | | | | | | | | | | This reverts commit 9fbc590860e75785bdaf8b83e48fabfe4d4f7d58. The change to kernel crypto and fixes to ntlvm2 and ntlmssp series, introduced a regression. Deferring this patch series to 2.6.37 after Shirish fixes it. Signed-off-by: Steve French <sfrench@us.ibm.com> Acked-by: Jeff Layton <jlayton@redhat.com> CC: Shirish Pargaonkar <shirishp@us.ibm.com>
* [CIFS] Fix ntlmv2 auth with ntlmsspSteve French2010-08-201-0/+13
| | | | | | | | | | | | | | | | | | | | | Make ntlmv2 as an authentication mechanism within ntlmssp instead of ntlmv1. Parse type 2 response in ntlmssp negotiation to pluck AV pairs and use them to calculate ntlmv2 response token. Also, assign domain name from the sever response in type 2 packet of ntlmssp and use that (netbios) domain name in calculation of response. Enable cifs/smb signing using rc4 and md5. Changed name of the structure mac_key to session_key to reflect the type of key it holds. Use kernel crypto_shash_* APIs instead of the equivalent cifs functions. Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Add remaining ntlmssp flags and standardize field namesSteve French2009-05-011-26/+42
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] cleanup old checkpatch warningsSteve French2008-05-131-2/+2
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] whitespace cleanupSteve French2007-07-061-1/+1
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] whitespace fixesSteve French2007-06-281-10/+10
| | | | | | This changeset brought to you ... by patchcheck.pl Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Cleanup NTLMSSP session setup handlingSteve French2006-02-091-1/+1
| | | | | | Fix to hash NTLMv2 properly will follow. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Change pragma pack(1) to attribute(packed) to allow cifs on arm to accessSteve French2005-10-271-8/+4
| | | | | | | | | | | | | | | | | unaligned structures coming in off the wire gcc on arm processors generates very odd code with pragma pack specified - although it does pack the structures in some sense - it does not allow you to access unaligned elements in nested structures at the right offset as other architectures do. Oddly enough though, specifying the structures as packed the long way - one by one with the packed attribute does work. Rather than fighting over whether this is a gcc bug or some obscure side effect of pragma pack, it is easier to do what most (all but 96 other places in the kernel) do - and replace pragma pack with dozens of attribute(packed) structure qualifiers. Much more verbose ... but at least it works. Signed-off-by: David Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com> CG: -----------------------------------------------------------------------
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+101
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
OpenPOWER on IntegriCloud