diff options
| author | Karel Klic <kklic@redhat.com> | 2009-11-30 16:43:13 +0100 |
|---|---|---|
| committer | Karel Klic <kklic@redhat.com> | 2009-11-30 16:43:13 +0100 |
| commit | 49c4d359ff6d5332f60c090ad2c26a9a39086014 (patch) | |
| tree | 7f8ff0bd74fc842b5578d27399511aa6c2ec6d58 /src/Daemon | |
| parent | 277c2b79dd8d4bfa9eac979bcb51dc050ff1627b (diff) | |
| parent | ccffe86678210568449c6a6345ae5d6dc20ef104 (diff) | |
| download | abrt-49c4d359ff6d5332f60c090ad2c26a9a39086014.tar.gz abrt-49c4d359ff6d5332f60c090ad2c26a9a39086014.tar.xz abrt-49c4d359ff6d5332f60c090ad2c26a9a39086014.zip | |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src/Daemon')
| -rw-r--r-- | src/Daemon/Daemon.cpp | 2 | ||||
| -rw-r--r-- | src/Daemon/MiddleWare.cpp | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index 0e80c25..666a756 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -495,7 +495,7 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin /* Send dbus signal */ { // I don't see any usable usecase for other plugin to be able automatic report. - if (analyzer_has_AutoReportUIDs(/*crashinfo[CD_MWANALYZER][CD_CONTENT].c_str()*/"Kerneloops",crashinfo[CD_UID][CD_CONTENT].c_str())) + if (analyzer_has_AutoReportUIDs(crashinfo[CD_MWANALYZER][CD_CONTENT].c_str(), crashinfo[CD_UID][CD_CONTENT].c_str())) { map_crash_report_t crash_report; VERB3 log("Create autoreport for user with uid %s",crashinfo[CD_UID][CD_CONTENT].c_str()); diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index 69d36bf..7b0eea5 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -656,6 +656,7 @@ bool analyzer_has_InformAllUsers(const char *analyzer_name) bool analyzer_has_AutoReportUIDs(const char *analyzer_name, const char* uid) { + CAnalyzer* analyzer = g_pPluginManager->GetAnalyzer(analyzer_name); if (!analyzer) { @@ -667,6 +668,10 @@ bool analyzer_has_AutoReportUIDs(const char *analyzer_name, const char* uid) if (it == settings.end()) return false; + if ((strcmp(analyzer_name, "Kerneloops") == 0) && (strcmp(uid, "-1") == 0)) + return true; + +/* vector_string_t logins; parse_args(it->second.c_str(), logins); @@ -674,19 +679,16 @@ bool analyzer_has_AutoReportUIDs(const char *analyzer_name, const char* uid) if (size == 0) return false; - if ((strcmp(analyzer_name, "Kerneloops") == 0) && (strcmp(uid, "-1") == 0)) - return true; - uid_t id; for (uint32_t ii = 0; ii < size; ii++) { - if (!xgetpwnam(logins[ii].c_str(), &id)) + if (!getuidbyname(logins[ii].c_str(), &id)) continue; if (strcmp(uid, to_string(id).c_str()) == 0) return true; } - +*/ return false; } |
