Browse code

clamonacc - add pthread conditional wait to event consumer queue; add uname exclusion; add error handling for selinux permission denied case when reading fanotify kernel event queue; remove deprecated clamuko references; update clamd.conf.sample; remove unsused options in help output; add daemonization/foreground command-line option; add retry and deny on error functionality

Mickey Sola authored on 2019/06/04 05:56:35
Showing 8 changed files
... ...
@@ -1259,44 +1259,6 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
1259 1259
     logg("*MaxQueue set to: %d\n", max_queue);
1260 1260
     acceptdata.max_queue = max_queue;
1261 1261
 
1262
-    if (optget(opts, "ScanOnAccess")->enabled)
1263
-/*
1264
-#if defined(FANOTIFY) || defined(CLAMAUTH)
1265
-    {
1266
-        int thread_started = 1;
1267
-        do {
1268
-            if (pthread_attr_init(&fan_attr)) break;
1269
-            pthread_attr_setdetachstate(&fan_attr, PTHREAD_CREATE_JOINABLE);
1270
-
1271
-			Allocate memory for arguments. Thread is responsible for freeing it.
1272
-            if (!(tharg = (struct thrarg *)calloc(sizeof(struct thrarg), 1))) break;
1273
-            if (!(tharg->options = (struct cl_scan_options *)calloc(sizeof(struct cl_scan_options), 1))) break;
1274
-
1275
-            (void)memcpy(tharg->options, &options, sizeof(struct cl_scan_options));
1276
-            tharg->opts   = opts;
1277
-            tharg->engine = engine;
1278
-
1279
-            thread_started = pthread_create(&fan_pid, &fan_attr, onas_fan_th, tharg);
1280
-        } while (0);
1281
-
1282
-        if (0 != thread_started) {
1283
-			Failed to create thread. Free anything we may have allocated.
1284
-            logg("!Unable to start on-access scan.\n");
1285
-            if (NULL != tharg) {
1286
-                if (NULL != tharg->options) {
1287
-                    free(tharg->options);
1288
-                    tharg->options = NULL;
1289
-                }
1290
-                free(tharg);
1291
-                tharg = NULL;
1292
-            }
1293
-        }
1294
-    }
1295
-#else
1296
-        logg("!On-access scan is not available\n");
1297
-#endif
1298
-*/
1299
-
1300 1262
 #ifndef _WIN32
1301 1263
     /* set up signal handling */
1302 1264
     sigfillset(&sigset);
... ...
@@ -1576,12 +1538,6 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
1576 1576
             reload = 0;
1577 1577
             time(&reloaded_time);
1578 1578
             pthread_mutex_unlock(&reload_mutex);
1579
-
1580
-#if defined(FANOTIFY) || defined(CLAMAUTH)
1581
-            if (optget(opts, "ScanOnAccess")->enabled && tharg) {
1582
-                tharg->engine = engine;
1583
-            }
1584
-#endif
1585 1579
             time(&start_time);
