...
|
...
|
@@ -40,7 +40,7 @@ struct cfgoption cfg_options[] = {
|
40
|
40
|
{"LogClean", OPT_BOOL, 0, NULL, 0, OPT_CLAMD},
|
41
|
41
|
{"LogVerbose", OPT_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM},
|
42
|
42
|
{"LogSyslog", OPT_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM},
|
43
|
|
- {"LogFacility", OPT_STR, -1, "LOG_LOCAL6", 0, OPT_CLAMD | OPT_FRESHCLAM},
|
|
43
|
+ {"LogFacility", OPT_QUOTESTR, -1, "LOG_LOCAL6", 0, OPT_CLAMD | OPT_FRESHCLAM},
|
44
|
44
|
{"PidFile", OPT_QUOTESTR, -1, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM},
|
45
|
45
|
{"TemporaryDirectory", OPT_QUOTESTR, -1, NULL, 0, OPT_CLAMD},
|
46
|
46
|
{"ScanPE", OPT_BOOL, 1, NULL, 0, OPT_CLAMD},
|
...
|
...
|
@@ -64,7 +64,7 @@ struct cfgoption cfg_options[] = {
|
64
|
64
|
{"ArchiveBlockEncrypted", OPT_BOOL, 0, NULL, 0, OPT_CLAMD},
|
65
|
65
|
{"ArchiveBlockMax", OPT_BOOL, 0, NULL, 0, OPT_CLAMD},
|
66
|
66
|
{"DatabaseDirectory", OPT_QUOTESTR, -1, DATADIR, 0, OPT_CLAMD | OPT_FRESHCLAM},
|
67
|
|
- {"TCPAddr", OPT_STR, -1, NULL, 0, OPT_CLAMD},
|
|
67
|
+ {"TCPAddr", OPT_QUOTESTR, -1, NULL, 0, OPT_CLAMD},
|
68
|
68
|
{"TCPSocket", OPT_NUM, -1, NULL, 0, OPT_CLAMD},
|
69
|
69
|
{"LocalSocket", OPT_QUOTESTR, -1, NULL, 0, OPT_CLAMD},
|
70
|
70
|
{"MaxConnectionQueueLength", OPT_NUM, 15, NULL, 0, OPT_CLAMD},
|
...
|
...
|
@@ -82,7 +82,7 @@ struct cfgoption cfg_options[] = {
|
82
|
82
|
{"Debug", OPT_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM},
|
83
|
83
|
{"LeaveTemporaryFiles", OPT_BOOL, 0, NULL, 0, OPT_CLAMD},
|
84
|
84
|
{"FixStaleSocket", OPT_BOOL, 0, NULL, 0, OPT_CLAMD},
|
85
|
|
- {"User", OPT_STR, -1, NULL, 0, OPT_CLAMD},
|
|
85
|
+ {"User", OPT_QUOTESTR, -1, NULL, 0, OPT_CLAMD},
|
86
|
86
|
{"AllowSupplementaryGroups", OPT_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM},
|
87
|
87
|
{"SelfCheck", OPT_NUM, 1800, NULL, 0, OPT_CLAMD},
|
88
|
88
|
{"VirusEvent", OPT_FULLSTR, -1, NULL, 0, OPT_CLAMD},
|
...
|
...
|
@@ -95,22 +95,22 @@ struct cfgoption cfg_options[] = {
|
95
|
95
|
{"ClamukoExcludePath", OPT_QUOTESTR, 0, NULL, 0, OPT_CLAMD},
|
96
|
96
|
{"ClamukoMaxFileSize", OPT_COMPSIZE, 5242880, NULL, 0, OPT_CLAMD},
|
97
|
97
|
{"ClamukoScanArchive", OPT_BOOL, 0, NULL, 0, OPT_CLAMD},
|
98
|
|
- {"DatabaseOwner", OPT_STR, -1, CLAMAVUSER, 0, OPT_FRESHCLAM},
|
|
98
|
+ {"DatabaseOwner", OPT_QUOTESTR, -1, CLAMAVUSER, 0, OPT_FRESHCLAM},
|
99
|
99
|
{"Checks", OPT_NUM, 12, NULL, 0, OPT_FRESHCLAM},
|
100
|
100
|
{"UpdateLogFile", OPT_QUOTESTR, -1, NULL, 0, OPT_FRESHCLAM},
|
101
|
|
- {"DNSDatabaseInfo", OPT_STR, -1, "current.cvd.clamav.net", 0, OPT_FRESHCLAM},
|
102
|
|
- {"DatabaseMirror", OPT_STR, -1, NULL, 1, OPT_FRESHCLAM},
|
|
101
|
+ {"DNSDatabaseInfo", OPT_QUOTESTR, -1, "current.cvd.clamav.net", 0, OPT_FRESHCLAM},
|
|
102
|
+ {"DatabaseMirror", OPT_QUOTESTR, -1, NULL, 1, OPT_FRESHCLAM},
|
103
|
103
|
{"MaxAttempts", OPT_NUM, 3, NULL, 0, OPT_FRESHCLAM},
|
104
|
|
- {"HTTPProxyServer", OPT_STR, -1, NULL, 0, OPT_FRESHCLAM},
|
|
104
|
+ {"HTTPProxyServer", OPT_QUOTESTR, -1, NULL, 0, OPT_FRESHCLAM},
|
105
|
105
|
{"HTTPProxyPort", OPT_NUM, -1, NULL, 0, OPT_FRESHCLAM},
|
106
|
|
- {"HTTPProxyUsername", OPT_STR, -1, NULL, 0, OPT_FRESHCLAM},
|
107
|
|
- {"HTTPProxyPassword", OPT_STR, -1, NULL, 0, OPT_FRESHCLAM},
|
|
106
|
+ {"HTTPProxyUsername", OPT_QUOTESTR, -1, NULL, 0, OPT_FRESHCLAM},
|
|
107
|
+ {"HTTPProxyPassword", OPT_QUOTESTR, -1, NULL, 0, OPT_FRESHCLAM},
|
108
|
108
|
{"HTTPUserAgent", OPT_FULLSTR, -1, NULL, 0, OPT_FRESHCLAM},
|
109
|
109
|
{"NotifyClamd", OPT_QUOTESTR, -1, NULL, 0, OPT_FRESHCLAM},
|
110
|
110
|
{"OnUpdateExecute", OPT_FULLSTR, -1, NULL, 0, OPT_FRESHCLAM},
|
111
|
111
|
{"OnErrorExecute", OPT_FULLSTR, -1, NULL, 0, OPT_FRESHCLAM},
|
112
|
112
|
{"OnOutdatedExecute", OPT_FULLSTR, -1, NULL, 0, OPT_FRESHCLAM},
|
113
|
|
- {"LocalIPAddress", OPT_STR, -1, NULL, 0, OPT_FRESHCLAM},
|
|
113
|
+ {"LocalIPAddress", OPT_QUOTESTR, -1, NULL, 0, OPT_FRESHCLAM},
|
114
|
114
|
{"ConnectTimeout", OPT_NUM, 10, NULL, 0, OPT_FRESHCLAM},
|
115
|
115
|
{"ReceiveTimeout", OPT_NUM, 30, NULL, 0, OPT_FRESHCLAM},
|
116
|
116
|
{NULL, 0, 0, NULL, 0, 0}
|
...
|
...
|
@@ -169,6 +169,7 @@ struct cfgstruct *getcfg(const char *cfgfile, int verbose)
|
169
|
169
|
found = 1;
|
170
|
170
|
switch(pt->argtype) {
|
171
|
171
|
case OPT_STR:
|
|
172
|
+ /* deprecated. Use OPT_QUOTESTR instead since it behaves like this, but supports quotes to allow values to contain whitespace */
|
172
|
173
|
if(!arg) {
|
173
|
174
|
if(verbose)
|
174
|
175
|
fprintf(stderr, "ERROR: Parse error at line %d: Option %s requires string argument.\n", line, name);
|