aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 6e004587fa48..f2fa05bbcb47 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -46,6 +46,7 @@ static struct {
46} protocols[] = { 46} protocols[] = {
47#ifdef CONFIG_CIFS_WEAK_PW_HASH 47#ifdef CONFIG_CIFS_WEAK_PW_HASH
48 {LANMAN_PROT, "\2LM1.2X002"}, 48 {LANMAN_PROT, "\2LM1.2X002"},
49 {LANMAN2_PROT, "\2LANMAN2.1"},
49#endif /* weak password hashing for legacy clients */ 50#endif /* weak password hashing for legacy clients */
50 {CIFS_PROT, "\2NT LM 0.12"}, 51 {CIFS_PROT, "\2NT LM 0.12"},
51 {POSIX_PROT, "\2POSIX 2"}, 52 {POSIX_PROT, "\2POSIX 2"},
@@ -67,13 +68,13 @@ static struct {
67/* define the number of elements in the cifs dialect array */ 68/* define the number of elements in the cifs dialect array */
68#ifdef CONFIG_CIFS_POSIX 69#ifdef CONFIG_CIFS_POSIX
69#ifdef CONFIG_CIFS_WEAK_PW_HASH 70#ifdef CONFIG_CIFS_WEAK_PW_HASH
70#define CIFS_NUM_PROT 3 71#define CIFS_NUM_PROT 4
71#else 72#else
72#define CIFS_NUM_PROT 2 73#define CIFS_NUM_PROT 2
73#endif /* CIFS_WEAK_PW_HASH */ 74#endif /* CIFS_WEAK_PW_HASH */
74#else /* not posix */ 75#else /* not posix */
75#ifdef CONFIG_CIFS_WEAK_PW_HASH 76#ifdef CONFIG_CIFS_WEAK_PW_HASH
76#define CIFS_NUM_PROT 2 77#define CIFS_NUM_PROT 3
77#else 78#else
78#define CIFS_NUM_PROT 1 79#define CIFS_NUM_PROT 1
79#endif /* CONFIG_CIFS_WEAK_PW_HASH */ 80#endif /* CONFIG_CIFS_WEAK_PW_HASH */
@@ -446,7 +447,8 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
446 goto neg_err_exit; 447 goto neg_err_exit;
447#ifdef CONFIG_CIFS_WEAK_PW_HASH 448#ifdef CONFIG_CIFS_WEAK_PW_HASH
448 } else if((pSMBr->hdr.WordCount == 13) 449 } else if((pSMBr->hdr.WordCount == 13)
449 && (pSMBr->DialectIndex == LANMAN_PROT)) { 450 && ((pSMBr->DialectIndex == LANMAN_PROT)
451 || (pSMBr->DialectIndex == LANMAN2_PROT))) {
450 int tmp, adjust; 452 int tmp, adjust;
451 struct lanman_neg_rsp * rsp = (struct lanman_neg_rsp *)pSMBr; 453 struct lanman_neg_rsp * rsp = (struct lanman_neg_rsp *)pSMBr;
452 454