1#!/bin/sh 2# $FreeBSD: head/tools/regression/pjdfstest/tests/granular/01.t 211352 2010-08-15 21:24:17Z pjd $ 3 4desc="NFSv4 granular permissions checking - ACL_READ_ATTRIBUTES and ACL_WRITE_ATTRIBUTES" 5 6dir=`dirname $0` 7. ${dir}/../misc.sh 8 9[ "${os}:${fs}" = "FreeBSD:ZFS" ] || quick_exit 10 11echo "1..12" 12 13n0=`namegen` 14n1=`namegen` 15n2=`namegen` 16 17expect 0 mkdir ${n2} 0755 18cdir=`pwd` 19cd ${n2} 20 21# Tests 1..12 - check out whether user 65534 is permitted to read attributes. 22expect 0 create ${n0} 0644 23expect 0 lstat ${n0} size 24expect 0 -u 65534 -g 65534 stat ${n0} size 25expect 0 prependacl ${n0} user:65534:read_attributes::deny 26expect 0 lstat ${n0} size 27expect EACCES -u 65534 -g 65534 stat ${n0} size 28expect 0 prependacl ${n0} user:65534:read_attributes::allow 29expect 0 -u 65534 -g 65534 stat ${n0} size 30expect 0 lstat ${n0} size 31expect 0 unlink ${n0} 32 33# Tests 12..12 - check out whether user 65534 is permitted to write attributes. 34# XXX: Check if ACL_WRITE_ATTRIBUTES allows for modifying access times. 35 36cd ${cdir} 37expect 0 rmdir ${n2} 38