Modified 2024-08-11

LD Preload

You can replace a dynamically loaded library by using the environment variable ld_preload. For example:
$ LD_PRELOAD=/path/to/my/malloc.so /bin/ls
At first, I thought there was a huuuge security risk. But apparently, the loader checks that ruid == euid