diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-03-04 16:19:31 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-03-04 16:19:31 +0100 |
commit | afb30fe1502e9c45b722da3b5c09e292d589aa7f (patch) | |
tree | 8f0429ccc50987a34e73899c0a724ff6e0205c93 /src/Daemon/MiddleWare.h | |
parent | 892b7fde75cafca50a18dcb8620ddc22b2e74688 (diff) | |
download | abrt-afb30fe1502e9c45b722da3b5c09e292d589aa7f.tar.gz abrt-afb30fe1502e9c45b722da3b5c09e292d589aa7f.tar.xz abrt-afb30fe1502e9c45b722da3b5c09e292d589aa7f.zip |
*: UID:UUID -> crash_id conversion
This fixes at least three instances where we did not check whether
user is even allowed to report or delete a crash.
Also fixes a few cases when root might inadvertently act on (e.g. delete)
mote than one crash.
Renamed FILENAME_UID to CD_UID - makes more sense this way.
Added COL_INFORMALL and CD_INFORMALL. Nuked UID == -1 hacks.
Renamed getReport() to start_job on Python side.
Dropped a few unused parameters from server -> client dbus signals.
Fixed CLI's way of reverencing crashes (see updated help text).
Run-tested (GUI and CLI).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Acked-by: Nikola Pajkovsky <npajkovs@redhat.com>
Diffstat (limited to 'src/Daemon/MiddleWare.h')
-rw-r--r-- | src/Daemon/MiddleWare.h | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/Daemon/MiddleWare.h b/src/Daemon/MiddleWare.h index 94f9fb99..275d5312 100644 --- a/src/Daemon/MiddleWare.h +++ b/src/Daemon/MiddleWare.h @@ -29,8 +29,8 @@ * An enum contains all return codes. */ typedef enum { - MW_ERROR, /**< Common error.*/ MW_OK, /**< No error.*/ + MW_ERROR, /**< Common error.*/ MW_BLACKLISTED, /**< Package is blacklisted.*/ MW_CORRUPTED, /**< Debugdump directory is corrupted.*/ MW_PACKAGE_ERROR, /**< Cannot determine package name.*/ @@ -62,8 +62,8 @@ void LoadOpenGPGPublicKey(const char* key); * @param pCrashData A filled crash report. * @return It return results of operation. See mw_result_t. */ -mw_result_t CreateCrashReport(const char *pUUID, - const char *pUID, +mw_result_t CreateCrashReport(const char *crash_id, + long caller_uid, int force, map_crash_data_t& pCrashData); /** @@ -93,16 +93,7 @@ void RunActionsAndReporters(const char *pDebugDumpDir); */ report_status_t Report(const map_crash_data_t& pCrashData, map_map_string_t& pSettings, - const char *pUID); -/** - * Get debugdump direcotory. If debugdump is not found - * in database it will return empty string. - * @param pUUID A local UUID of a crash. - * @param pUID An UID of an user. - * @return A debugdump directory. - */ -std::string getDebugDumpDir( const char *pUUID, - const char *pUID); + long caller_uid); /** * Adds package name and description to debugdump dir. * Saves debugdump into database. @@ -123,8 +114,7 @@ mw_result_t SaveDebugDump(const char *pDebugDumpDir, * @param pCrashData A crash info. * @return It return results of operation. See mw_result_t. */ -mw_result_t FillCrashInfo(const char *pUUID, - const char *pUID, +mw_result_t FillCrashInfo(const char *crash_id, map_crash_data_t& pCrashData); /** * Gets all local UUIDs and UIDs of crashes. These crashes @@ -132,7 +122,7 @@ mw_result_t FillCrashInfo(const char *pUUID, * @param pUID an UID of an user. * @return A vector of pairs (local UUID, UID). */ -vector_pair_string_string_t GetUUIDsOfCrash(const char *pUID); +void GetUUIDsOfCrash(long caller_uid, vector_string_t &result); /** * Adds one association among alanyzer plugin and its * action and reporter plugins. |