Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3429467imu; Sun, 11 Nov 2018 14:55:12 -0800 (PST) X-Google-Smtp-Source: AJdET5dWalNYMv5lymO/IrxIdYPMmtzDTxSUGUt+6wbHnp6oW+oGVi9cNppim6gE0xJRZskeyPS1 X-Received: by 2002:a63:6643:: with SMTP id a64-v6mr15041206pgc.15.1541976912858; Sun, 11 Nov 2018 14:55:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541976912; cv=none; d=google.com; s=arc-20160816; b=Uq/Rlam/dh136vRyftYEkJoai4nZNDaVU8WeXZBnBReYKIoFmgNppzdBlb5/UojaiK K/Ub+0jOHMGBOlF+sdvVVHwUvvC9h424XiET8o6HLEx+SUe0b/uhLTHuY7Ns5Z6P0cB0 4g4IxasY86/W4CliaP+HN80SKDqeTlQGsPP2OZmzJjXHLx+rcRo1kSdof+idXiXSj7GI +d3kGhbUqEdLvbdzwfBzcVHKOu/4EuS6dmTGuPPLFGfqR4n4su7SGZFQcGTm/8qiPIzq tJtD3YdqgPJzd0IOjMF03lFVIV9z4nWFIR3ElIT6zVw0iI49YAIXi6NMXwPHwFa77aWN LbFg== 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=M7Uu7JW/c5wrEtylEJqINVMYD4qYm757UONb/MCMcsA=; b=XHv4xMRG/4ead2U0dA+PzP5ijnHcrfw1plC8GlPDTODZTYjRpcB8xi/UVHT5D2cuc0 vUB0b2u0SXElsnbqse10pEomKvGDLrh1V9N7ktTCk1E1axombIw2FQsH8iQF7YzvqtLq J/PDSncUxt6VHZQt9gND5pM+G/+S9G0RKprgSAnhBIJCUrPeHAYeAGdePPEGFYNyWkaW 4WqSx9dfRw0zJ7uIyOsMi30T1sEscVzDmO/ptXDpXTCgKLkpBE9b5DF0+hXWkyjDDt5i BafP57aO8SmDDxgRGQIuyVowvfLF4Ory4+mxCBr7GFZlnHG0d1Z7MpH7D/YfWIChXphX gJbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SDExcshO; 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 o186-v6si17376926pfo.236.2018.11.11.14.54.57; Sun, 11 Nov 2018 14:55:12 -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=SDExcshO; 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 S2390893AbeKLIok (ORCPT + 99 others); Mon, 12 Nov 2018 03:44:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:54620 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403959AbeKLIW4 (ORCPT ); Mon, 12 Nov 2018 03:22:56 -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 D151F22443; Sun, 11 Nov 2018 22:32:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975578; bh=DTvMDIVBwzldwn0MI2JUlBk0ueLEHMIB4kTZ4tdOtEk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SDExcshOgAPVQvH9pymCL9tZAwketVa660tbpy+BG9/oKRPDD0Sc1bGj2GjfJiy20 orU+YqlbrI88923AtpweDhKmnAMV51rWQgOa/pA89KixaPnMWEeLgC8z0Xoj9q5XS/ wrYzEdPpZrT2JDluLzNJBr63BPYr9i5DkfyH19Zw= 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.14 166/222] smb3: on kerberos mount if server doesnt specify auth type use krb5 Date: Sun, 11 Nov 2018 14:24:23 -0800 Message-Id: <20181111221702.101659785@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@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.14-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",