The recent backport of https://github.com/systemd/systemd/pull/38707 to RHEL-9 revealed that the assumption that cron implementations forward XDG_SESSION_CLASS to PAM is false for cronie.
When a user attempts to set XDG_SESSION_CLASS within their crontab environment (e.g., to implement a "lighter" background session as intended by the systemd enhancement), the variable is not propagated correctly to the PAM stack. Consequently, pam_systemd.so cannot utilize this variable to correctly assign the desired session class.
This results in background cron jobs being treated as standard interactive sessions for systemd's session management, which may lead to suboptimal resource management or incorrect behavior for background processes.
Create a patch to cronie to ensure that the XDG_SESSION_CLASS environment variable, if set in the crontab job environment, is explicitly forwarded to the PAM stack during session setup.