From 520c3bb42371d2b461a031e5b783a62b66c0ad6f Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Wed, 21 Oct 2009 15:38:26 +0200 Subject: - fixed case when root couldn't properly report others bugs - if root reports other bugs the SetReported() failed because it was looking for dump using UUID and UID which doesn't work for root, so I changed it to use only UUID if abrt-gui is run by root --- lib/Plugins/SQLite3.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/Plugins/SQLite3.cpp') diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp index 797ed2d..a2dc426 100644 --- a/lib/Plugins/SQLite3.cpp +++ b/lib/Plugins/SQLite3.cpp @@ -321,7 +321,16 @@ void CSQLite3::Delete(const std::string& pUUID, const std::string& pUID) void CSQLite3::SetReported(const std::string& pUUID, const std::string& pUID, const std::string& pMessage) { - if (Exist(pUUID, pUID)) + if(pUID == "0") + { + Exec("UPDATE "ABRT_TABLE" " + "SET "DATABASE_COLUMN_REPORTED" = 1 " + "WHERE "DATABASE_COLUMN_UUID" = '"+pUUID+"';"); + Exec("UPDATE "ABRT_TABLE" " + "SET "DATABASE_COLUMN_MESSAGE" = '" + pMessage + "' " + "WHERE "DATABASE_COLUMN_UUID" = '"+pUUID+"';"); + } + else if (Exist(pUUID, pUID)) { Exec("UPDATE "ABRT_TABLE" " "SET "DATABASE_COLUMN_REPORTED" = 1 " -- cgit