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

« back to all changes in this revision

Viewing changes to clamd/server-th.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Tautschnig, Michael Tautschnig
  • Date: 2009-11-02 10:24:35 UTC
  • mfrom: (0.39.5 squeeze)
  • mto: (122.1.1 raring-security)
  • mto: This revision was merged to the branch mainline in revision 73.
  • Revision ID: james.westby@ubuntu.com-20091102102435-yzkn3jdvo4gank3q
Tags: 0.95.3+dfsg-1
[ Michael Tautschnig ]
* New upstream version
* Should fix clamd segfault on startup (closes: #537629)
* Updated info in clamd.conf man page (closes: #534443)
* Proper socket ownership setup, no chgrp in make_dir (closes: #553333)

Show diffs side-by-side

added added

removed removed

Lines of Context:
718
718
#endif
719
719
 
720
720
    /* set up limits */
721
 
    if((opt = optget(opts, "MaxScanSize"))->enabled) {
 
721
    if((opt = optget(opts, "MaxScanSize"))->active) {
722
722
        if((ret = cl_engine_set_num(engine, CL_ENGINE_MAX_SCANSIZE, opt->numarg))) {
723
723
            logg("!cl_engine_set_num(CL_ENGINE_MAX_SCANSIZE) failed: %s\n", cl_strerror(ret));
724
724
            cl_engine_free(engine);
731
731
    else
732
732
        logg("^Limits: Global size limit protection disabled.\n");
733
733
 
734
 
    if((opt = optget(opts, "MaxFileSize"))->enabled) {
 
734
    if((opt = optget(opts, "MaxFileSize"))->active) {
735
735
        if((ret = cl_engine_set_num(engine, CL_ENGINE_MAX_FILESIZE, opt->numarg))) {
736
736
            logg("!cl_engine_set_num(CL_ENGINE_MAX_FILESIZE) failed: %s\n", cl_strerror(ret));
737
737
            cl_engine_free(engine);
755
755
    }
756
756
#endif
757
757
 
758
 
    if((opt = optget(opts, "MaxRecursion"))->enabled) {
 
758
    if((opt = optget(opts, "MaxRecursion"))->active) {
759
759
        if((ret = cl_engine_set_num(engine, CL_ENGINE_MAX_RECURSION, opt->numarg))) {
760
760
            logg("!cl_engine_set_num(CL_ENGINE_MAX_RECURSION) failed: %s\n", cl_strerror(ret));
761
761
            cl_engine_free(engine);
768
768
    else
769
769
        logg("^Limits: Recursion level limit protection disabled.\n");
770
770
 
771
 
    if((opt = optget(opts, "MaxFiles"))->enabled) {
 
771
    if((opt = optget(opts, "MaxFiles"))->active) {
772
772
        if((ret = cl_engine_set_num(engine, CL_ENGINE_MAX_FILES, opt->numarg))) {
773
773
            logg("!cl_engine_set_num(CL_ENGINE_MAX_FILES) failed: %s\n", cl_strerror(ret));
774
774
            cl_engine_free(engine);
1258
1258
        pthread_mutex_lock(&reload_mutex);
1259
1259
        if(reload) {
1260
1260
            pthread_mutex_unlock(&reload_mutex);
 
1261
#ifdef CLAMUKO
 
1262
            if(optget(opts, "ClamukoScanOnAccess")->enabled && tharg) {
 
1263
                logg("Stopping and restarting Clamuko.\n");
 
1264
                pthread_kill(clamuko_pid, SIGUSR1);
 
1265
                pthread_join(clamuko_pid, NULL);
 
1266
            }
 
1267
#endif
1261
1268
            engine = reload_db(engine, dboptions, opts, FALSE, &ret);
1262
1269
            if(ret) {
1263
1270
                logg("Terminating because of a fatal error.\n");
1272
1279
            pthread_mutex_unlock(&reload_mutex);
1273
1280
#ifdef CLAMUKO
1274
1281
            if(optget(opts, "ClamukoScanOnAccess")->enabled && tharg) {
1275
 
                logg("Stopping and restarting Clamuko.\n");
1276
 
                pthread_kill(clamuko_pid, SIGUSR1);
1277
 
                pthread_join(clamuko_pid, NULL);
1278
1282
                tharg->engine = engine;
1279
1283
                pthread_create(&clamuko_pid, &clamuko_attr, clamukoth, tharg);
1280
1284
            }