From a40fa54b21e0eb72302634a8fdc0af84cdd9fb82 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 28 Jun 2006 00:13:38 +0000 Subject: [PATCH] --- yaml --- r: 30895 b: refs/heads/master c: f40c562855294bf4e7268274d7461dc32c1e6b25 h: refs/heads/master i: 30893: eb680918ea700c6c6cb695a2da4d87d5fbf87c05 30891: 5804d31a468c9eb7228e2e55c7d8a5d05c95317f 30887: 66034a39a9379ae88f42c2e947bb51f36013cd79 30879: 32bf02b3fd2f87c220635c66640527840170ca6c v: v3 --- [refs] | 2 +- trunk/fs/cifs/cifssmb.c | 10 +++++++--- trunk/fs/cifs/sess.c | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index dd4aab4fff59..9168bea68e37 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0223cf0b10bdb3b557d8884b1a957cc64be843c3 +refs/heads/master: f40c562855294bf4e7268274d7461dc32c1e6b25 diff --git a/trunk/fs/cifs/cifssmb.c b/trunk/fs/cifs/cifssmb.c index de405bfb67d2..19678c575dfc 100644 --- a/trunk/fs/cifs/cifssmb.c +++ b/trunk/fs/cifs/cifssmb.c @@ -415,6 +415,8 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) else /* if override flags set only sign/seal OR them with global auth */ secFlags = extended_security | ses->overrideSecFlg; + cFYI(1,("secFlags 0x%x",secFlags)); + pSMB->hdr.Mid = GetNextMid(server); pSMB->hdr.Flags2 |= SMBFLG2_UNICODE; if((secFlags & CIFSSEC_MUST_KRB5) == CIFSSEC_MUST_KRB5) @@ -511,11 +513,13 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) cERROR(1,("Server requests plain text password" " but client support disabled")); - if(secFlags & CIFSSEC_MUST_NTLMV2) + if((secFlags & CIFSSEC_MUST_NTLMV2) == CIFSSEC_MUST_NTLMV2) server->secType = NTLMv2; - else + else if(secFlags & CIFSSEC_MAY_NTLM) server->secType = NTLM; - /* else krb5 ... */ + else if(secFlags & CIFSSEC_MAY_NTLMV2) + server->secType = NTLMv2; + /* else krb5 ... any others ... */ /* one byte, so no need to convert this or EncryptionKeyLen from little endian */ diff --git a/trunk/fs/cifs/sess.c b/trunk/fs/cifs/sess.c index b7d49c03985c..7202d534ef0b 100644 --- a/trunk/fs/cifs/sess.c +++ b/trunk/fs/cifs/sess.c @@ -323,11 +323,12 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time, __u16 action; int bytes_remaining; - cFYI(1,("new sess setup")); if(ses == NULL) return -EINVAL; type = ses->server->secType; + + cFYI(1,("sess setup type %d",type)); if(type == LANMAN) { #ifndef CONFIG_CIFS_WEAK_PW_HASH /* LANMAN and plaintext are less secure and off by default.