1586 1580
         } else {
1587 1581
             pthread_mutex_unlock(&reload_mutex);
... ...
@@ -1603,16 +1559,6 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
1603 1603
      */
1604 1604
     logg("*Waiting for all threads to finish\n");
1605 1605
     thrmgr_destroy(thr_pool);
1606
-#if defined(FANOTIFY) || defined(CLAMAUTH)
1607
-    if (optget(opts, "ScanOnAccess")->enabled && tharg) {
1608
-        logg("Stopping on-access scan\n");
1609
-        pthread_mutex_lock(&logg_mutex);
1610
-        pthread_kill(fan_pid, SIGUSR1);
1611
-        pthread_mutex_unlock(&logg_mutex);
1612
-        pthread_join(fan_pid, NULL);
1613
-        free(tharg);
1614
-    }
1615
-#endif
1616 1606
     if (engine) {
1617 1607
         thrmgr_setactiveengine(NULL);
1618 1608
         cl_engine_free(engine);
... ...
@@ -75,6 +75,15 @@ int main(int argc, char **argv)
75 75
 	}
76 76
 	ctx->opts = opts;
77 77
 
78
+#ifndef _WIN32
79
+        if (!optget(ctx->opts, "foreground")->enabled) {
80
+            if (-1 == daemonize()) {
81
+                logg("!Clamonacc: could not daemonize\n");
82
+                return 2;
83
+            }
84
+        }
85
+#endif
86
+
78 87
 	clamdopts = optparse(optget(opts, "config-file")->strarg, 0, NULL, 1, OPT_CLAMD, 0, NULL);
79 88
 	if (clamdopts == NULL) {
80 89
 		logg("!Clamonacc: can't parse clamd configuration file %s\n", optget(opts, "config-file")->strarg);
... ...
@@ -218,14 +227,14 @@ void help(void)
218 218
     mprintf("    --version              -V          Print version number and exit\n");
219 219
     mprintf("    --verbose              -v          Be verbose\n");
220 220
     mprintf("    --log=FILE             -l FILE     Save scanning output to FILE\n");
221
+    mprintf("    --foreground           -F          Output to foreground and do not daemonize\n");
221 222
     mprintf("    --watch-list=FILE      -w FILE     Watch directories from FILE\n");
222
-    mprintf("    --exclude-list=FILES   -f FILE     Exclude directories from FILE\n");
223
+    mprintf("    --exclude-list=FILES   -e FILE     Exclude directories from FILE\n");
223 224
     mprintf("    --remove                           Remove infected files. Be careful!\n");
224 225
     mprintf("    --move=DIRECTORY                   Move infected files into DIRECTORY\n");
225 226
     mprintf("    --copy=DIRECTORY                   Copy infected files into DIRECTORY\n");
226 227
     mprintf("    --config-file=FILE                 Read configuration from FILE.\n");
227 228
     mprintf("    --allmatch             -z          Continue scanning within file after finding a match.\n");
228
-    mprintf("    --infected             -i          Only print infected files\n");
229 229
     mprintf("    --fdpass                           Pass filedescriptor to clamd (useful if clamd is running as a different user)\n");
230 230
     mprintf("    --stream                           Force streaming files to clamd (for debugging and unit testing)\n");
231 231
     mprintf("\n");
... ...
@@ -306,6 +306,9 @@ cl_error_t onas_setup_client (struct onas_context **ctx) {
306 306
     }
307 307
 
308 308
     (*ctx)->timeout = optget((*ctx)->clamdopts, "OnAccessCurlTimeout")->numarg;
309
+    (*ctx)->retry_attempts = optget((*ctx)->clamdopts, "OnAccessRetryAttempts")->numarg;
310
+    (*ctx)->retry_attempts ? ((*ctx)->retry_on_error = 1) : ((*ctx)->retry_on_error = 0);
311
+    optget((*ctx)->clamdopts, "OnAccessDenyOnError")->enabled ? ((*ctx)->deny_on_error  = 1) : ((*ctx)->deny_on_error = 0);
309 312
 
310 313
     (*ctx)->isremote = onas_check_remote(ctx, &err);
311 314
     if (err) {
... ...
@@ -208,26 +208,33 @@ int onas_fan_eloop(struct onas_context **ctx) {
208 208
 	} while((ret == -1 && errno == EINTR));
209 209
 
210 210
     time_t start = time(NULL) - 30;
211
-	while(((bread = read((*ctx)->fan_fd, buf, sizeof(buf))) > 0) || (errno == EOVERFLOW || errno == EMFILE)) {
212
-
213
-        if (errno == EOVERFLOW) {
211
+	while(((bread = read((*ctx)->fan_fd, buf, sizeof(buf))) > 0) || (errno == EOVERFLOW || errno == EMFILE || errno == EACCES)) {
212
+		switch(errno) {
213
+			case EOVERFLOW:
214 214
             if (time(NULL) - start >= 30) {
215
-				logg("!ClamFanotif: internal error (failed to read data) ... %s\n", strerror(errno));
216
-				logg("!ClamFanotif: file too large for fanotify ... recovering and continuing scans...\n");
215
+					logg("*ClamFanotif: internal error (failed to read data) ... %s\n", strerror(errno));
216
+					logg("*ClamFanotif: file too large for fanotify ... recovering and continuing scans...\n");
217 217
                 start = time(NULL);
218 218
             }
219 219
 
220 220
             errno = 0;
221 221
             continue;
222
-        }
222
+			case EACCES:
223
+				logg("*ClamFanotif: internal error (failed to read data) ... %s\n", strerror(errno));
224
+				logg("*ClamFanotif: check your SELinux audit logs and consider adding an exception \
225
+						... recovering and continuing scans...\n");
223 226
 
224
-                if (errno == EMFILE) {
227
+				errno = 0;
228
+				continue;
229
+			case EMFILE:
225 230
 				logg("*ClamFanotif: internal error (failed to read data) ... %s\n", strerror(errno));
226 231
                                 logg("*ClamFanotif: waiting for consumer thread to catch up then retrying ...\n");
227
-                                errno = 0;
228
-
229 232
                                 sleep(3);
233
+
234
+				errno = 0;
230 235
                                 continue;
236
+			default:
237
+			break;
231 238
                 }
232 239
 
233 240
         fmd = (struct fanotify_event_metadata *)buf;
... ...
@@ -614,10 +614,10 @@ int onas_ht_add_hierarchy(struct onas_ht *ht, const char *pathname)
614 614
         switch (curr->fts_info) {
615 615
             case FTS_D:
616 616
                 hnode = onas_hashnode_init();
617
-				if (!hnode) {
618
-                                    ret = CL_EMEM;
619
-                                    goto out;
620
-                                }
617
+                if (!hnode) {
618
+                    ret = CL_EMEM;
619
+                    goto out;
620
+                }
621 621
 
622 622
                 hnode->pathlen  = curr->fts_pathlen;
623 623
                 hnode->pathname = cli_strndup(curr->fts_path, hnode->pathlen);
... ...
@@ -637,12 +637,10 @@ int onas_ht_add_hierarchy(struct onas_ht *ht, const char *pathname)
637 637
                 if (childlist->fts_info == FTS_D) {
638 638
                     if (CL_EMEM == onas_add_hashnode_child(hnode, childlist->fts_name)) {
639 639
 
640
-						ret = CL_EMEM;
641
-                                                goto out;
642
-                                        }
640
+                        ret = CL_EMEM;
641
+                        goto out;
643 642
                     }
644 643
                 }
645
-
646 644
             } while ((childlist = childlist->fts_link));
647 645
         }
648 646
 
... ...
@@ -31,6 +31,7 @@
31 31
 #include <sys/stat.h>
32 32
 #include <errno.h>
33 33
 #include <pthread.h>
34
+#include <pwd.h>
34 35
 #include "libclamav/clamav.h"
35 36
 #include "shared/optparser.h"
36 37
 #include "shared/output.h"
... ...
@@ -42,10 +43,12 @@
42 42
 
43 43
 int onas_fan_checkowner(int pid, const struct optstruct *opts)
44 44
 {
45
+    struct passwd *pwd;
45 46
     char path[32];
46 47
     STATBUF sb;
47 48
     const struct optstruct *opt      = NULL;
48 49
     const struct optstruct *opt_root = NULL;
50
+    const struct optstruct *opt_uname = NULL;
49 51
 
50 52
     /* always ignore ourselves */
51 53
     if (pid == (int)getpid()) {
... ...
@@ -55,9 +58,10 @@ int onas_fan_checkowner(int pid, const struct optstruct *opts)
55 55
     /* look up options */
56 56
     opt      = optget(opts, "OnAccessExcludeUID");
57 57
     opt_root = optget(opts, "OnAccessExcludeRootUID");
58
+    opt_uname = optget (opts, "OnAccessExcludeUname");
58 59
 
59 60
     /* we can return immediately if no uid exclusions were requested */
60
-    if (!(opt->enabled || opt_root->enabled))
61
+    if (!(opt->enabled || opt_root->enabled || opt_uname->enabled))
61 62
         return CHK_CLEAN;
62 63
 
63 64
     /* perform exclusion checks if we can stat OK */
... ...
@@ -71,16 +75,26 @@ int onas_fan_checkowner(int pid, const struct optstruct *opts)
71 71
                 opt = opt->nextarg;
72 72
             }
73 73
         }
74
+        /* then check our unames */
75
+        if (opt_uname->enabled) {
76
+            while (opt_uname)
77
+            {
78
+                pwd = getpwuid(sb.st_uid);
79
+                if (!strncmp(opt_uname->strarg, pwd->pw_name, strlen(opt_uname->strarg)))
80
+                    return CHK_FOUND;
81
+                opt_uname = opt_uname->nextarg;
82
+            }
83
+        }
74 84
         /* finally check root UID */
75 85
         if (opt_root->enabled) {
76 86
             if (0 == (long long)sb.st_uid)
77 87
                 return CHK_FOUND;
78 88
         }
79 89
     } else if (errno == EACCES) {
80
-        logg("*Permission denied to stat /proc/%d to exclude UIDs... perhaps SELinux denial?\n", pid);
90
+        logg("*ClamMisc: permission denied to stat /proc/%d to exclude UIDs... perhaps SELinux denial?\n", pid);
81 91
     } else if (errno == ENOENT) {
82 92
         /* TODO: should this be configurable? */
83
-        logg("$/proc/%d vanished before UIDs could be excluded; scanning anyway\n", pid);
93
+        logg("ClamMisc: $/proc/%d vanished before UIDs could be excluded; scanning anyway\n", pid);
84 94
     }
85 95
 
86 96
     return CHK_CLEAN;
... ...
@@ -614,34 +614,53 @@ Example
614 614
 ## On-access Scan Settings
615 615
 ##
616 616
 
617
-# Enable on-access scanning. Currently, this is supported via fanotify.
618
-# Clamuko/Dazuko support has been deprecated.
619
-# Default: no
620
-#ScanOnAccess yes
621
-
622
-# Set the  mount point to be scanned. The mount point specified, or the mount
623
-# point containing the specified directory will be watched. If any directories
624
-# are specified, this option will preempt the DDD system. This will notify
625
-# only. It can be used multiple times.
626
-# (On-access scan only)
627
-# Default: disabled
628
-#OnAccessMountPath /
629
-#OnAccessMountPath /home/user
630
-
631 617
 # Don't scan files larger than OnAccessMaxFileSize
632 618
 # Value of 0 disables the limit.
633 619
 # Default: 5M
634 620
 #OnAccessMaxFileSize 10M
635 621
 
622
+# Max number of scanning threads to allocate to the OnAccess thread pool at startup.
623
+# These threads are the ones responsible for creating a connection with the daemon 
624
+# and kicking off scanning after an event has been processed. To prevent clamonacc 
625
+# from consuming all clamd's resources keep this lower than clamd's max threads.
626
+# Default: 5
627
+#OnAccessMaxThreads 10
628
+
629
+# Max amount of time (in milliseconds) that the OnAccess client should spend for every 
630
+# connect, send, and recieve attempt when communicating with clamd via curl.
631
+# Default: 5000L (5 seconds)
632
+# OnAccessCurlTimeout 10000L
633
+
636 634
 # Set the include paths (all files inside them will be scanned). You can have
637 635
 # multiple OnAccessIncludePath directives but each directory must be added
638
-# in a separate line. (On-access scan only)
636
+# in a separate line.
639 637
 # Default: disabled
640 638
 #OnAccessIncludePath /home
641 639
 #OnAccessIncludePath /students
642 640
 
641
+# Modifies fanotify blocking behaviour when handling permission events.
642
+# If off, fanotify will only notify if the file scanned is a virus,
643
+# and not perform any blocking.
644
+# Default: no
645
+#OnAccessPrevention yes
646
+
647
+# Toggles dynamic directory determination. Allows for recursively watching
648
+# include paths.
649
+# Default: no
650
+#OnAccessDisableDDD yes
651
+
652
+# Set the  mount point to be scanned. The mount point specified, or the mount
653
+# point containing the specified directory will be watched. If any directories
654
+# are specified, this option will preempt (disable and ignore all options related to) 
655
+# the DDD system. This option will result in verdicts only: Prevention is explicitly 
656
+# disallowed to prevent uninteded, fatal misuse by users due to their potential 
657
+# fundamental misunderstanding of (pre kernel 5.1) fanotify mechanisms.
658
+# It can be used multiple times.
659
+# Default: disabled
660
+#OnAccessMountPath /
661
+#OnAccessMountPath /home/user
662
+
643 663
 # Set the exclude paths. All subdirectories are also excluded.
644
-# (On-access scan only)
645 664
 # Default: disabled
646 665
 #OnAccessExcludePath /home/bofh
647 666
 
... ...
@@ -671,25 +690,28 @@ Example
671 671
 # Default: disabled
672 672
 #OnAccessExcludeUID -1
673 673
 
674
-# Toggles dynamic directory determination. Allows for recursively watching
675
-# include paths.
676
-# (On-access scan only)
677
-# Default: no
678
-#OnAccessDisableDDD yes
674
+# This option allows exclusions via user names when using the on-access 
675
+# scanning client. It can be used multiple times.
676
+# It has the same potential race condition limitations of the OnAccessExcludeUID option.
677
+# Default: disabled
678
+#OnAccessExcludeUname clamuser
679 679
 
680
-# Modifies fanotify blocking behaviour when handling permission events.
681
-# If off, fanotify will only notify if the file scanned is a virus,
682
-# and not perform any blocking.
683
-# (On-access scan only)
680
+# Number of times the OnAccess client will retry a failed scan due to connection problems 
681
+# (or other issues). 
682
+# Default: 0
683
+#OnAccessRetryAttempts 3
684
+
685
+# When using prevention, if this option is turned on, any errors that occur during 
686
+# scanning will result in the event attempt being denied. This could potentially 
687
+# lead to unwanted system behaviour with certain configurations, so the client defaults 
688
+# this to off and prefers allowing access events in case of scan or connection error.
684 689
 # Default: no
685
-#OnAccessPrevention yes
690
+#OnAccessDenyOnError yes
691
+
686 692
 
687 693
 # Toggles extra scanning and notifications when a file or directory is
688 694
 # created or moved.
689 695
 # Requires the  DDD system to kick-off extra scans.
690
-# NOTE:  This feature is disabled until a thread resource leak bug
691
-#        in the OnAccessExtraScanning code can be resolved.
692
-# (On-access scan only)
693 696
 # Default: no
694 697
 #OnAccessExtraScanning yes
695 698
 
... ...
@@ -277,7 +277,7 @@ const struct clam_option __clam_options[] = {
277 277
 
278 278
     {"AllowAllMatchScan", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD, "Permit use of the ALLMATCHSCAN command.", "yes"},
279 279
 
280
-    {"Foreground", "foreground", 'F', CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER, "Don't fork into background.", "no"},
280
+    { "Foreground", "foreground", 'F', CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER | OPT_CLAMONACC, "Don't fork into background.", "no" },
281 281
 
282 282
     {"Debug", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM, "Enable debug messages in libclamav.", "no"},
283 283
 
... ...
@@ -400,8 +400,6 @@ const struct clam_option __clam_options[] = {
400 400
     {"PCREMaxFileSize", "pcre-max-filesize", 0, CLOPT_TYPE_SIZE, MATCH_SIZE, CLI_DEFAULT_PCRE_MAX_FILESIZE, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "This option sets the maximum filesize for which PCRE subsigs will be executed.\nFiles exceeding this limit will not have PCRE subsigs executed unless a subsig is encompassed to a smaller buffer.\nNegative values are not allowed.\nSetting this value to zero disables the limit.\nWARNING: setting this limit too high or disabling it may severely impact performance.", "25M"},
401 401
 
402 402
     /* OnAccess settings */
403
-    {"ScanOnAccess", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD, "This option enables on-access scanning (Linux only)", "no"},
404
-
405 403
     {"OnAccessMountPath", NULL, 0, CLOPT_TYPE_STRING, NULL, -1, NULL, FLAG_MULTIPLE, OPT_CLAMD, "This option specifies a directory or mount point which should be scanned on access. The mount point specified, or the mount point containing the specified directory will be watched, but only notifications will occur. If any directories are specified, this option will preempt the DDD system. It can also be used multiple times.", "/\n/home/user"},
406 404
 
407 405
     { "OnAccessIncludePath", NULL, 0, CLOPT_TYPE_STRING, NULL, -1, NULL, FLAG_MULTIPLE, OPT_CLAMD, "This option specifies a directory (including all files and directories\ninside it), which should be scanned on access. This option can\nbe used multiple times.", "/home\n/students" },
... ...
@@ -412,6 +410,8 @@ const struct clam_option __clam_options[] = {
412 412
 
413 413
     {"OnAccessExcludeUID", NULL, 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, -1, NULL, FLAG_MULTIPLE, OPT_CLAMD, "With this option you can whitelist specific UIDs. Processes with these UIDs\nwill be able to access all files.\nThis option can be used multiple times (one per line). Using a value of 0 on any line will disable this option entirely. To whitelist the root UID please enable the OnAccessExcludeRootUID option.", "0"},
414 414
 
415
+    { "OnAccessExcludeUname", NULL, 0, CLOPT_TYPE_STRING, NULL, -1, NULL, FLAG_MULTIPLE, OPT_CLAMD, "This option allows exclusions via user names when using the on-access scanning client. It can\nbe used multiple times.", "clamuser" },
416
+
415 417
     {"OnAccessMaxFileSize", NULL, 0, CLOPT_TYPE_SIZE, MATCH_SIZE, 5242880, NULL, 0, OPT_CLAMD, "Files larger than this value will not be scanned in on access.", "5M"},
416 418
 
417 419
     { "OnAccessDisableDDD", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD, "This option toggles the dynamic directory determination system for on-access scanning (Linux only).", "no" },
... ...
@@ -425,6 +425,10 @@ const struct clam_option __clam_options[] = {
425 425
 
426 426
     { "OnAccessMaxThreads", NULL, 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, 5, NULL, 0, OPT_CLAMD, "Max number of scanning threads to allocate to the OnAccess thread pool at startup--these threads are the ones responsible for creating a connection with the daemon and kicking off scanning after an event has been processed. To prevent clamonacc from consuming all clamd's resources keep this lower than clamd's max threads. Default is 5", "10" },
427 427
 
428
+    { "OnAccessRetryAttempts", NULL, 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, 0, NULL, 0, OPT_CLAMD, "Number of times the OnAccess client will retry a failed scan due to connection problems (or other issues). Defaults to no retries.", "3" },
429
+
430
+    { "OnAccessDenyOnError", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD, "When using prevention, if this option is turned on, any errors that occur during scanning will result in the event attempt being denied. This could potentially lead to unwanted system behaviour with certain configurations, so the client defaults to off and allowing access events in case of error.", "yes" },
431
+
428 432
 
429 433
     /* clamonacc cmdline options */
430 434
 
... ...
@@ -520,16 +524,8 @@ const struct clam_option __clam_options[] = {
520 520
     {"ArchiveBlockMax", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", ""},
521 521
     {"ArchiveLimitMemoryUsage", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", ""},
522 522
     {"MailFollowURLs", "mail-follow-urls", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "", ""},
523
-    {"ClamukoScanOnAccess", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", ""},
524
-    {"ClamukoScannerCount", NULL, 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, 3, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", ""},
525
-    {"ClamukoScanOnOpen", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", ""},
526
-    {"ClamukoScanOnClose", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", ""},
527
-    {"ClamukoScanOnExec", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", ""},
528
-    {"ClamukoIncludePath", NULL, 0, CLOPT_TYPE_STRING, NULL, -1, NULL, FLAG_MULTIPLE, OPT_CLAMD | OPT_DEPRECATED, "", ""},
529
-    {"ClamukoExcludePath", NULL, 0, CLOPT_TYPE_STRING, NULL, -1, NULL, FLAG_MULTIPLE, OPT_CLAMD | OPT_DEPRECATED, "", ""},
530
-    {"ClamukoExcludeUID", NULL, 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, -1, NULL, FLAG_MULTIPLE, OPT_CLAMD | OPT_DEPRECATED, "", ""},
531
-    {"ClamukoMaxFileSize", NULL, 0, CLOPT_TYPE_SIZE, MATCH_SIZE, 5242880, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", ""},
532 523
     {"AllowSupplementaryGroups", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER | OPT_DEPRECATED, "Initialize a supplementary group access (the process must be started by root).", "no"},
524
+    { "ScanOnAccess", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", "" },
533 525
 
534 526
     /* Milter specific options */
535 527