ERROR: Invalid setting true for option LogInfected

Bug #808311 reported by Fabien Tassin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ClamAV
Fix Released
Medium
clamav (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

 * Starting Sendmail milter plugin for ClamAV clamav-milter
ERROR: Invalid setting true for option LogInfected [fail]

yet:

# grep LogInfected /etc/clamav/clamav-milter.conf
LogInfected Off

the reason is the log is bogus:

clamav-milter/clamfi.c:
====
    if(!(opt = optget(opts, "LogInfected"))->enabled || !strcasecmp(opt->strarg, "Off"))
        loginfected = LOGINF_NONE;
    else if(!strcasecmp(opt->strarg, "Basic"))
        loginfected = LOGINF_BASIC;
    else if(!strcasecmp(opt->strarg, "Full"))
        loginfected = LOGINF_FULL;
    else {
        logg("!Invalid setting %s for option LogInfected\n", opt->strarg);
        return 1;
    }

    if((opt = optget(opts, "LogClean"))->enabled) {
        if(!strcasecmp(opt->strarg, "Basic"))
            loginfected |= LOGCLN_BASIC;
        else if(!strcasecmp(opt->strarg, "Full"))
            loginfected |= LOGCLN_FULL;
        else if(strcasecmp(opt->strarg, "Off")) {
            logg("!Invalid setting %s for option LogInfected\n", opt->strarg); <====== should be "LogClean"
            return 1;
        }
    }
====

and indeed:

# grep LogClean /etc/clamav/clamav-milter.conf
LogClean true

Changing "true" to "Basic" / "Full" / "Off" make it work.

So both the confusing log and the wrong default value should be fixed.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: clamav 0.97.1+dfsg-1ubuntu1
ProcVersionSignature: Ubuntu 3.0-3.4-generic 3.0.0-rc5
Uname: Linux 3.0-3-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Sun Jul 10 12:41:09 2011
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/usr/bin/tcsh
SourcePackage: clamav
UpgradeStatus: Upgraded to oneiric on 2009-07-28 (712 days ago)

Revision history for this message
Fabien Tassin (fta) wrote :
Revision history for this message
In , Michael Tautschnig (mt-debian) wrote :

Hi,

As just reported on Ubuntu's launchpad [1], the error message shown when an invalid config value is found for LogClean is bogus. Please see [1] for details, but basically it just boils down to replacing "LogInfected" by "LogClean" in line 560 of clamav-milter/clamfi.c.

Best,
Michael

[1] https://bugs.launchpad.net/ubuntu/+source/clamav/+bug/808311

Revision history for this message
Michael Tautschnig (mt-debian) wrote : Re: [Bug 808311] [NEW] ERROR: Invalid setting true for option LogInfected

Hi,

> Public bug reported:
>
> * Starting Sendmail milter plugin for ClamAV clamav-milter
> ERROR: Invalid setting true for option LogInfected [fail]
>
> yet:
>
> # grep LogInfected /etc/clamav/clamav-milter.conf
> LogInfected Off
>
> the reason is the log is bogus:
>

I've just reported this to upstream as #3040, see
https://wwws.clamav.net/bugzilla/show_bug.cgi?id=3040.

>
> and indeed:
>
> # grep LogClean /etc/clamav/clamav-milter.conf
> LogClean true
>
> Changing "true" to "Basic" / "Full" / "Off" make it work.
>
> So both the confusing log and the wrong default value should be fixed.
>

The wrong value "true" was likely caused by the debconf question missing in
versions before 0.97.1+dfsg-1 (whilst still internally asking debconf for a
value). If you remove this line from the config file or dpkg-reconfigure
clamav-milter you should get an appropriate value in there.

Automatically fixing this problem seems to be a bit risky as we do not want to
override a user's choice/configuration, not even an invalid one.

Hope this helps,
Michael

Revision history for this message
In , Acab (acab) wrote :

Fixed in clamav-0.97.1-2-g4e9b71b,
thanks!

Dave Walker (davewalker)
Changed in clamav (Ubuntu):
importance: Undecided → Low
Revision history for this message
Imre Gergely (cemc) wrote :

This was fixed upstream in clamav-0.97.1-2-g4e9b71b . Since then, 0.97.2 came out, which is in Oneiric. I've tested it in Oneiric and it seems to work ok.

Setting up clamav-milter (0.97.2+dfsg-1ubuntu1) ...
 * Starting Sendmail milter plugin for ClamAV clamav-milter [ OK ]
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

root@utest-oos32:~# grep LogClean /etc/clamav/clamav-milter.conf
LogClean Off

clamav 0.97.2 is in the process of SRU back to Natty (then backported to Lucid and Hardy) (see bug #826828).

Revision history for this message
Scott Kitterman (kitterman) wrote :

Marking fix released since it's fixed on the development release.

Changed in clamav (Ubuntu):
status: New → Fix Released
Revision history for this message
martin suchanek (martin-suc) wrote :

Just small notice from Linux newbie:
I have just upgraded clamav in Oneiric to 0.97.3+dfsg-1ubuntu0.11.10.1 version and corresponding error appeared:
ERROR: Invalid setting true for option LogClean
solved by dpkg-reconfigure clamav-milter mentioned in #2

Changed in clamav:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.