Print this page
7290 ZFS test suite needs to control what utilities it can run
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
*** 24,34 ****
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
! # Copyright (c) 2013 by Delphix. All rights reserved.
#
. $STF_SUITE/include/libtest.shlib
#
--- 24,34 ----
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
! # Copyright (c) 2013, 2016 by Delphix. All rights reserved.
#
. $STF_SUITE/include/libtest.shlib
#
*** 47,57 ****
verify_runnable "both"
MMAP_EXEC=$STF_SUITE/tests/functional/exec/mmap_exec
function cleanup
{
! log_must $RM $TESTDIR/myls
}
#
# Execute and check if the return value is equal to expected.
#
--- 47,57 ----
verify_runnable "both"
MMAP_EXEC=$STF_SUITE/tests/functional/exec/mmap_exec
function cleanup
{
! log_must rm $TESTDIR/myls
}
#
# Execute and check if the return value is equal to expected.
#
*** 74,85 ****
log_assert "Setting exec=off on a filesystem, processes can not be executed " \
"from this file system."
log_onexit cleanup
! log_must $CP $LS $TESTDIR/myls
! log_must $ZFS set exec=off $TESTPOOL/$TESTFS
log_must exec_n_check 126 $TESTDIR/myls
log_must exec_n_check 13 $MMAP_EXEC $TESTDIR/myls
log_pass "Setting exec=off on filesystem testing passed."
--- 74,85 ----
log_assert "Setting exec=off on a filesystem, processes can not be executed " \
"from this file system."
log_onexit cleanup
! log_must cp /usr/bin/ls $TESTDIR/myls
! log_must zfs set exec=off $TESTPOOL/$TESTFS
log_must exec_n_check 126 $TESTDIR/myls
log_must exec_n_check 13 $MMAP_EXEC $TESTDIR/myls
log_pass "Setting exec=off on filesystem testing passed."