Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43884
b: refs/heads/master
c: 200d018
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Dec 9, 2006
1 parent e148c36 commit f2cc5d9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f0647a52974daccbe20990fb6341f07792445fe0
refs/heads/master: 200d018eff4be3a1fb9823441cfcebb7de86a677
3 changes: 2 additions & 1 deletion trunk/fs/cifs/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Allow null user to be specified on mount ("username="). Do not return
EINVAL on readdir when filldir fails due to overwritten blocksize
(fixes FC problem). Return error in rename 2nd attempt retry (ie report
if rename by handle also fails, after rename by path fails, we were
not reporting whether the retry worked or not).
not reporting whether the retry worked or not). Fix NTLMv2 to
work to Windows servers (mount with option "sec=ntlmv2").

Version 1.45
------------
Expand Down
4 changes: 3 additions & 1 deletion trunk/fs/cifs/cifsencrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,10 @@ void setup_ntlmv2_rsp(struct cifsSesInfo * ses, char * resp_buf,
buf->time = cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME));
get_random_bytes(&buf->client_chal, sizeof(buf->client_chal));
buf->reserved2 = 0;
buf->names[0].type = 0;
buf->names[0].type = cpu_to_le16(NTLMSSP_DOMAIN_TYPE);
buf->names[0].length = 0;
buf->names[1].type = 0;
buf->names[1].length = 0;

/* calculate buf->ntlmv2_hash */
rc = calc_ntlmv2_hash(ses, nls_cp);
Expand Down
8 changes: 7 additions & 1 deletion trunk/fs/cifs/cifspdu.h
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,12 @@ typedef union smb_com_session_setup_andx {

/* format of NLTMv2 Response ie "case sensitive password" hash when NTLMv2 */

#define NTLMSSP_SERVER_TYPE 1
#define NTLMSSP_DOMAIN_TYPE 2
#define NTLMSSP_FQ_DOMAIN_TYPE 3
#define NTLMSSP_DNS_DOMAIN_TYPE 4
#define NTLMSSP_DNS_PARENT_TYPE 5

struct ntlmssp2_name {
__le16 type;
__le16 length;
Expand All @@ -593,7 +599,7 @@ struct ntlmv2_resp {
__le64 time;
__u64 client_chal; /* random */
__u32 reserved2;
struct ntlmssp2_name names[1];
struct ntlmssp2_name names[2];
/* array of name entries could follow ending in minimum 4 byte struct */
} __attribute__((packed));

Expand Down

0 comments on commit f2cc5d9

Please sign in to comment.