rpms/PolicyKit-gnome/devel PolicyKit-gnome-0.7-avoid-crash-for-faceless.patch, NONE, 1.1 PolicyKit-gnome.spec, 1.14, 1.15

David Zeuthen (davidz) fedora-extras-commits at redhat.com
Tue Dec 18 16:36:38 UTC 2007


Author: davidz

Update of /cvs/pkgs/rpms/PolicyKit-gnome/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20568

Modified Files:
	PolicyKit-gnome.spec 
Added Files:
	PolicyKit-gnome-0.7-avoid-crash-for-faceless.patch 
Log Message:
* Tue Dec 18 2007 David Zeuthen <davidz at redhat.com> - 0.7-2%{?dist}
- Avoid crashing when an authorization is blocked for a user without ~/.face



PolicyKit-gnome-0.7-avoid-crash-for-faceless.patch:

--- NEW FILE PolicyKit-gnome-0.7-avoid-crash-for-faceless.patch ---
From: David Zeuthen <davidz at redhat.com>
Date: Tue, 18 Dec 2007 16:23:51 +0000 (-0500)
Subject: don't crash when showing block authorizations for a user without .face
X-Git-Url: http://gitweb.freedesktop.org/?p=users/david/PolicyKit-gnome.git;a=commitdiff;h=c6673a7f9e63e65b108dec7f97ae898ee20a8820

don't crash when showing block authorizations for a user without .face
---

--- a/tools/polkit-gnome-authorization.c
+++ b/tools/polkit-gnome-authorization.c
@@ -432,30 +432,35 @@ add_authorization (PolKitAuthorizationDB
         }
 
         GdkPixbuf *pixbuf;
+        GdkPixbuf *pixbuf_to_use;
         pixbuf = get_face_for_uid (for_uid);
 
         if (is_negative) {
+                pixbuf_to_use = gdk_pixbuf_copy (pixbuf);
 
                 /* turn black and white */
-                gdk_pixbuf_saturate_and_pixelate (pixbuf,
-                                                  pixbuf,
+                gdk_pixbuf_saturate_and_pixelate (pixbuf_to_use,
+                                                  pixbuf_to_use,
                                                   0.0,
                                                   FALSE);
 
                 /* blend the STOP icon on top */
                 gdk_pixbuf_composite (stop_pixbuf,
-                                      pixbuf,
+                                      pixbuf_to_use,
                                       12, 12, 12, 12,
                                       12.0, 12.0, 0.5, 0.5,
                                       GDK_INTERP_BILINEAR,
                                       255);
 
+        } else {
+                pixbuf_to_use = g_object_ref (pixbuf);
         }
+        g_object_unref (pixbuf);
 
         GtkTreeIter iter;
         gtk_list_store_append (authlist_store, &iter);
         gtk_list_store_set (authlist_store, &iter,
-                            EXPLICIT_ICON_COLUMN, pixbuf,
+                            EXPLICIT_ICON_COLUMN, pixbuf_to_use,
                             EXPLICIT_ENTITY_NAME_COLUMN, for_user,
                             EXPLICIT_SCOPE_COLUMN, scope,
                             EXPLICIT_CONSTRAINTS_COLUMN, constraint_string,


Index: PolicyKit-gnome.spec
===================================================================
RCS file: /cvs/pkgs/rpms/PolicyKit-gnome/devel/PolicyKit-gnome.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- PolicyKit-gnome.spec	6 Dec 2007 06:40:21 -0000	1.14
+++ PolicyKit-gnome.spec	18 Dec 2007 16:36:03 -0000	1.15
@@ -10,7 +10,7 @@
 Summary: PolicyKit integration for the GNOME desktop
 Name: PolicyKit-gnome
 Version: 0.7
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+
 Group: System Environment/Libraries
 URL: http://gitweb.freedesktop.org/?p=users/david/PolicyKit-gnome.git;a=summary
@@ -34,6 +34,8 @@
 Requires: PolicyKit >= %{polkit_version}
 Requires: libsexy >= %{libsexy_version}
 
+Patch0: PolicyKit-gnome-0.7-avoid-crash-for-faceless.patch
+
 %description 
 PolicyKit-gnome provides a GNOME integration library and tools for
 PolicyKit including an Authentication Agent that matches the look and
@@ -75,6 +77,7 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .avoid-crash-for-faceless
 
 %build
 %configure
@@ -130,6 +133,9 @@
 %{_datadir}/PolicyKit/policy/polkit-gnome-example.policy
 
 %changelog
+* Tue Dec 18 2007 David Zeuthen <davidz at redhat.com> - 0.7-2%{?dist}
+- Avoid crashing when an authorization is blocked for a user without ~/.face
+
 * Thu Dec  6 2007 David Zeuthen <davidz at redhat.com> - 0.7-1%{?dist}
 - Update to latest upstream release
 




More information about the fedora-extras-commits mailing list