aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsencrypt.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-12-07 23:14:28 -0500
committerSteve French <sfrench@us.ibm.com>2006-12-07 23:14:28 -0500
commit33ec32fae0e2c4433bfd1e74cbde6cb16604a719 (patch)
treed1752424d29d226e4d23868d186fdb16d66e6f25 /fs/cifs/cifsencrypt.c
parentc99767974ebd2a719d849fdeaaa1674456f5283f (diff)
[CIFS] Fix NTLMv2 mounts to Windows servers
Windows servers are pickier about NTLMv2 than Samba. This enables more secure mounts to Windows (not just Samba) ie when "sec=ntlmv2" is specified on the mount. Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsencrypt.c')
-rw-r--r--fs/cifs/cifsencrypt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
index 4bc250b2d9fc..fdeda519eace 100644
--- a/fs/cifs/cifsencrypt.c
+++ b/fs/cifs/cifsencrypt.c
@@ -372,8 +372,10 @@ void setup_ntlmv2_rsp(struct cifsSesInfo * ses, char * resp_buf,
372 buf->time = cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME)); 372 buf->time = cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME));
373 get_random_bytes(&buf->client_chal, sizeof(buf->client_chal)); 373 get_random_bytes(&buf->client_chal, sizeof(buf->client_chal));
374 buf->reserved2 = 0; 374 buf->reserved2 = 0;
375 buf->names[0].type = 0; 375 buf->names[0].type = cpu_to_le16(NTLMSSP_DOMAIN_TYPE);
376 buf->names[0].length = 0; 376 buf->names[0].length = 0;
377 buf->names[1].type = 0;
378 buf->names[1].length = 0;
377 379
378 /* calculate buf->ntlmv2_hash */ 380 /* calculate buf->ntlmv2_hash */
379 rc = calc_ntlmv2_hash(ses, nls_cp); 381 rc = calc_ntlmv2_hash(ses, nls_cp);