pam icon indicating copy to clipboard operation
pam copied to clipboard

Env vars not set correctly

Open marcelhollerbach opened this issue 8 years ago • 1 comments

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?

marcelhollerbach avatar Sep 11 '15 07:09 marcelhollerbach

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?

1wilkens avatar Sep 16 '15 12:09 1wilkens