]> git.ipfire.org Git - thirdparty/systemd.git/commit
units: drop "-p" flag from agetty's login options
authorRonan Pigott <ronan@rjp.ie>
Wed, 14 Aug 2024 18:42:03 +0000 (11:42 -0700)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 15 Aug 2024 07:49:02 +0000 (16:49 +0900)
commit3d2157e7072b3e9691c469b992848fb249f8b605
treea0942c1519b2675851c11114e9f891af9dcae000
parent0409213cbc1f939b6f2f72deabc4c92a7fe30523
units: drop "-p" flag from agetty's login options

This flag was added in db6aedab9292 with the justification that locale
environment variables should be preserved by the user session. However,
the companion patch to drop the UnsetEnvironment= directive blocking
these variables was never merged, so the intended change was never
effected.

While the patch was ineffective toward its stated goal, the "-p" option
does have material negative consequences for the user session in
systemd — environment variables to support the use of
credentials and memory pressure directives, such as
$CREDENTIALS_DIRECTORY and $MEMORY_PRESSURE_WATCH, which are now
directly used by agetty and login, get leaked into the user session
potentially breaking applications that rely on these values.

E.g. systemd-ask-password fails from the tty when $CREDENTIALS_DIRECTORY
has been leaked from agetty, because it expects to be able to access
credentials in $CREDENTIALS_DIRECTORY.

This effectively reverts db6aedab9292.

References: db6aedab9292 (units: Tell login to preserve environment (#6023), 2017-05-24)
units/console-getty.service.in
units/container-getty@.service.in
units/getty@.service.in
units/serial-getty@.service.in