allow skipping checks on sendmail.cf - bb#726

git-svn: trunk@4149
0.95
aCaB 17 years ago
parent 03f0f155fe
commit edc00340c8
  1. 9
      ChangeLog
  2. 11
      clamav-milter/clamav-milter.c

@ -1,3 +1,12 @@
Fri Aug 29 02:46:19 CEST 2008 (acab)
------------------------------------
* clamav-milter: Add option "--no-check-cf" to bypass sendmail.cf sanity
checks. For use by package maintainers on fresh installs,
when sendmail.cf is present for any reason although it's
not used or when the milter is configured via an m4 file
included in sendmail.cf. This option is intentionally
not extensively documented (bb#726)
Thu Aug 28 15:13:07 CEST 2008 (acab) Thu Aug 28 15:13:07 CEST 2008 (acab)
------------------------------------ ------------------------------------
* unit_tests/check_disasm: add the remaining test cases (fpu, prefixes and more) * unit_tests/check_disasm: add the remaining test cases (fpu, prefixes and more)

@ -542,6 +542,7 @@ static const char *whitelistFile; /*
* addresses that we don't scan * addresses that we don't scan
*/ */
static const char *sendmailCF; /* location of sendmail.cf to verify */ static const char *sendmailCF; /* location of sendmail.cf to verify */
static int checkCF = 1;
static const char *pidfile; static const char *pidfile;
static int black_hole_mode; /* static int black_hole_mode; /*
* Since sendmail calls its milters before it * Since sendmail calls its milters before it
@ -686,6 +687,7 @@ help(void)
puts(_("\t--quarantine-dir=DIR\t-U DIR\tDirectory to store infected emails.")); puts(_("\t--quarantine-dir=DIR\t-U DIR\tDirectory to store infected emails."));
puts(_("\t--server=SERVER\t\t-s SERVER\tHostname/IP address of server(s) running clamd (when using TCPsocket).")); puts(_("\t--server=SERVER\t\t-s SERVER\tHostname/IP address of server(s) running clamd (when using TCPsocket)."));
puts(_("\t--sendmail-cf=FILE\t\tLocation of the sendmail.cf file to verify")); puts(_("\t--sendmail-cf=FILE\t\tLocation of the sendmail.cf file to verify"));
puts(_("\t--no-check-cf\t\tSkip verification of sendmail.cf"));
puts(_("\t--sign\t\t\t-S\tAdd a hard-coded signature to each scanned message.")); puts(_("\t--sign\t\t\t-S\tAdd a hard-coded signature to each scanned message."));
puts(_("\t--signature-file=FILE\t-F FILE\tLocation of signature file.")); puts(_("\t--signature-file=FILE\t-F FILE\tLocation of signature file."));
puts(_("\t--template-file=FILE\t-t FILE\tLocation of e-mail template file.")); puts(_("\t--template-file=FILE\t-t FILE\tLocation of e-mail template file."));
@ -893,6 +895,9 @@ main(int argc, char **argv)
{ {
"sendmail-cf", 1, NULL, '0' "sendmail-cf", 1, NULL, '0'
}, },
{
"no-check-cf", 0, &checkCF, 0
},
{ {
"server", 1, NULL, 's' "server", 1, NULL, 's'
}, },
@ -934,8 +939,8 @@ main(int argc, char **argv)
if(ret == -1) if(ret == -1)
break; break;
else if(ret == 0) else if(ret == 0)
ret = long_options[opt_index].val; continue;
switch(ret) { switch(ret) {
case 'a': /* e-mail errors from here */ case 'a': /* e-mail errors from here */
@ -1135,7 +1140,7 @@ main(int argc, char **argv)
port = argv[optind]; port = argv[optind];
if(rootdir == NULL) /* FIXME: Handle CHROOT */ if(rootdir == NULL) /* FIXME: Handle CHROOT */
if(verifyIncomingSocketName(port) < 0) { if(checkCF && verifyIncomingSocketName(port) < 0) {
fprintf(stderr, _("%s: socket-addr (%s) doesn't agree with sendmail.cf\n"), argv[0], port); fprintf(stderr, _("%s: socket-addr (%s) doesn't agree with sendmail.cf\n"), argv[0], port);
return EX_CONFIG; return EX_CONFIG;
} }

Loading…
Cancel
Save