svn commit: r305221 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Alexander Motin mav at FreeBSD.org
Thu Sep 1 18:25:50 UTC 2016


Author: mav
Date: Thu Sep  1 18:25:49 2016
New Revision: 305221
URL: https://svnweb.freebsd.org/changeset/base/305221

Log:
  MFV r302992: 7071 lzc_snapshot does not fill in errlist on ENOENT
  
  illumos/illumos-gate at 25f7d993adbfb3452ac4625b3791670746d35ae3
  https://github.com/illumos/illumos-gate/commit/25f7d993adbfb3452ac4625b379167074
  6d35ae3
  
  https://www.illumos.org/issues/7071
    upstream
    DLPX-40482 lzc_snapshot does not fill in errlist on ENOENT
  
  Reviewed by: Igor Kozhukhov <ikozhukhov at gmail.com>
  Reviewed by: George Wilson <george.wilson at delphix.com>
  Reviewed by: Dan Kimmel <dan.kimmel at delphix.com>
  Approved by: Robert Mustacchi <rm at joyent.com>
  Author: Matthew Ahrens <mahrens at delphix.com>

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c	Thu Sep  1 18:16:45 2016	(r305220)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c	Thu Sep  1 18:25:49 2016	(r305221)
@@ -500,6 +500,14 @@ zfs_secpolicy_write_perms(const char *na
 	dsl_dataset_t *ds;
 	dsl_pool_t *dp;
 
+	/*
+	 * First do a quick check for root in the global zone, which
+	 * is allowed to do all write_perms.  This ensures that zfs_ioc_*
+	 * will get to handle nonexistent datasets.
+	 */
+	if (INGLOBALZONE(curthread) && secpolicy_zfs(cr) == 0)
+		return (0);
+
 	error = dsl_pool_hold(name, FTAG, &dp);
 	if (error != 0)
 		return (error);


More information about the svn-src-head mailing list