diff options
Diffstat (limited to 'recipes-security/clamav/clamav-0.98.5/0016-clamav-milter-add-additinal-SMFIF_-flags-before-invo.patch')
-rw-r--r-- | recipes-security/clamav/clamav-0.98.5/0016-clamav-milter-add-additinal-SMFIF_-flags-before-invo.patch | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/recipes-security/clamav/clamav-0.98.5/0016-clamav-milter-add-additinal-SMFIF_-flags-before-invo.patch b/recipes-security/clamav/clamav-0.98.5/0016-clamav-milter-add-additinal-SMFIF_-flags-before-invo.patch deleted file mode 100644 index 621c6dc..0000000 --- a/recipes-security/clamav/clamav-0.98.5/0016-clamav-milter-add-additinal-SMFIF_-flags-before-invo.patch +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | From dbc72db36eced2d3ca7c5b7f14970528c435429e Mon Sep 17 00:00:00 2001 | ||
2 | From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> | ||
3 | Date: Sun, 26 Oct 2014 12:11:09 +0100 | ||
4 | Subject: clamav-milter: add additinal SMFIF_* flags before invoking | ||
5 | smfi_register() | ||
6 | |||
7 | unfortunately after the shifting of the code (so that the socket could | ||
8 | be part of a group which is not part of the clamav user) I forgot (or | ||
9 | did not see it) to have the header flags added before the | ||
10 | smfi_register() was invoked. As a result the socket was working but it | ||
11 | was unable to add the X-Virus-Scanned & X-Virus-Status flags. This | ||
12 | patch fixes the issue. | ||
13 | |||
14 | https://bugzilla.clamav.net/show_bug.cgi?id=10731 | ||
15 | |||
16 | Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> | ||
17 | --- | ||
18 | clamav-milter/clamav-milter.c | 48 ++++++++++++++++++++++++------------------- | ||
19 | 1 file changed, 27 insertions(+), 21 deletions(-) | ||
20 | |||
21 | diff --git a/clamav-milter/clamav-milter.c b/clamav-milter/clamav-milter.c | ||
22 | index 99e7fe7fac04..22db98ab7c5e 100644 | ||
23 | --- a/clamav-milter/clamav-milter.c | ||
24 | +++ b/clamav-milter/clamav-milter.c | ||
25 | @@ -116,6 +116,33 @@ int main(int argc, char **argv) { | ||
26 | } | ||
27 | } | ||
28 | |||
29 | + pt = optget(opts, "AddHeader")->strarg; | ||
30 | + if (strcasecmp(pt, "No")) { | ||
31 | + char myname[255]; | ||
32 | + | ||
33 | + if (((opt = optget(opts, "ReportHostname"))->enabled && | ||
34 | + strncpy(myname, opt->strarg, sizeof(myname))) || | ||
35 | + !gethostname(myname, sizeof(myname))) { | ||
36 | + | ||
37 | + myname[sizeof(myname)-1] = '\0'; | ||
38 | + snprintf(xvirushdr, sizeof(xvirushdr), "clamav-milter %s at %s", | ||
39 | + get_version(), myname); | ||
40 | + } else { | ||
41 | + snprintf(xvirushdr, sizeof(xvirushdr), "clamav-milter %s", | ||
42 | + get_version()); | ||
43 | + } | ||
44 | + xvirushdr[sizeof(xvirushdr)-1] = '\0'; | ||
45 | + | ||
46 | + descr.xxfi_flags |= SMFIF_ADDHDRS; | ||
47 | + | ||
48 | + if (strcasecmp(pt, "Add")) { /* Replace or Yes */ | ||
49 | + descr.xxfi_flags |= SMFIF_CHGHDRS; | ||
50 | + addxvirus = 1; | ||
51 | + } else { /* Add */ | ||
52 | + addxvirus = 2; | ||
53 | + } | ||
54 | + } | ||
55 | + | ||
56 | if(!(my_socket = optget(opts, "MilterSocket")->strarg)) { | ||
57 | logg("!Please configure the MilterSocket directive\n"); | ||
58 | logg_close(); | ||
59 | @@ -323,27 +350,6 @@ int main(int argc, char **argv) { | ||
60 | return 1; | ||
61 | } | ||
62 | |||
63 | - pt = optget(opts, "AddHeader")->strarg; | ||
64 | - if(strcasecmp(pt, "No")) { | ||
65 | - char myname[255]; | ||
66 | - | ||
67 | - if(((opt = optget(opts, "ReportHostname"))->enabled && strncpy(myname, opt->strarg, sizeof(myname))) || !gethostname(myname, sizeof(myname))) { | ||
68 | - myname[sizeof(myname)-1] = '\0'; | ||
69 | - snprintf(xvirushdr, sizeof(xvirushdr), "clamav-milter %s at %s", get_version(), myname); | ||
70 | - } else | ||
71 | - snprintf(xvirushdr, sizeof(xvirushdr), "clamav-milter %s", get_version()); | ||
72 | - xvirushdr[sizeof(xvirushdr)-1] = '\0'; | ||
73 | - | ||
74 | - descr.xxfi_flags |= SMFIF_ADDHDRS; | ||
75 | - | ||
76 | - if(strcasecmp(pt, "Add")) { /* Replace or Yes */ | ||
77 | - descr.xxfi_flags |= SMFIF_CHGHDRS; | ||
78 | - addxvirus = 1; | ||
79 | - } else { /* Add */ | ||
80 | - addxvirus = 2; | ||
81 | - } | ||
82 | - } | ||
83 | - | ||
84 | multircpt = optget(opts, "SupportMultipleRecipients")->enabled; | ||
85 | |||
86 | if(!optget(opts, "Foreground")->enabled) { | ||