2
# Copyright (C) 2002-2005 Novell/SUSE
4
# This program is free software; you can redistribute it and/or
5
# modify it under the terms of the GNU General Public License as
6
# published by the Free Software Foundation, version 2 of the
11
# This test verifies that subdomain file access checks function correctly
12
# for named piped (nodes in the filesystem created with mknod). The test
13
# creates a parent/child process relationship which attempt to rendevous via
14
# the named pipe. The tests are attempted for unconfined and confined
15
# processes and also for subhats.
19
pwd=`cd $pwd ; /bin/pwd`
31
# NAMED PIPE - no confinement
33
runchecktest "NAMED PIPE (no confinement)" pass nochange ${fifo}
37
#rm -f ${fifo} && mknod ${fifo} p
38
genprofile $fifo:${okperm}
39
runchecktest "NAMED PIPE RW (confinement)" pass nochange ${fifo}
41
# PIPE - confined - no access.
43
#rm -f ${fifo} && mknod ${fifo} p
45
runchecktest "NAMED PIPE (confinement)" fail nochange ${fifo}
47
# PIPE - in a subprofile.
49
#rm -f ${fifo} && mknod ${fifo} p
50
genprofile ${fifo}:${okperm} hat:$subtest ${fifo}:${okperm}
52
runchecktest "NAMED PIPE RW (subprofile)" pass ${subtest} ${fifo}
54
# PIPE - in a subprofile - no access
56
#rm -f ${fifo} && mknod ${fifo} p
57
genprofile ${fifo}:${okperm} hat:$subtest
59
runchecktest "NAMED PIPE (subprofile)" fail ${subtest} ${fifo}