[PATCH] core-backtrace: make sure kernel version does not contain spaces
by Michal Toman
---
src/plugins/abrt-action-generate-core-backtrace.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/plugins/abrt-action-generate-core-backtrace.c b/src/plugins/abrt-action-generate-core-backtrace.c
index 9010aaf..8dbac12 100644
--- a/src/plugins/abrt-action-generate-core-backtrace.c
+++ b/src/plugins/abrt-action-generate-core-backtrace.c
@@ -159,6 +159,10 @@ int main(int argc, char **argv)
backtrace = btp_parse_python_backtrace(txt_backtrace);
else if (strcmp(analyzer, "Kerneloops") == 0 || strcmp(analyzer, "vmcore") == 0)
{
+ char *space = strchr(kernel, ' ');
+ if (space)
+ *space = '\0';
+
backtrace = btp_parse_kerneloops(txt_backtrace, kernel);
oops_add_question_marks(backtrace);
}
--
1.7.1
11 years, 6 months
[PATCH] core-backtrace: also include '?' flag for oops
by Michal Toman
---
src/plugins/abrt-action-generate-core-backtrace.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/src/plugins/abrt-action-generate-core-backtrace.c b/src/plugins/abrt-action-generate-core-backtrace.c
index 1be46ad..9010aaf 100644
--- a/src/plugins/abrt-action-generate-core-backtrace.c
+++ b/src/plugins/abrt-action-generate-core-backtrace.c
@@ -25,6 +25,20 @@
static bool raw_fingerprints = false;
+static void oops_add_question_marks(GList *backtrace)
+{
+ GList *elem = backtrace;
+ struct backtrace_entry *entry;
+ while (elem)
+ {
+ entry = (struct backtrace_entry *)elem->data;
+ if (entry->function_initial_loc)
+ entry->fingerprint = btp_strdup("?");
+
+ elem = g_list_next(elem);
+ }
+}
+
static void hash_fingerprints(GList *backtrace)
{
GList *elem = backtrace;
@@ -144,7 +158,10 @@ int main(int argc, char **argv)
else if (strcmp(analyzer, "Python") == 0)
backtrace = btp_parse_python_backtrace(txt_backtrace);
else if (strcmp(analyzer, "Kerneloops") == 0 || strcmp(analyzer, "vmcore") == 0)
+ {
backtrace = btp_parse_kerneloops(txt_backtrace, kernel);
+ oops_add_question_marks(backtrace);
+ }
else
error_msg_and_die(_("Core-backtraces are not supported for '%s'"), analyzer);
--
1.7.1
11 years, 6 months
[LIBREPORT PATCH] check D-Bus err name without leaking nor crashing
by Jakub Filak
- closes: rhbz#863595
Signed-off-by: Jakub Filak <jfilak(a)redhat.com>
---
src/gtk-helpers/secrets.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/gtk-helpers/secrets.c b/src/gtk-helpers/secrets.c
index 5279ac2..0627110 100644
--- a/src/gtk-helpers/secrets.c
+++ b/src/gtk-helpers/secrets.c
@@ -184,6 +184,21 @@ static GVariant *dbus_call_sync(GDBusProxy *proxy, const gchar *method, GVariant
return resp;
}
+/* Compares D-Bus error name against a name passsed as type argument
+ *
+ * @param error an error occured in any D-Bus method
+ * @param type a checked error type
+ * @returns true if a D-Bus name of error param equals to a value of type param
+ */
+static bool is_dbus_remote_error(GError *error, const char *type)
+{
+ /* returns a malloced string and return value can be NULL */
+ char *remote_type = g_dbus_error_get_remote_error(error);
+ const bool result = remote_type && strcmp(type, remote_type) == 0;
+ g_free(remote_type);
+ return result;
+}
+
/******************************************************************************/
/* struct secrets_object */
/******************************************************************************/
@@ -695,7 +710,7 @@ static bool secrets_service_read_alias(const char *alias, struct secrets_object
/* return TRUE if collection was not found or if collection object is not NULL */
return !found || *collection;
}
- else if (strcmp(NOT_IMPLEMENTED_READ_ALIAS_ERROR, g_dbus_error_get_remote_error(error)) == 0)
+ else if (is_dbus_remote_error(error, NOT_IMPLEMENTED_READ_ALIAS_ERROR))
{
/* this code branch can be safely removed if KSecrets provides ReadAlias method*/
VERB1 log("D-Bus Secrets Service ReadAlias method failed,"
@@ -940,7 +955,7 @@ static bool secrets_collection_create_text_item(struct secrets_object *collectio
if (error)
{
- if (strcmp(INVALID_PROPERTIES_ARGUMENTS_ERROR, g_dbus_error_get_remote_error(error)) == 0)
+ if (is_dbus_remote_error(error, INVALID_PROPERTIES_ARGUMENTS_ERROR))
{ /* it is OK - we know this error and we can safely continue */
VERB2 log("CreateItem failed, going to use other property names: %s", error->message);
continue;
@@ -1127,7 +1142,7 @@ static void load_event_options_from_item(GDBusProxy *session,
{ /* if the error is NOT the known error produced by the gnome-keyring */
/* when no secret value is assigned to an item */
/* then let you user known that the error occurred */
- if(strcmp(GNOME_KEYRING_NOT_HAVING_SECRET_ERROR, g_dbus_error_get_remote_error(error)) != 0)
+ if (is_dbus_remote_error(error, GNOME_KEYRING_NOT_HAVING_SECRET_ERROR))
error_msg(_("can't get secret value: %s"), error->message);
else
{
--
1.7.11.4
11 years, 7 months
[Automatic Bug Reporting Tool - ABRT] #768: send uReport from abrt applet
by fedora-badges
#768: send uReport from abrt applet
--------------------+------------------------------
Reporter: jfilak | Owner: crash-catcher@…
Type: task | Status: new
Priority: major | Milestone: Autoreporting
Component: applet | Version:
Keywords: | Blocked By:
Blocking: |
--------------------+------------------------------
In the current implementation a click on the "report" button immediately
executes the 'report-gui' event. By default the event sends an uReport on
FAF server and the server provides information about the problem. The
report gui eventually continues with reporting to bugzilla or shows the
information returned by the server.
The decissioning made by the reporting gui should be moved to the applet.
If autoreporting is enabled, the applet will show URL to FAF or will offer
reporting a new bug.
If autoreporting is not enabled, the applet will ask to send uReport. If
the problem is known, the applet shows URL; otherwise starts reporting of
a new bug.
Problems:
- how to handle unavailable network
--
Ticket URL: <https://fedorahosted.org/abrt/ticket/768>
Automatic Bug Reporting Tool - ABRT <http://fedorahoted.org/abrt/>
Automatic bug reporting tool
11 years, 7 months
[PATCH] retrace-client: check whether all sent files are regular
by Michal Toman
---
src/plugins/abrt-retrace-client.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/plugins/abrt-retrace-client.c b/src/plugins/abrt-retrace-client.c
index db3023f..d46544f 100644
--- a/src/plugins/abrt-retrace-client.c
+++ b/src/plugins/abrt-retrace-client.c
@@ -453,9 +453,14 @@ static int create(bool delete_temp_archive,
xfunc_die();
}
- unpacked_size += (long long)file_stat.st_size;
free(path);
+ if (!S_ISREG(file_stat.st_mode))
+ error_msg_and_die(_("'%s' must be a regular file in "
+ "order to use Retrace server."),
+ required_files[i]);
+
+ unpacked_size += (long long)file_stat.st_size;
++i;
}
--
1.7.1
11 years, 7 months