~ubuntu-branches/ubuntu/jaunty/clamav/jaunty-backports

« back to all changes in this revision

Viewing changes to clamd/clamuko.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-10-02 17:11:00 UTC
  • mfrom: (0.3.1 lucid-proposed)
  • Revision ID: james.westby@ubuntu.com-20101002171100-0erjjoucua6kw2pc
Tags: 0.96.3+dfsg-2ubuntu0.10.04.1~jaunty1
* Source backport for Jaunty
  - Change build-dep on libtdl-dev to libtdl7-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include <string.h>
34
34
 
35
35
#include "libclamav/clamav.h"
 
36
#include "libclamav/scanners.h"
36
37
 
37
38
#include "shared/optparser.h"
38
39
#include "shared/output.h"
73
74
        unsigned long mask = 0;
74
75
        const struct optstruct *pt;
75
76
        short int scan;
76
 
        int sizelimit = 0;
 
77
        int sizelimit = 0, extinfo;
77
78
        struct stat sb;
 
79
        char virhash[33];
 
80
        unsigned int virsize;
78
81
 
79
82
 
80
83
    clamuko_scanning = 0;
166
169
    else
167
170
        logg("Clamuko: File size limit disabled.\n");
168
171
 
 
172
    extinfo = optget(tharg->opts, "ExtendedDetectionInfo")->enabled;
 
173
 
169
174
    while(1) {
170
175
 
171
176
        if(dazukoGetAccess(&acc) == 0) {
180
185
                }
181
186
            }
182
187
 
183
 
            if(scan && cl_scanfile(acc->filename, &virname, NULL, tharg->engine, tharg->options) == CL_VIRUS) {
184
 
                logg("Clamuko: %s: %s FOUND\n", acc->filename, virname);
 
188
            if(scan && cli_scanfile_stats(acc->filename, &virname, virhash, &virsize, NULL, tharg->engine, tharg->options) == CL_VIRUS) {
 
189
                if(extinfo && virsize)
 
190
                    logg("Clamuko: %s: %s(%s:%u) FOUND\n", acc->filename, virname, virhash, virsize);
 
191
                else
 
192
                    logg("Clamuko: %s: %s FOUND\n", acc->filename, virname);
185
193
                virusaction(acc->filename, virname, tharg->opts);
186
194
                acc->deny = 1;
187
195
            } else