Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
[CIFS] update cifs version
cifs: Fix regression in LANMAN (LM) auth code
cifs: fix handling of scopeid in cifs_convert_address

+9 -9
+1 -1
fs/cifs/cifsfs.h
··· 127 extern const struct export_operations cifs_export_ops; 128 #endif /* EXPERIMENTAL */ 129 130 - #define CIFS_VERSION "1.70" 131 #endif /* _CIFSFS_H */
··· 127 extern const struct export_operations cifs_export_ops; 128 #endif /* EXPERIMENTAL */ 129 130 + #define CIFS_VERSION "1.71" 131 #endif /* _CIFSFS_H */
+4 -4
fs/cifs/netmisc.c
··· 170 { 171 int rc, alen, slen; 172 const char *pct; 173 - char *endp, scope_id[13]; 174 struct sockaddr_in *s4 = (struct sockaddr_in *) dst; 175 struct sockaddr_in6 *s6 = (struct sockaddr_in6 *) dst; 176 ··· 197 memcpy(scope_id, pct + 1, slen); 198 scope_id[slen] = '\0'; 199 200 - s6->sin6_scope_id = (u32) simple_strtoul(pct, &endp, 0); 201 - if (endp != scope_id + slen) 202 - return 0; 203 } 204 205 return rc;
··· 170 { 171 int rc, alen, slen; 172 const char *pct; 173 + char scope_id[13]; 174 struct sockaddr_in *s4 = (struct sockaddr_in *) dst; 175 struct sockaddr_in6 *s6 = (struct sockaddr_in6 *) dst; 176 ··· 197 memcpy(scope_id, pct + 1, slen); 198 scope_id[slen] = '\0'; 199 200 + rc = strict_strtoul(scope_id, 0, 201 + (unsigned long *)&s6->sin6_scope_id); 202 + rc = (rc == 0) ? 1 : 0; 203 } 204 205 return rc;
+4 -4
fs/cifs/sess.c
··· 656 657 if (type == LANMAN) { 658 #ifdef CONFIG_CIFS_WEAK_PW_HASH 659 - char lnm_session_key[CIFS_SESS_KEY_SIZE]; 660 661 pSMB->req.hdr.Flags2 &= ~SMBFLG2_UNICODE; 662 663 /* no capabilities flags in old lanman negotiation */ 664 665 - pSMB->old_req.PasswordLength = cpu_to_le16(CIFS_SESS_KEY_SIZE); 666 667 /* Calculate hash with password and copy into bcc_ptr. 668 * Encryption Key (stored as in cryptkey) gets used if the ··· 675 true : false, lnm_session_key); 676 677 ses->flags |= CIFS_SES_LANMAN; 678 - memcpy(bcc_ptr, (char *)lnm_session_key, CIFS_SESS_KEY_SIZE); 679 - bcc_ptr += CIFS_SESS_KEY_SIZE; 680 681 /* can not sign if LANMAN negotiated so no need 682 to calculate signing key? but what if server
··· 656 657 if (type == LANMAN) { 658 #ifdef CONFIG_CIFS_WEAK_PW_HASH 659 + char lnm_session_key[CIFS_AUTH_RESP_SIZE]; 660 661 pSMB->req.hdr.Flags2 &= ~SMBFLG2_UNICODE; 662 663 /* no capabilities flags in old lanman negotiation */ 664 665 + pSMB->old_req.PasswordLength = cpu_to_le16(CIFS_AUTH_RESP_SIZE); 666 667 /* Calculate hash with password and copy into bcc_ptr. 668 * Encryption Key (stored as in cryptkey) gets used if the ··· 675 true : false, lnm_session_key); 676 677 ses->flags |= CIFS_SES_LANMAN; 678 + memcpy(bcc_ptr, (char *)lnm_session_key, CIFS_AUTH_RESP_SIZE); 679 + bcc_ptr += CIFS_AUTH_RESP_SIZE; 680 681 /* can not sign if LANMAN negotiated so no need 682 to calculate signing key? but what if server