aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-17 15:49:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-17 15:49:55 -0400
commitf560f6697f17e2465c8845c09f3a483faef38275 (patch)
treeb5b77d5f68ce957598e6b786a78c9dea78632ffa /fs
parent3d68bd0010d2c9bc9ad6004fdcc4d6a56dcae199 (diff)
parentc2ec9471b5b1307429aef1cfaa2b3ae453a61d6f (diff)
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 to version 1.74 [CIFS] update limit for snprintf in cifs_construct_tcon cifs: Fix signing failure when server mandates signing for NTLMSSP
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifsfs.h2
-rw-r--r--fs/cifs/connect.c2
-rw-r--r--fs/cifs/sess.c10
3 files changed, 7 insertions, 7 deletions
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index 0900e1658c96..036ca83e5f46 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -129,5 +129,5 @@ extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg);
129extern const struct export_operations cifs_export_ops; 129extern const struct export_operations cifs_export_ops;
130#endif /* CIFS_NFSD_EXPORT */ 130#endif /* CIFS_NFSD_EXPORT */
131 131
132#define CIFS_VERSION "1.73" 132#define CIFS_VERSION "1.74"
133#endif /* _CIFSFS_H */ 133#endif /* _CIFSFS_H */
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index dbd669cc5bc7..ccc1afa0bf3b 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3485,7 +3485,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, uid_t fsuid)
3485 goto out; 3485 goto out;
3486 } 3486 }
3487 3487
3488 snprintf(username, MAX_USERNAME_SIZE, "krb50x%x", fsuid); 3488 snprintf(username, sizeof(username), "krb50x%x", fsuid);
3489 vol_info->username = username; 3489 vol_info->username = username;
3490 vol_info->local_nls = cifs_sb->local_nls; 3490 vol_info->local_nls = cifs_sb->local_nls;
3491 vol_info->linux_uid = fsuid; 3491 vol_info->linux_uid = fsuid;
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 3892ab817a36..d3e619692ee0 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -428,8 +428,7 @@ static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer,
428 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { 428 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
429 flags |= NTLMSSP_NEGOTIATE_SIGN; 429 flags |= NTLMSSP_NEGOTIATE_SIGN;
430 if (!ses->server->session_estab) 430 if (!ses->server->session_estab)
431 flags |= NTLMSSP_NEGOTIATE_KEY_XCH | 431 flags |= NTLMSSP_NEGOTIATE_KEY_XCH;
432 NTLMSSP_NEGOTIATE_EXTENDED_SEC;
433 } 432 }
434 433
435 sec_blob->NegotiateFlags = cpu_to_le32(flags); 434 sec_blob->NegotiateFlags = cpu_to_le32(flags);
@@ -465,10 +464,11 @@ static int build_ntlmssp_auth_blob(unsigned char *pbuffer,
465 NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE | 464 NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE |
466 NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC; 465 NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC;
467 if (ses->server->sec_mode & 466 if (ses->server->sec_mode &
468 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) 467 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
469 flags |= NTLMSSP_NEGOTIATE_SIGN; 468 flags |= NTLMSSP_NEGOTIATE_SIGN;
470 if (ses->server->sec_mode & SECMODE_SIGN_REQUIRED) 469 if (!ses->server->session_estab)
471 flags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN; 470 flags |= NTLMSSP_NEGOTIATE_KEY_XCH;
471 }
472 472
473 tmp = pbuffer + sizeof(AUTHENTICATE_MESSAGE); 473 tmp = pbuffer + sizeof(AUTHENTICATE_MESSAGE);
474 sec_blob->NegotiateFlags = cpu_to_le32(flags); 474 sec_blob->NegotiateFlags = cpu_to_le32(flags);