Author: avg
Date: Tue Jan 16 11:22:08 2018
New Revision: 328049
URL: https://svnweb.freebsd.org/changeset/base/328049

Log:
  MFC r327725: zfs_mount: restore a bit of ifdef-out illumos code

Modified:
  stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==============================================================================
--- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c       
Tue Jan 16 11:22:07 2018        (r328048)
+++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c       
Tue Jan 16 11:22:08 2018        (r328049)
@@ -1629,13 +1629,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
@@ -1645,6 +1653,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?
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to