mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-11-01 16:40:54 +00:00
Merge branch 'master' into bytecode
* master: (60 commits) Fix build when git is not installed and using BSD make. Only use -fno-strict-aliasing for gcc-4.3+, to avoid bugs with older compilers (bb #1581). libclamav/matcher-bm.c: fix cli_bm_freeoff() (bb#1710) bb#1708 implove poolsize.pl win32: s/C_WINDOWS/_WIN32/ in clamd, shared libclamav/matcher-ac.c: fix matching of logical sigs (bb#1707) libclamav/readdb.c: fix handling of broken .ldb sigs (bb#1701) libclamav: new signature blacklisting format (bb#1625) killclamd must always succeed (except when there's a stuck clamd). Fix typo. Better error message when clamd gets killed merge win32 patches from sherpya remove bogus debug printf libclamav/matcher-ac.c: add support for line marker (L) (matches CR, CRLF and boundaries) fix EOL in platform.h sis.c: fix size check fix several problems introduced by the win32 commits fix in cli_is_abspath win32#3 ... Conflicts: .gitignore Makefile.am configure configure.in libclamav/readdb.c
This commit is contained in:
commit
72a03f9bd5
131 changed files with 3118 additions and 2622 deletions
|
|
@ -47,7 +47,6 @@
|
|||
#include "getopt.h"
|
||||
|
||||
#define MAXCMDOPTS 100
|
||||
#define MAX(a,b) (a > b ? a : b)
|
||||
|
||||
#define MATCH_NUMBER "^[0-9]+$"
|
||||
#define MATCH_SIZE "^[0-9]+[KM]?$"
|
||||
|
|
@ -292,6 +291,8 @@ const struct clam_option clam_options[] = {
|
|||
|
||||
{ "ClamukoScanOnAccess", NULL, 0, TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD, "This option enables Clamuko. Dazuko needs to be already configured and\nrunning.", "no" },
|
||||
|
||||
{ "ClamukoScannerCount", NULL, 0, TYPE_NUMBER, MATCH_NUMBER, 3, NULL, 0, OPT_CLAMD, "The number of scanner threads that will be started (DazukoFS only).\nHaving multiple scanner threads allows Clamuko to serve multiple\nprocesses simultaneously. This is particularly beneficial on SMP machines.", "3" },
|
||||
|
||||
{ "ClamukoScanOnOpen", NULL, 0, TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD, "Scan files when they get opened by the system.", "yes" },
|
||||
|
||||
{ "ClamukoScanOnClose", NULL, 0, TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD, "Scan files when they get closed by the system.", "yes" },
|
||||
|
|
@ -388,6 +389,8 @@ const struct clam_option clam_options[] = {
|
|||
|
||||
{ "AddHeader", NULL, 0, TYPE_STRING, "^(No|Replace|Yes|Add)$", -1, "no", 0, OPT_MILTER, "If this option is set to \"Replace\" (or \"Yes\"), an \"X-Virus-Scanned\" and an\n\"X-Virus-Status\" headers will be attached to each processed message, possibly\nreplacing existing headers.\nIf it is set to Add, the X-Virus headers are added possibly on top of the\nexisting ones.\nNote that while \"Replace\" can potentially break DKIM signatures, \"Add\" may\nconfuse procmail and similar filters.", "Replace" },
|
||||
|
||||
{ "ReportHostname", NULL, 0, TYPE_STRING, NULL, -1, NULL, 0, OPT_MILTER, "When AddHeader is in use, this option allows to arbitrary set the reported\nhostname. This may be desirable in order to avoid leaking internal names.\nIf unset the real machine name is used.", "my.mail.server.name" },
|
||||
|
||||
{ "Chroot", NULL, 0, TYPE_STRING, NULL, -1, NULL, 0, OPT_MILTER, "Chroot to the specified directory.\nChrooting is performed just after reading the config file and before\ndropping privileges.", "/newroot" },
|
||||
|
||||
{ "Whitelist", NULL, 0, TYPE_STRING, NULL, -1, NULL, 0, OPT_MILTER, "This option specifies a file which contains a list of basic POSIX regular\nexpressions. Addresses (sent to or from - see below) matching these regexes\nwill not be scanned. Optionally each line can start with the string \"From:\"\nor \"To:\" (note: no whitespace after the colon) indicating if it is,\nrespectively, the sender or recipient that is to be whitelisted.\nIf the field is missing, \"To:\" is assumed.\nLines starting with #, : or ! are ignored.", "/etc/whitelisted_addresses" },
|
||||
|
|
@ -695,7 +698,7 @@ struct optstruct *optparse(const char *cfgfile, int argc, char **argv, int verbo
|
|||
}
|
||||
|
||||
if(cfgfile) {
|
||||
if((fs = fopen(cfgfile, "rb")) == NULL) {
|
||||
if((fs = fopen(cfgfile, "r")) == NULL) {
|
||||
/* don't print error messages here! */
|
||||
optfree(opts);
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue