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
This commit is contained in:
Коммит
b4f5c46245
|
@ -127,5 +127,5 @@ extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg);
|
|||
extern const struct export_operations cifs_export_ops;
|
||||
#endif /* EXPERIMENTAL */
|
||||
|
||||
#define CIFS_VERSION "1.70"
|
||||
#define CIFS_VERSION "1.71"
|
||||
#endif /* _CIFSFS_H */
|
||||
|
|
|
@ -170,7 +170,7 @@ cifs_convert_address(struct sockaddr *dst, const char *src, int len)
|
|||
{
|
||||
int rc, alen, slen;
|
||||
const char *pct;
|
||||
char *endp, scope_id[13];
|
||||
char scope_id[13];
|
||||
struct sockaddr_in *s4 = (struct sockaddr_in *) dst;
|
||||
struct sockaddr_in6 *s6 = (struct sockaddr_in6 *) dst;
|
||||
|
||||
|
@ -197,9 +197,9 @@ cifs_convert_address(struct sockaddr *dst, const char *src, int len)
|
|||
memcpy(scope_id, pct + 1, slen);
|
||||
scope_id[slen] = '\0';
|
||||
|
||||
s6->sin6_scope_id = (u32) simple_strtoul(pct, &endp, 0);
|
||||
if (endp != scope_id + slen)
|
||||
return 0;
|
||||
rc = strict_strtoul(scope_id, 0,
|
||||
(unsigned long *)&s6->sin6_scope_id);
|
||||
rc = (rc == 0) ? 1 : 0;
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
|
|
@ -656,13 +656,13 @@ ssetup_ntlmssp_authenticate:
|
|||
|
||||
if (type == LANMAN) {
|
||||
#ifdef CONFIG_CIFS_WEAK_PW_HASH
|
||||
char lnm_session_key[CIFS_SESS_KEY_SIZE];
|
||||
char lnm_session_key[CIFS_AUTH_RESP_SIZE];
|
||||
|
||||
pSMB->req.hdr.Flags2 &= ~SMBFLG2_UNICODE;
|
||||
|
||||
/* no capabilities flags in old lanman negotiation */
|
||||
|
||||
pSMB->old_req.PasswordLength = cpu_to_le16(CIFS_SESS_KEY_SIZE);
|
||||
pSMB->old_req.PasswordLength = cpu_to_le16(CIFS_AUTH_RESP_SIZE);
|
||||
|
||||
/* Calculate hash with password and copy into bcc_ptr.
|
||||
* Encryption Key (stored as in cryptkey) gets used if the
|
||||
|
@ -675,8 +675,8 @@ ssetup_ntlmssp_authenticate:
|
|||
true : false, lnm_session_key);
|
||||
|
||||
ses->flags |= CIFS_SES_LANMAN;
|
||||
memcpy(bcc_ptr, (char *)lnm_session_key, CIFS_SESS_KEY_SIZE);
|
||||
bcc_ptr += CIFS_SESS_KEY_SIZE;
|
||||
memcpy(bcc_ptr, (char *)lnm_session_key, CIFS_AUTH_RESP_SIZE);
|
||||
bcc_ptr += CIFS_AUTH_RESP_SIZE;
|
||||
|
||||
/* can not sign if LANMAN negotiated so no need
|
||||
to calculate signing key? but what if server
|
||||
|
|
Загрузка…
Ссылка в новой задаче