[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: avoid mkdir/selinux failure when mknod is a shell built-in
From: |
Jim Meyering |
Subject: |
Re: avoid mkdir/selinux failure when mknod is a shell built-in |
Date: |
Wed, 16 Apr 2008 19:19:54 +0200 |
Matthew Woehlke <address@hidden> wrote:
>> $ /bin/sh -c '(exec mknod --version)' | head -1
>> $ /bin/sh -c 'nice mknod --version' | head -1
>> $ /bin/sh -c 'nohup mknod --version' | head -1
>
> I realize you already pushed something, but for the record, wouldn't
> env' work as well (and without the side effects)?
This "simple" test has certainly been beaten to death.
I confirmed that it works.
I'll push this soon.
Holler if the attribution should be different.
>From 0d03baa068c20f09bcba3a915fd756db7359a7fa Mon Sep 17 00:00:00 2001
From: Matthew Woehlke <address@hidden>
Date: Wed, 16 Apr 2008 19:15:05 +0200
Subject: [PATCH] tests: accommodate built-in mknod more cleanly still
* tests/mkdir/selinux: Use "env" rather than "nice".
Signed-off-by: Jim Meyering <address@hidden>
---
tests/mkdir/selinux | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/mkdir/selinux b/tests/mkdir/selinux
index 45c2399..91b23b1 100755
--- a/tests/mkdir/selinux
+++ b/tests/mkdir/selinux
@@ -38,8 +38,8 @@ msg="failed to set default file creation context to \`$c':"
for cmd_w_arg in 'mkdir dir' 'mknod b p' 'mkfifo f'; do
# In OpenBSD's /bin/sh, mknod is a shell built-in.
- # Running via "nice" ensures we run our program and not the built-in.
- nice -- $cmd_w_arg -Z $c 2> out && fail=1
+ # Running via "env" ensures we run our program and not the built-in.
+ env -- $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
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, (continued)
- 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
- 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, Matthew Woehlke, 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 <=
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Andreas Schwab, 2008/04/16