Bug#1063147: 'telinit u' infinitely re-exec's itself inside containers

Michael Biebl biebl at debian.org
Tue Feb 6 13:09:23 GMT 2024


Control: forwarded -1 https://github.com/systemd/systemd/issues/31220

Am 05.02.2024 um 12:45 schrieb Daniel P. Berrangé:
> The simple solution appears to be to just remove the '-Dtelinit-path'
> option from debian/rules, and leave it on systemd's built-in defaults.
> The binary at this default path won't exist, and thus on a non-systemd
> execution environment 'telinit u' will simply exit with an error:
> 
>    # telinit u
>    Couldn't find an alternative telinit implementation to spawn.
> 
> which is a sensible behaviour and what has happened in containers with
> Debian until recent Sid.  Other distros (eg Fedora) leave the telinit
> binary on systemd's default (non-existant) path too.
> 
> Possibly the upstream systemctl.c code should be made to protect itself
> against such a mis-configuration by setting an env variable it can look
> at to detect re-exec of itself.
> 

I've forwarded this upstream since I think systemd should behave better 
in this case. E.g. it could check if /sbin/telinit is a symlink on 
itself and in this case do not re-exec unless sd_booted is true.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20240206/e1cfab74/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list