[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#131072: apache-ssl: more on env cleanup (#129612)



Package: apache-ssl
Version: 1.3.22.1+1.44-1
Severity: minor

DESCRIPTION:

/etc/init.d/apache-ssl still throws ugly warnings with multi-line
environment variables, even with the new patch (#129612).  In particular
this happens when the other lines contain equal signs.  For example:

> <root@wednesday:/etc/init.d> env 
> ...
> TERMCAP=SC|screen|VT 100/ANSI X3.64 virtual terminal:\
>         :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\
>         :cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\
>         :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\
>         :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\
> ...
>
> <root@wednesday:/etc/init.d> /etc/init.d/apache-ssl 
> /etc/init.d/apache-ssl: unset: `:DO': not a valid identifier
> /etc/init.d/apache-ssl: unset: `:cd': not a valid identifier
> /etc/init.d/apache-ssl: unset: `:do': not a valid identifier
> /etc/init.d/apache-ssl: unset: `:le': not a valid identifier
> ...
> Usage: /etc/init.d/apache-ssl {start|stop|reload|reload-modules|force-reload|restart}


PATCH:

pipe sed's output through grep, removing anything with a space, since
a shell variable can't have spaces.

-------- cut here ------
--- apache-ssl.orig     Sat Jan 26 14:42:30 2002
+++ apache-ssl  Sat Jan 26 14:50:52 2002
@@ -4,7 +4,7 @@
 #
 
 # Clear our environment so we don't leak.
-unset `env | sed '/=/s/=.*//;t;d'`
+unset `env | sed '/=/s/=.*//;t;d' | grep -v [:space:]`
 NAME=apache-ssl
 PATH=/bin:/usr/bin:/sbin:/usr/sbin
 DAEMON=/usr/sbin/apache-ssl
-------- cut here ------





Reply to: