2 ms·
AFAICT libsystemd is the "blessed" way of a daemon interacting with systemd and its notification protocol. libsystemd is something of a kitchen sink library now
by mrspuratic 3y ago
AFAICT libsystemd is the "blessed" way of a daemon interacting with systemd and its notification protocol. libsystemd is something of a kitchen sink library now, it wasn't always so: there used to be separate libsystemd-daemon that had the functions a daemon might use (and not the ones it won't, like compression wrappers for functions in external libraries). https://lwn.net/Articles/587373/ https://lwn.net/Articles/587373/
A lot of things (e.g. OpenSSH, Apache) don't use it natively, you won't tend to see it in the official sources of non-Linux specific software. Package maintainers who choose to foist^H^H^H^H^Huse systemd add it to those packages. It's quite fun working out why Apache hangs when you port a config and don't realise it needs mod_systemd loaded to stop systemd stamping on it.
There's an extra security wrinkle too: lazy symbol resolution is not the done thing now, it's preferred that symbols are resolved at loading time so important chunks of memory can be protected from other types of attacks (more clarity in one of the preceding articles: https://research.swtch.com/xz-script https://research.swtch.com/xz-script ).