3 ms·
Interesting projects that employ LD_PRELOAD: https://github.com/stewartsmith/libeatmydata https://github.com/stewartsmith/libeatmydata https://github.com/wolf
by jwilk 9y ago
Interesting projects that employ LD_PRELOAD:
https://github.com/stewartsmith/libeatmydata https://github.com/stewartsmith/libeatmydata
https://github.com/wolfcw/libfaketime https://github.com/wolfcw/libfaketime
https://cwrap.org/ https://cwrap.org/
https://github.com/dex4er/fakechroot https://github.com/dex4er/fakechroot
https://blitiri.com.ar/p/libfiu/ https://blitiri.com.ar/p/libfiu/
https://github.com/paultag/tmperamental https://github.com/paultag/tmperamental
- eigengrau 9y agoAddendum: https://github.com/sickill/stderred https://github.com/sickill/stderred - colorizing wrapper for stderr
- Fnoord 9y agolibfaketime can be used for nefarious things such as using software past its trial stage (same with using serials attached to MAC addresses + mac spoofing) or returning future TOTP data. Its generally useful for QA as well. It could've been used by Apple to avoid the reset bug in iOS 11.1.2 fakechroot is used when you build your own *.deb file. libeatmydata can be used in environments where you'd destroy the data afterwards anyway, or where you don't need logging or keep state after a reboot. You can also mount a bunch of filesystems such as /tmp and /var/log as tmpfs though.
- rrix2 9y agolibfaketime is also still crucial for reproduceable builds with a lot of compiers embedding compilation date, too, right?
- jwilk 9y agoAt least Debian folks didn't have to resort to using libfaketime. Instead, they patch the embedding tools to use timestamp from environment: https://reproducible-builds.org/specs/source-date-epoch/ https://reproducible-builds.org/specs/source-date-epoch/
- jwilk 9y ago> fakechroot is used when you build your own *.deb file. That's "fakeroot", a different program, which is used for simulating superuser privileges. I was going to mention fakeroot, too, but it doesn't seem have a useful homepage. https://fakeroot.alioth.debian.org/ https://fakeroot.alioth.debian.org/ looks very much uninviting. fakeroot was written for Debian, and it's still developed by Debian developers, although there's nothing Debian-specific about it. Debian has giving back to the free software community in their Social Contract¹, but in practice there's no culture of making Debian software easily accessible to outsiders. :-( ¹ https://www.debian.org/social_contract https://www.debian.org/social_contract §2
- gpderetta 9y agoOnload [1], which is extensively used in some corners of the computing world, also relies on LD_PRELOAD. [1] http://www.openonload.org/ http://www.openonload.org/
- xioxox 9y agotsocks [1] is also interesting. It lets you run a program forwarding all its network data through a SOCKS proxy. It's very useful if you want to VPN a single application over a SSH connection. [1] http://tsocks.sourceforge.net/ http://tsocks.sourceforge.net/
- jpablo 9y agoThere is also retrace (https://github.com/riboseinc/retrace https://github.com/riboseinc/retrace)
- fireflash38 9y agohttps://github.com/SimonKagstrom/kcov https://github.com/SimonKagstrom/kcov Also uses LD_PRELOAD.
- thomasballinger 9y agoHere's an idea that I like (so much that I wrote an implementation): use LD_PRELOAD to swap out readline with version that forks on each input. Kill the forked child process and you have undo! https://github.com/thomasballinger/rlundo https://github.com/thomasballinger/rlundo post: http://ballingt.com/interactive-interpreter-undo/#hacking-fork-on-command-into-interpreters http://ballingt.com/interactive-interpreter-undo/#hacking-fo...
- DavidBuchanan 9y agoHere's my take on libfaketime, which hooks also hooks syscalls: https://github.com/DavidBuchanan314/TARDIS https://github.com/DavidBuchanan314/TARDIS It isn't intended for any kind of serious usage, I mainly just wanted to understand ptrace and LD_PRELOAD.