aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 9d2ebab53db7..5bce2778163b 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2686,13 +2686,13 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
2686 /* setup pointers to domain name and workstation name */ 2686 /* setup pointers to domain name and workstation name */
2687 bcc_ptr += SecurityBlobLength; 2687 bcc_ptr += SecurityBlobLength;
2688 2688
2689 SecurityBlob->WorkstationName.Buffer = 0; 2689 SecurityBlob->WorkstationName.BufferOffset = 0;
2690 SecurityBlob->WorkstationName.Length = 0; 2690 SecurityBlob->WorkstationName.Length = 0;
2691 SecurityBlob->WorkstationName.MaximumLength = 0; 2691 SecurityBlob->WorkstationName.MaximumLength = 0;
2692 2692
2693 /* Domain not sent on first Sesssetup in NTLMSSP, instead it is sent 2693 /* Domain not sent on first Sesssetup in NTLMSSP, instead it is sent
2694 along with username on auth request (ie the response to challenge) */ 2694 along with username on auth request (ie the response to challenge) */
2695 SecurityBlob->DomainName.Buffer = 0; 2695 SecurityBlob->DomainName.BufferOffset = 0;
2696 SecurityBlob->DomainName.Length = 0; 2696 SecurityBlob->DomainName.Length = 0;
2697 SecurityBlob->DomainName.MaximumLength = 0; 2697 SecurityBlob->DomainName.MaximumLength = 0;
2698 if (ses->capabilities & CAP_UNICODE) { 2698 if (ses->capabilities & CAP_UNICODE) {
@@ -3020,30 +3020,30 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
3020 3020
3021/* setup pointers to domain name and workstation name */ 3021/* setup pointers to domain name and workstation name */
3022 3022
3023 SecurityBlob->WorkstationName.Buffer = 0; 3023 SecurityBlob->WorkstationName.BufferOffset = 0;
3024 SecurityBlob->WorkstationName.Length = 0; 3024 SecurityBlob->WorkstationName.Length = 0;
3025 SecurityBlob->WorkstationName.MaximumLength = 0; 3025 SecurityBlob->WorkstationName.MaximumLength = 0;
3026 SecurityBlob->SessionKey.Length = 0; 3026 SecurityBlob->SessionKey.Length = 0;
3027 SecurityBlob->SessionKey.MaximumLength = 0; 3027 SecurityBlob->SessionKey.MaximumLength = 0;
3028 SecurityBlob->SessionKey.Buffer = 0; 3028 SecurityBlob->SessionKey.BufferOffset = 0;
3029 3029
3030 SecurityBlob->LmChallengeResponse.Length = 0; 3030 SecurityBlob->LmChallengeResponse.Length = 0;
3031 SecurityBlob->LmChallengeResponse.MaximumLength = 0; 3031 SecurityBlob->LmChallengeResponse.MaximumLength = 0;
3032 SecurityBlob->LmChallengeResponse.Buffer = 0; 3032 SecurityBlob->LmChallengeResponse.BufferOffset = 0;
3033 3033
3034 SecurityBlob->NtChallengeResponse.Length = 3034 SecurityBlob->NtChallengeResponse.Length =
3035 cpu_to_le16(CIFS_SESS_KEY_SIZE); 3035 cpu_to_le16(CIFS_SESS_KEY_SIZE);
3036 SecurityBlob->NtChallengeResponse.MaximumLength = 3036 SecurityBlob->NtChallengeResponse.MaximumLength =
3037 cpu_to_le16(CIFS_SESS_KEY_SIZE); 3037 cpu_to_le16(CIFS_SESS_KEY_SIZE);
3038 memcpy(bcc_ptr, ntlm_session_key, CIFS_SESS_KEY_SIZE); 3038 memcpy(bcc_ptr, ntlm_session_key, CIFS_SESS_KEY_SIZE);
3039 SecurityBlob->NtChallengeResponse.Buffer = 3039 SecurityBlob->NtChallengeResponse.BufferOffset =
3040 cpu_to_le32(SecurityBlobLength); 3040 cpu_to_le32(SecurityBlobLength);
3041 SecurityBlobLength += CIFS_SESS_KEY_SIZE; 3041 SecurityBlobLength += CIFS_SESS_KEY_SIZE;
3042 bcc_ptr += CIFS_SESS_KEY_SIZE; 3042 bcc_ptr += CIFS_SESS_KEY_SIZE;
3043 3043
3044 if (ses->capabilities & CAP_UNICODE) { 3044 if (ses->capabilities & CAP_UNICODE) {
3045 if (domain == NULL) { 3045 if (domain == NULL) {
3046 SecurityBlob->DomainName.Buffer = 0; 3046 SecurityBlob->DomainName.BufferOffset = 0;
3047 SecurityBlob->DomainName.Length = 0; 3047 SecurityBlob->DomainName.Length = 0;
3048 SecurityBlob->DomainName.MaximumLength = 0; 3048 SecurityBlob->DomainName.MaximumLength = 0;
3049 } else { 3049 } else {
@@ -3052,14 +3052,14 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
3052 ln *= 2; 3052 ln *= 2;
3053 SecurityBlob->DomainName.MaximumLength = 3053 SecurityBlob->DomainName.MaximumLength =
3054 cpu_to_le16(ln); 3054 cpu_to_le16(ln);
3055 SecurityBlob->DomainName.Buffer = 3055 SecurityBlob->DomainName.BufferOffset =
3056 cpu_to_le32(SecurityBlobLength); 3056 cpu_to_le32(SecurityBlobLength);
3057 bcc_ptr += ln; 3057 bcc_ptr += ln;
3058 SecurityBlobLength += ln; 3058 SecurityBlobLength += ln;
3059 SecurityBlob->DomainName.Length = cpu_to_le16(ln); 3059 SecurityBlob->DomainName.Length = cpu_to_le16(ln);
3060 } 3060 }
3061 if (user == NULL) { 3061 if (user == NULL) {
3062 SecurityBlob->UserName.Buffer = 0; 3062 SecurityBlob->UserName.BufferOffset = 0;
3063 SecurityBlob->UserName.Length = 0; 3063 SecurityBlob->UserName.Length = 0;
3064 SecurityBlob->UserName.MaximumLength = 0; 3064 SecurityBlob->UserName.MaximumLength = 0;
3065 } else { 3065 } else {
@@ -3068,7 +3068,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
3068 ln *= 2; 3068 ln *= 2;
3069 SecurityBlob->UserName.MaximumLength = 3069 SecurityBlob->UserName.MaximumLength =
3070 cpu_to_le16(ln); 3070 cpu_to_le16(ln);
3071 SecurityBlob->UserName.Buffer = 3071 SecurityBlob->UserName.BufferOffset =
3072 cpu_to_le32(SecurityBlobLength); 3072 cpu_to_le32(SecurityBlobLength);
3073 bcc_ptr += ln; 3073 bcc_ptr += ln;
3074 SecurityBlobLength += ln; 3074 SecurityBlobLength += ln;
@@ -3080,7 +3080,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
3080 SecurityBlob->WorkstationName.Length *= 2; 3080 SecurityBlob->WorkstationName.Length *= 2;
3081 SecurityBlob->WorkstationName.MaximumLength = 3081 SecurityBlob->WorkstationName.MaximumLength =
3082 cpu_to_le16(SecurityBlob->WorkstationName.Length); 3082 cpu_to_le16(SecurityBlob->WorkstationName.Length);
3083 SecurityBlob->WorkstationName.Buffer = 3083 SecurityBlob->WorkstationName.BufferOffset =
3084 cpu_to_le32(SecurityBlobLength); 3084 cpu_to_le32(SecurityBlobLength);
3085 bcc_ptr += SecurityBlob->WorkstationName.Length; 3085 bcc_ptr += SecurityBlob->WorkstationName.Length;
3086 SecurityBlobLength += SecurityBlob->WorkstationName.Length; 3086 SecurityBlobLength += SecurityBlob->WorkstationName.Length;
@@ -3112,7 +3112,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
3112 bcc_ptr += 2; /* null domain */ 3112 bcc_ptr += 2; /* null domain */
3113 } else { /* ASCII */ 3113 } else { /* ASCII */
3114 if (domain == NULL) { 3114 if (domain == NULL) {
3115 SecurityBlob->DomainName.Buffer = 0; 3115 SecurityBlob->DomainName.BufferOffset = 0;
3116 SecurityBlob->DomainName.Length = 0; 3116 SecurityBlob->DomainName.Length = 0;
3117 SecurityBlob->DomainName.MaximumLength = 0; 3117 SecurityBlob->DomainName.MaximumLength = 0;
3118 } else { 3118 } else {
@@ -3122,14 +3122,14 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
3122 ln = strnlen(domain, 64); 3122 ln = strnlen(domain, 64);
3123 SecurityBlob->DomainName.MaximumLength = 3123 SecurityBlob->DomainName.MaximumLength =
3124 cpu_to_le16(ln); 3124 cpu_to_le16(ln);
3125 SecurityBlob->DomainName.Buffer = 3125 SecurityBlob->DomainName.BufferOffset =
3126 cpu_to_le32(SecurityBlobLength); 3126 cpu_to_le32(SecurityBlobLength);
3127 bcc_ptr += ln; 3127 bcc_ptr += ln;
3128 SecurityBlobLength += ln; 3128 SecurityBlobLength += ln;
3129 SecurityBlob->DomainName.Length = cpu_to_le16(ln); 3129 SecurityBlob->DomainName.Length = cpu_to_le16(ln);
3130 } 3130 }
3131 if (user == NULL) { 3131 if (user == NULL) {
3132 SecurityBlob->UserName.Buffer = 0; 3132 SecurityBlob->UserName.BufferOffset = 0;
3133 SecurityBlob->UserName.Length = 0; 3133 SecurityBlob->UserName.Length = 0;
3134 SecurityBlob->UserName.MaximumLength = 0; 3134 SecurityBlob->UserName.MaximumLength = 0;
3135 } else { 3135 } else {
@@ -3137,7 +3137,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
3137 strncpy(bcc_ptr, user, 63); 3137 strncpy(bcc_ptr, user, 63);
3138 ln = strnlen(user, 64); 3138 ln = strnlen(user, 64);
3139 SecurityBlob->UserName.MaximumLength = cpu_to_le16(ln); 3139 SecurityBlob->UserName.MaximumLength = cpu_to_le16(ln);
3140 SecurityBlob->UserName.Buffer = 3140 SecurityBlob->UserName.BufferOffset =
3141 cpu_to_le32(SecurityBlobLength); 3141 cpu_to_le32(SecurityBlobLength);
3142 bcc_ptr += ln; 3142 bcc_ptr += ln;
3143 SecurityBlobLength += ln; 3143 SecurityBlobLength += ln;