Another point, also related to find_binary.

The check() function was modified like this:

 check() {
-    require_binaries busybox || return 1
+    require_binaries /usr/lib/initramfs-tools/bin/busybox || return 1

     return 255
 }


But require_binaries calls find_binary, and find_binary can return a binary 
from another path, defeating the purpose of check() I think.

Example:
$ cat demo-defect2.sh 
#!/bin/bash
DRACUT_INSTALL=/bin/true   # dracut-functions.sh exits if it can't find 
dracut-install
. "$(dirname "$0")/dracut-functions.sh"

echo "Calling find_binary /does/not/exist/sh"
find_binary /does/not/exist/sh

$ ./demo-defect2.sh 
Calling find_binary /does/not/exist/sh
/usr/bin/sh


So again if /usr/lib/initramfs-tools/bin/busybox does not exist, but "busybox" 
can be found elsewhere in PATH, check() will happily return true.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2150657

Title:
  Use busybox instead of rust-coreutils in initrd

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/busybox/+bug/2150657/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to