2
# $Id: named_pipe.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
# This test verifies that subdomain file access checks function correctly
14
# for named piped (nodes in the filesystem created with mknod). The test
15
# creates a parent/child process relationship which attempt to rendevous via
16
# the named pipe. The tests are attempted for unconfined and confined
17
# processes and also for subhats.
21
pwd=`cd $pwd ; /bin/pwd`
33
# NAMED PIPE - no confinement
35
runchecktest "NAMED PIPE (no confinement)" pass nochange ${fifo}
39
#rm -f ${fifo} && mknod ${fifo} p
40
genprofile $fifo:${okperm}
41
runchecktest "NAMED PIPE RW (confinement)" pass nochange ${fifo}
43
# PIPE - confined - no access.
45
#rm -f ${fifo} && mknod ${fifo} p
47
runchecktest "NAMED PIPE (confinement)" fail nochange ${fifo}
49
# PIPE - in a subprofile.
51
#rm -f ${fifo} && mknod ${fifo} p
52
genprofile ${fifo}:${okperm} hat:$subtest ${fifo}:${okperm}
54
runchecktest "NAMED PIPE RW (subprofile)" pass ${subtest} ${fifo}
56
# PIPE - in a subprofile - no access
58
#rm -f ${fifo} && mknod ${fifo} p
59
genprofile ${fifo}:${okperm} hat:$subtest
61
runchecktest "NAMED PIPE (subprofile)" fail ${subtest} ${fifo}