From patchwork Tue Sep 7 03:32:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shirish Pargaonkar X-Patchwork-Id: 159741 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o873YZDV011725 for ; Tue, 7 Sep 2010 03:37:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751959Ab0IGDhL (ORCPT ); Mon, 6 Sep 2010 23:37:11 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:52792 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751755Ab0IGDhK (ORCPT ); Mon, 6 Sep 2010 23:37:10 -0400 Received: by iwn5 with SMTP id 5so4899963iwn.19 for ; Mon, 06 Sep 2010 20:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=FTD/Y5iR4f+ma8vZMnISfSQ8xVJBEwRZG4HglaVxMfo=; b=d4cgAQjhBnbU18qCVjm2tmmJOBuPp7/NjAlAxGAqRWscs0sbQMQUMuA/KrMUEU2xf8 kUaSK/DQd0MSHTzqqmH8qfF/AAhFUg0rCBE4tN4E70pgvgYZBC9l2DvJnXDj6buKdIm9 mC1SNGFujuoQQQbhz7tlhbkiWXbbT3dvdvg+8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=N3umHtoytbKny87rjUZ0q1kT77MUhN/O2mZXDKFVL5fluV8Sy9V4rHSIx5AezuWOvs qlT7zio0NXJ/XbNb+qJGQ1SXZFGxEll/ONHNK4UhPf5taSAaao+0yyM5YKctefnEPAl0 9e1dhTRhc1dcA2JmBR4uW7LerVlwRLno08dxQ= Received: by 10.231.191.6 with SMTP id dk6mr7373648ibb.51.1283830629811; Mon, 06 Sep 2010 20:37:09 -0700 (PDT) Received: from localhost ([32.97.110.58]) by mx.google.com with ESMTPS id z6sm6616197ibc.12.2010.09.06.20.37.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 06 Sep 2010 20:37:08 -0700 (PDT) From: shirishpargaonkar@gmail.com To: smfrench@gmail.com Cc: linux-cifs@vger.kernel.org, Shirish Pargaonkar Subject: [PATCH] do not assume kerberos as default auth mech Date: Mon, 6 Sep 2010 22:32:55 -0500 Message-Id: <1283830375-25015-1-git-send-email-shirishpargaonkar@gmail.com> X-Mailer: git-send-email 1.6.0.2 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 07 Sep 2010 03:37:11 +0000 (UTC) diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index c65c341..1f1b097 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -604,12 +604,15 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) 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;