~ubuntu-branches/ubuntu/saucy/clamav/saucy-backports

« back to all changes in this revision

Viewing changes to debian/patches/0010-Call-cl_initialize_crypto-in-cl_init.patch

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman
  • Date: 2014-07-15 01:08:10 UTC
  • mfrom: (0.35.47 sid)
  • Revision ID: package-import@ubuntu.com-20140715010810-ru66ek4fun2iseba
Tags: 0.98.4+dfsg-2~ubuntu13.10.1
No-change backport to saucy (LP: #1341962)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From adc819811d21d51fb2ed25f63377c92b34352735 Mon Sep 17 00:00:00 2001
 
2
From: Shawn Webb <swebb@sourcefire.com>
 
3
Date: Thu, 3 Jul 2014 22:14:40 -0400
 
4
Subject: Call cl_initialize_crypto() in cl_init()
 
5
 
 
6
---
 
7
 clambc/bcrun.c        | 2 --
 
8
 clamconf/clamconf.c   | 2 --
 
9
 clamd/clamd.c         | 2 --
 
10
 clamdscan/clamdscan.c | 2 --
 
11
 freshclam/freshclam.c | 2 --
 
12
 libclamav/others.c    | 2 ++
 
13
 sigtool/sigtool.c     | 2 --
 
14
 7 files changed, 2 insertions(+), 12 deletions(-)
 
15
 
 
16
diff --git a/clambc/bcrun.c b/clambc/bcrun.c
 
17
index 3c7da93..adcd0ac 100644
 
18
--- a/clambc/bcrun.c
 
19
+++ b/clambc/bcrun.c
 
20
@@ -246,8 +246,6 @@ int main(int argc, char *argv[])
 
21
     int fd = -1;
 
22
     unsigned tracelevel;
 
23
 
 
24
-    cl_initialize_crypto();
 
25
-
 
26
     if(check_flevel())
 
27
        exit(1);
 
28
 
 
29
diff --git a/clamconf/clamconf.c b/clamconf/clamconf.c
 
30
index 2dd3113..218885c 100644
 
31
--- a/clamconf/clamconf.c
 
32
+++ b/clamconf/clamconf.c
 
33
@@ -376,8 +376,6 @@ int main(int argc, char **argv)
 
34
        unsigned int i, j;
 
35
        struct cli_environment env;
 
36
 
 
37
-    cl_initialize_crypto();
 
38
-
 
39
     opts = optparse(NULL, argc, argv, 1, OPT_CLAMCONF, 0, NULL);
 
40
     if(!opts) {
 
41
        printf("ERROR: Can't parse command line options\n");
 
42
diff --git a/clamd/clamd.c b/clamd/clamd.c
 
43
index 3cdca26..879c538 100644
 
44
--- a/clamd/clamd.c
 
45
+++ b/clamd/clamd.c
 
46
@@ -141,8 +141,6 @@ int main(int argc, char **argv)
 
47
     sigaction(SIGUSR2, &sa, NULL);
 
48
 #endif
 
49
 
 
50
-    cl_initialize_crypto();
 
51
-
 
52
     if((opts = optparse(NULL, argc, argv, 1, OPT_CLAMD, 0, NULL)) == NULL) {
 
53
         mprintf("!Can't parse command line options\n");
 
54
         return 1;
 
55
diff --git a/clamdscan/clamdscan.c b/clamdscan/clamdscan.c
 
56
index 4af2261..42d71ed 100644
 
57
--- a/clamdscan/clamdscan.c
 
58
+++ b/clamdscan/clamdscan.c
 
59
@@ -69,8 +69,6 @@ int main(int argc, char **argv)
 
60
        struct sigaction sigact;
 
61
 #endif
 
62
 
 
63
-    cl_initialize_crypto();
 
64
-
 
65
     if((opts = optparse(NULL, argc, argv, 1, OPT_CLAMDSCAN, OPT_CLAMSCAN, NULL)) == NULL) {
 
66
        mprintf("!Can't parse command line options\n");
 
67
        return 2;
 
68
diff --git a/freshclam/freshclam.c b/freshclam/freshclam.c
 
69
index a76d39f..3b6c8d0 100644
 
70
--- a/freshclam/freshclam.c
 
71
+++ b/freshclam/freshclam.c
 
72
@@ -302,8 +302,6 @@ main (int argc, char **argv)
 
73
     if (check_flevel ())
 
74
         exit (FCE_INIT);
 
75
 
 
76
-    cl_initialize_crypto();
 
77
-
 
78
     if ((retcl = cl_init (CL_INIT_DEFAULT)))
 
79
     {
 
80
         mprintf ("!Can't initialize libclamav: %s\n", cl_strerror (retcl));
 
81
diff --git a/libclamav/others.c b/libclamav/others.c
 
82
index 0460205..d367a57 100644
 
83
--- a/libclamav/others.c
 
84
+++ b/libclamav/others.c
 
85
@@ -290,6 +290,8 @@ int cl_init(unsigned int initoptions)
 
86
        struct timeval tv;
 
87
        unsigned int pid = (unsigned int) getpid();
 
88
 
 
89
+    cl_initialize_crypto();
 
90
+
 
91
     {
 
92
        unrar_main_header_t x;
 
93
        if (((char*)&x.flags - (char*)&x) != 3) {
 
94
diff --git a/sigtool/sigtool.c b/sigtool/sigtool.c
 
95
index 60bd850..358107f 100644
 
96
--- a/sigtool/sigtool.c
 
97
+++ b/sigtool/sigtool.c
 
98
@@ -2995,8 +2995,6 @@ int main(int argc, char **argv)
 
99
     if(check_flevel())
 
100
        exit(1);
 
101
 
 
102
-    cl_initialize_crypto();
 
103
-
 
104
     if((ret = cl_init(CL_INIT_DEFAULT)) != CL_SUCCESS) {
 
105
        mprintf("!Can't initialize libclamav: %s\n", cl_strerror(ret));
 
106
        return -1;