[Toybox] [PATCH] toysh: fix -Wuse-after-free

Rob Landley rob at landley.net
Wed Mar 27 06:56:43 PDT 2024


On 3/25/24 20:24, enh wrote:
>     But "dpkg-query -S $(which $NAME)" is pretty easy to do the mapping yourself on
>     debian...
> 
> 
> (yeah, though i suspect anyone trying to do this hypothetical "swap package $X
> for toybox" would want the _opposite_ mapping, from package name to all the
> commands. and i don't know of a way to ask apt that question?

  $ dpkg-query -L tar | grep bin/
  /bin/tar
  /usr/sbin/rmt-tar
  /usr/sbin/tarcat

> other than
> brute-forcing all of the executables in all of the directories in $PATH, anyway.)

Checking the $PATH would be clever but the above covers it for me.

There are some insane packages which crap binaries under /usr/lib, such as
/usr/lib/libreoffice/program/oosplash or /usr/lib/man-db/manconv and generally I
consider these packages to be maintained by madmen.

I mean honestly:

  $ cat /usr/bin/7z
  #! /bin/sh
  exec /usr/lib/p7zip/7z "$@"

Why would you do that? Why would ANYONE voluntarily DO that?

Rob


More information about the Toybox mailing list