diff options
author | Nikola Pajkovsky <npajkovs@redhat.com> | 2009-10-29 15:20:56 +0100 |
---|---|---|
committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2009-10-29 15:20:56 +0100 |
commit | 7f10181be367d77e5f3203e938ab24cf722119df (patch) | |
tree | 2c5f02ed0e9174bc3483aee3d0b84f860c314aef /src/Daemon | |
parent | ad158666b7a144d557a9476408766a7bbf7ace9d (diff) | |
download | abrt-7f10181be367d77e5f3203e938ab24cf722119df.tar.gz abrt-7f10181be367d77e5f3203e938ab24cf722119df.tar.xz abrt-7f10181be367d77e5f3203e938ab24cf722119df.zip |
Normal user can see kerneloops and report it
Bugzilla memory leaks fix
Diffstat (limited to 'src/Daemon')
-rw-r--r-- | src/Daemon/Daemon.cpp | 27 | ||||
-rw-r--r-- | src/Daemon/MiddleWare.cpp | 3 | ||||
-rw-r--r-- | src/Daemon/abrt.conf | 2 |
3 files changed, 28 insertions, 4 deletions
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index d1ab188e..a6a4f93c 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -22,6 +22,7 @@ #include <glib.h> #include <pthread.h> #include <string> +#include <limits.h> #if HAVE_CONFIG_H #include <config.h> #endif @@ -555,14 +556,34 @@ static gboolean handle_event_cb(GIOChannel *gio, GIOCondition condition, gpointe log("New crash, saving..."); RunActionsAndReporters(crashinfo[CD_MWDDD][CD_CONTENT]); /* Send dbus signal */ - g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], crashinfo[CD_UID][CD_CONTENT]); + if(crashinfo[CD_MWANALYZER][CD_CONTENT] == "Kerneloops") + { + // When Kerneloops comes it will be sent uid with -1 + // Applet will detected and show normal user + std::cout << "New: package|kerneloops" << crashinfo[CD_PACKAGE][CD_CONTENT] << std::endl; + g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], to_string(UINT_MAX)); + } + else + { + g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], crashinfo[CD_UID][CD_CONTENT]); + } break; case MW_REPORTED: case MW_OCCURED: log("Already saved crash, deleting..."); /* Send dbus signal */ - g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], crashinfo[CD_UID][CD_CONTENT]); - DeleteDebugDumpDir(std::string(DEBUG_DUMPS_DIR) + "/" + name); + if(crashinfo[CD_MWANALYZER][CD_CONTENT] == "Kerneloops") + { + // When Kerneloops comes it will be sent uid with -1 + // Applet will detected and show normal user + std::cout << "New: package|kerneloops" << crashinfo[CD_PACKAGE][CD_CONTENT] << std::endl; + g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], to_string(UINT_MAX)); + } + else + { + g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], crashinfo[CD_UID][CD_CONTENT]); + } + //DeleteDebugDumpDir(std::string(DEBUG_DUMPS_DIR) + "/" + name); break; case MW_BLACKLISTED: case MW_CORRUPTED: diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index 2ccd5890..7c5bb412 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -710,6 +710,7 @@ mw_result_t GetCrashInfo(const std::string& pUUID, std::string package; std::string executable; std::string description; + std::string analyzer; try { @@ -718,6 +719,7 @@ mw_result_t GetCrashInfo(const std::string& pUUID, dd.LoadText(FILENAME_EXECUTABLE, executable); dd.LoadText(FILENAME_PACKAGE, package); dd.LoadText(FILENAME_DESCRIPTION, description); + dd.LoadText(FILENAME_ANALYZER, analyzer); } catch (CABRTException& e) { @@ -738,6 +740,7 @@ mw_result_t GetCrashInfo(const std::string& pUUID, add_crash_data_to_crash_info(pCrashInfo, CD_REPORTED, row.m_sReported); add_crash_data_to_crash_info(pCrashInfo, CD_MESSAGE, row.m_sMessage); add_crash_data_to_crash_info(pCrashInfo, CD_MWDDD, row.m_sDebugDumpDir); + add_crash_data_to_crash_info(pCrashInfo, CD_MWANALYZER, analyzer); return MW_OK; } diff --git a/src/Daemon/abrt.conf b/src/Daemon/abrt.conf index 1fe6123b..375fd277 100644 --- a/src/Daemon/abrt.conf +++ b/src/Daemon/abrt.conf @@ -30,4 +30,4 @@ Python = Bugzilla, Logger [ Cron ] # h:m - at h:m an action plugin is activated # s - every s seconds is an action plugin activated -120 = KerneloopsScanner +2 = KerneloopsScanner |