Package: john Version: 1.6-38 Severity: normal Tags: patch Hi, in /usr/sbin/mailer you find lines like this one: ,---- | MAILCMD=`grep -e "mailcmd[ ]*=[ ]*" /etc/john/john-mail.conf | sed "s/.*=[ ]*//"` `----
So if you change /etc/john/john-mail.conf from something like this: ,---- | mailcmd=/usr/bin/sendmail `---- to something like this: ,---- | #mailcmd=/usr/bin/sendmail | mailcmd=/usr/local/my_script `---- Your mailcommand is (a) unchanged (still sendmail) and (b) $MAILCMD will contain two lines which will lead to *very* unexpected behaviour. Suggested fix: - Ensure that there's no other character than " " at the beginning of lines we like to parse - Stop grep after the first match --- /usr/sbin/mailer 2005-11-20 01:40:57.000000000 +0100 +++ /tmp/mailer 2005-11-26 21:23:00.835850153 +0100 @@ -24,9 +24,9 @@ JOHNDIR=/usr/sbin # Let's get stuff from conf file: -SHELLS=`grep -e "shells[ ]*=[ ]*" /etc/john/john-mail.conf | sed "s/.*=[ ]*//"` -MAILCMD=`grep -e "mailcmd[ ]*=[ ]*" /etc/john/john-mail.conf | sed "s/.*=[ ]*//"` -MAILARGS=`grep -e "mailargs[ ]*=[ ]*" /etc/john/john-mail.conf | sed "s/.*=[ ]*//"` +SHELLS=`grep -m1 -e "^ *shells[ ]*=[ ]*" /etc/john/john-mail.conf | sed "s/.*=[ ]*//"` +MAILCMD=`grep -m1 -e "^ *mailcmd[ ]*=[ ]*" /etc/john/john-mail.conf | sed "s/.*=[ ]*//"` +MAILARGS=`grep -m1 -e "^ *mailargs[ ]*=[ ]*" /etc/john/john-mail.conf | sed "s/.*=[ ]*//"` # Let's start $JOHNDIR/john -show "$1" -shells:$SHELLS | sed -n 's/:.*//p' | I would have found this bug earlier but I assumed that /usr/sbin/mailer would be a generic mailer and no john related stuff. This was already requested in bug #114059 by Taketoshi Sano (Cc'ed) and I totally agree with him. Please talk to upstream and ask them to rename it to john-mailer or something similar. regards Thorsten -- System Information: Debian Release: 3.1 Architecture: i386 (i686) Kernel: Linux 2.6.12.2 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8) Versions of packages john depends on: ii debconf 1.4.30.13 Debian configuration management sy ii dpkg 1.10.28 Package maintenance system for Deb ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

