summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2010-10-08 05:42:03 +0200
committerSteve French <sfrench@us.ibm.com>2010-10-08 05:42:03 +0200
commit6ea75952d7c671ea8b0d7b66f82afcafbb5d20c2 (patch)
tree66cf5e73830d2730866f7e6bf6cf93f0684c5b99 /fs/cifs/cifssmb.c
parentMerge branch 'hwpoison-fixes' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff)
parent[CIFS] Remove build warning (diff)
downloadlinux-6ea75952d7c671ea8b0d7b66f82afcafbb5d20c2.tar.xz
linux-6ea75952d7c671ea8b0d7b66f82afcafbb5d20c2.zip
Merge branch 'for-next'
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 7e83b356cc9e..54bd83af772c 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -620,13 +620,15 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
rc = 0;
else
rc = -EINVAL;
-
- if (server->sec_kerberos || server->sec_mskerberos)
- server->secType = Kerberos;
- else if (server->sec_ntlmssp)
- server->secType = RawNTLMSSP;
- else
- rc = -EOPNOTSUPP;
+ if (server->secType == Kerberos) {
+ if (!server->sec_kerberos &&
+ !server->sec_mskerberos)
+ rc = -EOPNOTSUPP;
+ } else if (server->secType == RawNTLMSSP) {
+ if (!server->sec_ntlmssp)
+ rc = -EOPNOTSUPP;
+ } else
+ rc = -EOPNOTSUPP;
}
} else
server->capabilities &= ~CAP_EXTENDED_SECURITY;