08.t revision 166065
1#!/bin/sh 2# $FreeBSD: head/tools/regression/fstest/tests/chown/08.t 166065 2007-01-17 01:42:12Z pjd $ 3 4desc="chown returns EPERM if the named file has its immutable or append-only flag set" 5 6dir=`dirname $0` 7. ${dir}/../misc.sh 8 9require chflags 10 11echo "1..34" 12 13n0=`namegen` 14 15expect 0 create ${n0} 0644 16expect 0 chflags ${n0} SF_IMMUTABLE 17expect EPERM chown ${n0} 65534 65534 18expect 0 chflags ${n0} none 19expect 0 chown ${n0} 65534 65534 20expect 0 unlink ${n0} 21 22expect 0 create ${n0} 0644 23expect 0 chflags ${n0} UF_IMMUTABLE 24expect EPERM chown ${n0} 65534 65534 25expect 0 chflags ${n0} none 26expect 0 chown ${n0} 65534 65534 27expect 0 unlink ${n0} 28 29expect 0 create ${n0} 0644 30expect 0 chflags ${n0} SF_APPEND 31expect EPERM chown ${n0} 65534 65534 32expect 0 chflags ${n0} none 33expect 0 chown ${n0} 65534 65534 34expect 0 unlink ${n0} 35 36expect 0 create ${n0} 0644 37expect 0 chflags ${n0} UF_APPEND 38expect EPERM chown ${n0} 65534 65534 39expect 0 chflags ${n0} none 40expect 0 chown ${n0} 65534 65534 41expect 0 unlink ${n0} 42 43expect 0 create ${n0} 0644 44expect 0 chflags ${n0} SF_NOUNLINK 45expect 0 chown ${n0} 65534 65534 46expect 0 chflags ${n0} none 47expect 0 unlink ${n0} 48 49expect 0 create ${n0} 0644 50expect 0 chflags ${n0} UF_NOUNLINK 51expect 0 chown ${n0} 65534 65534 52expect 0 chflags ${n0} none 53expect 0 unlink ${n0} 54