mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/docker-easyconnect/docker-easyconnect.git
synced 2026-09-20 08:03:33 +08:00
On docker, `/proc/self/loginuid` is -1 by default, while on podman it is 0 (root), which makes aTrust services refuse to start, because after they use `getlogin_r`, which is affected by `/proc/self/loginuid`, to get the username successfully, they give up trying any other way (such as `loginctl`) to get the non-root user used to start the http server (port 54631), even if the username they got is root. This commit adds a LD_PRELOAD hook named fake-getlogin, which hooks `getlogin` and `getlogin_r` to provide the non-root username directly. This commit also: - reduces errors when running postinst script of aTrust; - uses LD_LIBRARY_PATH to make aTrust use its versions of libraries, especially those very old and no longer getatable from debian packages.