From 666600c6bbc0d1064f434d5113a8efc9144e0de6 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Mon, 8 Feb 2010 11:19:32 +0100 Subject: changed lock name in init script to make rpmlint happy --- abrt.init | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/abrt.init b/abrt.init index f1dc410..6256767 100644 --- a/abrt.init +++ b/abrt.init @@ -16,7 +16,8 @@ # Source function library. . /etc/rc.d/init.d/functions - +ABRT_BIN="/usr/sbin/abrtd" +LOCK="/var/lock/subsys/abrtd" RETVAL=0 # @@ -28,7 +29,7 @@ check() { [ `id -u` = 0 ] || exit 4 # Check if abrt is executable - test -x /usr/sbin/abrtd || exit 5 + test -x $ABRT_BIN || exit 5 } start() { @@ -36,11 +37,11 @@ start() { check # Check if it is already running - if [ ! -f /var/lock/subsys/abrt ]; then + if [ ! -f $LOCK ]; then echo -n $"Starting abrt daemon: " - daemon /usr/sbin/abrtd + daemon $ABRT_BIN RETVAL=$? - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/abrt + [ $RETVAL -eq 0 ] && touch $LOCK echo fi return $RETVAL @@ -51,9 +52,9 @@ stop() { check echo -n $"Stopping abrt daemon: " - killproc /usr/sbin/abrtd + killproc $ABRT_BIN RETVAL=$? - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/abrt + [ $RETVAL -eq 0 ] && rm -f $LOCK echo return $RETVAL } @@ -86,7 +87,7 @@ restart) restart ;; condrestart) - if [ -f /var/lock/subsys/abrt ]; then + if [ -f $LOCK ]; then restart fi ;; -- cgit From b716fe885307411abcb9dea18dd2982fecd26d8c Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 8 Feb 2010 11:50:35 +0100 Subject: remove binary files from report if client did not include them This is not used at the moment, but will be needed when GUI will reinstate "Attachments" checkboxes Signed-off-by: Denys Vlasenko --- src/Daemon/MiddleWare.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index e0687fd..3e1b1ea 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -414,6 +414,25 @@ report_status_t Report(const map_crash_data_t& client_report, } } + /* Remove BIN filenames from stored_report if they are not present in client's data */ + map_crash_data_t::const_iterator its = stored_report.begin(); + while (its != stored_report.end()) + { + if (its->second[CD_TYPE] == CD_BIN) + { + std::string key = its->first; + if (get_crash_data_item_content_or_NULL(client_report, key.c_str()) == NULL) + { + /* client does not have it -> does not want it passed to reporters */ + VERB3 log("Won't report BIN file %s:'%s'", key.c_str(), its->second[CD_CONTENT].c_str()); + its++; /* move off the element we will erase */ + stored_report.erase(key); + continue; + } + } + its++; + } + const std::string& analyzer = get_crash_data_item_content(stored_report, FILENAME_ANALYZER); std::string dup_hash = GetGlobalUUID(analyzer.c_str(), pDumpDir.c_str()); -- cgit From 3406715e343774dfc0329c81f35fcfdd4e23ff10 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 8 Feb 2010 11:52:28 +0100 Subject: remove autoreport hack, re-enable proper code for it Signed-off-by: Denys Vlasenko --- src/Daemon/MiddleWare.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index 3e1b1ea..28066f5 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -752,10 +752,6 @@ bool analyzer_has_AutoReportUIDs(const char *analyzer_name, const char *uid_str) if (it == settings.end()) return false; - if ((strcmp(analyzer_name, "Kerneloops") == 0) && (strcmp(uid_str, "-1") == 0)) - return true; - -/* vector_string_t logins; parse_args(it->second.c_str(), logins); @@ -769,7 +765,7 @@ bool analyzer_has_AutoReportUIDs(const char *analyzer_name, const char *uid_str) if (pw->pw_uid == uid) return true; } -*/ + return false; } -- cgit