mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
OpenZFS 4521 - zfstest is trying to execute evil "zfs unmount -a"
Authored by: Yuri Pankov <yuri.pankov@nexenta.com> 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> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov> Porting Notes: - Correctly set __ZFS_POOL_RESTRICT in inherit_001_pos OpenZFS-issue: https://www.illumos.org/issues/4521 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/8808ac5 Closes #5674
This commit is contained in:
committed by
Brian Behlendorf
parent
9b7b9cd370
commit
d21d5b8248
+10
-1
@@ -25,8 +25,8 @@
|
||||
* 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 2016 Igor Kozhukhov <ikozhukhov@gmail.com>.
|
||||
* Copyright 2016 Nexenta Systems, Inc.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
@@ -6563,6 +6563,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,
|
||||
|
||||
Reference in New Issue
Block a user