diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Plugins/SQLite3.cpp | 12 | ||||
-rw-r--r-- | lib/Utils/DebugDump.cpp | 4 | ||||
-rw-r--r-- | lib/Utils/DebugDump.h | 3 |
3 files changed, 10 insertions, 9 deletions
diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp index 200a8131..dc035d30 100644 --- a/lib/Plugins/SQLite3.cpp +++ b/lib/Plugins/SQLite3.cpp @@ -99,7 +99,7 @@ bool CSQLite3::Exist(const std::string& pUUID, const std::string& pUID) GetTable("SELECT "DATABASE_COLUMN_REPORTED" FROM "ABRT_TABLE" WHERE " DATABASE_COLUMN_UUID" = '"+pUUID+"' " "AND ("DATABASE_COLUMN_UID" = '"+pUID+"' " - "OR "DATABASE_COLUMN_UID" = '"+to_string(UINT_MAX)+"');" + "OR "DATABASE_COLUMN_UID" = '-1');" , table); if (table.empty()) { @@ -315,7 +315,7 @@ void CSQLite3::Delete(const std::string& pUUID, const std::string& pUID) Exec("DELETE FROM "ABRT_TABLE" " "WHERE "DATABASE_COLUMN_UUID" = '"+pUUID+"' " "AND "DATABASE_COLUMN_UID" = '"+pUID+"' " - "OR "DATABASE_COLUMN_UID" = '"+to_string(UINT_MAX)+"';"); + "OR "DATABASE_COLUMN_UID" = '-1';"); } else { @@ -340,12 +340,12 @@ void CSQLite3::SetReported(const std::string& pUUID, const std::string& pUID, co "SET "DATABASE_COLUMN_REPORTED" = 1 " "WHERE "DATABASE_COLUMN_UUID" = '"+pUUID+"' " "AND ("DATABASE_COLUMN_UID" = '"+pUID+"' " - "OR "DATABASE_COLUMN_UID" = '"+to_string(UINT_MAX)+"');"); + "OR "DATABASE_COLUMN_UID" = '-1');"); Exec("UPDATE "ABRT_TABLE" " "SET "DATABASE_COLUMN_MESSAGE" = '" + pMessage + "' " "WHERE "DATABASE_COLUMN_UUID" = '"+pUUID+"' " "AND ("DATABASE_COLUMN_UID" = '"+pUID+"' " - "OR "DATABASE_COLUMN_UID" = '"+to_string(UINT_MAX)+"');"); + "OR "DATABASE_COLUMN_UID" = '-1');"); } else { @@ -364,7 +364,7 @@ vector_database_rows_t CSQLite3::GetUIDData(const std::string& pUID) { GetTable("SELECT * FROM "ABRT_TABLE " WHERE "DATABASE_COLUMN_UID" = '"+pUID+"' " - "OR "DATABASE_COLUMN_UID" = '"+to_string(UINT_MAX)+"';", + "OR "DATABASE_COLUMN_UID" = '-1';", table); } return table; @@ -385,7 +385,7 @@ database_row_t CSQLite3::GetUUIDData(const std::string& pUUID, const std::string GetTable("SELECT * FROM "ABRT_TABLE" " "WHERE "DATABASE_COLUMN_UUID" = '"+pUUID+"' " "AND ("DATABASE_COLUMN_UID" = '"+pUID+"' " - "OR "DATABASE_COLUMN_UID" = '"+to_string(UINT_MAX)+"');", + "OR "DATABASE_COLUMN_UID" = '-1');", table); } diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp index f5c73190..d5eeb777 100644 --- a/lib/Utils/DebugDump.cpp +++ b/lib/Utils/DebugDump.cpp @@ -208,7 +208,7 @@ void CDebugDump::UnLock() } } -void CDebugDump::Create(const std::string& pDir, uid_t uid) +void CDebugDump::Create(const std::string& pDir, uint64_t uid) { if (m_bOpened) { @@ -245,7 +245,7 @@ void CDebugDump::Create(const std::string& pDir, uid_t uid) perror_msg("can't change '%s' ownership to %u:%u", m_sDebugDumpDir.c_str(), (int)uid, (int)gid); } - SaveText(FILENAME_UID, ssprintf("%u", (int)uid)); + SaveText(FILENAME_UID, ssprintf("%li", uid)); SaveKernelArchitectureRelease(); SaveTime(); } diff --git a/lib/Utils/DebugDump.h b/lib/Utils/DebugDump.h index 687bac7d..fae64203 100644 --- a/lib/Utils/DebugDump.h +++ b/lib/Utils/DebugDump.h @@ -25,6 +25,7 @@ #include <string> #include <dirent.h> +#include <stdint.h> #define FILENAME_ARCHITECTURE "architecture" #define FILENAME_KERNEL "kernel" @@ -60,7 +61,7 @@ class CDebugDump ~CDebugDump() { Close(); } void Open(const std::string& pDir); - void Create(const std::string& pDir, uid_t nUID); + void Create(const std::string& pDir, uint64_t uid); void Delete(); void Close(); |