2
# $Id: fork.sh 61 2006-05-19 18:32:14Z steve-beattie $
4
# Copyright (C) 2002-2005 Novell/SUSE
6
# This program is free software; you can redistribute it and/or
7
# modify it under the terms of the GNU General Public License as
8
# published by the Free Software Foundation, version 2 of the
13
# Verifies that profiles are duplicated correctly for fork (the subtask
14
# receives a copy of it's parents profile). The test attempts to access the
15
# files passed as arguments for both a parent and a child. The test is
16
# repeated for permissive and restrictive profiles.
20
pwd=`cd $pwd ; /bin/pwd`
33
touch $file1 $file2 $file3
37
genprofile cap:$cap $file1:$okperm $file2:$okperm $file3:$okperm
39
runchecktest "FORK with rw" pass $file1 $file2 $file3
41
# TEST2. All will fail, but parent and child will equally fail
43
genprofile cap:$cap $file1:$badperm $file2:$badperm $file3:$badperm
45
runchecktest "FORK w/o w" pass $file1 $file2 $file3
47
# TEST3. Some pass, some fail, but parent and child will equally fail
49
genprofile cap:$cap $file1:$badperm $file2:$okperm $file3:$badperm
51
runchecktest "FORK mixed" pass $file1 $file2 $file3