zfs_acl_mv_001_pos.ksh revision d583b39bfb4e2571d3e41097c5c357ffe353ad45
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# CDDL HEADER START
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Common Development and Distribution License (the "License").
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# You may not use this file except in compliance with the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# information: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Use is subject to license terms.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# DESCRIPTION:
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Verify that '/usr/bin/mv' supports ZFS ACL
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# STRATEGY:
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# 1. Create file and directory in zfs filesystem
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# 2. Set special ACE to the file and directory
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# 3. Copy the file/directory within and across zfs file system
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# 4. Verify that the ACL of file/directroy is not changed
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinfunction testing_mv #<flag for file|dir> <file1|dir1> <file2|dir2>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin typeset flag=$1
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin set -A obj $2 $3
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin typeset -i i=0
$TESTDIR1/${obj[i]}/$nestedfile)
$TESTDIR1/${obj[i]}/$nestedfile)
$UMASK 0022
[[ ! -d $TESTDIR1 ]] && \
cd $TESTDIR
log_must $TOUCH ${orig_dir[i]}/$nestedfile
for obj in ${orig_dir[i]} ${orig_dir[i]}/$nestedfile; do