Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1041729pxu; Wed, 6 Jan 2021 10:43:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8nCEM+HaVniRem1cBHKTygSGMXaJC+XgvO7AJDP2AJQOK+MY8hC8/o4nHSSJjUiRb6BR+ X-Received: by 2002:aa7:c84c:: with SMTP id g12mr4729360edt.193.1609958585048; Wed, 06 Jan 2021 10:43:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609958585; cv=none; d=google.com; s=arc-20160816; b=YIfJNJTOuVVk+bP/2uv0FUZztp7LEmlxyyGgO2fJcHkTtWpavNC4iNfn99/tZ2hAjU cpJ65hG5rC+YUdS01RFPdZAJtS0hc8cRIa9GIKIvqp5pd4FIyas01KHctMJF3MrMW9or xgndlzy47aWBvJDEWyzuH2slDeoIgJbmRo3EIq8J5UCspUMWGp75En3MOh2cT0GAguOl HqAxi+pGaJ91HX3U8vfkS/ROzEA2gpVUNj+/tw4zLlyzyuduuHFaRjTjfEnm8XAvknRb m166PN7fWzLoF6Zsb8RaQ0hug8Izp+5PSCG5qlzDQ6wl5LpSHSONFlMgDevVPcnGfa87 a0Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=wGa6C62NULYcyHVVQc8PrGaCEFTX+WbQlaNUoEeUCG4=; b=G8MDVx2C+aEBMX5KAN/8HUICi6dxA2Ys6xqAKsQt1C6UUGocMY3poNT1TqcCcViix8 UxD72eW5IY+Y3oq63SJuWtjZ1o/xwu0UPiTFUYLmdXrtcbSK5NVzNI+6ob/H/BDVcfSG JnQUQZEa7OchypsZQmNC6xMeKBGlDpbQO70W0vtIEWoATT4TOXk7X0DTMh+mA7Gv3i9Q uj9B8KQ2FylQHO9r8MTd4KdtaoDJgTgF5bFI5rPNLquRc1ykkCmZCOMSh1qZatjM/Yia NWYllWYBx1ShDJxA6qQhbv1GNCgnp3ki3kT2trqBdQSWFjEUnKhQjVEevRGeB0jO9bod ZciQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Cog7ajqw; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si1127490ejt.658.2021.01.06.10.42.38; Wed, 06 Jan 2021 10:43:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Cog7ajqw; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726647AbhAFSlD (ORCPT + 99 others); Wed, 6 Jan 2021 13:41:03 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24253 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725789AbhAFSlD (ORCPT ); Wed, 6 Jan 2021 13:41:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609958377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=wGa6C62NULYcyHVVQc8PrGaCEFTX+WbQlaNUoEeUCG4=; b=Cog7ajqwEQuXl++28zRMBeXYoHh2PPQSzstjyoSwxBY4Y+nJ/F8nasFhUzyawXyeQZnHQW FnDrI+v534B7QQvPHkTWN2RUC47S52hV/+KJCIGi3DSH4IcJQBSXwYk7JW8krgvKOZrrO9 c2btkbAW7yMs7W3CFq+9msOg4Sm9jCE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-509-kjyBEE46OWe82YrIXOi5SQ-1; Wed, 06 Jan 2021 13:39:35 -0500 X-MC-Unique: kjyBEE46OWe82YrIXOi5SQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CFD8A1005513 for ; Wed, 6 Jan 2021 18:39:34 +0000 (UTC) Received: from madhat.boston.devel.redhat.com (ovpn-113-139.phx2.redhat.com [10.3.113.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D7711000232 for ; Wed, 6 Jan 2021 18:39:34 +0000 (UTC) From: Steve Dickson To: Linux NFS Mailing list Subject: [PATCH] mount: parse default values correctly Date: Wed, 6 Jan 2021 13:40:28 -0500 Message-Id: <20210106184028.150925-1-steved@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Commit 88c22f92 converted the configfile.c routines to use the parse_opt interfaces which broke how default values from nfsmount.conf are managed. Default values can not be added to the mount string handed to the kernel. They must be interpreted into the correct mount options then passed to the kernel. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1912877 Signed-off-by: Steve Dickson --- utils/mount/configfile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/mount/configfile.c b/utils/mount/configfile.c index 7934f4f..e865998 100644 --- a/utils/mount/configfile.c +++ b/utils/mount/configfile.c @@ -277,8 +277,10 @@ conf_parse_mntopts(char *section, char *arg, struct mount_options *options) } if (buf[0] == '\0') continue; + if (default_value(buf)) + continue; + po_append(options, buf); - default_value(buf); } conf_free_list(list); } -- 2.29.2