Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3474233imu; Sun, 11 Nov 2018 15:56:44 -0800 (PST) X-Google-Smtp-Source: AJdET5dLkDBb4rbNY1c7d/m46CHALjuIfRNwrDOZVaBJ4lQAPCZ8k97z0xU/TP/HtG+EVa9RugJp X-Received: by 2002:a62:d084:: with SMTP id p126-v6mr18736530pfg.147.1541980604259; Sun, 11 Nov 2018 15:56:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980604; cv=none; d=google.com; s=arc-20160816; b=gHJSac3gzTp4i3/lsjTgIRGjPgHedTviBVqPxV7I6cysKt9xpiBZIPO7FBc4LRLWFu Y8cu77bvl62hldrqRovtAieaAgaDYnHGja1fTMs1OE9MJIXN71rFQIjiFVI+DZMnl/Ay QUOWumOwEQTOB+AyTCXB4KxhNFkqHeL35MH+3XeXZBZ+ubHby4nhwDtxRdl+JIYJQTIc thpkKcHSQbg41F/0cD1gSOIOcKZz27h9BfmTVmU8NMIf1Udc4iTs3ddBd9IADBNkQEkk ewewaLBAKs2/A+mlLb6wZGlviOUgWPRgzbYsrLmDw+9UckTYBCOVQROYaGrV7A7s7s/b PB3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2f/nVJLBJgHJZ8QprOTSXkBOCdqbJp3MFCpnlFT+yNY=; b=cshtZrj9Uyore+TPkGBcL9UiI3b7IBclyMaEz+uziencIFzWBPRbtHrZZ94P6FrJMe 7LiLHBWZG4NoORlNDn+6rkfmOr8968JX4w3a6Mj3bsXDGrPqgEloox2CXczZ34oZGm4s 96PvK9D5BO0K2neu013Msw63ms5SJ8kV1Nr5AwTgkq7z2kmJkkXZ6a2+042CbG6T2hu9 2EivfFkRS/7nUjSwyXqkwRlx9R8nbGme0QKceYoCmrah3V4eVK2vs30bUVBvUATHPQg1 Z1l0nxgWadEIMsc1BGfXSbGsZWnJjFPT1e+wmDqRxSF7Q02TnsDTqKFVXPHeklSQE7Y9 eojw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=G+dWqXI8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si13442529pgl.471.2018.11.11.15.56.29; Sun, 11 Nov 2018 15:56:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=G+dWqXI8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732698AbeKLISU (ORCPT + 99 others); Mon, 12 Nov 2018 03:18:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:37142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732652AbeKLISS (ORCPT ); Mon, 12 Nov 2018 03:18:18 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8B294223C8; Sun, 11 Nov 2018 22:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975302; bh=e2bnWh4ODIALsdGhsfWu2OKP8AyLhUvgLfLdFbJip2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G+dWqXI8upzzuADxOsCdGKlTXJuJ1GEHvbcoD1WzU5ITxFGeZ55zwHNqAVx6hwkqW UMJo865RSS6BH9z1gFUX87/Bs9anneqd9lnv07dwPHXnmDakvSwFsHKXo/dqWLGpxP fLusydYPyri75LoeRHD1azbEm54VoOpAdLquWG/U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steve French , Ronnie Sahlberg Subject: [PATCH 4.19 265/361] smb3: on kerberos mount if server doesnt specify auth type use krb5 Date: Sun, 11 Nov 2018 14:20:12 -0800 Message-Id: <20181111221654.582655743@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Steve French commit 926674de6705f0f1dbf29a62fd758d0977f535d6 upstream. Some servers (e.g. Azure) do not include a spnego blob in the SMB3 negotiate protocol response, so on kerberos mounts ("sec=krb5") we can fail, as we expected the server to list its supported auth types (OIDs in the spnego blob in the negprot response). Change this so that on krb5 mounts we default to trying krb5 if the server doesn't list its supported protocol mechanisms. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg CC: Stable Signed-off-by: Greg Kroah-Hartman --- fs/cifs/cifs_spnego.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/fs/cifs/cifs_spnego.c +++ b/fs/cifs/cifs_spnego.c @@ -147,8 +147,10 @@ cifs_get_spnego_key(struct cifs_ses *ses sprintf(dp, ";sec=krb5"); else if (server->sec_mskerberos) sprintf(dp, ";sec=mskrb5"); - else - goto out; + else { + cifs_dbg(VFS, "unknown or missing server auth type, use krb5\n"); + sprintf(dp, ";sec=krb5"); + } dp = description + strlen(description); sprintf(dp, ";uid=0x%x",