summaryrefslogtreecommitdiff
path: root/tests/misc/selinux
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/selinux')
-rwxr-xr-xtests/misc/selinux11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/misc/selinux b/tests/misc/selinux
index e94666492..87b3af250 100755
--- a/tests/misc/selinux
+++ b/tests/misc/selinux
@@ -11,8 +11,9 @@ if test "$VERBOSE" = yes; then
fi
. $top_srcdir/tests/test-lib.sh
-skip_if_root_
+require_root_
require_selinux_
+skip_if_mcstransd_is_running_
# Create a regular file, dir, fifo.
touch f || framework_failure
@@ -21,10 +22,10 @@ mkfifo p || framework_failure
fail=0
-ctx=root:object_r:tmp_t
-# FIXME, what if $ctx is no different from the default. Not likely.
-# give each a different context, via chcon
-chcon $ctx f d p 2>/dev/null ||
+# special context that works both with and without mcstransd
+ctx=root:object_r:tmp_t:s0
+
+chcon $ctx f d p ||
skip_test_ '"chcon '$ctx' ..." failed'
# inspect that context with both ls -Z and stat.