pam
pam copied to clipboard
Env vars not set correctly
Hi, I am using your pam-auth module, I have one problem, env vars set by a pam_module are not available in the process,
for example in pam_systemd, pam_misc_setenv(... "XDG_SESSION_ID" ...) I am never seeing this envvar in my process, but pam_systemd has called it. Ref: https://github.com/systemd/systemd/blob/master/src/login/pam_systemd.c#L445
Any idea why this could happen? Or where I should search what is going wrong?
Hey, sorry for the late response.
To be honest I created this module without any prior knowledge of PAM and just tried to get basic authentication working. I took inspiration from https://github.com/gsingh93/display-manager and was happy enough when I was able to open a session.
That said I am not 100% sure whether it is the module's responsibility to manage environment variables. All the code does is call pam_putenv(..) to set the basic user variables which should do the same thing as pam_misc_setenv (see: http://linux.die.net/man/3/pam_misc_setenv). Could it be an issue with the pam.d file of your application?