Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Oct 2016 05:17:18 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r307111 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201610120517.u9C5HIPX012452@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Oct 12 05:17:17 2016
New Revision: 307111
URL: https://svnweb.freebsd.org/changeset/base/307111

Log:
  MFC r305221: MFV r302992: 7071 lzc_snapshot does not fill in errlist on ENOENT
  
  illumos/illumos-gate@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@gmail.com>
  Reviewed by: George Wilson <george.wilson@delphix.com>
  Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
  Approved by: Robert Mustacchi <rm@joyent.com>
  Author: Matthew Ahrens <mahrens@delphix.com>

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

Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==============================================================================
--- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c	Wed Oct 12 05:16:33 2016	(r307110)
+++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c	Wed Oct 12 05:17:17 2016	(r307111)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610120517.u9C5HIPX012452>