verify_runnable "global"
-ZFS_USER=$(cat /tmp/zfs-privs-test-user.txt)
+ZFS_USER=$(cat $TEST_BASE_DIR/zfs-privs-test-user.txt)
[[ -z $ZFS_USER ]] && log_fail "no ZFS_USER found"
-USES_NIS=$(cat /tmp/zfs-privs-test-nis.txt)
+USES_NIS=$(cat $TEST_BASE_DIR/zfs-privs-test-nis.txt)
if [ "${USES_NIS}" == "true" ]
then
userdel $ZFS_USER
[[ -d /export/home/$ZFS_USER ]] && rm -rf /export/home/$ZFS_USER
-rm /tmp/zfs-privs-test-nis.txt
-rm /tmp/zfs-privs-test-user.txt
+rm $TEST_BASE_DIR/zfs-privs-test-nis.txt
+rm $TEST_BASE_DIR/zfs-privs-test-user.txt
default_cleanup
log_assert "The RBAC profile \"ZFS Storage Management\" works"
-ZFS_USER=$(cat /tmp/zfs-privs-test-user.txt)
+ZFS_USER=$(cat $TEST_BASE_DIR/zfs-privs-test-user.txt)
# the user shouldn't be able to do anything initially
log_mustnot user_run $ZFS_USER "zpool create $TESTPOOL $DISKS"
log_assert "The RBAC profile \"ZFS File System Management\" works"
-ZFS_USER=$(cat /tmp/zfs-privs-test-user.txt)
+ZFS_USER=$(cat $TEST_BASE_DIR/zfs-privs-test-user.txt)
# Set a $DATASET where we can create child files systems
if is_global_zone; then
log_must mkdir -p /export/home/$ZFS_USER
log_must useradd -c "ZFS Privileges Test User" -d /export/home/$ZFS_USER $ZFS_USER
-echo $ZFS_USER > /tmp/zfs-privs-test-user.txt
-echo $USES_NIS > /tmp/zfs-privs-test-nis.txt
+echo $ZFS_USER > $TEST_BASE_DIR/zfs-privs-test-user.txt
+echo $USES_NIS > $TEST_BASE_DIR/zfs-privs-test-nis.txt
log_pass