1196948Strasz#!/bin/sh 2196948Strasz# $FreeBSD: releng/10.2/tools/regression/pjdfstest/tests/granular/01.t 210984 2010-08-06 23:58:54Z pjd $ 3196948Strasz 4196948Straszdesc="NFSv4 granular permissions checking - ACL_READ_ATTRIBUTES and ACL_WRITE_ATTRIBUTES" 5196948Strasz 6196948Straszdir=`dirname $0` 7196948Strasz. ${dir}/../misc.sh 8196948Strasz 9210984Spjd[ "${os}:${fs}" = "FreeBSD:ZFS" ] || quick_exit 10210984Spjd 11196948Straszecho "1..12" 12196948Strasz 13196948Straszn0=`namegen` 14196948Straszn1=`namegen` 15196948Straszn2=`namegen` 16196948Strasz 17196948Straszexpect 0 mkdir ${n2} 0755 18196948Straszcdir=`pwd` 19196948Straszcd ${n2} 20196948Strasz 21196948Strasz# Tests 1..12 - check out whether user 65534 is permitted to read attributes. 22196948Straszexpect 0 create ${n0} 0644 23196948Straszexpect 0 lstat ${n0} size 24196948Straszexpect 0 -u 65534 -g 65534 stat ${n0} size 25196948Straszexpect 0 prependacl ${n0} user:65534:read_attributes::deny 26196948Straszexpect 0 lstat ${n0} size 27196948Straszexpect EACCES -u 65534 -g 65534 stat ${n0} size 28196948Straszexpect 0 prependacl ${n0} user:65534:read_attributes::allow 29196948Straszexpect 0 -u 65534 -g 65534 stat ${n0} size 30196948Straszexpect 0 lstat ${n0} size 31196948Straszexpect 0 unlink ${n0} 32196948Strasz 33196948Strasz# Tests 12..12 - check out whether user 65534 is permitted to write attributes. 34196948Strasz# XXX: Check if ACL_WRITE_ATTRIBUTES allows for modifying access times. 35196948Strasz 36196948Straszcd ${cdir} 37196948Straszexpect 0 rmdir ${n2} 38