- Fix bug in detecting when a PolicyKit error is returned (#494787)
This commit is contained in:
parent
b35c6495dc
commit
6e6b8e5e65
@ -0,0 +1,41 @@
|
||||
From 53cf4a6635586e68c7a45030b381bc98d4f9eb1c Mon Sep 17 00:00:00 2001
|
||||
From: David Zeuthen <davidz@redhat.com>
|
||||
Date: Wed, 8 Apr 2009 12:04:17 -0400
|
||||
Subject: [PATCH] for now, prepend the D-Bus error name to the error string from the daemon
|
||||
|
||||
This is hidden behind a GtkExpander so it's not exactly a big deal. As
|
||||
noted we can removed this once we port to PolicyKit 1.0.
|
||||
---
|
||||
src/gdu/gdu-error.c | 9 +++++++++
|
||||
1 files changed, 9 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/gdu/gdu-error.c b/src/gdu/gdu-error.c
|
||||
index 956c61c..992c4d8 100644
|
||||
--- a/src/gdu/gdu-error.c
|
||||
+++ b/src/gdu/gdu-error.c
|
||||
@@ -57,6 +57,7 @@ _gdu_error_fixup (GError *error)
|
||||
{
|
||||
const char *name;
|
||||
gboolean matched;
|
||||
+ gchar *s;
|
||||
|
||||
if (error == NULL)
|
||||
return;
|
||||
@@ -89,6 +90,14 @@ _gdu_error_fixup (GError *error)
|
||||
|
||||
if (matched)
|
||||
error->domain = GDU_ERROR;
|
||||
+
|
||||
+ /* Always prepend the D-Bus exception name to the message; we need this in
|
||||
+ * gdu_error_check_polkit_not_authorized() to determine if it's a PolicyKit
|
||||
+ * exception... when we port to polkit 1.0 this can go away.
|
||||
+ */
|
||||
+ s = g_strdup_printf ("%s: %s", name, error->message);
|
||||
+ g_free (error->message);
|
||||
+ error->message = s;
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
1.6.2.2
|
||||
|
@ -12,7 +12,7 @@
|
||||
Summary: Disk management application
|
||||
Name: gnome-disk-utility
|
||||
Version: 0.3
|
||||
Release: 0.1.20090406git%{?dist}
|
||||
Release: 0.2.20090406git%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://git.gnome.org/cgit/gnome-disk-utility
|
||||
@ -36,6 +36,8 @@ BuildRequires: intltool
|
||||
Requires(post): scrollkeeper
|
||||
Requires(postun): scrollkeeper
|
||||
|
||||
Patch0: 0001-for-now-prepend-the-D-Bus-error-name-to-the-error-s.patch
|
||||
|
||||
%description
|
||||
This package contains the Palimpsest disk management application.
|
||||
Palimpsest supports partitioning, file system creation, encryption,
|
||||
@ -89,6 +91,7 @@ develop applications with gnome-disk-utility-ui-libs.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .gdu-polkit-authz
|
||||
|
||||
%build
|
||||
%configure
|
||||
@ -196,6 +199,9 @@ fi
|
||||
%{_includedir}/gnome-disk-utility/gdu-gtk/*
|
||||
|
||||
%changelog
|
||||
* Wed Apr 08 2009 David Zeuthen <davidz@redhat.com> - 0.3-0.2.20090406git%{?dist}
|
||||
- Fix bug in detecting when a PolicyKit error is returned (#494787)
|
||||
|
||||
* Mon Apr 06 2009 David Zeuthen <davidz@redhat.com> - 0.3-0.1.20090406git%{?dist}
|
||||
- New snapshot
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user