bug-coreutils
[Top][All Lists]
Advanced

[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:04:38 -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 2:33 AM:
| 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.

Couldn't you try to defeat the shell builtin by using a subshell and exec
to force the PATH lookup?  For example, on bash:

$ printf --version | head -n1
bash: printf: --: invalid option
printf: usage: printf [-v var] format [arguments]
$ (exec printf --version) | head -n1
printf (GNU coreutils) 6.10

Doesn't this also mean that you need to patch mknod.c to print
USAGE_BUILTIN_WARNING?

- --
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

iEYEARECAAYFAkgF61YACgkQ84KuGfSFAYDxgQCfcCM73K1gHf3zzTLsJrkqLIY+
T44AnRKNgfzjU4x7mMOzysT2zHCHnR+T
=TABh
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]