summaryrefslogtreecommitdiffstats
path: root/src/daemon/MiddleWare.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-11-05 12:01:00 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2010-11-05 12:01:00 +0100
commit10b3bd86bf87b0dd7b3a47d486dc6c1c8d0d7ebe (patch)
tree596fd865bdf27e3bc2dadbd8df5069e0deb0c2de /src/daemon/MiddleWare.cpp
parentf98c188316201bca59e9befb0151924a62e00a46 (diff)
downloadabrt-10b3bd86bf87b0dd7b3a47d486dc6c1c8d0d7ebe.tar.gz
abrt-10b3bd86bf87b0dd7b3a47d486dc6c1c8d0d7ebe.tar.xz
abrt-10b3bd86bf87b0dd7b3a47d486dc6c1c8d0d7ebe.zip
make DebugDumpToCrashReport() fill CD_EVENTS
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/daemon/MiddleWare.cpp')
-rw-r--r--src/daemon/MiddleWare.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/daemon/MiddleWare.cpp b/src/daemon/MiddleWare.cpp
index 268b8cdb..cc21602b 100644
--- a/src/daemon/MiddleWare.cpp
+++ b/src/daemon/MiddleWare.cpp
@@ -69,15 +69,19 @@ static bool DebugDumpToCrashReport(const char *pDebugDumpDir, map_crash_data_t&
if (!dd_exist(dd, *v))
{
dd_close(dd);
- throw CABRTException(EXCEP_ERROR, "DebugDumpToCrashReport(): important file '%s' is missing", *v);
+ log("Important file '%s/%s' is missing", pDebugDumpDir, *v);
+ return false;
}
-
v++;
}
load_crash_data_from_debug_dump(dd, pCrashData);
+ char *events = list_possible_events(dd, NULL, "");
dd_close(dd);
+ add_to_crash_data_ext(pCrashData, CD_EVENTS, CD_SYS, CD_ISNOTEDITABLE, events);
+ free(events);
+
return true;
}
@@ -112,15 +116,17 @@ mw_result_t CreateCrashReport(const char *crash_id,
mw_result_t r = MW_OK;
- char caller_uid_str[sizeof(long) * 3 + 2];
- sprintf(caller_uid_str, "%li", caller_uid);
if (caller_uid != 0 /* not called by root */
&& row->db_inform_all[0] != '1'
- && strcmp(caller_uid_str, row->db_uid) != 0
) {
- error_msg("crash '%s' can't be accessed by user with uid %ld", crash_id, caller_uid);
- r = MW_IN_DB_ERROR;
- goto ret;
+ char caller_uid_str[sizeof(long) * 3 + 2];
+ sprintf(caller_uid_str, "%ld", caller_uid);
+ if (strcmp(caller_uid_str, row->db_uid) != 0)
+ {
+ error_msg("crash '%s' can't be accessed by user with uid %ld", crash_id, caller_uid);
+ r = MW_IN_DB_ERROR;
+ goto ret;
+ }
}
try