[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
avoid mkdir/selinux failure when mknod is a shell built-in
From: |
Jim Meyering |
Subject: |
avoid mkdir/selinux failure when mknod is a shell built-in |
Date: |
Wed, 16 Apr 2008 10:33:05 +0200 |
This test would fail not only because the built-in mknod
doesn't support -Z, but because it doesn't know about 'p' pipes.
tests: avoid mkdir/selinux failure when mknod is a shell built-in
* tests/mkdir/selinux: Skip the mknod test if it's a built-in.
diff --git a/tests/mkdir/selinux b/tests/mkdir/selinux
index fcd45a8..adbaa6a 100755
--- a/tests/mkdir/selinux
+++ b/tests/mkdir/selinux
@@ -30,9 +30,15 @@ fi
c=invalid-selinux-context
msg="failed to set default file creation context to \`$c':"
+# In OpenBSD's /bin/sh, mknod is a shell built-in.
+# In that case, just skip the mknod test.
+( mknod --version 2>&1 ) | grep 'GNU coreutils' \
+ && mknod='mknod b p' \
+ || mknod='mkdir dir'
+
# Test each of mkdir, mknod, mkfifo with "-Z invalid-context".
-for cmd_w_arg in 'mkdir dir' 'mknod b p' 'mkfifo f'; do
+for cmd_w_arg in 'mkdir dir' "$mknod" 'mkfifo f'; do
$cmd_w_arg -Z $c 2> out && fail=1
set $cmd_w_arg; cmd=$1
echo "$cmd: $msg" > exp || fail=1
--
1.5.5.56.gbcf7f
- avoid mkdir/selinux failure when mknod is a shell built-in,
Jim Meyering <=
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Eric Blake, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Jim Meyering, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Thomas Schwinge, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Jim Meyering, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Eric Blake, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Jim Meyering, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Jim Meyering, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Ralf Wildenhues, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Eric Blake, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Ralf Wildenhues, 2008/04/16