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