[Bug 266532] x11/lightdm: Login sessions do not respect login.conf

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 23 Sep 2022 08:43:51 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266532

--- Comment #4 from Daniel O'Connor <darius@dons.net.au> ---
I just figured out why..
When session_child_run calls execve it passes in the env parameter with the
list generated by PAM (pam_getenvlist). This overwrites the environmental
variables set by setusercontext.

My work around is to reset the environment to pam_getenvlist() just before
setusercontext is called.

Here is my patch so far (need to set HAVE_SETUSERCONTEXT to 1):
https://gist.github.com/DanielO/178a3131cc1ae646e703d59e5d9c712d

-- 
You are receiving this mail because:
You are the assignee for the bug.