"ruderich.org/simon/safcm/testutil"
)
-func chmod(name string, perm int) {
- err := os.Chmod(name, FullPermToFileMode(perm))
+func chmod(name string, mode fs.FileMode) {
+ err := os.Chmod(name, mode)
if err != nil {
panic(err)
}
chmod("files-invalid-perm-dir/files/etc/", 0755)
chmod("files-invalid-perm-dir/files/etc/resolv.conf", 0644)
chmod("files-invalid-perm-dir-setgid/files", 0755)
- chmod("files-invalid-perm-dir-setgid/files/etc/", 02755)
+ chmod("files-invalid-perm-dir-setgid/files/etc/", 0755|fs.ModeSetgid)
chmod("files-invalid-perm-dir-setgid/files/etc/resolv.conf", 0644)
chmod("files-invalid-perm-file/files", 0755)
chmod("files-invalid-perm-file/files/etc/", 0755)
if !skipInvalidSticky {
chmod("files-invalid-perm-file-sticky/files", 0755)
chmod("files-invalid-perm-file-sticky/files/etc", 0755)
- chmod("files-invalid-perm-file-sticky/files/etc/resolv.conf", 01644)
+ chmod("files-invalid-perm-file-sticky/files/etc/resolv.conf",
+ 0644|fs.ModeSticky)
}
ft.CreateFifo("files-invalid-type/files/invalid", 0644)