[abrt/f17] updated to latest upstream - fixed rhbz#808131
Jiří Moskovčák
jmoskovc at fedoraproject.org
Mon Apr 2 11:29:03 UTC 2012
commit 038b66d302a47396187c252d201130e7c0477eaa
Author: Jiri <moskovcak at gmail.com>
Date: Mon Apr 2 13:29:30 2012 +0200
updated to latest upstream - fixed rhbz#808131
.gitignore | 1 +
...rash-when-chowning-directory-using-dbus-c.patch | 28 ++++++
...e-helper-dir_accessible_by_uid-more-consi.patch | 97 ++++++++++++++++++++
abrt.spec | 14 +++-
sources | 2 +-
5 files changed, 139 insertions(+), 3 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0323266..e787f5b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ abrt-1.1.13.tar.gz
/abrt-2.0.6.tar.gz
/abrt-2.0.7.tar.gz
/abrt-2.0.9.tar.gz
+/abrt-2.0.10.tar.gz
diff --git a/0002-gui-fixed-crash-when-chowning-directory-using-dbus-c.patch b/0002-gui-fixed-crash-when-chowning-directory-using-dbus-c.patch
new file mode 100644
index 0000000..cfe7a97
--- /dev/null
+++ b/0002-gui-fixed-crash-when-chowning-directory-using-dbus-c.patch
@@ -0,0 +1,28 @@
+From 4776f9e6b84482047d75aa9b36ac5c4db29c06a0 Mon Sep 17 00:00:00 2001
+Message-Id: <4776f9e6b84482047d75aa9b36ac5c4db29c06a0.1333282746.git.jmoskovc at redhat.com>
+In-Reply-To: <fc91ca4433b373e57997d400cc413b4c3de09b7c.1333282746.git.jmoskovc at redhat.com>
+References: <fc91ca4433b373e57997d400cc413b4c3de09b7c.1333282746.git.jmoskovc at redhat.com>
+From: Jiri Moskovcak <jmoskovc at redhat.com>
+Date: Sun, 1 Apr 2012 01:04:27 +0200
+Subject: [PATCH 2/5] gui: fixed crash when chowning directory using dbus call
+
+---
+ src/gui-gtk/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gui-gtk/main.c b/src/gui-gtk/main.c
+index 02e5c48..e80d1c7 100644
+--- a/src/gui-gtk/main.c
++++ b/src/gui-gtk/main.c
+@@ -398,7 +398,7 @@ static gboolean on_focus_cb(
+
+ static int chown_dir_over_dbus(const char *problem_dir_path)
+ {
+- GError *error;
++ GError *error = NULL;
+ GDBusProxy * proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM,
+ G_DBUS_PROXY_FLAGS_NONE,
+ NULL,
+--
+1.7.9.3
+
diff --git a/0003-dbus-use-the-helper-dir_accessible_by_uid-more-consi.patch b/0003-dbus-use-the-helper-dir_accessible_by_uid-more-consi.patch
new file mode 100644
index 0000000..732b214
--- /dev/null
+++ b/0003-dbus-use-the-helper-dir_accessible_by_uid-more-consi.patch
@@ -0,0 +1,97 @@
+From 9cade723ad0d267aaae2aa93bfb8288e2d7a1ba8 Mon Sep 17 00:00:00 2001
+Message-Id: <9cade723ad0d267aaae2aa93bfb8288e2d7a1ba8.1333282746.git.jmoskovc at redhat.com>
+In-Reply-To: <fc91ca4433b373e57997d400cc413b4c3de09b7c.1333282746.git.jmoskovc at redhat.com>
+References: <fc91ca4433b373e57997d400cc413b4c3de09b7c.1333282746.git.jmoskovc at redhat.com>
+From: Jiri Moskovcak <jmoskovc at redhat.com>
+Date: Sun, 1 Apr 2012 13:41:39 +0200
+Subject: [PATCH 3/5] dbus: use the helper dir_accessible_by_uid() more
+ consistently
+
+---
+ src/dbus/abrt-dbus.c | 44 +++++++++++++++-----------------------------
+ 1 file changed, 15 insertions(+), 29 deletions(-)
+
+diff --git a/src/dbus/abrt-dbus.c b/src/dbus/abrt-dbus.c
+index e72cd30..0c7af5c 100644
+--- a/src/dbus/abrt-dbus.c
++++ b/src/dbus/abrt-dbus.c
+@@ -144,7 +144,7 @@ static int dir_accessible_by_uid(const char* dir_path, uid_t uid)
+ struct stat statbuf;
+ if (stat(dir_path, &statbuf) == 0 && S_ISDIR(statbuf.st_mode))
+ {
+- if (uid == 0 || uid_in_group(uid, statbuf.st_gid))
++ if (uid == 0 || (statbuf.st_mode & S_IROTH) || uid_in_group(uid, statbuf.st_gid))
+ {
+ VERB1 log("caller has access to the requested directory %s", dir_path);
+ return 1;
+@@ -293,28 +293,15 @@ static void handle_method_call(GDBusConnection *connection,
+ return;
+ }
+
+- struct stat statbuf;
+- errno = 0;
+- if (stat(problem_dir, &statbuf) == 0 && S_ISDIR(statbuf.st_mode))
+- {
+- if (caller_uid == 0 || uid_in_group(caller_uid, statbuf.st_gid)) //caller seems to be in group with access to this dir, so no action needed
+- {
+- VERB1 log("caller has access to the requested directory %s", problem_dir);
+- g_dbus_method_invocation_return_value(invocation, NULL);
+- dd_close(dd);
+- return;
+- }
+-
+- }
+- else
++ if(dir_accessible_by_uid(problem_dir, caller_uid)) //caller seems to be in group with access to this dir, so no action needed
+ {
+- g_dbus_method_invocation_return_dbus_error(invocation,
+- "org.freedesktop.problems.StatFailure",
+- strerror(errno));
++ VERB1 log("caller has access to the requested directory %s", problem_dir);
++ g_dbus_method_invocation_return_value(invocation, NULL);
+ dd_close(dd);
+ return;
+ }
+
++
+ if (polkit_check_authorization_dname(caller, "org.freedesktop.problems.getall") != PolkitYes)
+ {
+ VERB1 log("not authorized");
+@@ -329,6 +316,15 @@ static void handle_method_call(GDBusConnection *connection,
+ if (pwd)
+ {
+ errno = 0;
++ struct stat statbuf;
++ if (!(stat(problem_dir, &statbuf) == 0 && S_ISDIR(statbuf.st_mode)))
++ {
++ g_dbus_method_invocation_return_dbus_error(invocation,
++ "org.freedesktop.problems.StatFailure",
++ strerror(errno));
++ return;
++ }
++
+ chown_res = chown(problem_dir, statbuf.st_uid, pwd->pw_gid);
+ dd_init_next_file(dd);
+ char *short_name, *full_name;
+@@ -361,17 +357,7 @@ static void handle_method_call(GDBusConnection *connection,
+
+ GVariantBuilder *builder;
+
+- struct stat statbuf;
+- errno = 0;
+- if (stat(problem_dir, &statbuf) != 0)
+- {
+- g_dbus_method_invocation_return_dbus_error(invocation,
+- "org.freedesktop.problems.GetInfoError",
+- strerror(errno));
+- return;
+- }
+-
+- if (!uid_in_group(caller_uid, statbuf.st_gid))
++ if (!dir_accessible_by_uid(problem_dir, caller_uid))
+ {
+ if (polkit_check_authorization_dname(caller, "org.freedesktop.problems.getall") != PolkitYes)
+ {
+--
+1.7.9.3
+
diff --git a/abrt.spec b/abrt.spec
index 55d3e29..ba10530 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -24,7 +24,7 @@
Summary: Automatic bug detection and reporting tool
Name: abrt
-Version: 2.0.9
+Version: 2.0.10
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
@@ -34,6 +34,8 @@ Source1: abrt1_to_abrt2
Patch0: abrt-rhelkeys.patch
Patch1: blacklist.patch
Patch2: abrt_disable_gpgcheck.diff
+Patch3: 0002-gui-fixed-crash-when-chowning-directory-using-dbus-c.patch
+Patch4: 0003-dbus-use-the-helper-dir_accessible_by_uid-more-consi.patch
BuildRequires: dbus-devel
BuildRequires: gtk2-devel
BuildRequires: rpm-devel >= 4.6
@@ -48,7 +50,7 @@ BuildRequires: libtool
BuildRequires: nss-devel
BuildRequires: asciidoc
BuildRequires: xmlto
-BuildRequires: libreport-devel > 2.0.6
+BuildRequires: libreport-devel >= 2.0.10-2
BuildRequires: btparser-devel
BuildRequires: elfutils-devel
BuildRequires: elfutils-libelf-devel
@@ -90,6 +92,7 @@ Development libraries and headers for %{name}.
Summary: %{name}'s gui
Group: User Interface/Desktops
Requires: %{name} = %{version}-%{release}
+Requires: %{name}-dbus = %{version}-%{release}
BuildRequires: libreport-gtk-devel
# we used to have abrt-applet, now abrt-gui includes it:
Provides: abrt-applet = %{version}-%{release}
@@ -232,6 +235,8 @@ uses PolicyKit to authorize to access the problem data.
#Fedora
%patch1 -p1 -b .blacklist
%patch2 -p1 -b .gpgcheck
+%patch3 -p1
+%patch4 -p1
%build
autoconf
@@ -632,6 +637,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/polkit-1/actions/abrt_polkit.policy
%changelog
+* Mon Apr 02 2012 Jiri Moskovcak <jmoskovc at redhat.com> 2.0.10-1
+- new upstream release
+- fixed problem with empty problem directory rhzb#808131
+- Resolves: #808131
+
* Mon Mar 19 2012 Jiri Moskovcak <jmoskovc at redhat.com> 2.0.7-7
- fixed problems with rhel gpg keys rhbz#800419
diff --git a/sources b/sources
index ae25664..1c2b942 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-29598a2d5851ed820b1b5b030b8e9a42 abrt-2.0.9.tar.gz
+82109d1d6d216a7e28a581190b89c1e7 abrt-2.0.10.tar.gz
More information about the scm-commits
mailing list