[PATCH] Fix known_glibc_specials comparison

Nick Clifton nickc@redhat.com
Fri Jun 14 08:53:14 GMT 2024


Hi Tulio,

> Sometimes variable path stores a longer path instead of just the name of
> a file, e.g. /usr/lib/libfoo.so instead of libfoo.so.

Err, I think, based upon your code you mean that path should be "usr/lib/libfoo.so"
instead of just "libfoo.so".  (ie without the leading forward slash - there is
already code at the start of is_special_glibc_binary that handles absolute paths).

> In those cases, we need to remove all the directories before calling
> strcmp().

I am reluctant to accept this change because it would treat, eg "build/getent"
as a glibc binary when it almost certainly should not.  I would prefer it if
only a known set of path prefixes were allowed.

Instead, would you mind trying out the attached alternative patch and let me
know if it solves the problem that you were investigating ?

Cheers
   Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glibc-abs-path.patch
Type: text/x-patch
Size: 1533 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/annobin/attachments/20240614/b937b42f/attachment.bin>


More information about the Annobin mailing list