4 desc="chflags returns EPERM when the effective user ID does not match the owner of the file and the effective user ID is not the super-user"
17 expect 0 mkdir ${n0} 0755
21 expect 0 create ${n1} 0644
22 expect EPERM -u 65534 -g 65534 chflags ${n1} UF_IMMUTABLE
23 expect none stat ${n1} flags
24 expect 0 chown ${n1} 65534 65534
25 expect EPERM -u 65533 -g 65533 chflags ${n1} UF_IMMUTABLE
26 expect none stat ${n1} flags
29 expect 0 mkdir ${n1} 0755
30 expect EPERM -u 65534 -g 65534 chflags ${n1} UF_IMMUTABLE
31 expect none stat ${n1} flags
32 expect 0 chown ${n1} 65534 65534
33 expect EPERM -u 65533 -g 65533 chflags ${n1} UF_IMMUTABLE
34 expect none stat ${n1} flags
37 expect 0 mkfifo ${n1} 0644
38 expect EPERM -u 65534 -g 65534 chflags ${n1} UF_IMMUTABLE
39 expect none stat ${n1} flags
40 expect 0 chown ${n1} 65534 65534
41 expect EPERM -u 65533 -g 65533 chflags ${n1} UF_IMMUTABLE
42 expect none stat ${n1} flags
45 expect 0 symlink ${n2} ${n1}
46 expect EPERM -u 65534 -g 65534 lchflags ${n1} UF_IMMUTABLE
47 expect none lstat ${n1} flags
48 expect 0 lchown ${n1} 65534 65534
49 expect EPERM -u 65533 -g 65533 lchflags ${n1} UF_IMMUTABLE
50 expect none lstat ${n1} flags