~yolanda.robla/ubuntu/saucy/clamav/dep-8-tests

« back to all changes in this revision

Viewing changes to libclamav/others.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2009-11-02 23:27:19 UTC
  • mfrom: (0.35.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091102232719-61ay35095dhbuxfm
Tags: 0.95.3+dfsg-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop build-dep on electric-fence (in Universe)
  - Build-dep on libltdl3-dev instead of libltdl-dev for updating earlier
    releases more easily
  - Add apparmor profiles for clamd and freshclam along with maintainer
    script changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
    return 0;
119
119
}
120
120
 
121
 
#define PASTE(a,b) a#b
 
121
#define PASTE2(a,b) a#b
 
122
#define PASTE(a,b) PASTE2(a,b)
122
123
 
123
124
static lt_dlhandle lt_dlfind(const char *name, const char *featurename)
124
125
{
266
267
 
267
268
int cl_init(unsigned int initoptions)
268
269
{
 
270
        struct timeval tv;
 
271
        unsigned int pid = (unsigned int) getpid();
 
272
 
269
273
    /* put dlopen() stuff here, etc. */
270
274
    if (lt_init() == 0) {
271
275
        cli_rarload();
272
276
    }
 
277
    gettimeofday(&tv, (struct timezone *) 0);
 
278
    srand(pid + tv.tv_usec*(pid+1) + clock());
273
279
    return CL_SUCCESS;
274
280
}
275
281
 
564
570
        /* if the remaining scansize is too small... */
565
571
        if(ctx->engine->maxscansize-ctx->scansize<needed) {
566
572
            /* ... we tell the caller to skip this file */
567
 
            cli_dbgmsg("%s: scansize exceeded (initial: %lu, remaining: %lu, needed: %lu)\n", who, ctx->engine->maxscansize, ctx->scansize, needed);
 
573
            cli_dbgmsg("%s: scansize exceeded (initial: %lu, remaining: %lu, needed: %lu)\n", who, (unsigned long int) ctx->engine->maxscansize, (unsigned long int) ctx->scansize, needed);
568
574
            ret = CL_EMAXSIZE;
569
575
        }
570
576
    }
572
578
    /* if we have per-file size limits, and we are overlimit... */
573
579
    if(needed && ctx->engine->maxfilesize && ctx->engine->maxfilesize<needed) {
574
580
        /* ... we tell the caller to skip this file */
575
 
        cli_dbgmsg("%s: filesize exceeded (allowed: %lu, needed: %lu)\n", who, ctx->engine->maxfilesize, needed);
 
581
        cli_dbgmsg("%s: filesize exceeded (allowed: %lu, needed: %lu)\n", who, (unsigned long int) ctx->engine->maxfilesize, needed);
576
582
        ret = CL_EMAXSIZE;
577
583
    }
578
584