From owner-freebsd-fs@freebsd.org Tue Jun 4 00:07:58 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD4DF15C1F65 for ; Tue, 4 Jun 2019 00:07:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 460167607E for ; Tue, 4 Jun 2019 00:07:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id F063D15C1F64; Tue, 4 Jun 2019 00:07:56 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B195115C1F63 for ; Tue, 4 Jun 2019 00:07:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D0287607B for ; Tue, 4 Jun 2019 00:07:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 8D3D51E8C1 for ; Tue, 4 Jun 2019 00:07:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x5407trD008683 for ; Tue, 4 Jun 2019 00:07:55 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x5407tIa008675 for fs@FreeBSD.org; Tue, 4 Jun 2019 00:07:55 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 147881] [zfs] [patch] ZFS "sharenfs" doesn't allow different "exports" options for different hosts Date: Tue, 04 Jun 2019 00:07:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rmacklem@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jun 2019 00:07:58 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D147881 --- Comment #16 from Rick Macklem --- Personally, I think Quentin Rameau's patch is all you need. I don't think embedded comments in the sharenfs property are needed and it just makes the patch much more involved. The one slightly scary thing about it is that "; ;" is allowed and results in the file system being exported read/write to the world, because it will generate a line with just the mountpoint in it. (I never use ZFS, so I don't know if a blank sharenfs property is allowed and results in the same thing?) It might be safer to not allow that case? One other change would be to take the "const" off the argument for translate_opts() and don't have it strlcpy() the shareopts, since they have already be copied by the caller with Quentin's patch. I don't recommend changing the exports(5) syntax for two reasons: 1- Any change must be 100% backwards compatible or it is a POLA violation and can't go in FreeBSD. (ie. Any exports file that worked before must still work and provide the same semantics.) 2 - Parsing of exports file(s) is done by a function called get_exportlist_one() in src/usr.sbin/mountd/mountd.c and, if you look at it, you will find the code convoluted and difficult to modify without breaking it. I'm not a ZFS guy, so I can't help w.r.t. getting this in FreeBSD. I'd suggest you post on a FreeBSD mailing list about this and hope that someone on the ZFS side is interested in getting the patch in. --=20 You are receiving this mail because: You are the assignee for the bug.=