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)
committerLennart Poettering <lennart@poettering.net>
Thu, 24 Oct 2024 20:37:00 +0000 (22:37 +0200)
commite4b4d9cc7adf245950e8676be0e0f4a813069500
tree3e22e11c8beea9ca3e37f453f11938a1ec621a6c
parent4167e9e210818d79eca0de2cf992623abed7073c
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
src/core/exec-invoke.c