Hi Colin,

On Mon, Sep 12, 2005 at 06:35:59PM +0100, Colin Watson wrote:
> pam_getenv doesn't work at all. It has the following problems:

>   * It attempts to parse /etc/environment using the syntax of
>     /etc/security/pam_env.conf (the DEFAULT and OVERRIDE stuff). That
>     won't work.

>   * It exits zero even when it fails to find the environment variable
>     you asked for. I suppose this might not be considered a bug, but it
>     seems likely to cause unreliability in scripts that could otherwise
>     say something like 'LANG="$(pam_getenv -l LANG || echo C)"'.

> The attached patch corrects these problems. I won't really object much
> if you decide it should exit zero, but the script is useless unless the
> other two points are fixed.

I've partially applied your patch so that at least the first issue is fixed
in 0.79-1; I'll wait for Sam's input on the second part, since it seems just
as likely that one may want to do LANG=$(pam_getenv -l LANG); LANG=${LANG:-C}.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
[EMAIL PROTECTED]                                   http://www.debian.org/

Attachment: signature.asc
Description: Digital signature

Reply via email to