summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@localhost.localdomain>2009-11-16 19:31:39 +0100
committerJiri Moskovcak <jmoskovc@localhost.localdomain>2009-11-16 19:31:39 +0100
commite02e60e8b1b3083ea13454c61460d72a0188517a (patch)
tree1679fa5bf56a00f9b6f3947cc2e1aef1f4c2559f
parent80a2d45c6ce729fc778d2ecc00569635cf886e7b (diff)
parentb69dd49d43a7c538c55e5cebab97c5f217cfe8fb (diff)
downloadabrt-e02e60e8b1b3083ea13454c61460d72a0188517a.tar.gz
abrt-e02e60e8b1b3083ea13454c61460d72a0188517a.tar.xz
abrt-e02e60e8b1b3083ea13454c61460d72a0188517a.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
-rw-r--r--doc/DESIGN15
-rw-r--r--doc/PLUGINS-HOWTO59
-rw-r--r--lib/Plugins/RunApp.cpp32
-rw-r--r--lib/Utils/DebugDump.cpp8
-rw-r--r--po/pl.po52
-rw-r--r--src/Daemon/CommLayerServerDBus.cpp2
-rw-r--r--src/Daemon/CrashWatcher.cpp2
-rw-r--r--src/Daemon/Daemon.cpp2
-rw-r--r--src/Daemon/MiddleWare.cpp51
-rw-r--r--src/Daemon/PluginManager.cpp179
-rw-r--r--src/Daemon/PluginManager.h34
-rw-r--r--src/Daemon/Settings.cpp1
-rw-r--r--src/Daemon/abrt.conf7
13 files changed, 233 insertions, 211 deletions
diff --git a/doc/DESIGN b/doc/DESIGN
index 78947238..7298b4c8 100644
--- a/doc/DESIGN
+++ b/doc/DESIGN
@@ -107,14 +107,19 @@ The key dbus calls served by abrt-process are:
Development plan
Since current code does not match the planned design, we need to gradually
-change the code to "morph" it into the desired shape. Planned steps:
+change the code to "morph" it into the desired shape.
-* make kerneloops plugin into separate daemon (convert it to a hook
- and get rid of "cron plugins" which are wrong idea since the begining)
-* Make abrtd dbus startable
+Done:
+
+* Make abrtd dbus startable.
+* Add -t TIMEOUT_SEC option to abrtd. {done}
* Make abrt-gui start abrtd on demand, so that abrt-gui can be started
even if abrtd does not run at the moment.
-* Add -t TIMEOUT_SEC option to abrtd.
+
+Planned steps:
+
+* make kerneloops plugin into separate daemon (convert it to a hook
+ and get rid of "cron plugins" which are wrong idea since the begining)
* ???
* ???
* ???
diff --git a/doc/PLUGINS-HOWTO b/doc/PLUGINS-HOWTO
index ef0c6ba6..d8467801 100644
--- a/doc/PLUGINS-HOWTO
+++ b/doc/PLUGINS-HOWTO
@@ -18,57 +18,64 @@ The files that were created when the application crashed (such as core dumps)
are all stored here. In addition, the plugins can write
their output files there, if any.
-Let's discuss the plugin types in detail:
+Plugin types in detail:
+
Action Plugin
-------------
-You use this type of plugin when you need some action to be
-performed when a crash is encountered.
-you have to override one method:
+This type of plugin is useful when you need some action to be performed
+immediately when a crash is encountered (using ActionsAndReporters = ...
+directive in abrt.conf), or if you need some action to be performed
+periodically ([Cron] section in the same file).
+
+You have to override one method:
+
+virtual void Run(const char *dir, const char *args);
+
+The first argument is a directory that contains the current debug
+dump, or all debug dumps for periodic actions.
+The second argument is a string with arguments (specified in config file).
-virtual void Run(const std::string& pActiveDir,
- const std::string& pArgs) = 0;
--This method runs the specified action.
- The first argument is a directory name. It can be either the current debug
- dump dir or a directory that contains all debug dumps.
- The second argument is a string with arguments specified for the action.
Analyzer Plugin
---------------
This plugin has to compute the UUID of the crash. Crashes differ, depending on
where they occur, for example crashes in the kernel differ from crashes in
userspace binaries, which differ from crashes in python scripts. Therefore,
-you need a plugin for each type of application that you want "abrt" to handle.
+you need a plugin for each type of application that you want abrt to handle.
-you have to override these methods:
+You have to override these methods:
-virtual std::string GetLocalUUID(const std::string& pDebugDumpPath) = 0;
+virtual std::string GetLocalUUID(const std::string& pDebugDumpPath);
- This method computes the local UUID of the crash.
-virtual std::string GetGlobalUUID(const std::string& pDebugDumpPath) = 0;
+virtual std::string GetGlobalUUID(const std::string& pDebugDumpPath);
- This method computes the global UUID of the crash.
-NOTE:The difference between local and global UUID is that the local UUID
+{something is fishy here}
+
+NOTE: The difference between local and global UUID is that the local UUID
is specific for the machine architecture on which the crash is encountered.
When the crash is reported, abrt has to use the "-debuginfo" packages
to render a global UUID, which should be independent of the specific
system (the same crash on different architectures/configurations can
yield different local UUIDs but has to have the same global UUID).
-virtual void CreateReport(const std::string& pDebugDumpPath) = 0;
+virtual void CreateReport(const std::string& pDebugDumpPath);
- This method creates the report about the crash and stores it
in the crash's directory.
+
Reporter Plugin
---------------
This plugin receives the entire finished crash report and
posts/reports it somewhere (e.g. logs it, mails it, posts
it on some web tool...)
-you have to override this method:
+You have to override this method:
virtual void Report(const crash_report_t& pCrashReport,
- const std::string& pArgs) = 0;
+ const std::string& pArgs);
-It is self-explanatory, that this method takes the report
and presents it somewhere to the world.
The second argument is a string with arguments specified for the reporter.
@@ -82,30 +89,30 @@ is not the same as some crash before. The database can be local, or in
some centralized location on the network.
you have to override these methods:
-virtual void Connect() = 0;
-virtual void DisConnect() = 0;
+virtual void Connect();
+virtual void DisConnect();
- connect and disconnect from the database
virtual void Insert(const std::string& pUUID,
const std::string& pUID,
const std::string& pDebugDumpPath,
- const std::string& pTime) = 0;
+ const std::string& pTime);
- insert an entry into the database: you use both UID (user ID) and UUID
(ID of the crash)
-virtual void Delete(const std::string& pUUID, const std::string& pUID) = 0;
+virtual void Delete(const std::string& pUUID, const std::string& pUID);
- delete an entry
-virtual void SetReported(const std::string& pUUID, const std::string& pUID) = 0;
+virtual void SetReported(const std::string& pUUID, const std::string& pUID);
- insert information into the database to say that this bug was already
reported (so for example the report plugins won't run several times
for the same bug)
-virtual const vector_database_rows_t GetUIDData(const std::string& pUID) = 0;
+virtual const vector_database_rows_t GetUIDData(const std::string& pUID);
- get database rows for the specified user ID
virtual const database_row_t GetUUIDData(const std::string& pUUID, const
- std::string& pUID) = 0;
+ std::string& pUID);
- get a database row for the specified user ID and UUID
@@ -124,7 +131,7 @@ PLUGIN_INFO(type, plugin_class, name, version, description, email, www)
- "description" is a string with the summary of what the plugin does
- "email" and "www" are strings with the contact info for the author
-for example:
+For example:
PLUGIN_INFO(REPORTER,
CMailx,
"Mailx",
diff --git a/lib/Plugins/RunApp.cpp b/lib/Plugins/RunApp.cpp
index 3be7bdf4..a2aa6987 100644
--- a/lib/Plugins/RunApp.cpp
+++ b/lib/Plugins/RunApp.cpp
@@ -21,7 +21,6 @@
#include "RunApp.h"
-#include <stdio.h>
#include "DebugDump.h"
#include "ABRTException.h"
#include "CommLayerInner.h"
@@ -30,20 +29,39 @@
#define COMMAND 0
#define FILENAME 1
+using namespace std;
+
void CActionRunApp::Run(const char *pActionDir, const char *pArgs)
{
- update_client(_("Executing RunApp plugin..."));
+ /* Don't update_client() - actions run at crash time */
+ log("RunApp('%s','%s')", pActionDir, pArgs);
- std::string output;
vector_string_t args;
-
parse_args(pArgs, args, '"');
- FILE *fp = popen(args[COMMAND].c_str(), "r");
+ const char *cmd = args[COMMAND].c_str();
+ if (!cmd[0])
+ {
+ return;
+ }
+
+//FIXME: need to be able to escape " in .conf
+ /* Chdir to the dump dir. Command can analyze component and such.
+ * Example:
+ * test x"`cat component`" = x"xorg-x11-apps" && cp /var/log/Xorg.0.log .
+ */
+//Can do it using chdir() in child if we'd open-code popen
+ string cd_and_cmd = ssprintf("cd '%s'; %s", pActionDir, cmd);
+ FILE *fp = popen(cd_and_cmd.c_str(), "r");
if (fp == NULL)
{
- throw CABRTException(EXCEP_PLUGIN, "Can't execute " + args[COMMAND]);
+ /* Happens only on resource starvation (fork fails or out-of-mem) */
+ return;
}
+
+//FIXME: RunApp("gzip -9 </var/log/Xorg.0.log", "Xorg.0.log.gz") fails
+//since we mangle NULs.
+ string output;
char line[1024];
while (fgets(line, 1024, fp) != NULL)
{
@@ -51,7 +69,7 @@ void CActionRunApp::Run(const char *pActionDir, const char *pArgs)
}
pclose(fp);
- if (args.size() > 1)
+ if (args.size() > FILENAME)
{
CDebugDump dd;
dd.Open(pActionDir);
diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp
index ba11d965..2883d01f 100644
--- a/lib/Utils/DebugDump.cpp
+++ b/lib/Utils/DebugDump.cpp
@@ -74,7 +74,7 @@ void CDebugDump::Open(const char *pDir)
bool CDebugDump::Exist(const char* pPath)
{
- std::string fullPath = m_sDebugDumpDir + "/" + pPath;
+ std::string fullPath = concat_path_file(m_sDebugDumpDir.c_str(), pPath);
return ExistFileDir(fullPath.c_str());
}
@@ -433,7 +433,7 @@ void CDebugDump::LoadText(const char* pName, std::string& pData)
{
throw CABRTException(EXCEP_DD_OPEN, "CDebugDump::LoadText(): DebugDump is not opened.");
}
- std::string fullPath = m_sDebugDumpDir + '/' + pName;
+ std::string fullPath = concat_path_file(m_sDebugDumpDir.c_str(), pName);
LoadTextFile(fullPath.c_str(), pData);
}
@@ -443,7 +443,7 @@ void CDebugDump::SaveText(const char* pName, const char* pData)
{
throw CABRTException(EXCEP_DD_OPEN, "CDebugDump::SaveText(): DebugDump is not opened.");
}
- std::string fullPath = m_sDebugDumpDir + "/" + pName;
+ std::string fullPath = concat_path_file(m_sDebugDumpDir.c_str(), pName);
SaveBinaryFile(fullPath.c_str(), pData, strlen(pData));
}
void CDebugDump::SaveBinary(const char* pName, const char* pData, unsigned pSize)
@@ -452,7 +452,7 @@ void CDebugDump::SaveBinary(const char* pName, const char* pData, unsigned pSize
{
throw CABRTException(EXCEP_DD_OPEN, "CDebugDump::SaveBinary(): DebugDump is not opened.");
}
- std::string fullPath = m_sDebugDumpDir + "/" + pName;
+ std::string fullPath = concat_path_file(m_sDebugDumpDir.c_str(), pName);
SaveBinaryFile(fullPath.c_str(), pData, pSize);
}
diff --git a/po/pl.po b/po/pl.po
index a27f0811..c97f69bf 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: pl\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-11-09 23:17+0000\n"
-"PO-Revision-Date: 2009-11-10 00:19+0100\n"
+"POT-Creation-Date: 2009-11-16 16:28+0000\n"
+"PO-Revision-Date: 2009-11-16 17:29+0100\n"
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
"Language-Team: Polish <fedora-trans-pl@redhat.com>\n"
"MIME-Version: 1.0\n"
@@ -81,7 +81,7 @@ msgstr "<span color=\"white\">Opis</span>"
msgid "About ABRT"
msgstr "Informacje o ABRT"
-#: ../src/Gui/ccgui.glade.h:6
+#: ../src/Gui/ccgui.glade.h:6 ../src/Gui/abrt.desktop.in.h:1
msgid "Automatic Bug Reporting Tool"
msgstr "Narzędzie do automatycznego zgłaszania błędów"
@@ -438,24 +438,24 @@ msgstr "gtk-close"
msgid "gtk-remove"
msgstr "gtk-remove"
+#: ../src/Gui/abrt.desktop.in.h:2
+msgid "View and report application crashes"
+msgstr "Wyświetlanie i zgłaszanie awarii aplikacji"
+
#: ../src/Applet/Applet.cpp:79
#, c-format
msgid "A crash in package %s has been detected"
msgstr "Wykryto awarię pakietu %s"
-#: ../src/Applet/Applet.cpp:138
-msgid "ABRT service has been started"
-msgstr "Usługa ABRT została uruchomiona"
-
-#: ../src/Applet/Applet.cpp:140 ../src/Applet/Applet.cpp:254
+#: ../src/Applet/Applet.cpp:253
msgid "ABRT service is not running"
msgstr "Usługa ABRT nie jest uruchomiona"
-#: ../src/Applet/CCApplet.cpp:185
+#: ../src/Applet/CCApplet.cpp:189
msgid "Warning"
msgstr "Ostrzeżenie"
-#: ../src/Daemon/Daemon.cpp:519
+#: ../src/Daemon/Daemon.cpp:520
msgid ""
"Report size exceeded the quota. Please check system's MaxCrashReportsSize "
"value in abrt.conf."
@@ -463,37 +463,37 @@ msgstr ""
"Wielkość raportu przekroczyła dozwolone ograniczenie. Proszę sprawdzić "
"wartość zmiennej MaxCrashReportsSize w pliku abrt.conf"
-#: ../lib/Plugins/Bugzilla.cpp:240
+#: ../lib/Plugins/Bugzilla.cpp:209
#, c-format
msgid "Bug is already reported: %i"
msgstr "Błąd został już wcześniej zgłoszony: %i"
-#: ../lib/Plugins/Bugzilla.cpp:302
+#: ../lib/Plugins/Bugzilla.cpp:271
#, c-format
msgid "New bug id: %i"
msgstr "Identyfikator nowego błędu: %i"
-#: ../lib/Plugins/Bugzilla.cpp:395
+#: ../lib/Plugins/Bugzilla.cpp:364
msgid "Checking for duplicates..."
msgstr "Sprawdzanie duplikatów..."
-#: ../lib/Plugins/Bugzilla.cpp:398
+#: ../lib/Plugins/Bugzilla.cpp:367
msgid "Logging into bugzilla..."
msgstr "Logowanie do Bugzilli..."
-#: ../lib/Plugins/Bugzilla.cpp:402
+#: ../lib/Plugins/Bugzilla.cpp:371
msgid "Empty login and password. Please check Bugzilla.conf"
msgstr "Pola login i hasło są puste. Proszę sprawdzić plik Bugzilla.conf"
-#: ../lib/Plugins/Bugzilla.cpp:408
+#: ../lib/Plugins/Bugzilla.cpp:377
msgid "Checking CC..."
msgstr "Sprawdzanie listy CC..."
-#: ../lib/Plugins/Bugzilla.cpp:417
+#: ../lib/Plugins/Bugzilla.cpp:386
msgid "Creating new bug..."
msgstr "Dodawanie nowego błędu..."
-#: ../lib/Plugins/Bugzilla.cpp:421
+#: ../lib/Plugins/Bugzilla.cpp:390
msgid "Logging out..."
msgstr "Wylogowywanie..."
@@ -533,15 +533,11 @@ msgstr "Pomijanie instalacji pakietu debuginfo"
msgid "Creating and submitting a report..."
msgstr "Tworzenie i wysyłanie raportu..."
-#: ../lib/Plugins/Logger.cpp:57 ../lib/Plugins/Mailx.cpp:124
+#: ../lib/Plugins/Logger.cpp:65
msgid "Creating a report..."
msgstr "Tworzenie raportu..."
-#: ../lib/Plugins/RunApp.cpp:64
-msgid "Executing RunApp plugin..."
-msgstr "Wykonywanie wtyczki RunApp..."
-
-#: ../lib/Plugins/FileTransfer.cpp:63 ../lib/Plugins/FileTransfer.cpp:381
+#: ../lib/Plugins/FileTransfer.cpp:63 ../lib/Plugins/FileTransfer.cpp:384
msgid "FileTransfer: URL not specified"
msgstr "Wtyczka przesyłania plików: nie podano adresu URL"
@@ -568,19 +564,19 @@ msgstr "Nie można utworzyć i wysłać archiwum %s"
msgid "Creating kernel oops crash reports..."
msgstr "Tworzenie raportów awarii \"kernel oops\""
-#: ../lib/Plugins/Mailx.cpp:109
+#: ../lib/Plugins/Mailx.cpp:163
msgid "Sending an email..."
msgstr "Wysłanie wiadomości e-mail..."
-#: ../lib/Plugins/SOSreport.cpp:100
+#: ../lib/Plugins/SOSreport.cpp:69
msgid "Executing SOSreport plugin..."
msgstr "Wykonywanie wtyczki SOSreport..."
-#: ../lib/Plugins/SOSreport.cpp:122
+#: ../lib/Plugins/SOSreport.cpp:91
#, c-format
msgid "running sosreport: %s"
msgstr "wykonywanie sosreport: %s"
-#: ../lib/Plugins/SOSreport.cpp:137
+#: ../lib/Plugins/SOSreport.cpp:95
msgid "done running sosreport"
msgstr "ukończono wykonywanie sosreport"
diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp
index ed7e3858..2c2ca3a5 100644
--- a/src/Daemon/CommLayerServerDBus.cpp
+++ b/src/Daemon/CommLayerServerDBus.cpp
@@ -352,7 +352,7 @@ static int handle_GetPluginSettings(DBusMessage* call, DBusMessage* reply)
long unix_uid = get_remote_uid(call);
VERB1 log("got %s('%s') call from uid %ld", "GetPluginSettings", PluginName, unix_uid);
- map_plugin_settings_t plugin_settings = g_pPluginManager->GetPluginSettings(PluginName, to_string(unix_uid));
+ map_plugin_settings_t plugin_settings = g_pPluginManager->GetPluginSettings(PluginName, to_string(unix_uid).c_str());
DBusMessageIter iter;
dbus_message_iter_init_append(reply, &iter);
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index e684277c..f8595157 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -113,7 +113,7 @@ map_crash_report_t GetJobResult(const char* pUUID, const char* pUID, int force)
/* FIXME: starting from here, any shared data must be protected with a mutex.
* For example, CreateCrashReport does:
- * g_pPluginManager->GetDatabase(g_settings_sDatabase);
+ * g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str());
* which is unsafe wrt concurrent updates to g_pPluginManager state.
*/
mw_result_t res = CreateCrashReport(pUUID, pUID, force, crashReport);
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp
index 53c44d3f..99f4af80 100644
--- a/src/Daemon/Daemon.cpp
+++ b/src/Daemon/Daemon.cpp
@@ -223,7 +223,7 @@ static void SetUpMW()
set_string_t::iterator it_p = g_settings_setEnabledPlugins.begin();
for (; it_p != g_settings_setEnabledPlugins.end(); it_p++)
{
- g_pPluginManager->RegisterPlugin(*it_p);
+ g_pPluginManager->RegisterPlugin(it_p->c_str());
}
VERB1 log("Adding actions or reporters");
vector_pair_string_string_t::iterator it_ar = g_settings_vectorActionsAndReporters.begin();
diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp
index 0bc358e1..66bdea67 100644
--- a/src/Daemon/MiddleWare.cpp
+++ b/src/Daemon/MiddleWare.cpp
@@ -184,7 +184,7 @@ mw_result_t CreateCrashReport(const char *pUUID,
database_row_t row;
if (pUUID[0] != '\0')
{
- CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
+ CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str());
database->Connect();
row = database->GetUUIDData(pUUID, pUID);
database->DisConnect();
@@ -278,17 +278,21 @@ void RunActionsAndReporters(const char *pDebugDumpDir)
{
try
{
- if (g_pPluginManager->GetPluginType(it_ar->first) == REPORTER)
+ VERB3 log("RunActionsAndReporters: checking %s", it_ar->first.c_str());
+ plugin_type_t tp = g_pPluginManager->GetPluginType(it_ar->first.c_str());
+ if (tp == REPORTER)
{
- CReporter* reporter = g_pPluginManager->GetReporter(it_ar->first);
+ CReporter* reporter = g_pPluginManager->GetReporter(it_ar->first.c_str());
map_crash_report_t crashReport;
DebugDumpToCrashReport(pDebugDumpDir, crashReport);
+ VERB2 log("%s.Report(...)", it_ar->first.c_str());
reporter->Report(crashReport, plugin_settings, it_ar->second);
}
- else if (g_pPluginManager->GetPluginType(it_ar->first) == ACTION)
+ else if (tp == ACTION)
{
- CAction* action = g_pPluginManager->GetAction(it_ar->first);
+ CAction* action = g_pPluginManager->GetAction(it_ar->first.c_str());
+ VERB2 log("%s.Run('%s','%s')", it_ar->first.c_str(), pDebugDumpDir, it_ar->second.c_str());
action->Run(pDebugDumpDir, it_ar->second.c_str());
}
}
@@ -375,27 +379,31 @@ report_status_t Report(const map_crash_report_t& pCrashReport,
}
}
- // analyzer with package name (CCpp:xrog-x11-app) has higher priority
+ // analyzer with package name (CCpp:xorg-x11-app) has higher priority
std::string key = analyzer + ":" + packageName;
+ map_analyzer_actions_and_reporters_t::iterator end = s_mapAnalyzerActionsAndReporters.end();
map_analyzer_actions_and_reporters_t::iterator keyPtr = s_mapAnalyzerActionsAndReporters.find(key);
- if (keyPtr == s_mapAnalyzerActionsAndReporters.end())
+ if (keyPtr == end)
{
// if there is no such settings, then try default analyzer
keyPtr = s_mapAnalyzerActionsAndReporters.find(analyzer);
+ key = analyzer;
}
std::string message;
- if (keyPtr != s_mapAnalyzerActionsAndReporters.end())
+ if (keyPtr != end)
{
+ VERB2 log("Found AnalyzerActionsAndReporters for '%s'", key.c_str());
+
vector_pair_string_string_t::iterator it_r = keyPtr->second.begin();
for (; it_r != keyPtr->second.end(); it_r++)
{
std::string pluginName = it_r->first;
try
{
- if (g_pPluginManager->GetPluginType(pluginName) == REPORTER)
+ if (g_pPluginManager->GetPluginType(pluginName.c_str()) == REPORTER)
{
- CReporter* reporter = g_pPluginManager->GetReporter(pluginName);
+ CReporter* reporter = g_pPluginManager->GetReporter(pluginName.c_str());
#if 0 /* Using ~user/.abrt/ is bad wrt security */
std::string home = "";
map_plugin_settings_t oldSettings;
@@ -433,12 +441,12 @@ report_status_t Report(const map_crash_report_t& pCrashReport,
{
ret[pluginName].push_back("0");
ret[pluginName].push_back(e.what());
- update_client("Reporting via %s' was not successful: %s", pluginName.c_str(), e.what());
+ update_client("Reporting via '%s' was not successful: %s", pluginName.c_str(), e.what());
}
}
}
- CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
+ CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str());
database->Connect();
database->SetReported(UUID, UID, message);
database->DisConnect();
@@ -456,7 +464,7 @@ void DeleteDebugDumpDir(const char *pDebugDumpDir)
std::string DeleteCrashInfo(const char *pUUID,
const char *pUID)
{
- CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
+ CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str());
database->Connect();
database_row_t row = database->GetUUIDData(pUUID, pUID);
database->Delete(pUUID, pUID);
@@ -476,7 +484,7 @@ std::string DeleteCrashInfo(const char *pUUID,
static bool IsDebugDumpSaved(const char *pUID,
const char *pDebugDumpDir)
{
- CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
+ CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str());
database->Connect();
vector_database_rows_t rows = database->GetUIDData(pUID);
database->DisConnect();
@@ -604,9 +612,9 @@ static void RunAnalyzerActions(const char *pAnalyzer, const char *pDebugDumpDir)
std::string pluginName = it_a->first;
try
{
- if (g_pPluginManager->GetPluginType(pluginName) == ACTION)
+ if (g_pPluginManager->GetPluginType(pluginName.c_str()) == ACTION)
{
- CAction* action = g_pPluginManager->GetAction(pluginName);
+ CAction* action = g_pPluginManager->GetAction(pluginName.c_str());
action->Run(pDebugDumpDir, it_a->second.c_str());
}
}
@@ -635,7 +643,7 @@ static mw_result_t SaveDebugDumpToDatabase(const char *pUUID,
const char *pDebugDumpDir,
map_crash_info_t& pCrashInfo)
{
- CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
+ CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str());
database->Connect();
database->Insert(pUUID, pUID, pDebugDumpDir, pTime);
database_row_t row = database->GetUUIDData(pUUID, pUID);
@@ -657,7 +665,7 @@ static mw_result_t SaveDebugDumpToDatabase(const char *pUUID,
std::string getDebugDumpDir(const char *pUUID,
const char *pUID)
{
- CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
+ CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str());
database->Connect();
database_row_t row = database->GetUUIDData(pUUID, pUID);
database->DisConnect();
@@ -712,7 +720,7 @@ mw_result_t GetCrashInfo(const char *pUUID,
map_crash_info_t& pCrashInfo)
{
pCrashInfo.clear();
- CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
+ CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str());
database->Connect();
database_row_t row = database->GetUUIDData(pUUID, pUID);
database->DisConnect();
@@ -757,14 +765,14 @@ mw_result_t GetCrashInfo(const char *pUUID,
vector_pair_string_string_t GetUUIDsOfCrash(const char *pUID)
{
- CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
+ CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str());
vector_database_rows_t rows;
database->Connect();
rows = database->GetUIDData(pUID);
database->DisConnect();
vector_pair_string_string_t UUIDsUIDs;
- int ii;
+ unsigned ii;
for (ii = 0; ii < rows.size(); ii++)
{
UUIDsUIDs.push_back(make_pair(rows[ii].m_sUUID, rows[ii].m_sUID));
@@ -783,5 +791,6 @@ void AddAnalyzerActionOrReporter(const char *pAnalyzer,
void AddActionOrReporter(const char *pActionOrReporter,
const char *pArgs)
{
+ VERB3 log("AddActionOrReporter('%s','%s')", pActionOrReporter, pArgs);
s_vectorActionsAndReporters.push_back(make_pair(std::string(pActionOrReporter), std::string(pArgs)));
}
diff --git a/src/Daemon/PluginManager.cpp b/src/Daemon/PluginManager.cpp
index 5b871515..5865e42c 100644
--- a/src/Daemon/PluginManager.cpp
+++ b/src/Daemon/PluginManager.cpp
@@ -30,7 +30,7 @@
/**
* Text representation of plugin types.
*/
-static const char* const plugin_type_str[] = {
+static const char *const plugin_type_str[] = {
"Analyzer",
"Action",
"Reporter",
@@ -38,61 +38,60 @@ static const char* const plugin_type_str[] = {
};
-bool LoadPluginSettings(const std::string& pPath, map_plugin_settings_t& pSettings)
+bool LoadPluginSettings(const char *pPath, map_plugin_settings_t& pSettings)
{
std::ifstream fIn;
- fIn.open(pPath.c_str());
- if (fIn.is_open())
+ fIn.open(pPath);
+ if (!fIn.is_open())
+ return false;
+
+ std::string line;
+ while (!fIn.eof())
{
- std::string line;
- while (!fIn.eof())
+ getline(fIn, line);
+
+ int ii;
+ bool is_value = false;
+ bool valid = false;
+ bool in_quote = false;
+ std::string key;
+ std::string value;
+ for (ii = 0; ii < line.length(); ii++)
{
- getline(fIn, line);
-
- int ii;
- bool is_value = false;
- bool valid = false;
- bool in_quote = false;
- std::string key = "";
- std::string value = "";
- for (ii = 0; ii < line.length(); ii++)
+ if (line[ii] == '\"')
{
- if (line[ii] == '\"')
- {
- in_quote = in_quote == true ? false : true;
- }
- if (isspace(line[ii]) && !in_quote)
- {
- continue;
- }
- if (line[ii] == '#' && !in_quote && key == "")
- {
- break;
- }
- if (line[ii] == '=' && !in_quote)
- {
- is_value = true;
- continue;
- }
- if (!is_value)
- {
- key += line[ii];
- }
- else
- {
- valid = true;
- value += line[ii];
- }
+ in_quote = in_quote == true ? false : true;
}
- if (valid && !in_quote)
+ if (isspace(line[ii]) && !in_quote)
{
- pSettings[key] = value;
+ continue;
+ }
+ if (line[ii] == '#' && !in_quote && key == "")
+ {
+ break;
+ }
+ if (line[ii] == '=' && !in_quote)
+ {
+ is_value = true;
+ continue;
+ }
+ if (!is_value)
+ {
+ key += line[ii];
+ }
+ else
+ {
+ valid = true;
+ value += line[ii];
}
}
- fIn.close();
- return true;
+ if (valid && !in_quote)
+ {
+ pSettings[key] = value;
+ }
}
- return false;
+ fIn.close();
+ return true;
}
/**
@@ -101,9 +100,9 @@ bool LoadPluginSettings(const std::string& pPath, map_plugin_settings_t& pSettin
* @param settings Plugin's settings.
* @return if it success it returns true, otherwise it returns false.
*/
-static bool SavePluginSettings(const std::string& pPath, const map_plugin_settings_t& pSettings)
+static bool SavePluginSettings(const char *pPath, const map_plugin_settings_t& pSettings)
{
- FILE* fOut = fopen(pPath.c_str(), "w");
+ FILE* fOut = fopen(pPath, "w");
if (fOut)
{
fprintf(fOut, "# Settings were written by abrt\n");
@@ -141,7 +140,7 @@ void CPluginManager::LoadPlugins()
{
name.erase(0, sizeof(PLUGINS_LIB_PREFIX) - 1);
name.erase(name.length() - sizeof(PLUGINS_LIB_EXTENSION));
- LoadPlugin(name);
+ LoadPlugin(name.c_str());
}
}
}
@@ -151,40 +150,39 @@ void CPluginManager::LoadPlugins()
void CPluginManager::UnLoadPlugins()
{
- map_abrt_plugins_t::iterator it_p;
- while ((it_p = m_mapABRTPlugins.begin()) != m_mapABRTPlugins.end())
+ map_abrt_plugins_t::iterator it_p = m_mapABRTPlugins.begin();
+ while (it_p != m_mapABRTPlugins.end())
{
- std::string pluginName = it_p->first;
- UnLoadPlugin(pluginName);
+ UnLoadPlugin(it_p->first.c_str());
}
}
-void CPluginManager::LoadPlugin(const std::string& pName)
+void CPluginManager::LoadPlugin(const char *pName)
{
if (m_mapABRTPlugins.find(pName) == m_mapABRTPlugins.end())
{
CABRTPlugin* abrtPlugin = NULL;
try
{
- std::string libPath = PLUGINS_LIB_DIR"/"PLUGINS_LIB_PREFIX + pName + "."PLUGINS_LIB_EXTENSION;
+ std::string libPath = ssprintf(PLUGINS_LIB_DIR"/"PLUGINS_LIB_PREFIX"%s."PLUGINS_LIB_EXTENSION, pName);
abrtPlugin = new CABRTPlugin(libPath.c_str());
if (abrtPlugin->GetMagicNumber() != PLUGINS_MAGIC_NUMBER ||
(abrtPlugin->GetType() < ANALYZER && abrtPlugin->GetType() > DATABASE))
{
throw CABRTException(EXCEP_PLUGIN, "CPluginManager::LoadPlugin(): non-compatible plugin");
}
- log("Plugin %s (%s) succesfully loaded", pName.c_str(), abrtPlugin->GetVersion());
+ log("Plugin %s (%s) succesfully loaded", pName, abrtPlugin->GetVersion());
m_mapABRTPlugins[pName] = abrtPlugin;
}
catch (CABRTException& e)
{
delete abrtPlugin;
- error_msg("Failed to load plugin %s: %s", pName.c_str(), e.what());
+ error_msg("Failed to load plugin %s: %s", pName, e.what());
}
}
}
-void CPluginManager::UnLoadPlugin(const std::string& pName)
+void CPluginManager::UnLoadPlugin(const char *pName)
{
map_abrt_plugins_t::iterator abrt_plugin = m_mapABRTPlugins.find(pName);
if (abrt_plugin != m_mapABRTPlugins.end())
@@ -192,11 +190,11 @@ void CPluginManager::UnLoadPlugin(const std::string& pName)
UnRegisterPlugin(pName);
delete abrt_plugin->second;
m_mapABRTPlugins.erase(abrt_plugin);
- log("Plugin %s successfully unloaded", pName.c_str());
+ log("Plugin %s successfully unloaded", pName);
}
}
-void CPluginManager::RegisterPlugin(const std::string& pName)
+void CPluginManager::RegisterPlugin(const char *pName)
{
map_abrt_plugins_t::iterator abrt_plugin = m_mapABRTPlugins.find(pName);
if (abrt_plugin != m_mapABRTPlugins.end())
@@ -206,7 +204,7 @@ void CPluginManager::RegisterPlugin(const std::string& pName)
CPlugin* plugin = abrt_plugin->second->PluginNew();
map_plugin_settings_t pluginSettings;
- LoadPluginSettings(PLUGINS_CONF_DIR"/" + pName + "."PLUGINS_CONF_EXTENSION, pluginSettings);
+ LoadPluginSettings(ssprintf(PLUGINS_CONF_DIR"/%s."PLUGINS_CONF_EXTENSION, pName).c_str(), pluginSettings);
try
{
plugin->Init();
@@ -215,7 +213,7 @@ void CPluginManager::RegisterPlugin(const std::string& pName)
catch (CABRTException& e)
{
log("Can't initialize plugin %s(%s): %s",
- pName.c_str(),
+ pName,
plugin_type_str[abrt_plugin->second->GetType()],
e.what()
);
@@ -223,13 +221,12 @@ void CPluginManager::RegisterPlugin(const std::string& pName)
return;
}
m_mapPlugins[pName] = plugin;
- log("Registered plugin %s(%s)", pName.c_str(), plugin_type_str[abrt_plugin->second->GetType()]);
+ log("Registered plugin %s(%s)", pName, plugin_type_str[abrt_plugin->second->GetType()]);
}
}
}
-void CPluginManager::RegisterPluginDBUS(const std::string& pName,
- const char * pDBUSSender)
+void CPluginManager::RegisterPluginDBUS(const char *pName, const char *pDBUSSender)
{
int polkit_result = polkit_check_authorization(pDBUSSender,
"org.fedoraproject.abrt.change-daemon-settings");
@@ -242,7 +239,7 @@ void CPluginManager::RegisterPluginDBUS(const std::string& pName,
}
}
-void CPluginManager::UnRegisterPlugin(const std::string& pName)
+void CPluginManager::UnRegisterPlugin(const char *pName)
{
map_abrt_plugins_t::iterator abrt_plugin = m_mapABRTPlugins.find(pName);
if (abrt_plugin != m_mapABRTPlugins.end())
@@ -253,13 +250,12 @@ void CPluginManager::UnRegisterPlugin(const std::string& pName)
plugin->second->DeInit();
delete plugin->second;
m_mapPlugins.erase(plugin);
- log("UnRegistered plugin %s(%s)", pName.c_str(), plugin_type_str[abrt_plugin->second->GetType()]);
+ log("UnRegistered plugin %s(%s)", pName, plugin_type_str[abrt_plugin->second->GetType()]);
}
}
}
-void CPluginManager::UnRegisterPluginDBUS(const std::string& pName,
- const char * pDBUSSender)
+void CPluginManager::UnRegisterPluginDBUS(const char *pName, const char *pDBUSSender)
{
int polkit_result = polkit_check_authorization(pDBUSSender,
"org.fedoraproject.abrt.change-daemon-settings");
@@ -273,77 +269,68 @@ void CPluginManager::UnRegisterPluginDBUS(const std::string& pName,
}
-CAnalyzer* CPluginManager::GetAnalyzer(const std::string& pName)
+CAnalyzer* CPluginManager::GetAnalyzer(const char *pName)
{
map_plugins_t::iterator plugin = m_mapPlugins.find(pName);
if (plugin == m_mapPlugins.end())
{
- throw CABRTException(EXCEP_PLUGIN, "CPluginManager::GetAnalyzer():"
- "Analyzer plugin: '"+pName+"' is not registered.");
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not registered", pName));
}
if (m_mapABRTPlugins[pName]->GetType() != ANALYZER)
{
- throw CABRTException(EXCEP_PLUGIN, "CPluginManager::GetAnalyzer():"
- "Plugin: '"+pName+"' is not analyzer plugin.");
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not an analyzer plugin", pName));
}
return (CAnalyzer*)(plugin->second);
}
-CReporter* CPluginManager::GetReporter(const std::string& pName)
+CReporter* CPluginManager::GetReporter(const char *pName)
{
map_plugins_t::iterator plugin = m_mapPlugins.find(pName);
if (plugin == m_mapPlugins.end())
{
- throw CABRTException(EXCEP_PLUGIN, "CPluginManager::GetReporter():"
- "Reporter plugin: '"+pName+"' is not registered.");
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not registered", pName));
}
if (m_mapABRTPlugins[pName]->GetType() != REPORTER)
{
- throw CABRTException(EXCEP_PLUGIN, "CPluginManager::GetReporter():"
- "Plugin: '"+pName+"' is not reporter plugin.");
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not a reporter plugin", pName));
}
return (CReporter*)(plugin->second);
}
-CAction* CPluginManager::GetAction(const std::string& pName)
+CAction* CPluginManager::GetAction(const char *pName)
{
map_plugins_t::iterator plugin = m_mapPlugins.find(pName);
if (plugin == m_mapPlugins.end())
{
- throw CABRTException(EXCEP_PLUGIN, "CPluginManager::GetAction():"
- "Action plugin: '"+pName+"' is not registered.");
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not registered", pName));
}
if (m_mapABRTPlugins[pName]->GetType() != ACTION)
{
- throw CABRTException(EXCEP_PLUGIN, "CPluginManager::GetAction():"
- "Plugin: '"+pName+"' is not action plugin.");
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not an action plugin", pName));
}
return (CAction*)(plugin->second);
}
-CDatabase* CPluginManager::GetDatabase(const std::string& pName)
+CDatabase* CPluginManager::GetDatabase(const char *pName)
{
map_plugins_t::iterator plugin = m_mapPlugins.find(pName);
if (plugin == m_mapPlugins.end())
{
- throw CABRTException(EXCEP_PLUGIN, "CPluginManager::GetDatabase():"
- "Database plugin: '"+pName+"' is not registered.");
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not registered", pName));
}
if (m_mapABRTPlugins[pName]->GetType() != DATABASE)
{
- throw CABRTException(EXCEP_PLUGIN, "CPluginManager::GetDatabase():"
- "Plugin: '"+pName+"' is not database plugin.");
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not a database plugin", pName));
}
return (CDatabase*)(plugin->second);
}
-plugin_type_t CPluginManager::GetPluginType(const std::string& pName)
+plugin_type_t CPluginManager::GetPluginType(const char *pName)
{
map_plugins_t::iterator plugin = m_mapPlugins.find(pName);
if (plugin == m_mapPlugins.end())
{
- throw CABRTException(EXCEP_PLUGIN, "CPluginManager::GetPluginType():"
- "Plugin: '"+pName+"' is not registered.");
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not registered", pName));
}
return m_mapABRTPlugins[pName]->GetType();
}
@@ -370,8 +357,8 @@ vector_map_string_t CPluginManager::GetPluginsInfo()
return ret;
}
-void CPluginManager::SetPluginSettings(const std::string& pName,
- const std::string& pUID,
+void CPluginManager::SetPluginSettings(const char *pName,
+ const char *pUID,
const map_plugin_settings_t& pSettings)
{
map_abrt_plugins_t::iterator abrt_plugin = m_mapABRTPlugins.find(pName);
@@ -444,8 +431,8 @@ void CPluginManager::SetPluginSettings(const std::string& pName,
#endif
}
-map_plugin_settings_t CPluginManager::GetPluginSettings(const std::string& pName,
- const std::string& pUID)
+map_plugin_settings_t CPluginManager::GetPluginSettings(const char *pName,
+ const char *pUID)
{
map_plugin_settings_t ret;
map_abrt_plugins_t::iterator abrt_plugin = m_mapABRTPlugins.find(pName);
diff --git a/src/Daemon/PluginManager.h b/src/Daemon/PluginManager.h
index d4914db6..0d3400b2 100644
--- a/src/Daemon/PluginManager.h
+++ b/src/Daemon/PluginManager.h
@@ -74,68 +74,66 @@ class CPluginManager
* A method, which loads particular plugin.
* @param pName A plugin name.
*/
- void LoadPlugin(const std::string& pName);
+ void LoadPlugin(const char *pName);
/**
* A method, which unloads particular plugin.
* @param pName A plugin name.
*/
- void UnLoadPlugin(const std::string& pName);
+ void UnLoadPlugin(const char *pName);
/**
* A method, which registers particular plugin.
* @param pName A plugin name.
*/
- void RegisterPlugin(const std::string& pName);
+ void RegisterPlugin(const char *pName);
/**
* A method, which unregister particular plugin.
* @param pName A plugin name.
*/
- void UnRegisterPlugin(const std::string& pName);
+ void UnRegisterPlugin(const char *pName);
/**
* A method, which registers particular plugin,
* called via DBUS
* @param pName A plugin name.
* @param pDBUSSender DBUS user identification
*/
- void RegisterPluginDBUS(const std::string& pName,
- const char * pDBUSSender);
+ void RegisterPluginDBUS(const char *pName, const char *pDBUSSender);
/**
* A method, which unregister particular plugin,
* called via DBUS
* @param pName A plugin name.
* @param pDBUSSender DBUS user identification
*/
- void UnRegisterPluginDBUS(const std::string& pName,
- const char * pDBUSSender);
+ void UnRegisterPluginDBUS(const char *pName, const char *pDBUSSender);
/**
* A method, which returns instance of particular analyzer plugin.
* @param pName A plugin name.
* @return An analyzer plugin.
*/
- CAnalyzer* GetAnalyzer(const std::string& pName);
+ CAnalyzer* GetAnalyzer(const char *pName);
/**
* A method, which returns instance of particular reporter plugin.
* @param pName A plugin name.
* @return A reporter plugin.
*/
- CReporter* GetReporter(const std::string& pName);
+ CReporter* GetReporter(const char *pName);
/**
* A method, which returns instance of particular action plugin.
* @param pName A plugin name.
* @return An action plugin.
*/
- CAction* GetAction(const std::string& pName);
+ CAction* GetAction(const char *pName);
/**
* A method, which returns instance of particular database plugin.
* @param pName A plugin name.
* @return A database plugin.
*/
- CDatabase* GetDatabase(const std::string& pName);
+ CDatabase* GetDatabase(const char *pName);
/**
* A method, which returns type of particular plugin.
* @param pName A plugin name.
* @return A plugin type.
*/
- plugin_type_t GetPluginType(const std::string& pName);
+ plugin_type_t GetPluginType(const char *pName);
/**
* A method, which gets all plugins info (event those plugins which are
* disabled). It can be send via DBus to GUI and displayed to an user.
@@ -150,8 +148,8 @@ class CPluginManager
* @param pUID An uid of user.
* @param pSettings A plugin's settings.
*/
- void SetPluginSettings(const std::string& pName,
- const std::string& pUID,
+ void SetPluginSettings(const char *pName,
+ const char *pUID,
const map_plugin_settings_t& pSettings);
/**
* A method, which returns plugin's settings according to user.
@@ -159,8 +157,8 @@ class CPluginManager
* @param pUID An uid of user.
* @return Plugin's settings accorting to user.
*/
- map_plugin_settings_t GetPluginSettings(const std::string& pName,
- const std::string& pUID);
+ map_plugin_settings_t GetPluginSettings(const char *pName,
+ const char *pUID);
};
/**
@@ -170,6 +168,6 @@ class CPluginManager
* @param settings A readed plugin's settings.
* @return if it success it returns true, otherwise it returns false.
*/
-bool LoadPluginSettings(const std::string& pPath,
+bool LoadPluginSettings(const char *pPath,
map_plugin_settings_t& pSettings);
#endif /*PLUGINMANAGER_H_*/
diff --git a/src/Daemon/Settings.cpp b/src/Daemon/Settings.cpp
index cefd35a4..7f419ec5 100644
--- a/src/Daemon/Settings.cpp
+++ b/src/Daemon/Settings.cpp
@@ -228,6 +228,7 @@ static void ParseAnalyzerActionsAndReporters()
set_string_t::iterator it_keys = keys.begin();
for (; it_keys != keys.end(); it_keys++)
{
+ VERB2 log("AnalyzerActionsAndReporters['%s']=...", it_keys->c_str());
g_settings_mapAnalyzerActionsAndReporters[*it_keys] = actionsAndReporters;
}
}
diff --git a/src/Daemon/abrt.conf b/src/Daemon/abrt.conf
index e9845e58..f24ec4a8 100644
--- a/src/Daemon/abrt.conf
+++ b/src/Daemon/abrt.conf
@@ -10,20 +10,21 @@ OpenGPGPublicKeys = /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
# Blacklisted packages
BlackList = nspluginwrapper
# Enabled plugins. There has to be exactly one database plugin
-EnabledPlugins = SQLite3, CCpp, Logger, Kerneloops, KerneloopsScanner, KerneloopsReporter, Bugzilla, Python
+EnabledPlugins = SQLite3, CCpp, Logger, Kerneloops, KerneloopsScanner, KerneloopsReporter, Bugzilla, Python, RunApp
# Database
Database = SQLite3
# Max size for crash storage [MiB]
MaxCrashReportsSize = 1000
# Vector of actions and reporters which are activated immediately after a crash occurs
-# ActionsAndReporters = Mailx("[abrt] new crash was detected")
+#ActionsAndReporters = Mailx("[abrt] new crash was detected")
+# TODO: teach parser to escape \". Should be: x"`cat component`" = x"xorg-x11-server-Xorg"
+ActionsAndReporters = RunApp("test x`cat component` = xxorg-x11-server-Xorg && cp /var/log/Xorg*.log .")
# Reporters association with analyzers
[ AnalyzerActionsAndReporters ]
Kerneloops = KerneloopsReporter
CCpp = Bugzilla, Logger
Python = Bugzilla, Logger
-# CCpp : xorg-x11-apps = RunApp("date", "RunApp")
# Repeated calling of Action plugins
[ Cron ]