summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-10-21 15:38:26 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2009-10-21 15:38:26 +0200
commit520c3bb42371d2b461a031e5b783a62b66c0ad6f (patch)
tree652c78d016882d0265f1d54a9e826fc8aacf7724 /lib
parent4fdccf0281cb9158988e504151d6b7bfb89b465c (diff)
downloadabrt-520c3bb42371d2b461a031e5b783a62b66c0ad6f.tar.gz
abrt-520c3bb42371d2b461a031e5b783a62b66c0ad6f.tar.xz
abrt-520c3bb42371d2b461a031e5b783a62b66c0ad6f.zip
- 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
Diffstat (limited to 'lib')
-rw-r--r--lib/Plugins/SQLite3.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp
index 797ed2db..a2dc426f 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 "