~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to clamconf/clamconf.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#include "libclamav/str.h"
35
35
#include "libclamav/clamav.h"
36
36
#include "libclamav/others.h"
 
37
#include "libclamav/bytecode.h"
 
38
 
 
39
#ifndef _WIN32
 
40
extern const struct clam_option *clam_options;
 
41
#else
 
42
__declspec(dllimport) extern const struct clam_option *clam_options;
 
43
#endif
37
44
 
38
45
static struct _cfgfile {
39
46
    const char *name;
237
244
    dir = optget(opts, "config-dir")->strarg;
238
245
    printf("Checking configuration files in %s\n", dir);
239
246
    for(i = 0; cfgfile[i].name; i++) {
240
 
        snprintf(path, sizeof(path), "%s/%s", dir, cfgfile[i].name);
 
247
        snprintf(path, sizeof(path), "%s"PATHSEP"%s", dir, cfgfile[i].name);
241
248
        path[511] = 0;
242
249
        if(access(path, R_OK)) {
243
250
            printf("\n%s not found\n", cfgfile[i].name);
288
295
        printf("BZIP2 ");
289
296
#endif
290
297
    if(have_rar)
291
 
        printf("RAR");
 
298
        printf("RAR ");
 
299
    if (have_clamjit)
 
300
        printf("JIT");
292
301
    printf("\n");
293
302
 
294
303
    if(!strlen(dbdir)) {
304
313
    printf("Database directory: %s\n", dbdir);
305
314
    flevel = cl_retflevel();
306
315
    for(i = 0; dbnames[i]; i++) {
307
 
        snprintf(path, sizeof(path), "%s/%s", dbdir, dbnames[i]);
 
316
        snprintf(path, sizeof(path), "%s"PATHSEP"%s", dbdir, dbnames[i]);
308
317
        path[511] = 0;
309
318
        if(!access(path, R_OK)) {
310
319
            cvd = cl_cvdhead(path);
311
320
            if(!cvd) {
312
321
                printf("%s: Can't get information about the database\n", dbnames[i]);
313
322
            } else {
314
 
                printf("%s: version %u, sigs: %u, built on %s", dbnames[i], cvd->version, cvd->sigs, ctime((const time_t *) &cvd->stime));
 
323
                const time_t t = cvd->stime;
 
324
                printf("%s: version %u, sigs: %u, built on %s", dbnames[i], cvd->version, cvd->sigs, ctime(&t));
315
325
                if(cvd->fl > flevel)
316
326
                    printf("%s: WARNING: This database requires f-level %u (current f-level: %u)\n", dbnames[i], cvd->fl, flevel);
317
327
                cl_cvdfree(cvd);