~ubuntu-branches/ubuntu/raring/clamav/raring

« back to all changes in this revision

Viewing changes to debian/patches/25_skip_sendmail.cf.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Gran
  • Date: 2008-09-05 17:25:34 UTC
  • mfrom: (0.35.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080905172534-yi3f8fkye1o7u1r3
* New upstream version (closes: #497662, #497773)
  - lots of new options for clamd.conf
  - fixes CVEs CVE-2008-3912, CVE-2008-3913, CVE-2008-3914, and
    CVE-2008-1389
* No longer supports --unzip option, so typo is gone (closes: #496276)
* Translations:
  - sv (thanks Martin Bagge <brother@bsnet.se>) (closes: #491760)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## skip_sendmail.cf.dpatch by  <sgran@debian.org>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: Stop checking sendmail.cf - we ship the milter config in a seperate file
6
 
 
7
 
@DPATCH@
8
 
Index: clamav-milter/clamav-milter.c
9
 
===================================================================
10
 
--- a/clamav-milter/clamav-milter.c     (revision 595)
11
 
+++ b/clamav-milter/clamav-milter.c     (working copy)
12
 
@@ -534,6 +534,7 @@
13
 
                                         */
14
 
 static const   char    *sendmailCF;    /* location of sendmail.cf to verify */
15
 
 static const   char    *pidfile;
16
 
+static int nocheckCF = 0;
17
 
 static int     black_hole_mode; /*
18
 
                                 * Since sendmail calls its milters before it
19
 
                                 * looks in /etc/aliases we can spend time
20
 
@@ -629,6 +630,7 @@
21
 
        puts(_("\t--quarantine-dir=DIR\t-U DIR\tDirectory to store infected emails."));
22
 
        puts(_("\t--server=SERVER\t\t-s SERVER\tHostname/IP address of server(s) running clamd (when using TCPsocket)."));
23
 
        puts(_("\t--sendmail-cf=FILE\t\tLocation of the sendmail.cf file to verify"));
24
 
+       puts(_("\t--no-check-cf\t\tSkip verification of sendmail.cf"));
25
 
        puts(_("\t--sign\t\t\t-S\tAdd a hard-coded signature to each scanned message."));
26
 
        puts(_("\t--signature-file=FILE\t-F FILE\tLocation of signature file."));
27
 
        puts(_("\t--template-file=FILE\t-t FILE\tLocation of e-mail template file."));
28
 
@@ -832,6 +834,9 @@
29
 
                                "freshclam-monitor", 1, NULL, 'M'
30
 
                        },
31
 
                        {
32
 
+                               "no-check-cf", 0, NULL, 'z'
33
 
+                       },
34
 
+                       {
35
 
                                "sendmail-cf", 1, NULL, '0'
36
 
                        },
37
 
                        {
38
 
@@ -1037,6 +1042,9 @@
39
 
                                debug_level = atoi(optarg);
40
 
                                break;
41
 
 #endif
42
 
+                       case 'z':
43
 
+                               nocheckCF = 1;
44
 
+                               break;
45
 
                        default:
46
 
 #ifdef CL_DEBUG
47
 
                                fprintf(stderr, "Usage: %s [-b] [-c FILE] [-F FILE] [--max-children=num] [-e] [-l] [-o] [-p address] [-P] [-q] [-Q USER] [-s SERVER] [-S] [-x#] [-U PATH] [-M#] socket-addr\n", argv[0]);
48
 
@@ -5937,6 +5945,9 @@
49
 
                 */
50
 
                return 1;
51
 
 
52
 
+       if (nocheckCF) 
53
 
+               return 1;
54
 
+
55
 
        if(sendmailCF)
56
 
                fd = open(sendmailCF, O_RDONLY);
57
 
        else {
58
 
Index: docs/man/clamav-milter.8.in
59
 
===================================================================
60
 
--- a/docs/man/clamav-milter.8.in       (revision 590)
61
 
+++ b/docs/man/clamav-milter.8.in       (working copy)
62
 
@@ -296,6 +296,9 @@
63
 
 file, usually in /etc/sendmail.cf or /etc/mail/sendmail.cf. This directive
64
 
 tells clamav\-milter where to find the sendmail.cf file.
65
 
 .TP
66
 
+\fB\-\-no\-check\-cf\fR
67
 
+Skip the above check.
68
 
+.TP
69
 
 \fB\-\-black-hole-mode\fR
70
 
 Since \fIsendmail\fR calls its milters before it looks in its alias and virtuser
71
 
 tables, clamav-milter can spend time looking for malware that's going to be