#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
# Copyright (c) 2016 by Delphix. All rights reserved.
#
#
# DESCRIPTION:
# Verify that the read_data/write_data/execute permission for
#
# STRATEGY:
# 1. Loop root and non-root user.
# 2. Separated verify type@:access:allow|deny to file and directory
# 3. To super user, read and write deny was override.
# 4. According to ACE list and override rule, expect that
#
verify_runnable "both"
# owner@ group_users other_users
set -A users \
"root" "$ZFS_ACL_ADMIN" "$ZFS_ACL_OTHER1" \
# In order to test execute permission, read_data was need firstly.
set -A a_flag "owner@" "group@" "everyone@"
log_assert "Verify that the read_data/write_data/execute permission for" \
{
typeset node=$1
typeset acl_spec=$2
typeset user=$3
# To super user, read and write deny permission was override.
then
print "log_must"
print "log_mustnot"
fi
}
{
typeset node=$1
typeset acl_spec=$2
typeset g_usr=$3
typeset o_usr=$4
typeset log
fi
fi
fi
}
{
typeset node=$1
typeset g_usr=$2
typeset o_usr=$3
done
done
done
}
typeset -i i=0
while (( i < ${#users[@]} )); do
log_must set_cur_usr ${users[i]}
(( i += 3 ))
done