aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifs_debug.c6
-rw-r--r--fs/cifs/cifssmb.c2
-rw-r--r--fs/cifs/sess.c5
3 files changed, 6 insertions, 7 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index 7c0015a96959..2f55edf2eeea 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -860,8 +860,6 @@ security_flags_write(struct file *file, const char __user *buffer,
860 char flags_string[12]; 860 char flags_string[12];
861 char c; 861 char c;
862 862
863 cERROR(1,("size %ld",count)); /* BB removeme BB */
864
865 if((count < 1) || (count > 11)) 863 if((count < 1) || (count > 11))
866 return -EINVAL; 864 return -EINVAL;
867 865
@@ -883,14 +881,14 @@ security_flags_write(struct file *file, const char __user *buffer,
883 881
884 flags = simple_strtoul(flags_string, NULL, 0); 882 flags = simple_strtoul(flags_string, NULL, 0);
885 883
886 cERROR(1,("sec flags 0x%x", flags)); /* BB FIXME make cFYI */ 884 cFYI(1,("sec flags 0x%x", flags));
887 885
888 if(flags <= 0) { 886 if(flags <= 0) {
889 cERROR(1,("invalid security flags %s",flags_string)); 887 cERROR(1,("invalid security flags %s",flags_string));
890 return -EINVAL; 888 return -EINVAL;
891 } 889 }
892 890
893 if((flags & CIFSSEC_MASK) != CIFSSEC_MASK) { 891 if(flags & ~CIFSSEC_MASK) {
894 cERROR(1,("attempt to set unsupported security flags 0x%d", 892 cERROR(1,("attempt to set unsupported security flags 0x%d",
895 flags & ~CIFSSEC_MASK)); 893 flags & ~CIFSSEC_MASK));
896 return -EINVAL; 894 return -EINVAL;
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 0442c3b36799..acae58313b0c 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -504,7 +504,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
504#endif /* CIFS_WEAK_PW_HASH */ 504#endif /* CIFS_WEAK_PW_HASH */
505 cERROR(1,("Server requests plain text password" 505 cERROR(1,("Server requests plain text password"
506 " but client support disabled")); 506 " but client support disabled"));
507 507
508 if(extended_security & CIFSSEC_MUST_NTLMV2) 508 if(extended_security & CIFSSEC_MUST_NTLMV2)
509 server->secType = NTLMv2; 509 server->secType = NTLMv2;
510 else 510 else
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 76a09f5f804f..1fe9461c6dca 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -339,9 +339,10 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
339 return -EOPNOTSUPP; 339 return -EOPNOTSUPP;
340#endif 340#endif
341 wct = 10; /* lanman 2 style sessionsetup */ 341 wct = 10; /* lanman 2 style sessionsetup */
342 } else if((type == NTLM) || (type == NTLMv2)) /* NTLMv2 may retry NTLM */ 342 } else if((type == NTLM) || (type == NTLMv2)) {
343 /* For NTLMv2 failures eventually may need to retry NTLM */
343 wct = 13; /* old style NTLM sessionsetup */ 344 wct = 13; /* old style NTLM sessionsetup */
344 else /* same size for negotiate or auth, NTLMSSP or extended security */ 345 } else /* same size for negotiate or auth, NTLMSSP or extended security */
345 wct = 12; 346 wct = 12;
346 347
347 rc = small_smb_init_no_tc(SMB_COM_SESSION_SETUP_ANDX, wct, ses, 348 rc = small_smb_init_no_tc(SMB_COM_SESSION_SETUP_ANDX, wct, ses,