1# CDDL HEADER START 2# 3# The contents of this file are subject to the terms of the 4# Common Development and Distribution License (the "License"). 5# You may not use this file except in compliance with the License. 6# 7# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 8# or http://www.opensolaris.org/os/licensing. 9# See the License for the specific language governing permissions 10# and limitations under the License. 11# 12# When distributing Covered Code, include this CDDL HEADER in each 13# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 14# If applicable, add the following below this CDDL HEADER, with the 15# fields enclosed by brackets "[]" replaced with your own identifying 16# information: Portions Copyright [yyyy] [name of copyright owner] 17# 18# CDDL HEADER END 19# 20 21# 22# Copyright 2012 Spectra Logic. All rights reserved. 23# Use is subject to license terms. 24# 25 26 27atf_test_case cifs_attr_001_pos cleanup 28cifs_attr_001_pos_head() 29{ 30 atf_set "descr" "Verify set/clear DOS attributes will succeed while user haswrite_attributes permission or PRIV_FILE_OWNER privilege" 31 atf_set "require.config" "zfs_acl zfs_xattr" 32 atf_set "require.progs" "ksh93 runwattr" 33} 34cifs_attr_001_pos_body() 35{ 36 . $(atf_get_srcdir)/../../../include/default.cfg 37 . $(atf_get_srcdir)/cifs.kshlib 38 . $(atf_get_srcdir)/../acl.cfg 39 40 verify_disk_count "$DISKS" 1 41 ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" 42 ksh93 $(atf_get_srcdir)/cifs_attr_001_pos.ksh || atf_fail "Testcase failed" 43} 44cifs_attr_001_pos_cleanup() 45{ 46 . $(atf_get_srcdir)/../../../include/default.cfg 47 . $(atf_get_srcdir)/cifs.kshlib 48 . $(atf_get_srcdir)/../acl.cfg 49 50 ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" 51} 52 53 54atf_test_case cifs_attr_002_pos cleanup 55cifs_attr_002_pos_head() 56{ 57 atf_set "descr" "Verify set/clear BSD'ish attributes will succeed while user hasPRIV_FILE_FLAG_SET/PRIV_FILE_FLAG_CLEAR privilege" 58 atf_set "require.config" "zfs_acl zfs_xattr" 59 atf_set "require.progs" "ksh93 runwattr" 60} 61cifs_attr_002_pos_body() 62{ 63 . $(atf_get_srcdir)/../../../include/default.cfg 64 . $(atf_get_srcdir)/cifs.kshlib 65 . $(atf_get_srcdir)/../acl.cfg 66 67 verify_disk_count "$DISKS" 1 68 ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" 69 ksh93 $(atf_get_srcdir)/cifs_attr_002_pos.ksh || atf_fail "Testcase failed" 70} 71cifs_attr_002_pos_cleanup() 72{ 73 . $(atf_get_srcdir)/../../../include/default.cfg 74 . $(atf_get_srcdir)/cifs.kshlib 75 . $(atf_get_srcdir)/../acl.cfg 76 77 ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" 78} 79 80 81atf_test_case cifs_attr_003_pos cleanup 82cifs_attr_003_pos_head() 83{ 84 atf_set "descr" "Verify DOS & BSD'ish attributes will provide theaccess limitation as expected." 85 atf_set "require.config" "zfs_acl zfs_xattr" 86 atf_set "require.progs" "ksh93 runat" 87} 88cifs_attr_003_pos_body() 89{ 90 . $(atf_get_srcdir)/../../../include/default.cfg 91 . $(atf_get_srcdir)/cifs.kshlib 92 . $(atf_get_srcdir)/../acl.cfg 93 94 verify_disk_count "$DISKS" 1 95 ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" 96 ksh93 $(atf_get_srcdir)/cifs_attr_003_pos.ksh || atf_fail "Testcase failed" 97} 98cifs_attr_003_pos_cleanup() 99{ 100 . $(atf_get_srcdir)/../../../include/default.cfg 101 . $(atf_get_srcdir)/cifs.kshlib 102 . $(atf_get_srcdir)/../acl.cfg 103 104 ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" 105} 106 107 108atf_init_test_cases() 109{ 110 111 atf_add_test_case cifs_attr_001_pos 112 atf_add_test_case cifs_attr_002_pos 113 atf_add_test_case cifs_attr_003_pos 114} 115