2 # make sure `cp -p' preserves special bits
3 # This works only when run as root.
5 # This test would fail due to a bug introduced in 4.0y.
6 # The bug was fixed in 4.0z.
8 if test "$VERBOSE" = yes; then
13 PRIV_CHECK_ARG=require-root . $srcdir/../priv-check
16 t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
17 trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
18 trap '(exit $?); exit' 1 2 13 15
21 mkdir -p $tmp || framework_failure=1
22 cd $tmp || framework_failure=1
24 touch a b || framework_failure=1
25 chmod u+sx,go= a || framework_failure=1
26 chmod u=rwx,g=sx,o= b || framework_failure=1
28 if test $framework_failure = 1; then
29 echo 'failure in testing framework'
36 set _ `ls -l a`; shift; p1=$1
37 set _ `ls -l a2`; shift; p2=$1
38 test $p1 = $p2 || fail=1
41 set _ `ls -l b`; shift; p1=$1
42 set _ `ls -l b2`; shift; p2=$1
43 test $p1 = $p2 || fail=1
45 (exit $fail); exit $fail