git-svn: trunk@4149
aCaB authored on 2008/08/29 10:01:34... | ... |
@@ -1,3 +1,12 @@ |
1 |
+Fri Aug 29 02:46:19 CEST 2008 (acab) |
|
2 |
+------------------------------------ |
|
3 |
+ * clamav-milter: Add option "--no-check-cf" to bypass sendmail.cf sanity |
|
4 |
+ checks. For use by package maintainers on fresh installs, |
|
5 |
+ when sendmail.cf is present for any reason although it's |
|
6 |
+ not used or when the milter is configured via an m4 file |
|
7 |
+ included in sendmail.cf. This option is intentionally |
|
8 |
+ not extensively documented (bb#726) |
|
9 |
+ |
|
1 | 10 |
Thu Aug 28 15:13:07 CEST 2008 (acab) |
2 | 11 |
------------------------------------ |
3 | 12 |
* unit_tests/check_disasm: add the remaining test cases (fpu, prefixes and more) |
... | ... |
@@ -542,6 +542,7 @@ static const char *whitelistFile; /* |
542 | 542 |
* addresses that we don't scan |
543 | 543 |
*/ |
544 | 544 |
static const char *sendmailCF; /* location of sendmail.cf to verify */ |
545 |
+static int checkCF = 1; |
|
545 | 546 |
static const char *pidfile; |
546 | 547 |
static int black_hole_mode; /* |
547 | 548 |
* Since sendmail calls its milters before it |
... | ... |
@@ -686,6 +687,7 @@ help(void) |
686 | 686 |
puts(_("\t--quarantine-dir=DIR\t-U DIR\tDirectory to store infected emails.")); |
687 | 687 |
puts(_("\t--server=SERVER\t\t-s SERVER\tHostname/IP address of server(s) running clamd (when using TCPsocket).")); |
688 | 688 |
puts(_("\t--sendmail-cf=FILE\t\tLocation of the sendmail.cf file to verify")); |
689 |
+ puts(_("\t--no-check-cf\t\tSkip verification of sendmail.cf")); |
|
689 | 690 |
puts(_("\t--sign\t\t\t-S\tAdd a hard-coded signature to each scanned message.")); |
690 | 691 |
puts(_("\t--signature-file=FILE\t-F FILE\tLocation of signature file.")); |
691 | 692 |
puts(_("\t--template-file=FILE\t-t FILE\tLocation of e-mail template file.")); |
... | ... |
@@ -894,6 +896,9 @@ main(int argc, char **argv) |
894 | 894 |
"sendmail-cf", 1, NULL, '0' |
895 | 895 |
}, |
896 | 896 |
{ |
897 |
+ "no-check-cf", 0, &checkCF, 0 |
|
898 |
+ }, |
|
899 |
+ { |
|
897 | 900 |
"server", 1, NULL, 's' |
898 | 901 |
}, |
899 | 902 |
{ |
... | ... |
@@ -934,8 +939,8 @@ main(int argc, char **argv) |
934 | 934 |
|
935 | 935 |
if(ret == -1) |
936 | 936 |
break; |
937 |
- else if(ret == 0) |
|
938 |
- ret = long_options[opt_index].val; |
|
937 |
+ else if(ret == 0) |
|
938 |
+ continue; |
|
939 | 939 |
|
940 | 940 |
switch(ret) { |
941 | 941 |
case 'a': /* e-mail errors from here */ |
... | ... |
@@ -1135,7 +1140,7 @@ main(int argc, char **argv) |
1135 | 1135 |
port = argv[optind]; |
1136 | 1136 |
|
1137 | 1137 |
if(rootdir == NULL) /* FIXME: Handle CHROOT */ |
1138 |
- if(verifyIncomingSocketName(port) < 0) { |
|
1138 |
+ if(checkCF && verifyIncomingSocketName(port) < 0) { |
|
1139 | 1139 |
fprintf(stderr, _("%s: socket-addr (%s) doesn't agree with sendmail.cf\n"), argv[0], port); |
1140 | 1140 |
return EX_CONFIG; |
1141 | 1141 |
} |