summaryrefslogtreecommitdiff
path: root/usr/src/cmd/zfs
diff options
context:
space:
mode:
authorYuri Pankov <yuri.pankov@nexenta.com>2016-02-21 20:54:49 -0800
committerMatthew Ahrens <mahrens@delphix.com>2016-02-22 08:20:39 -0800
commit8808ac5dae118369991f158b6ab736cb2691ecde (patch)
treee51332adf996e935131398d08cfeb238dae406a3 /usr/src/cmd/zfs
parent6e7bd6722c43b5bb4fa3bfb4961472f546ec2a6a (diff)
downloadillumos-gate-8808ac5dae118369991f158b6ab736cb2691ecde.tar.gz
4521 zfstest is trying to execute evil "zfs unmount -a"
Reviewed by: Andriy Gapon <avg@FreeBSD.org> Reviewed by: Dan McDonald <danmcd@omniti.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: John Kennedy <john.kennedy@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/cmd/zfs')
-rw-r--r--usr/src/cmd/zfs/zfs_main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr/src/cmd/zfs/zfs_main.c b/usr/src/cmd/zfs/zfs_main.c
index 75806e279c..d0627c94b5 100644
--- a/usr/src/cmd/zfs/zfs_main.c
+++ b/usr/src/cmd/zfs/zfs_main.c
@@ -25,9 +25,9 @@
* Copyright 2012 Milan Jurik. All rights reserved.
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
- * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2014 Integros [integros.com]
* Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>.
+ * Copyright 2016 Nexenta Systems, Inc.
*/
#include <assert.h>
@@ -6376,6 +6376,15 @@ unshare_unmount(int op, int argc, char **argv)
continue;
}
+ /*
+ * Ignore datasets that are excluded/restricted by
+ * parent pool name.
+ */
+ if (zpool_skip_pool(zfs_get_pool_name(zhp))) {
+ zfs_close(zhp);
+ continue;
+ }
+
switch (op) {
case OP_SHARE:
verify(zfs_prop_get(zhp, ZFS_PROP_SHARENFS,