06.t revision 1.1
1#!/bin/sh 2# $FreeBSD: src/tools/regression/fstest/tests/symlink/06.t,v 1.1 2007/01/17 01:42:11 pjd Exp $ 3 4desc="symlink returns EACCES if the parent directory of the file to be created denies write permission" 5 6n0=`namegen` 7n1=`namegen` 8n2=`namegen` 9 10expect 0 mkdir ${n0} 0755 11cdir=`pwd` 12cd ${n0} 13 14expect 0 mkdir ${n1} 0755 15expect 0 chown ${n1} 65534 65534 16 17expect 0 -u 65534 -g 65534 symlink test ${n1}/${n2} 18expect 0 -u 65534 -g 65534 unlink ${n1}/${n2} 19 20expect 0 chmod ${n1} 0555 21expect EACCES -u 65534 -g 65534 symlink test ${n1}/${n2} 22expect 0 chmod ${n1} 0755 23expect 0 -u 65534 -g 65534 symlink test ${n1}/${n2} 24expect 0 unlink ${n1}/${n2} 25 26expect 0 rmdir ${n1} 27 28cd ${cdir} 29expect 0 rmdir ${n0} 30