Hello community,

here is the log from the commit of package gnome-control-center for 
openSUSE:Factory checked in at 2012-06-10 20:16:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-control-center (Old)
 and      /work/SRC/openSUSE:Factory/.gnome-control-center.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnome-control-center", Maintainer is "[email protected]"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/gnome-control-center/gnome-control-center.changes    
    2012-05-22 08:14:39.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.gnome-control-center.new/gnome-control-center.changes
   2012-06-10 21:51:12.000000000 +0200
@@ -1,0 +2,8 @@
+Fri May 25 12:20:40 UTC 2012 - [email protected]
+
+- Add gnome-control-center-fine-grained-tz-polkit.patch: do not
+  require the privilege to change the time to change the timezone.
+  In the default configuration, this makes it possible to change
+  the timezone without authentication. Fix bnc#749453.
+
+-------------------------------------------------------------------

New:
----
  gnome-control-center-fine-grained-tz-polkit.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnome-control-center.spec ++++++
--- /var/tmp/diff_new_pack.vsoR9R/_old  2012-06-10 21:51:14.000000000 +0200
+++ /var/tmp/diff_new_pack.vsoR9R/_new  2012-06-10 21:51:14.000000000 +0200
@@ -33,6 +33,8 @@
 Patch0:         gnome-control-center-allow-yast-in-shell.patch
 # PATCH-HACK-OPENSUSE gnome-control-center-hide-region-system-tab.patch 
[email protected] -- Hide system tab in region panel until we really use the 
right files for system settings (see bnc#703833)
 Patch2:         gnome-control-center-hide-region-system-tab.patch
+# PATCH-FIX-UPSTREAM gnome-control-center-fine-grained-tz-polkit.patch 
bgo#646185 bnc#749453 [email protected] -- Allow changing timezone without 
requiring privileges to change time
+Patch3:         gnome-control-center-fine-grained-tz-polkit.patch
 # PATCH-NEEDS-REBASE gnome-control-center-system-proxy-configuration.patch -- 
this needs to be reimplemented to be more distro-generic before submitting 
upstream - docs at http://en.opensuse.org/GNOME/Proxy_configuration (was 
PATCH-FEATURE-OPENSUSE)
 Patch14:        gnome-control-center-system-proxy-configuration.patch
 BuildRequires:  cups-devel
@@ -155,6 +157,7 @@
 translation-update-upstream
 %patch0 -p1
 %patch2 -p1
+%patch3 -p1
 #NEEDS-REBASE
 #%patch14 -p1
 


++++++ gnome-control-center-fine-grained-tz-polkit.patch ++++++
commit 4300867b7bfc4f67a0e8b273aa7d2d13973ea7ac
Author: Vincent Untz <[email protected]>
Date:   Mon Mar 12 15:31:40 2012 +0100

    datetime: Allow changing timezone without auth if action is allowed
    
    As changing the time can have security implications, while changing the
    timezone doesn't, it's not unusual to have a setup where
    org.freedesktop.timedate1.set-timezone is allowed while other
    time-related actions aren't.
    
    Therefore, if org.freedesktop.timedate1.set-timezone is allowed, there's
    no reason to require that the user unlocks the panel to enable him to
    change the timezone.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=646185

diff --git a/panels/datetime/cc-datetime-panel.c 
b/panels/datetime/cc-datetime-panel.c
index d229e94..378e0cb 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -86,6 +86,7 @@ struct _CcDateTimePanelPrivate
   GCancellable *cancellable;
 
   GPermission *permission;
+  GPermission *permission_tz;
 };
 
 static void update_time (CcDateTimePanel *self);
@@ -164,6 +165,12 @@ cc_date_time_panel_dispose (GObject *object)
       priv->permission = NULL;
     }
 
+  if (priv->permission_tz)
+    {
+      g_object_unref (priv->permission_tz);
+      priv->permission_tz = NULL;
+    }
+
   G_OBJECT_CLASS (cc_date_time_panel_parent_class)->dispose (object);
 }
 
@@ -806,19 +813,33 @@ on_permission_changed (GPermission *permission,
                        gpointer     data)
 {
   CcDateTimePanelPrivate *priv = CC_DATE_TIME_PANEL (data)->priv;
-  gboolean allowed, using_ntp;
+  gboolean allowed, allowed_tz, using_ntp;
 
   allowed = g_permission_get_allowed (permission);
+  allowed_tz = priv->permission_tz && g_permission_get_allowed 
(priv->permission_tz);
   using_ntp = gtk_switch_get_active (GTK_SWITCH (W("network_time_switch")));
 
   /* All the widgets but the lock button and the 24h setting */
-  gtk_widget_set_sensitive (W("map-vbox"), allowed);
+  gtk_widget_set_sensitive (W("map-vbox"), allowed || allowed_tz);
   gtk_widget_set_sensitive (W("hbox2"), allowed);
   gtk_widget_set_sensitive (W("alignment2"), allowed);
   update_widget_state_for_ntp (data, using_ntp);
 }
 
 static void
+on_permission_tz_changed (GPermission *permission,
+                          GParamSpec  *pspec,
+                          gpointer     data)
+{
+  CcDateTimePanelPrivate *priv = CC_DATE_TIME_PANEL (data)->priv;
+  gboolean allowed;
+
+  allowed = g_permission_get_allowed (permission) || g_permission_get_allowed 
(priv->permission);
+
+  gtk_widget_set_sensitive (W("map-vbox"), allowed);
+}
+
+static void
 update_ntp_switch_from_system (CcDateTimePanel *self)
 {
   CcDateTimePanelPrivate *priv = self->priv;
@@ -1103,6 +1124,18 @@ cc_date_time_panel_init (CcDateTimePanel *self)
   g_signal_connect (priv->permission, "notify",
                     G_CALLBACK (on_permission_changed), self);
   on_permission_changed (priv->permission, NULL, self);
+
+  priv->permission_tz = polkit_permission_new_sync 
("org.freedesktop.timedate1.set-timezone", NULL, NULL, NULL);
+  if (priv->permission_tz == NULL)
+    {
+      g_warning ("Your system does not have the '%s' PolicyKit files 
installed. Please check your installation",
+                 "org.freedesktop.timedate1.set-timezone");
+      return;
+    }
+
+  g_signal_connect (priv->permission_tz, "notify",
+                    G_CALLBACK (on_permission_tz_changed), self);
+  on_permission_tz_changed (priv->permission_tz, NULL, self);
 }
 
 void
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to