From nobody Tue Jan 20 14:25:17 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 4dwV3T54V9z6PdP1 for ; Tue, 20 Jan 2026 14:25:25 +0000 (UTC) (envelope-from sr@genyosha.net) Received: from ns0.genyosha.net (ns0.genyosha.net [50.39.243.220]) (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 RSA-PSS (2048 bits) client-digest SHA256) (Client CN "float.home.genyosha.net", Issuer "float.home.genyosha.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dwV3S4lnKz3sqc for ; Tue, 20 Jan 2026 14:25:24 +0000 (UTC) (envelope-from sr@genyosha.net) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of sr@genyosha.net designates 50.39.243.220 as permitted sender) smtp.mailfrom=sr@genyosha.net Received: from dragon.home.genyosha.net (ops0.genyosha.net [50.39.243.219]) by ns0.genyosha.net (8.18.1/8.18.1) with ESMTPS id 60KEPN1S075353 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=FAIL); Tue, 20 Jan 2026 06:25:23 -0800 (PST) (envelope-from sr@genyosha.net) Received: from dragon.home.genyosha.net (localhost [127.0.0.1]) by dragon.home.genyosha.net (8.18.1/8.18.1) with ESMTPS id 60KEPHBA030931 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 20 Jan 2026 06:25:18 -0800 (PST) (envelope-from sr@dragon.home.genyosha.net) Received: (from sr@localhost) by dragon.home.genyosha.net (8.18.1/8.18.1/Submit) id 60KEPHSa030930; Tue, 20 Jan 2026 06:25:17 -0800 (PST) (envelope-from sr) Date: Tue, 20 Jan 2026 06:25:17 -0800 From: Steve Rikli To: Rick Macklem Cc: freebsd-hackers@freebsd.org Subject: Re: NFS /etc/exports syntax Message-ID: References: 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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Greylist: inspected by milter-greylist-4.6.4 (ns0.genyosha.net [50.39.243.220]); Tue, 20 Jan 2026 06:25:23 -0800 (PST) for IP:'50.39.243.219' DOMAIN:'ops0.genyosha.net' HELO:'dragon.home.genyosha.net' FROM:'sr@genyosha.net' RCPT:'' X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (ns0.genyosha.net [50.39.243.220]); Tue, 20 Jan 2026 06:25:23 -0800 (PST) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.54 / 15.00]; NEURAL_HAM_SHORT(-0.98)[-0.978]; NEURAL_HAM_MEDIUM(-0.96)[-0.956]; NEURAL_HAM_LONG(-0.30)[-0.302]; R_SPF_ALLOW(-0.20)[+mx:c]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; ASN(0.00)[asn:20055, ipnet:50.39.128.0/17, country:US]; TAGGED_RCPT(0.00)[]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[genyosha.net]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; FROM_HAS_DN(0.00)[] X-Rspamd-Queue-Id: 4dwV3S4lnKz3sqc On Tue, Jan 20, 2026 at 05:47:21AM -0800, Rick Macklem wrote: > On Mon, Jan 19, 2026 at 9:30 PM Steve Rikli wrote: > > There appear to be some inconsistencies in exports(5) man page, or at > > least a couple things which have me wondering a bit. :-) > ... > > 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 > > No, each flag must be separate with the "-" at the beginning of > it, from what I can see. (The parsing code is literally decades > old. It was first written in the late 1980s.) Does that mean this line from EXAMPLES is actually invalid? /cdrom -alldirs,quiet,ro -network 192.168.33.0 -mask 255.255.255.0 ^^^^^^^^^^^^^^ Note the "," between alldirs,quiet,ro flags, with no spaces or dashes. > > From a readability standpoint, this seems clearer to me: > > > > /foo -maproot=root -ro -alldirs -network=1.2.3.4/24 > > Not sure what you were asking about this line, but it > looks ok to me. That example was simply to draw a comparison between "-flag1 -flag2" and the above question about "-flag1,flag2". I find the clarity and readability better with dashes and spaces between flags, vs. chaining flags together with commmas. $.02. > > but I'm curious if there is a formal syntax definition for this stuff. > > Nope. It's very old C that has been hacked by many over the > years. I can barely figure out what it is doing when I look at it > and I've looked at it many times. Understood. I'm guessing the very old C code is somewhat reflected in the exports(5) content -- the man page has a lot of info, and some of it resembles a proverbial wall of text. :-) The EXAMPLES are pretty helpful, fortunately. Thanks, sr.