https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6327

           Summary: Fix calling argument in utility used to determine
                    DCC's homedir
           Product: Spamassassin
           Version: 3.3.0
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P5
         Component: Plugins
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=4668)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4668)
Patch to DCC.pm to change the argument cdcc is called with

SpamAssassin's DCC.pm uses the cdcc utility to find DCC's home directory,
calling it with 'cdcc home'. Apparently, the official argument cdcc uses is
'homedir', however.  While 'home' worked in previous DCC versions:

cgreen:Pumice7# cdcc -V
1.3.105
cdcc map> ^C

cgreen:Pumice7# cdcc home
    homedir=/var/dcc

cgreen:Pumice7# cdcc homedir
    homedir=/var/dcc



the usage has been tightened up in more recent ones:

cgreen:Test_releng8# cdcc -V
1.3.116
cdcc map> ^C

cgreen:Test_releng8# cdcc home
usage: homedir [path]
 ?

cgreen:Test_releng8# cdcc homedir
    homedir=/var/dcc


This is also seen in SA 3.3.0's debugging output:

cgreen:Test_releng8# spamassassin -V
SpamAssassin version 3.3.0
  running on Perl version 5.10.1

cgreen:Test_releng8# spamassassin -Ddcc < /tmp/1
Feb  9 12:37:39.250 [25567] dbg: dcc: network tests on, registering DCC
Feb  9 12:37:43.303 [25567] dbg: dcc: dcc_home not set, querying cdcc utility
Feb  9 12:37:43.315 [25567] dbg: dcc: cdcc reports homedir as ' ?'



Simply patching DCC.pm to use 'cdcc homedir' instead fixes the issue:

cgreen:Test_releng8# spamassassin -Ddcc < /tmp/1
Feb  9 12:46:55.594 [25682] dbg: dcc: network tests on, registering DCC
Feb  9 12:46:59.081 [25682] dbg: dcc: dcc_home not set, querying cdcc utility
Feb  9 12:46:59.092 [25682] dbg: dcc: cdcc reports homedir as '/var/dcc'
Feb  9 12:46:59.094 [25682] dbg: dcc: cdcc reported homedir /var/dcc exists,
using it

-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to