Comment on attachment 76324
pkexec: Set process environment from pam_getenvlist()

Review of attachment 76324:
-----------------------------------------------------------------

::: src/programs/pkexec.c
@@ +182,5 @@
> +    {
> +      guint n;
> +      for (n = 0; envlist[n]; n++)
> +        putenv (envlist[n]);
> +      free (envlist);

>From my reading of the manual page (haven't looked at the source), it
looks to me like you need to free() the individual elements too.  I.e.,
do what g_strfreev() does.

Right?

(Just looked at the source of Linux-PAM-1.1.6, and that does indeed
appear to be the case)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/982684

Title:
  sudo, pkexec don't apply global environment settings from
  /etc/environment

To manage notifications about this bug go to:
https://bugs.launchpad.net/policykit/+bug/982684/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to