From patchwork Wed Dec 16 22:31:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 1417411 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=jYzK3dQm; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4Cx8yB6Bk6z9sTK for ; Thu, 17 Dec 2020 09:32:18 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730176AbgLPWcB (ORCPT ); Wed, 16 Dec 2020 17:32:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727821AbgLPWcB (ORCPT ); Wed, 16 Dec 2020 17:32:01 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E949C061794 for ; Wed, 16 Dec 2020 14:31:21 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id a9so52436434lfh.2 for ; Wed, 16 Dec 2020 14:31:21 -0800 (PST) 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=X0oV0c+DEna77MaYqksnL658KMZn2DgHu/VOTFs8Mxg=; b=jYzK3dQmuxWbXu2HzzkpuB/kqTnBwya1j8TOug9vRgfRj7l2EcJhXnNzr1bJ58f+Gr JInACoMJE4J1qliXKM2PaYPc5SdUFEjDezR8ZdZCsrTo9w8hlReopzmkAx5jFTDMLu4A bX7xp+nW9OQ16SQhEtcXNj3aKAFP8OZmlSw5CozZFpvTD27WFZu+6d+6PMlIPO9cYFkh SgNcEwM00HVWt1gwDmVQxfDKXg8Vw7jBPsSNxL2KrJ0f497hFaxcoMb3naeDPNrX819Q S5kGOFec0Kzv/liyAEOOpH7LfKkkfaaUEo9g2BajozQhg2EeCLjKlmKYxJ4otoAhr/wM 1TxQ== 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=X0oV0c+DEna77MaYqksnL658KMZn2DgHu/VOTFs8Mxg=; b=KhIdFtSy9zC88WKhXCzj/H6Rox/Kd5OG3j9N8jAf1tuecAgjwzoWZ6An8LDTMg6TZw RGcluRgCG5BzRomBRsGQRls0NR8gVY/ja+M6P/II2kw1BfitavxEPLAxFKKSYSOxClgN S3jlJdKqNPNE3xjZoIQ6YQbo8VNH2xEqcr5DdeYkRPy23Z+c95R+oJC7H6svufnAjWBg ggX6ytn/m9GHnikmwZS+As4cRQBEUVZ7aYZCNTw9jgDa8LZviFN6JmkF1jEIKzSNDpLm E2+OJqwNuSBcO7jPfifDgL+3GspFum7cOUNCI0951zxvY7jmocVDhM9K1lhMsHz9S1fF Ek9Q== X-Gm-Message-State: AOAM530V/r/xi7m8O/M6vgMI2VkO1/NILUbatwxAhsmhwokFMaeI0c+S qnjKFHcEp3LtNWXgtzFeAQLn+UFeZZLZaMNCcsZGTJIKftEGzw== X-Google-Smtp-Source: ABdhPJwkNGphJQzKn9eC3zhB9fvXc/hqdRH3QH5SEK46e8271B0jDWVf0Ds7ao1b8F0bXoH/3kmepHxNhLR9jrMdj3Q= X-Received: by 2002:a2e:88c8:: with SMTP id a8mr15082131ljk.148.1608157879165; Wed, 16 Dec 2020 14:31:19 -0800 (PST) MIME-Version: 1.0 From: Steve French Date: Wed, 16 Dec 2020 16:31:07 -0600 Message-ID: Subject: [CIFS][PATCH] handle "guest" mount parameter To: CIFS , ronnie sahlberg Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org With the new mount API it can not handle empty strings for mount parms ("guest" is mapped in userspace mount helper to "user=") so we have to special case it as we do for the password mount parm. Signed-off-by: Steve French --- fs/cifs/fs_context.c | 4 ++++ 1 file changed, 4 insertions(+) @@ -1250,6 +1253,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc, ctx->rdma = true; break; } + /* case Opt_ignore: - is ignored as expected ... */ return 0; diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c index 29b99e68ec80..24b7f8d0a51a 100644 --- a/fs/cifs/fs_context.c +++ b/fs/cifs/fs_context.c @@ -733,6 +733,9 @@ static int smb3_fs_context_parse_param(struct fs_context *fc, if (!strcmp("pass", param->key) || !strcmp("password", param->key)) { skip_parsing = true; opt = Opt_pass; + } else if (!strcmp("user", param->key) || !strcmp("username", param->key)) { + skip_parsing = true; + opt = Opt_user; } }