core: make sure that if PAMName= is set we always do the full user changing even...
authorLennart Poettering <lennart@poettering.net>
Thu, 24 Oct 2024 08:52:56 +0000 (10:52 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 13 Nov 2024 19:48:10 +0000 (19:48 +0000)
commit0f7efb0cfcb3aff78efe1dff6293ec0e98a6aad9
tree847c2b7409d213a7876e858b5b52e83c1ccfe78c
parent7a369c3971bdcc1c29be41b4c8171e720a50d9f4
core: make sure that if PAMName= is set we always do the full user changing even if no user is specified explicitly

When PAMName= is set this should be enough to go through our entire user
changing story, so that PAM is definitely run, and environment variables
definitely pulled in and so on.

Previously, it would happen that under some circumstances we might no do
this when transitioning from root to root itself even though PAM was
enabled.

Fixes: #34682
(cherry picked from commit e4b4d9cc7adf245950e8676be0e0f4a813069500)
src/core/exec-invoke.c