~ubuntu-branches/ubuntu/hardy/clamav/hardy-backports

« back to all changes in this revision

Viewing changes to clamdscan/proto.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-01 11:26:02 UTC
  • mfrom: (0.5.36 natty)
  • Revision ID: james.westby@ubuntu.com-20101201112602-f408toqx14w4duw7
Tags: 0.96.4+dfsg-1ubuntu1~hardy1
* Source backport for Hardy:
  - Build without llvm support on lpia to fix FTBFS (not a regression as
    llvm has never built on hardy lpia)
  - Drop -T -W from apparmor_parser calls in clamav-daemon and freshclam
    postinsts since it is not supported in Hardy's apparmor
  - Drop deny rule in freshclam apparmor profile since deny is not
    supported in Hardy's apparmor
  - Drop dh_lintian from debian/rules and adjust version of debhelper
    build-dep
  - Drop build-dep and libclamav-dev depends on non-existent libtommath-dev
  - Changed Section to 'utils' for clamav-dbg package
  - Drop versioning of lsb-base depends
  - Revert lsb status changes from maintainer scripts
  - Ignore test suite errors on hppa
  - Build-depend on libltdl3-dev instead of libltdl-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
285
285
        return -1;
286
286
    }
287
287
    sprintf(bol, "z%s %s", scancmd[scantype], filename);
288
 
    if(sendln(sockd, bol, len)) return -1;
 
288
    if(sendln(sockd, bol, len)) {
 
289
        free(bol);
 
290
        return -1;
 
291
    }
289
292
    free(bol);
290
293
    break;
291
294
 
313
316
        if(len > 7) {
314
317
            char *colon = strrchr(bol, ':');
315
318
            if(colon && colon[1] != ' ') {
316
 
                char *colon2;
 
319
                char *br;
317
320
                *colon = 0;
318
 
                colon2 = strrchr(bol, ':');
319
 
                *colon = ':';
320
 
                colon = colon2;
 
321
                br = strrchr(bol, '(');
 
322
                if(br)
 
323
                    *br = 0;
 
324
                colon = strrchr(bol, ':');
321
325
            }
322
326
            if(!colon) {
323
327
                logg("Failed to parse reply\n");
324
328
                return -1;
325
329
            } else if(!memcmp(eol - 7, " FOUND", 6)) {
 
330
                *(eol - 7) = 0;
326
331
                *printok = 0;
327
332
                infected++;
328
333
                if(filename) {
329
334
                    if(scantype >= STREAM) {
330
 
                        logg("~%s%s\n", filename, colon);
 
335
                        logg("~%s%s FOUND\n", filename, colon);
331
336
                        if(action) action(filename);
332
337
                    } else {
333
 
                        logg("~%s\n", bol);
 
338
                        logg("~%s FOUND\n", bol);
334
339
                        *colon = '\0';
335
340
                        if(action)
336
341
                            action(bol);