Date: Mon, 01 Jun 2020 13:03:06 -0700 From: Cy Schubert <Cy.Schubert@cschubert.com> To: Ryan Moeller <freqlabs@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r361699 - head/sys/kern Message-ID: <202006012003.051K36sR039220@slippy.cwsent.com> In-Reply-To: <202006011843.051IhpMM085854@repo.freebsd.org> References: <202006011843.051IhpMM085854@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <rpc/rpc.h> 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 <Cy.Schubert@cschubert.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org NTP: <cy@nwtime.org> Web: https://nwtime.org The need of the many outweighs the greed of the few.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006012003.051K36sR039220>