diff options
author | Shirish Pargaonkar <shirishpargaonkar@gmail.com> | 2010-10-28 10:53:07 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-10-28 21:47:33 -0400 |
commit | d3686d54c7902a303bd65d751226aa1647319863 (patch) | |
tree | b4acd7dfc6c5ec2f254608a2f0ef11ef274861b8 /fs/cifs/cifsglob.h | |
parent | d3ba50b17aa7a391bb5b3dcd8d6ba7a02c4f031c (diff) |
cifs: Cleanup and thus reduce smb session structure and fields used during authentication
Removed following fields from smb session structure
cryptkey, ntlmv2_hash, tilen, tiblob
and ntlmssp_auth structure is allocated dynamically only if the auth mech
in NTLMSSP.
response field within a session_key structure is used to initially store the
target info (either plucked from type 2 challenge packet in case of NTLMSSP
or fabricated in case of NTLMv2 without extended security) and then to store
Message Authentication Key (mak) (session key + client response).
Server challenge or cryptkey needed during a NTLMSSP authentication
is now part of ntlmssp_auth structure which gets allocated and freed
once authenticaiton process is done.
Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index b73695176467..f259e4d7612d 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -119,11 +119,12 @@ struct cifs_secmech { | |||
119 | struct sdesc *sdescmd5; /* ctxt to generate cifs/smb signature */ | 119 | struct sdesc *sdescmd5; /* ctxt to generate cifs/smb signature */ |
120 | }; | 120 | }; |
121 | 121 | ||
122 | /* per smb connection structure/fields */ | 122 | /* per smb session structure/fields */ |
123 | struct ntlmssp_auth { | 123 | struct ntlmssp_auth { |
124 | __u32 client_flags; /* sent by client in type 1 ntlmsssp exchange */ | 124 | __u32 client_flags; /* sent by client in type 1 ntlmsssp exchange */ |
125 | __u32 server_flags; /* sent by server in type 2 ntlmssp exchange */ | 125 | __u32 server_flags; /* sent by server in type 2 ntlmssp exchange */ |
126 | unsigned char ciphertext[CIFS_CPHTXT_SIZE]; /* sent to server */ | 126 | unsigned char ciphertext[CIFS_CPHTXT_SIZE]; /* sent to server */ |
127 | char cryptkey[CIFS_CRYPTO_KEY_SIZE]; /* used by ntlmssp */ | ||
127 | }; | 128 | }; |
128 | 129 | ||
129 | struct cifs_cred { | 130 | struct cifs_cred { |
@@ -241,12 +242,8 @@ struct cifsSesInfo { | |||
241 | char userName[MAX_USERNAME_SIZE + 1]; | 242 | char userName[MAX_USERNAME_SIZE + 1]; |
242 | char *domainName; | 243 | char *domainName; |
243 | char *password; | 244 | char *password; |
244 | char cryptkey[CIFS_CRYPTO_KEY_SIZE]; /* used by ntlmssp */ | ||
245 | struct session_key auth_key; | 245 | struct session_key auth_key; |
246 | char ntlmv2_hash[16]; | 246 | struct ntlmssp_auth *ntlmssp; /* ciphertext, flags, server challenge */ |
247 | unsigned int tilen; /* length of the target info blob */ | ||
248 | unsigned char *tiblob; /* target info blob in challenge response */ | ||
249 | struct ntlmssp_auth ntlmssp; /* ciphertext, flags */ | ||
250 | bool need_reconnect:1; /* connection reset, uid now invalid */ | 247 | bool need_reconnect:1; /* connection reset, uid now invalid */ |
251 | }; | 248 | }; |
252 | /* no more than one of the following three session flags may be set */ | 249 | /* no more than one of the following three session flags may be set */ |