1#!/bin/sh 2# $FreeBSD: src/tools/regression/fstest/tests/open/10.t,v 1.1 2007/01/17 01:42:10 pjd Exp $ 3 4desc="open returns EPERM when the named file has its immutable flag set and the file is to be modified" 5 6n0=`namegen` 7 8expect 0 create ${n0} 0644 9expect 0 chflags ${n0} SF_IMMUTABLE 10expect EPERM open ${n0} O_WRONLY 11expect EPERM open ${n0} O_RDWR 12expect EPERM open ${n0} O_RDONLY,O_TRUNC 13expect 0 chflags ${n0} none 14expect 0 unlink ${n0} 15 16expect 0 create ${n0} 0644 17expect 0 chflags ${n0} UF_IMMUTABLE 18expect EPERM open ${n0} O_WRONLY 19expect EPERM open ${n0} O_RDWR 20expect EPERM open ${n0} O_RDONLY,O_TRUNC 21expect 0 chflags ${n0} none 22expect 0 unlink ${n0} 23