From patchwork Sun Oct 28 18:24:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 10658689 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 410721734 for ; Sun, 28 Oct 2018 18:24:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20EC229822 for ; Sun, 28 Oct 2018 18:24:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F47E29878; Sun, 28 Oct 2018 18:24:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAA1429822 for ; Sun, 28 Oct 2018 18:24:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726330AbeJ2DKN (ORCPT ); Sun, 28 Oct 2018 23:10:13 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:40529 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726153AbeJ2DKN (ORCPT ); Sun, 28 Oct 2018 23:10:13 -0400 Received: by mail-pf1-f194.google.com with SMTP id g21-v6so2870011pfi.7 for ; Sun, 28 Oct 2018 11:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=2ig5Mq5AQTuKOLLhRPv28Hl977qAANy9fT6Tk84F6ac=; b=p8DHgSXKiWb8iF07FMbzlk3K8xkWEkUFz6h2/vK85787gV1i2XGNEIDsHStfxWlREE s24N3YKIBrSK1LiKqxCbCjMlZd1yiPsAOTsgMbOpBzUK1dDyK2xjPNU0C8VjzhCyRzYH SQ9J3PXZmcCXpYhIcBZ/DeiM0X9MTTpJ8bwl2yxnPk3MCt0lXVftNEdFiBWU9RnCAT/D Q5GY/cL7Hm2Ls7cVZ/tM7CQrFCrX9BpKisKheGIZL4ITIhgg58slN8H/vZhGTvxpyg/2 x9TSm9LyJmBlCQ343VVEJ5QMAdk+Uio67TpergfgP8SVQ20+perQ2ml5mLWfB8vtbUVX 9+gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=2ig5Mq5AQTuKOLLhRPv28Hl977qAANy9fT6Tk84F6ac=; b=o56vc/7V6k9hZ55NtgtLP+MZJXfkTASVWI478cldMeDSG1VDvmeDW2W/81junAuwuS Gs5NLQhvm4h0NqvOUYQFK+WqC3YZC7n43v8yIFSgxapEaff9Ha15Lj7HbKZ8hQnFOziZ qHHuOpt91izdhOWS4AaYZLcs9uV1kctwL8jsqRhuUPv3WSl/05A4zVvtmwsgqz+4JG2W 2HezFElIGBir0anTq34Np3XVkcY7QfwHoPyleuKYTfauMafFVw3HCGhXpDXF8hO1CACo +sZWTRZRlRwFzeJESMA5bYxWlmnjhYoX5eUGlbj6bN5MB01bGmvFk/DfzLfIL/MwtUdR SRUQ== X-Gm-Message-State: AGRZ1gIxpnDEbYWui/QImIkYK8zvxuQR2bzWOV81MNnXhoEhxDmtpwOM 2kLBE9hZHFO7rgoStWKkiT9vdIWZu3RGRK31uuVFUg== X-Google-Smtp-Source: AJdET5eCc1ZQaYJlBaybYA47dpsaZrwnCIqeKOm5PdipUnyrCiUB4oxo8wg2vLMDMZyVuNN9695lPOldGTX6Z8RR27A= X-Received: by 2002:a62:444f:: with SMTP id r76-v6mr12433415pfa.111.1540751085977; Sun, 28 Oct 2018 11:24:45 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Sun, 28 Oct 2018 13:24:34 -0500 Message-ID: Subject: [PATCH] smb3: on kerberos mount if server doesn't specify auth type use krb5 To: CIFS , samba-technical Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- fs/cifs/cifs_spnego.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- Thanks, Steve diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c index b611fc2e8984..7f01c6e60791 100644 --- a/fs/cifs/cifs_spnego.c +++ b/fs/cifs/cifs_spnego.c @@ -147,8 +147,10 @@ cifs_get_spnego_key(struct cifs_ses *sesInfo) 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",