svn commit: r328048 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Andriy Gapon
avg at FreeBSD.org
Tue Jan 16 11:22:09 UTC 2018
Author: avg
Date: Tue Jan 16 11:22:07 2018
New Revision: 328048
URL: https://svnweb.freebsd.org/changeset/base/328048
Log:
MFC r327725: zfs_mount: restore a bit of ifdef-out illumos code
Modified:
stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Tue Jan 16 10:58:31 2018 (r328047)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Tue Jan 16 11:22:07 2018 (r328048)
@@ -1617,13 +1617,21 @@ zfs_mount(vfs_t *vfsp)
* can be interrogated.
*/
if ((uap->flags & MS_DATA) && uap->datalen > 0)
+ return (SET_ERROR(EINVAL));
+
+ /*
+ * Get the objset name (the "special" mount argument).
+ */
+ if (error = pn_get(uap->spec, fromspace, &spn))
+ return (error);
+
+ osname = spn.pn_path;
#else /* !illumos */
if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_ZFS))
return (SET_ERROR(EPERM));
if (vfs_getopt(vfsp->mnt_optnew, "from", (void **)&osname, NULL))
return (SET_ERROR(EINVAL));
-#endif /* illumos */
/*
* If full-owner-access is enabled and delegated administration is
@@ -1633,6 +1641,7 @@ zfs_mount(vfs_t *vfsp)
dsl_deleg_access(osname, ZFS_DELEG_PERM_MOUNT, cr) != ECANCELED) {
secpolicy_fs_mount_clearopts(cr, vfsp);
}
+#endif /* illumos */
/*
* Check for mount privilege?
More information about the svn-src-stable
mailing list