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:
Giuseppe Di Natale
2017-02-03 13:24:44 -08:00
committed by Brian Behlendorf
parent 9b7b9cd370
commit d21d5b8248
6 changed files with 52 additions and 14 deletions
@@ -331,7 +331,7 @@ function scan_state { #state-file
if [[ $op == "-" ]]; then
log_note "No operation specified"
else
export __ZFS_POOL_RESTRICT="$TESTPOOL"
export __ZFS_POOL_RESTRICT="TESTPOOL"
log_must $ZFS unmount -a
unset __ZFS_POOL_RESTRICT