Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #934405

Bug#888106: initramfs-tools: mkinitramfs should fail when ldd fails in copy_exec

From Trek <trek00@inbox.ru>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#888106: initramfs-tools: mkinitramfs should fail when ldd fails in copy_exec
Date 2018-12-21 16:00 +0100
Message-ID <x7urn-3Ah-1@gated-at.bofh.it> (permalink)
References <vb6lb-2pQ-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


On 23 Jan 2018 13:49:30 +0100
Andrew Shadura <andrewsh@debian.org> wrote:

> The return code of ldd is not handled at all. Should ldd fail for any
> reason, this failure will be ignored.

with this code, failures of ldd should be handled

  ldd_output=$(ldd "${src}" 2>/dev/null) || return $?
  for x in $(echo "$ldd_output" | sed -e …)
  do
  done


the problem is when copy_exec is used to copy script files, for
example as cryptsetup does to copy the keyscripts

it can be solved in two ways:

1) check if ldd is running fine at the start of mkinitramfs
   ldd /bin/sh >/dev/null || exit $?

2) handle ldd errors and change packages to use copy_file instead of
   copy_exec when copying files other than binaries


ciao!

Back to linux.debian.bugs.dist | Previous | Next | Find similar | Unroll thread


Thread

Bug#888106: initramfs-tools: mkinitramfs should fail when ldd fails in copy_exec Trek <trek00@inbox.ru> - 2018-12-21 16:00 +0100

csiph-web