[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#108417: procmail -p -m resets too many environment variables (fwd)
- To: Santiago Vila <http://www.unex.es/~sanvila>
- Subject: Re: Bug#108417: procmail -p -m resets too many environment variables (fwd)
- From: Philip Guenther <http://www.gac.edu/~guenther>
- Date: Sat, 11 Aug 2001 18:24:44 -0500
- Cc: 108417-http://www.bugs.debian.org/~forwarded, Robert <http://dummy.us.eu.org/robert>
- In-reply-to: <http://www.home.unex.es/~Pine.LNX.4.33.0108112336250.3933-100000>
Santiago Vila <http://www.unex.es/~sanvila> writes:
>I received this yesterday.
>
>procmailrc(5) for 3.15.2 says:
>
> Other cleared or preset environment variables are IFS, ENV
> and PWD.
>
>and procmail(1) for 3.15.2 says:
>
> If both -p and -m
> are specified, the list of preset environment vari
> ables shrinks to just: LOGNAME, HOME, SHELL, ORGMAIL
> and MAILDIR.
>
>but it seems PATH is also preset, as in 3.13.1.
>
>When did procmail change its behaviour? Is the manpage for 3.15.2 ok?
Prior to version 3.15, PATH was handled by the same code that clears
IFS, ENV, and PWD. As a result, it was overridden unless both -p and
-m were used.
In 3.15, changes were made to provide a 'secure' PATH to /etc/procmailrc.
Along the way the setting of PATH was moved out of the conditional.
Whoops.
The manpage looks fine to me, it's just a bug in the binary. I'll look
at generating a patch.
>From: Robert <http://dummy.us.eu.org/robert>
...
>% cat > testpath.proc
>:0ic
>|sh -c "printenv PATH 1>&2"
That's easier written as
LOG = "PATH=$PATH
"
The 'obvious' version (which you probably tried before switching to what
you wrote) of
:0 ic
|printenv PATH 1>&2
doesn't work because SHELLMETAS isn't set by procmail -p -m
Philip Guenther
Procmail Maintainer