Various pam modules provide environment variables that are intended to be set
in the environment of the pam session. pkexec needs to process the output of
pam_getenvlist() to get these.
https://bugs.freedesktop.org/show_bug.cgi?id=62016
gboolean ret;
gint rc;
pam_handle_t *pam_h;
+ char **envlist;
struct pam_conv conversation;
ret = FALSE;
ret = TRUE;
+ envlist = pam_getenvlist (pam_h);
+ if (envlist != NULL)
+ {
+ guint n;
+ for (n = 0; envlist[n]; n++)
+ putenv (envlist[n]);
+ free (envlist);
+ }
+
out:
if (pam_h != NULL)
pam_end (pam_h, rc);