4 desc="verify SUID/SGID bit behaviour"
15 expect 0 mkdir ${n2} 0755
19 # Check whether writing to the file by non-owner clears the SUID.
20 expect 0 create ${n0} 04777
21 expect 0777 -u 65534 -g 65534 open ${n0} O_WRONLY : write 0 x : fstat 0 mode
22 expect 0777 stat ${n0} mode
25 # Check whether writing to the file by non-owner clears the SGID.
26 expect 0 create ${n0} 02777
27 expect 0777 -u 65534 -g 65534 open ${n0} O_RDWR : write 0 x : fstat 0 mode
28 expect 0777 stat ${n0} mode
31 # Check whether writing to the file by non-owner clears the SUID+SGID.
32 expect 0 create ${n0} 06777
33 expect 0777 -u 65534 -g 65534 open ${n0} O_RDWR : write 0 x : fstat 0 mode
34 expect 0777 stat ${n0} mode