dropbear-initramfs init-bottom script uses wrong ps options, can't kill descendants
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dropbear (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
/usr/share/
My session drops briefly when init-bottom/
Of note is that /bin/busybox (shipped with busybox-static) supports 'ps -o' but /usr/lib/
=======
$ /bin/busybox ps --help
BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3) multi-call binary.
Usage: ps [-o COL1,COL2=HEADER] [-T]
Show list of processes
-o COL1,COL2=HEADER Select columns for display
-T Show threads
$ /usr/lib/
BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3) multi-call binary.
Usage: ps
Show list of processes
w Wide output
l Long output
=======
My system is amd64 18.04.1.
busybox-initramfs 1:1.27.2-2ubuntu3
busybox-static 1:1.27.2-2ubuntu3
dropbear-bin 2017.75-3build1
dropbear-initramfs 2017.75-3build1
initramfs-tools 0.130ubuntu3.5
Here's relevant console output during boot:
=======
Begin: Running /scripts/
BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3) multi-call binary.
Usage: ps
Show list of processes
w Wide output
l Long output
ps: invalid option -- 'o'
BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3) multi-call binary.
Usage: ps
Show list of processes
w Wide output
l Long output
done.
Begin: Bringing down ens3 ... done.
Begin: Bringing down lo ... done.
done.
=======
I'm using the attached patch on my system without issue, but it only kills direct children instead of everything in the process group. (busybox's kill doesn't support PGID at all from what I can see)
It might be possible to solve this with a change to busybox-initramfs for additional ps options, or include /bin/busybox instead of /usr/lib/ initramfs- tools/bin/ busybox.