Author: adam-guest
Date: 2008-03-03 22:44:18 +0000 (Mon, 03 Mar 2008)
New Revision: 1097

Modified:
   trunk/debian/changelog
   trunk/scripts/bts.pl
Log:
bts: Allow the sendmail command to begin with a ~ (Closes: #469207)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-03-03 21:10:03 UTC (rev 1096)
+++ trunk/debian/changelog      2008-03-03 22:44:18 UTC (rev 1097)
@@ -16,6 +16,7 @@
       Geissert for the patch (Closes: #469050)
     + Modify each of the simple shell variable tests (e.g. $RANDOM) to
       also match ${variable}
+  * bts: Allow the sendmail command to begin with a ~ (Closes: #469207)
 
  -- Adam D. Barratt <[EMAIL PROTECTED]>  Sat, 01 Mar 2008 11:42:02 +0000
 

Modified: trunk/scripts/bts.pl
===================================================================
--- trunk/scripts/bts.pl        2008-03-03 21:10:03 UTC (rev 1096)
+++ trunk/scripts/bts.pl        2008-03-03 22:44:18 UTC (rev 1097)
@@ -412,7 +412,7 @@
     if (!length $config_vars{'BTS_SMTP_HOST'}
         and $config_vars{'BTS_SENDMAIL_COMMAND'} ne '/usr/sbin/sendmail') {
        my $cmd = (split ' ', $config_vars{'BTS_SENDMAIL_COMMAND'})[0];
-       unless ($cmd =~ /^[A-Za-z0-9_\-\+\.\/]*$/) {
+       unless ($cmd =~ /^~?[A-Za-z0-9_\-\+\.\/]*$/) {
            warn "BTS_SENDMAIL_COMMAND contained funny characters: 
$cmd\nReverting to default value /usr/sbin/sendmail\n";
            $config_vars{'BTS_SENDMAIL_COMMAND'}='/usr/sbin/sendmail';
        } elsif (system("command -v $cmd >/dev/null 2>&1") != 0) {
@@ -507,7 +507,7 @@
     if ($opt_sendmail ne '/usr/sbin/sendmail'
        and $opt_sendmail ne $sendmailcmd) {
        my $cmd = (split ' ', $opt_sendmail)[0];
-       unless ($cmd =~ /^[A-Za-z0-9_\-\+\.\/]*$/) {
+       unless ($cmd =~ /^~?[A-Za-z0-9_\-\+\.\/]*$/) {
            warn "--sendmail command contained funny characters: 
$cmd\nReverting to default value $sendmailcmd\n";
            undef $opt_sendmail;
        } elsif (system("command -v $cmd >/dev/null 2>&1") != 0) {



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to