procmail
[Top] [All Lists]

Re: perl -e in recipes

1999-10-27 21:08:32
On Wed, 27 Oct 1999, Matt Dunford wrote:

Can we use perl -e as a filter in a recipe?
I'm getting the following error.  I'm not too
familiar with what setuid is. Is this a procmail
or a perl issue?

### filter out the [PHP] ###
# -n puts code in a while loop
# -e executes code
# s/// and print both assume $_
:0fhw
| $PERL -ne "s/\[PHP\]//; print;"

procmail: Program failure (255) of " $PERL -ne "s/\[PHP\]//;print;""
No -e allowed in setuid scripts.

Yes, you can, but for that particular instance sed is a much better
tool.

:0fhw
| sed -e "s/\[PHP\]//g"

To use perl -e scripts you must first DROPPRIVS so that perl is not
running as root.

--
 John Hardin KA7OHZ         ICQ#15735746          
jhardin(_at_)wolfenet(_dot_)com
 pgpk -a finger://gonzo.wolfenet.com/jhardin    PGP key ID: 0x41EA94F5
 PGP key fingerprint: A3 0C 5B C2 EF 0D 2C E5  E9 BF C8 33 A7 A9 CE 76 
-----------------------------------------------------------------------
  Mary had a little key
  she kept it in escrow
  and everything that Mary sent
  the feds were sure to know         -- Andy Starritt, in sci.crypt
-----------------------------------------------------------------------
   4 days until Halloween and Daylight Savings Time ends

<Prev in Thread] Current Thread [Next in Thread>