[lsb-discuss] Two-line patch to make ldd work with dash

Wichmann, Mats D mats.d.wichmann at intel.com
Fri May 23 08:58:54 PDT 2008


Theodore Ts'o wrote:
> I found a fix for it here:
> 
>   http://sourceware.org/ml/glibc-bugs/2007-07/msg00015.html
> 
> ... but Uhlrich rejected it with extreme prejudice since he only wants
> to support bash.

and in this case, I think the reason makes sense, if you look at
the situation described in the comment (abbreviated in the diff
as a bit of it falls outside the five-line c-diff window):

# The following use of cat is needed to make ldd work in SElinux
# environments where the executed program might not have permissions
# to write to the console/tty.  But only bash 3.x supports the pipefail
# option, and we don't bother to handle the case for older bash
versions.

In other words, we might fix the script to not blow up on a shell
that doesn't understand the pipefail option, but that shell is
still going to fail to run ldd in the restricted permission case
cited since it wouldn't get access to the workaround, so we wouldn't 
be much better off.

I think it's fine to mark ldd as #!/bin/bash and move on from there.
As noted, we do provide bash in the lsbsi; and the implementation of
ldd is not covered by LSB so it can be implemented in non-POSIX-shell
syntax without it being a problem (in fact, ldd isn't mentioned at all).






More information about the lsb-discuss mailing list