summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Daemon/Daemon.cpp4
-rw-r--r--src/Daemon/Daemon.h7
-rw-r--r--src/Daemon/MiddleWare.cpp18
-rw-r--r--src/Daemon/MiddleWare.h2
4 files changed, 15 insertions, 16 deletions
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp
index b4e99140..781a1bc0 100644
--- a/src/Daemon/Daemon.cpp
+++ b/src/Daemon/Daemon.cpp
@@ -37,7 +37,6 @@
#endif
#include "abrtlib.h"
#include "ABRTException.h"
-#include "RPM.h"
#include "CrashWatcher.h"
#include "Daemon.h"
@@ -193,8 +192,7 @@ static void SetUpMW()
set_string_t::iterator it_k = g_settings_setOpenGPGPublicKeys.begin();
for (; it_k != g_settings_setOpenGPGPublicKeys.end(); it_k++)
{
- VERB1 log("Loading GPG key '%s'", it_k->c_str());
- g_RPM.LoadOpenGPGPublicKey(it_k->c_str());
+ LoadOpenGPGPublicKey(it_k->c_str());
}
set_string_t::iterator it_b = g_settings_mapBlackList.begin();
for (; it_b != g_settings_mapBlackList.end(); it_b++)
diff --git a/src/Daemon/Daemon.h b/src/Daemon/Daemon.h
index b24955b1..dbcfc291 100644
--- a/src/Daemon/Daemon.h
+++ b/src/Daemon/Daemon.h
@@ -27,7 +27,6 @@
class CCrashWatcher;
class CCommLayerServer;
class CPluginManager;
-class CRPM;
/* Verbosity level */
extern int g_verbose;
@@ -46,12 +45,6 @@ extern CCommLayerServer *g_pCommLayer;
extern CPluginManager* g_pPluginManager;
/**
- * An instance of CRPM used for package checking.
- * @see RPM.h
- */
-extern CRPM g_RPM;
-
-/**
* A set of blacklisted packages.
*/
extern set_string_t g_setBlackList;
diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp
index 05e91fdd..e6c9187c 100644
--- a/src/Daemon/MiddleWare.cpp
+++ b/src/Daemon/MiddleWare.cpp
@@ -36,14 +36,14 @@
*/
CPluginManager* g_pPluginManager;
/**
- * An instance of CRPM used for package checking.
- * @see RPM.h
- */
-CRPM g_RPM;
-/**
* A set of blacklisted packages.
*/
set_string_t g_setBlackList;
+/**
+ * An instance of CRPM used for package checking.
+ * @see RPM.h
+ */
+static CRPM s_RPM;
/**
@@ -450,6 +450,12 @@ static bool IsDebugDumpSaved(const std::string& pUID,
return found;
}
+void LoadOpenGPGPublicKey(const char* key)
+{
+ VERB1 log("Loading GPG key '%s'", key);
+ s_RPM.LoadOpenGPGPublicKey(key);
+}
+
/**
* Get a package name from executable name and save
* package description to particular debugdump directory of a crash.
@@ -484,7 +490,7 @@ static mw_result_t SavePackageDescriptionToDebugDump(const std::string& pExecuta
}
if (g_settings_bOpenGPGCheck)
{
- if (!g_RPM.CheckFingerprint(packageName))
+ if (!s_RPM.CheckFingerprint(packageName))
{
error_msg("package isn't signed with proper key");
return MW_GPG_ERROR;
diff --git a/src/Daemon/MiddleWare.h b/src/Daemon/MiddleWare.h
index a127c230..86d59396 100644
--- a/src/Daemon/MiddleWare.h
+++ b/src/Daemon/MiddleWare.h
@@ -51,6 +51,8 @@ typedef enum {
} report_status_items_t;
+void LoadOpenGPGPublicKey(const char* key);
+
/**
* Takes care of getting all additional data needed
* for computing UUIDs and creating a report for particular analyzer