configure analyze retrace event with sending-sensitive-data opition

This commit is contained in:
Jakub Filak 2012-08-10 14:06:41 +02:00
parent a775d06e45
commit de53221e71
3 changed files with 93 additions and 1 deletions

View File

@ -25,7 +25,7 @@
Summary: Automatic bug detection and reporting tool
Name: abrt
Version: 2.0.11
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2+
Group: Applications/System
URL: https://fedorahosted.org/abrt/
@ -34,6 +34,8 @@ Source1: abrt1_to_abrt2
Patch0: abrt-rhelkeys.patch
Patch1: blacklist.patch
Patch2: abrt_disable_gpgcheck.diff
Patch3: no_elements_abrt_dbus_crash_fix.patch
Patch4: analyze_retrace_sensitive_data_configuration.patch
BuildRequires: dbus-devel
BuildRequires: gtk3-devel
BuildRequires: rpm-devel >= 4.6
@ -247,6 +249,8 @@ uses PolicyKit to authorize to access the problem data.
#Fedora
%patch1 -p1 -b .blacklist
%patch2 -p1 -b .gpgcheck
%patch3 -p1 -b .noelements
%patch4 -p1 -b .senstive
%build
autoconf
@ -644,6 +648,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/polkit-1/actions/abrt_polkit.policy
%changelog
* Fri Aug 10 2012 Jakub Filak <jfilak@redhat.com> 2.0.11-2
- fix abrt-dbus crash if no element is found in GetInfo()
- set sending-sensitive-data option to 'yes' for analyze_RetraceServer event
* Thu Aug 02 2012 Jiri Moskovcak <jmoskovc@redhat.com> 2.0.11-1
- new upstream release
- Resolves: #622773, #741222, #823299, #825116, #826058, #826800, #831333, #832085, #838842

View File

@ -0,0 +1,26 @@
From e5d7e2e0f3aa9047e1b7268965021b91b29d76e2 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Fri, 10 Aug 2012 13:13:18 +0200
Subject: [PATCH 6/6] set sending-sensitive-data option to 'yes' for
analyze_RetraceServer event
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/plugins/analyze_RetraceServer.xml.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/plugins/analyze_RetraceServer.xml.in b/src/plugins/analyze_RetraceServer.xml.in
index a2ca859..e437cac 100644
--- a/src/plugins/analyze_RetraceServer.xml.in
+++ b/src/plugins/analyze_RetraceServer.xml.in
@@ -8,6 +8,7 @@
</_long-description>
<creates-items>backtrace</creates-items>
<gui-review-elements>no</gui-review-elements>
+ <sending-sensitive-data>yes</sending-sensitive-data>
<options>
<option type="text" name="RETRACE_SERVER_URL">
<_label>Retrace server URL</_label>
--
1.7.11.2

View File

@ -0,0 +1,58 @@
From 1a9cd8817eb80b2e47a989a1fc5d14292800542e Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Thu, 9 Aug 2012 13:58:49 +0200
Subject: [PATCH 3/6] fix abrt-dbus crash if no element is found in GetInfo()
* g_variant_new() calls g_variant_builder_end() internally
"...
It is also an error to call this function if the builder was created
with an indefinite array or maybe type and no children have been added
..."
[g_variant_builder_end() glib-2.32 documentation]
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/dbus/abrt-dbus.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/dbus/abrt-dbus.c b/src/dbus/abrt-dbus.c
index e4a3689..4302b4f 100644
--- a/src/dbus/abrt-dbus.c
+++ b/src/dbus/abrt-dbus.c
@@ -579,7 +579,7 @@ static void handle_method_call(GDBusConnection *connection,
GList *elements = string_list_from_variant(array);
g_variant_unref(array);
- GVariantBuilder *builder = g_variant_builder_new(G_VARIANT_TYPE_ARRAY);
+ GVariantBuilder *builder = NULL;
for (GList *l = elements; l; l = l->next)
{
const char *element_name = (const char*)l->data;
@@ -590,6 +590,9 @@ static void handle_method_call(GDBusConnection *connection,
VERB1 log("element '%s' %s", element_name, value ? "fetched" : "not found");
if (value)
{
+ if (!builder)
+ builder = g_variant_builder_new(G_VARIANT_TYPE_ARRAY);
+
/* g_variant_builder_add makes a copy. No need to xstrdup here */
g_variant_builder_add(builder, "{ss}", element_name, value);
free(value);
@@ -597,8 +600,12 @@ static void handle_method_call(GDBusConnection *connection,
}
list_free_with_free(elements);
dd_close(dd);
+ /* It is OK to call g_variant_new("(a{ss})", NULL) because */
+ /* G_VARIANT_TYPE_TUPLE allows NULL value */
GVariant *response = g_variant_new("(a{ss})", builder);
- g_variant_builder_unref(builder);
+
+ if (builder)
+ g_variant_builder_unref(builder);
VERB2 log("GetInfo: returning value for '%s'", problem_dir);
g_dbus_method_invocation_return_value(invocation, response);
--
1.7.11.2