[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: |
Eric Blake |
Subject: |
Re: avoid mkdir/selinux failure when mknod is a shell built-in |
Date: |
Wed, 16 Apr 2008 06:46:11 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Jim Meyering on 4/16/2008 6:30 AM:
| My first reaction was "great! that looks much better".
| Unfortunately, the technique doesn't work with that shell:
|
| openbsd$ ./mknod --version|head -1
| mknod (GNU coreutils) 6.10.188-7cb24
| openbsd$ PATH=. /bin/sh -c 'mknod --version'|head -1
| /bin/sh: mknod: --: unknown option
| /bin/sh: mknod: usage: mknod [-m mode] name [b | c] major minor
| /bin/sh: mknod: usage: mknod [-m mode] name p
That still uses a builtin. You need an exec in the loop to force a PATH
search (even command, which bypasses functions, won't bypass builtins).
Or perhaps a forwarding command will help; do any of these work?
$ /bin/sh -c '(exec mknod --version)' | head -1
$ /bin/sh -c 'nice mknod --version' | head -1
$ /bin/sh -c 'nohup mknod --version' | head -1
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkgF9RMACgkQ84KuGfSFAYD3eACeJSYwRzZXjUCknA/wnqsOMHCU
hMAAoKLQv1qEKOn07Gkc0mq7El/iJcgx
=0FHy
-----END PGP SIGNATURE-----
- 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, 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
- Re: avoid mkdir/selinux failure when mknod is a shell built-in,
Eric Blake <=
- 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, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Andreas Schwab, 2008/04/16