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()
8
clamconf/clamconf.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(-)
16
diff --git a/clambc/bcrun.c b/clambc/bcrun.c
17
index 3c7da93..adcd0ac 100644
20
@@ -246,8 +246,6 @@ int main(int argc, char *argv[])
24
- cl_initialize_crypto();
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)
35
struct cli_environment env;
37
- cl_initialize_crypto();
39
opts = optparse(NULL, argc, argv, 1, OPT_CLAMCONF, 0, NULL);
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
46
@@ -141,8 +141,6 @@ int main(int argc, char **argv)
47
sigaction(SIGUSR2, &sa, NULL);
50
- cl_initialize_crypto();
52
if((opts = optparse(NULL, argc, argv, 1, OPT_CLAMD, 0, NULL)) == NULL) {
53
mprintf("!Can't parse command line options\n");
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;
63
- cl_initialize_crypto();
65
if((opts = optparse(NULL, argc, argv, 1, OPT_CLAMDSCAN, OPT_CLAMSCAN, NULL)) == NULL) {
66
mprintf("!Can't parse command line options\n");
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)
76
- cl_initialize_crypto();
78
if ((retcl = cl_init (CL_INIT_DEFAULT)))
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)
87
unsigned int pid = (unsigned int) getpid();
89
+ cl_initialize_crypto();
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)
102
- cl_initialize_crypto();
104
if((ret = cl_init(CL_INIT_DEFAULT)) != CL_SUCCESS) {
105
mprintf("!Can't initialize libclamav: %s\n", cl_strerror(ret));