003 File Manager
Current Path:
/usr/src/contrib/pjdfstest/tests/chmod
usr
/
src
/
contrib
/
pjdfstest
/
tests
/
chmod
/
📁
..
📄
00.t
(3.24 KB)
📄
01.t
(514 B)
📄
02.t
(692 B)
📄
03.t
(726 B)
📄
04.t
(686 B)
📄
05.t
(1.17 KB)
📄
06.t
(709 B)
📄
07.t
(1.82 KB)
📄
08.t
(2.49 KB)
📄
09.t
(1.02 KB)
📄
10.t
(510 B)
📄
11.t
(2.96 KB)
📄
12.t
(1 KB)
📄
foo
(0 B)
Editing: 12.t
#!/bin/sh # vim: filetype=sh noexpandtab ts=8 sw=8 # $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/12.t 219463 2011-03-10 20:59:02Z pjd $ desc="verify SUID/SGID bit behaviour" dir=`dirname $0` . ${dir}/../misc.sh echo "1..14" n0=`namegen` n1=`namegen` n2=`namegen` expect 0 mkdir ${n2} 0755 cdir=`pwd` cd ${n2} # Check whether writing to the file by non-owner clears the SUID. expect 0 create ${n0} 04777 expect 0777 -u 65534 -g 65534 open ${n0} O_WRONLY : write 0 x : fstat 0 mode expect 0777 stat ${n0} mode expect 0 unlink ${n0} # Check whether writing to the file by non-owner clears the SGID. expect 0 create ${n0} 02777 expect 0777 -u 65534 -g 65534 open ${n0} O_RDWR : write 0 x : fstat 0 mode expect 0777 stat ${n0} mode expect 0 unlink ${n0} # Check whether writing to the file by non-owner clears the SUID+SGID. expect 0 create ${n0} 06777 expect 0777 -u 65534 -g 65534 open ${n0} O_RDWR : write 0 x : fstat 0 mode expect 0777 stat ${n0} mode expect 0 unlink ${n0} cd ${cdir} expect 0 rmdir ${n2}
Upload File
Create Folder