Tags 501605 +patch
thanks

Hi,

On Thu, Oct 09, 2008 at 03:17:43PM +0300, Niko Tyni wrote:
> Line 212 in the postinst breaks if sympa/key_password contains sed
> metacharacters, for instance 'a/b/c' as above.

attached is a patch for this issue.

Best Regards,
Patrick
--- sympa-5.3.4/debian/postinst	2008-10-09 17:20:42.000000000 +0200
+++ sympa-5.3.4.patched/debian/postinst	2008-10-09 17:20:18.433756307 +0200
@@ -208,8 +208,10 @@
 	if ! grep -q "^#-- S/MIME configuration" /etc/sympa/sympa.conf ; then
 	    db_get sympa/key_password
 	    key_password="$RET"
+	    # Escape the character which is used in the sed command
+	    key_password="`echo $key_password|sed 's/|/\\\|/g'`"
 
-	    sed -e "s/@KEY_PASSWORD@/$key_password/" \
+	    sed -e "s|@KEY_PASSWORD@|$key_password|" \
 	    /etc/sympa/sympa.conf-smime.in >>/etc/sympa/sympa.conf
 	    chown sympa:sympa /etc/sympa/sympa.conf
 	fi

Reply via email to