FS#67369 - [pam] pam_env doesn't set environment variables from ~/.pam_environment

Attached to Project: Arch Linux
Opened by nl6720 (nl6720) - Thursday, 23 July 2020, 08:25 GMT
Last edited by Tobias Powalowski (tpowa) - Thursday, 13 August 2020, 09:39 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
After upgrading to pam 1.4.0-2 and pambase 20200721.1-1, environment variables from ~/.pam_environment are not set anymore. Not in getty nor in a graphical Plasma X11 session started from SDDM.


Additional info:
* package version(s)
* config and/or log files etc.
* link to upstream bug report, if any
pam 1.4.0-2
pambase 20200721.1-1


Steps to reproduce:
$ echo TEST1 DEFAULT="1" >> ~/.pam_environment
relogin
$ printenv TEST1
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Thursday, 13 August 2020, 09:39 GMT
Reason for closing:  Fixed
Additional comments about closing:  pambase-20200721.1-2 pam-1.4.0-3
Comment by loqs (loqs) - Thursday, 23 July 2020, 14:49 GMT
Upstream changed default behavior [1]. You need to add the option pam_env.so user_readenv=1.
Edit:
Upstream further clarified the reason for the change [2].

[1] https://github.com/linux-pam/linux-pam/commit/f83fb5f25263356391d71da595def409e8dd90f7
[2] https://github.com/linux-pam/linux-pam/commit/cbdef051ab5d4031656d14ac6cdb1f6c2d8d6595
Comment by loqs (loqs) - Saturday, 25 July 2020, 14:24 GMT
What if you set the user_readenv=1 option to the pam_env.so call at the end of /etc/pam.d/system-login?
Comment by Ng Oon-Ee (ngoonee) - Monday, 27 July 2020, 02:57 GMT
This works for me to get it working as before. Time to migrate settings out of here.
Comment by Tobias Powalowski (tpowa) - Wednesday, 12 August 2020, 19:41 GMT
pam-1.4.0-3 and pambase-20200721.1-2 should fix this.
Comment by nl6720 (nl6720) - Thursday, 13 August 2020, 09:03 GMT
With pam-1.4.0-3 and pambase-20200721.1-2 environment variables from ~/.pam_environment are exported.

Loading...