4 desc
="rename returns EPERM if the file pointed at by the 'from' argument has its immutable, undeletable or append-only flag set"
16 expect
0 create
${n0} 0644
17 for flag
in SF_IMMUTABLE UF_IMMUTABLE SF_APPEND UF_APPEND SF_NOUNLINK UF_NOUNLINK
; do
18 expect
0 chflags
${n0} ${flag}
19 expect
${flag} stat
${n0} flags
20 expect EPERM rename
${n0} ${n1}
22 expect
0 chflags
${n0} none
25 expect
0 mkdir
${n0} 0755
26 for flag
in SF_IMMUTABLE UF_IMMUTABLE SF_APPEND UF_APPEND SF_NOUNLINK UF_NOUNLINK
; do
27 expect
0 chflags
${n0} ${flag}
28 expect
${flag} stat
${n0} flags
29 expect EPERM rename
${n0} ${n1}
31 expect
0 chflags
${n0} none
34 expect
0 mkfifo ${n0} 0644
35 for flag
in SF_IMMUTABLE UF_IMMUTABLE SF_APPEND UF_APPEND SF_NOUNLINK UF_NOUNLINK
; do
36 expect
0 chflags
${n0} ${flag}
37 expect
${flag} stat
${n0} flags
38 expect EPERM rename
${n0} ${n1}
40 expect
0 chflags
${n0} none
43 expect
0 symlink
${n1} ${n0}
44 for flag
in SF_IMMUTABLE UF_IMMUTABLE SF_APPEND UF_APPEND SF_NOUNLINK UF_NOUNLINK
; do
45 expect
0 lchflags
${n0} ${flag}
46 expect
${flag} lstat
${n0} flags
47 expect EPERM rename
${n0} ${n1}
49 expect
0 lchflags
${n0} none