At 18:38 2006-12-29 +0000, Ryan Steele wrote:
Thanks for the background info on execv. Maybe I can't put all the blame on
procmail then for silently balking (although, it still deserves its fair
share of the blame).
Er, it runs the shell with the arguments and, gets the result code. How is
it to blame?
Although, you would think that, since /bin/sh is pretty much a
known quantity in POSIX, that either it or execv would default to
something sane
like that instead of the user's login shell, which on many systems
(especially
mail servers) are set to /bin/false, /usr/bin/pine, etc. Then, they can
override that if they like in their script (e.g., SHELL=/bin/bash or
something).
I glanced at the code only breifly, but it seems to me that procmail IS
setting the shell, based on the default it knows: the user's shell. In
turn, if YOU don't override the default by setting SHELL= within the
rcfile, that SHELL is what gets provided to execv. execv would be in error
if it decided that because it couldn't run one shell that it should instead
try another.
What precisely is the problem here? That programs don't _IGNORE_ the
default and instead set some other default? fsck, I'd be pissed if that
happened (either procmail or exec). Instead, procmail is doing exactly
what it should, and it's results are predictable as a result.
Note that procmail doesn't evaluate the user's shell to figure out if it's
a useable shell or not (such as comparing it against some phantom list of
bogus shells), so there's no way to say that procmail would know one shell
from another should be auto-replaced with an otherwise functioning default
shell (presuming of course that the binary itself hasn't been tweaked). If
you had your shell set to some specific app (dialup users might have pppd
or somesuch as their shell), it might not even be a command shell capable
of interpreting shell scripts or providing a CLI.
Bottom line: when in doubt, set SHELL in your rcfile.
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail