From owner-svn-src-head@freebsd.org Mon Jun 1 20:03:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5A1FC2F09AC; Mon, 1 Jun 2020 20:03:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49bR1X5DFVz4btH; Mon, 1 Jun 2020 20:03:12 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id fqeKjH2MTYYpxfqeMj6c6h; Mon, 01 Jun 2020 14:03:10 -0600 X-Authority-Analysis: v=2.3 cv=OubUNx3t c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=nTHF0DUjJn0A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=4PEESc2Rp9k6QwJ_zCIA:9 a=0bXxn9q0MV6snEgNplNhOjQmxlI=:19 a=CjuIK1q_8ugA:10 a=OJAZQCPpPQ8A:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 162723CF; Mon, 1 Jun 2020 13:03:07 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 051K36gY039246; Mon, 1 Jun 2020 13:03:06 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 051K36sR039220; Mon, 1 Jun 2020 13:03:06 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202006012003.051K36sR039220@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ryan Moeller cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r361699 - head/sys/kern In-reply-to: <202006011843.051IhpMM085854@repo.freebsd.org> References: <202006011843.051IhpMM085854@repo.freebsd.org> Comments: In-reply-to Ryan Moeller message dated "Mon, 01 Jun 2020 18:43:51 -0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 01 Jun 2020 13:03:06 -0700 X-CMAE-Envelope: MS4wfGx1V+gSS0Hu8SqpREi17TuDtsnmPK9vjM703yb7gmVvjoP+8Exz71s4aUlTYvqyLKGfEb7RIpNA0Qe5LWOWzfIHn6mh6Vh9+gNzTssJy5egePMhggXa PrrLWu8Q55j3cxhiz4ea+QG07ijIbqU6d7ncb2xSXATA4l8wkTF3WePp5cTi+puPrQEET8BIVbKnYzFvXUzHdaAYEYQYit9+3pElYRrff4wrCarq5+ANZA1X 8MVlk2hEOwx09LkMeQ5GHorAwjIVvgZiLuD/DSS0QIm7zMyJgwwhgnF5slQhDzT6 X-Rspamd-Queue-Id: 49bR1X5DFVz4btH X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2020 20:03:13 -0000 In message <202006011843.051IhpMM085854@repo.freebsd.org>, Ryan Moeller writes: > Author: freqlabs > Date: Mon Jun 1 18:43:51 2020 > New Revision: 361699 > URL: https://svnweb.freebsd.org/changeset/base/361699 > > Log: > Assign default security flavor when converting old export args > > vfs_export requires security flavors be explicitly listed when > exporting as of r360900. > > Use the default AUTH_SYS flavor when converting old export args to > ensure compatibility with the legacy mount syscall. > > Reported by: rmacklem > Reviewed by: rmacklem > Approved by: mav (mentor) > MFC after: 3 days > Sponsored by: iXsystems, Inc. > Differential Revision: https://reviews.freebsd.org/D25045 > > Modified: > head/sys/kern/vfs_mount.c > > Modified: head/sys/kern/vfs_mount.c > ============================================================================= > = > --- head/sys/kern/vfs_mount.c Mon Jun 1 16:14:29 2020 (r361698) > +++ head/sys/kern/vfs_mount.c Mon Jun 1 18:43:51 2020 (r361699) > @@ -2343,10 +2343,22 @@ kernel_vmount(int flags, ...) > return (error); > } > > +/* > + * Convert the old export args format into new export args. > + * > + * The old export args struct does not have security flavors. Otherwise, th > e > + * structs are identical. The default security flavor 'sys' is applied when > + * the given args export the filesystem. > + */ > void > vfs_oexport_conv(const struct oexport_args *oexp, struct export_args *exp) > { > > bcopy(oexp, exp, sizeof(*oexp)); > - exp->ex_numsecflavors = 0; > + if (exp->ex_flags & MNT_EXPORTED) { > + exp->ex_numsecflavors = 1; > + exp->ex_secflavors[0] = AUTH_SYS; #include will be needed for this. This of course opens a new can of worms with regard to namespace pollution. > + } else { > + exp->ex_numsecflavors = 0; > + } > } > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.