xref: /freebsd/contrib/pjdfstest/tests/symlink/05.t (revision 40a8ac8f62b535d30349faf28cf47106b7041b83)
1*40a8ac8fSEnji Cooper#!/bin/sh
2*40a8ac8fSEnji Cooper# $FreeBSD: head/tools/regression/pjdfstest/tests/symlink/05.t 211352 2010-08-15 21:24:17Z pjd $
3*40a8ac8fSEnji Cooper
4*40a8ac8fSEnji Cooperdesc="symlink returns EACCES when a component of the name2 path prefix denies search permission"
5*40a8ac8fSEnji Cooper
6*40a8ac8fSEnji Cooperdir=`dirname $0`
7*40a8ac8fSEnji Cooper. ${dir}/../misc.sh
8*40a8ac8fSEnji Cooper
9*40a8ac8fSEnji Cooperecho "1..12"
10*40a8ac8fSEnji Cooper
11*40a8ac8fSEnji Coopern0=`namegen`
12*40a8ac8fSEnji Coopern1=`namegen`
13*40a8ac8fSEnji Coopern2=`namegen`
14*40a8ac8fSEnji Cooper
15*40a8ac8fSEnji Cooperexpect 0 mkdir ${n0} 0755
16*40a8ac8fSEnji Coopercdir=`pwd`
17*40a8ac8fSEnji Coopercd ${n0}
18*40a8ac8fSEnji Cooper
19*40a8ac8fSEnji Cooperexpect 0 mkdir ${n1} 0755
20*40a8ac8fSEnji Cooperexpect 0 chown ${n1} 65534 65534
21*40a8ac8fSEnji Cooper
22*40a8ac8fSEnji Cooperexpect 0 -u 65534 -g 65534 symlink test ${n1}/${n2}
23*40a8ac8fSEnji Cooperexpect 0 -u 65534 -g 65534 unlink ${n1}/${n2}
24*40a8ac8fSEnji Cooper
25*40a8ac8fSEnji Cooperexpect 0 chmod ${n1} 0644
26*40a8ac8fSEnji Cooperexpect EACCES -u 65534 -g 65534 symlink test ${n1}/${n2}
27*40a8ac8fSEnji Cooperexpect 0 chmod ${n1} 0755
28*40a8ac8fSEnji Cooperexpect 0 -u 65534 -g 65534 symlink test ${n1}/${n2}
29*40a8ac8fSEnji Cooperexpect 0 -u 65534 -g 65534 unlink ${n1}/${n2}
30*40a8ac8fSEnji Cooper
31*40a8ac8fSEnji Cooperexpect 0 rmdir ${n1}
32*40a8ac8fSEnji Cooper
33*40a8ac8fSEnji Coopercd ${cdir}
34*40a8ac8fSEnji Cooperexpect 0 rmdir ${n0}
35