Bug#888106: initramfs-tools: mkinitramfs should fail when ldd fails in copy_exec
Package: initramfs-tools
Version: 0.130
Severity: minor
Dear Maintainer,
We're working on a minimalist build of a Debian derivative which doesn't
include bash, and we ran into an situation in which due to a human error
the system didn't have a working ldd. This wasn't detected during an
image build process as mkinitramfs happily ignored ldd not working
(while being present and being an executable), and proceeded creating
a broken initramfs. In hook-functions, copy_exec does the following:
# Copy the dependant libraries
for x in $(ldd "${src}" 2>/dev/null | sed -e …)
do
done
The return code of ldd is not handled at all. Should ldd fail for any
reason, this failure will be ignored.
I tried to write a patch, but I couldn't come up with an elegant
solution which would cover cases other than just a wrong hashbang in
ldd :)
Maybe something like https://www.spinics.net/lists/dash/msg00165.html
can be used, but it's up to you to introduce hacks like that into the
code.
Thanks in advance.
--
Cheers,
Andrew
Reply to: