mirror of
https://github.com/Jeffrey-Sardina/liberated-systemd.git
synced 2026-10-18 17:20:51 -05:00
The helper reaches a user manager with the uid@ machine transport. That transport runs systemd-run, which opens a PAM login session for the user. In that session, systemd-stdio-bridge connects to the user's D-Bus broker. rpm runs the helper once per package scriptlet. A large transaction therefore opens many login sessions for every logged-in user. The operations also fail whenever the user's D-Bus broker is not running. The user manager accepts connections from root on its private socket, and systemctl --user uses the same socket. Connect to /run/user/UID/systemd/private directly with bus_connect_user_systemd_by_uid(). The user owns /run/user/UID. The function therefore refuses a socket that the user does not own or that a process of another user listens on. Otherwise a user could point the helper at the private socket of the system manager.