From nobody Tue Jan 20 09:07:24 2026 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dwM122Yb2z6PHFg for ; Tue, 20 Jan 2026 09:07:50 +0000 (UTC) (envelope-from zarychtam@plan-b.pwste.edu.pl) Received: from plan-b.pwste.edu.pl (plan-b.pwste.edu.pl [IPv6:2001:678:618::40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "plan-b.pwste.edu.pl", Issuer "GEANT TLS ECC 1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dwM105nZGz42MG for ; Tue, 20 Jan 2026 09:07:48 +0000 (UTC) (envelope-from zarychtam@plan-b.pwste.edu.pl) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=plan-b.pwste.edu.pl header.s=plan-b-mailer header.b="LKInuzT/"; dmarc=pass (policy=quarantine) header.from=plan-b.pwste.edu.pl; spf=pass (mx1.freebsd.org: domain of zarychtam@plan-b.pwste.edu.pl designates 2001:678:618::40 as permitted sender) smtp.mailfrom=zarychtam@plan-b.pwste.edu.pl Received: from [192.168.7.70] (dom.potoki.eu [62.133.140.50]) (authenticated bits=0) by plan-b.pwste.edu.pl (8.18.2/8.17.2) with ESMTPSA id 60K97Og6007821 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO) for ; Tue, 20 Jan 2026 10:07:24 +0100 (CET) (envelope-from zarychtam@plan-b.pwste.edu.pl) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=plan-b.pwste.edu.pl; s=plan-b-mailer; t=1768900045; bh=GoLxghJ1E6Fxha3eRSSspmDu/xZdmp2O6+T9fp0GNwI=; h=Date:Subject:To:References:From:In-Reply-To; b=LKInuzT/+nCA4gEEhtRQy1mfqhCbdhNvRDBu8V90Cau9hs0NxuY/LYm8tN5rBlgq7 ytHbg2nk47037u6RgGmCyOnJKJM2WuSb38pu7fZvqNU3a24PZ/efe6iWFctJmKSwSh Yd4gEaG3M+rCUkWU1R81PKYobW7wnWribjTX1EU/ISf6Isgjb1pBQO4NlVMQfc+nsX ZdR/BvYRM0Sx4KkYUgMaS3iZv2Y6id5omSrmniCyxaiaEi0r9HozmsVN2M3nJcb3BF EmsltwEz5uK+9yh9QQ1C7U9LV9Jkni135zieF7rEsANuhz8GfwWTcvHLc7DBww+UT8 RKQaqhzuOXihg== X-Authentication-Warning: plan-b.pwste.edu.pl: Host dom.potoki.eu [62.133.140.50] claimed to be [192.168.7.70] Content-Type: multipart/alternative; boundary="------------6iQLgRbijcOCbciQqSx0Vm0Z" Message-ID: <5f5aea35-fae1-4305-898d-c0f1eb408566@plan-b.pwste.edu.pl> Date: Tue, 20 Jan 2026 10:07:24 +0100 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: NFS /etc/exports syntax To: freebsd-hackers@freebsd.org References: Content-Language: en-US From: Marek Zarychta Autocrypt: addr=zarychtam@plan-b.pwste.edu.pl; keydata= xsBNBFfi3cMBCADLecMTFXad4uDXqv3eRuB4qJJ8G9tzzFezeRnnwxOsPdytW5ES2z1ibSrR IsiImx6+PTqrAmXpTInxAi7yiZGdSiONRI4CCxKY9d1YFiNYT/2WyNXCekm9x29YeIU7x0JB Llbz0f/9HC+styBIu2H+PY/X98Clzm110CS+n/b9l1AtiGxTiVFj7/uavYAKxH6LNWnbkuc5 v8EVNc7NkEcl5h7Z9X5NEtzDxTOiBIFQ/kOT7LAtkYUPo1lqLeOM2DtWSXTXQgXl0zJI4iP1 OAu4qQYm2nXwq4b2AH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yMCGBl/1fOJTyEGYv1CRojv97KK89KP5+r8x1P1iHcSrunlDNqGxTMydNCwBH23QcOM+m u4spKnJ/s0VRBkw3xoKBZfZza6fTQ4gTpAipjyk7ldOGBV+PvkKATdhK2yLwuWXhKbg/GRlD 1r5P0gxzSqfV4My+KJuc2EDcrqp1y0wOpE1m9iZqCcd0fup5f7HDsYlLWshr7NQl28f6+fQb sylq/j672BHXsdeqf/Ip9V4= In-Reply-To: X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.79 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.991]; DMARC_POLICY_ALLOW(-0.50)[plan-b.pwste.edu.pl,quarantine]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_ALLOW(-0.20)[plan-b.pwste.edu.pl:s=plan-b-mailer]; ONCE_RECEIVED(0.20)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:206006, ipnet:2001:678:618::/48, country:PL]; RCVD_COUNT_ONE(0.00)[1]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; FROM_HAS_DN(0.00)[]; HAS_XAW(0.00)[]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DKIM_TRACE(0.00)[plan-b.pwste.edu.pl:+] X-Rspamd-Queue-Id: 4dwM105nZGz42MG This is a multi-part message in MIME format. --------------6iQLgRbijcOCbciQqSx0Vm0Z Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit W dniu 20.01.2026 o 06:30, Steve Rikli pisze: > There appear to be some inconsistencies in exports(5) man page, or at > least a couple things which have me wondering a bit. :-) > > In particular I'm looking at the use of "=" (or not) between some flags > and their args. > > E.g. the man page text has descriptions like: > > The third case is specified > by the flag -network=netname[/prefixlength] and optionally -mask=netmask. > > but down in EXAMPLES the "=" is not used with those flags, like so: > > /cdrom -alldirs,quiet,ro -network 192.168.33.0 -mask 255.255.255.0 > > I've been using -network=1.2.3.4/24 syntax in my own exports and it > seems to do the right thing, fwiw. > > Others like -maproot seem to more consistently use "=" in the man page, > and I don't see instances with " " instead; I'm guessing it would work > that way too, but haven't tried it. > > In general, are exports flags intended to work with either "=" or " " > between the flag and its arg? > > As an aside, the 'zfs set sharenfs' syntax examples from Handbook seem > to use the "=" between flags and their args pretty consistently. > > Different but related, is there a syntax rule for "chaining" flags > together after a leading "-"? E.g. is something like this valid: > > /foo -maproot=root,ro,alldirs -network=1.2.3.4/24 > > From a readability standpoint, this seems clearer to me: > > /foo -maproot=root -ro -alldirs -network=1.2.3.4/24 > > but I'm curious if there is a formal syntax definition for this stuff. > > Thanks, > sr. Hi Steve, There is more than one valid strict approach when assigning options in the exports file. Both " " and "=" can be used, and the same applies to network masks. Please consult the source code if you have any doubts [1] . [1]: https://github.com/freebsd/freebsd-src/blob/main/usr.sbin/mountd/mountd.c#L2871 -- Marek Zarychta --------------6iQLgRbijcOCbciQqSx0Vm0Z Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
W dniu 20.01.2026 o 06:30, Steve Rikli pisze:
There appear to be some inconsistencies in exports(5) man page, or at
least a couple things which have me wondering a bit.  :-)

In particular I'm looking at the use of "=" (or not) between some flags
and their args.

E.g. the man page text has descriptions like:

  The third case is specified
  by the flag -network=netname[/prefixlength] and optionally -mask=netmask.

but down in EXAMPLES the "=" is not used with those flags, like so:

  /cdrom -alldirs,quiet,ro -network 192.168.33.0 -mask 255.255.255.0

I've been using -network=1.2.3.4/24 syntax in my own exports and it
seems to do the right thing, fwiw.

Others like -maproot seem to more consistently use "=" in the man page,
and I don't see instances with " " instead; I'm guessing it would work
that way too, but haven't tried it.

In general, are exports flags intended to work with either "=" or " "
between the flag and its arg?

As an aside, the 'zfs set sharenfs' syntax examples from Handbook seem
to use the "=" between flags and their args pretty consistently.

Different but related, is there a syntax rule for "chaining" flags
together after a leading "-"?  E.g. is something like this valid:

  /foo -maproot=root,ro,alldirs -network=1.2.3.4/24

From a readability standpoint, this seems clearer to me:
  
  /foo -maproot=root -ro -alldirs -network=1.2.3.4/24

but I'm curious if there is a formal syntax definition for this stuff.

Thanks,
sr.

    

Hi Steve,

There is more than one valid strict approach when assigning options in the exports file. Both " " and "=" can be used, and the same applies to network masks. Please consult the source code if you have any doubts [1] .

[1]: https://github.com/freebsd/freebsd-src/blob/main/usr.sbin/mountd/mountd.c#L2871

-- 
Marek Zarychta
--------------6iQLgRbijcOCbciQqSx0Vm0Z--