summaryrefslogtreecommitdiff
path: root/tests/selinux
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-09-05 10:57:54 +0200
committerJim Meyering <jim@meyering.net>2007-09-05 10:58:45 +0200
commit0fb836f179d0cb2509aefcf007157e02dd0814b6 (patch)
treef4c6040fe50cac03c0fb58df15e36f608f2f4bf2 /tests/selinux
parent4055cd5a2679bc625c4dde7bce941461481ea8b0 (diff)
downloadcoreutils-0fb836f179d0cb2509aefcf007157e02dd0814b6.tar.xz
Adapt to new SELinux behavior: "?" vs. new "unlabeled"
* src/ls.c (gobble_file): Interpret the new "unlabeled" indicator from getfilecon/lgetfilecon the same way we interpret a negative return value: no security context. So we don't print the "+". * tests/selinux: Recognize that "unlabeled" means insufficient support for SELinux, just like "?".
Diffstat (limited to 'tests/selinux')
-rw-r--r--tests/selinux9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/selinux b/tests/selinux
index 087658a39..2026a6a98 100644
--- a/tests/selinux
+++ b/tests/selinux
@@ -1,4 +1,4 @@
-# Is a test expensive?
+# Skip this test if there is insufficient SELinux support.
# Copyright (C) 2007 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -14,9 +14,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-test "`ls -Zd .`" = '? .' &&
- {
+case `ls -Zd .` in
+ '? .'|'unlabeled .')
echo "$0: skipping this test; this system (or maybe just" 1>&2
echo " the current file system) lacks SELinux support" 1>&2
(exit 77); exit 77
- }
+ ;;
+esac