Hello community,

here is the log from the commit of package NetworkManager-gnome.1644 for 
openSUSE:12.3:Update checked in at 2013-05-14 16:56:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3:Update/NetworkManager-gnome.1644 (Old)
 and      /work/SRC/openSUSE:12.3:Update/.NetworkManager-gnome.1644.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "NetworkManager-gnome.1644"

Changes:
--------
New Changes file:

--- /dev/null   2013-05-09 10:40:33.472011256 +0200
+++ 
/work/SRC/openSUSE:12.3:Update/.NetworkManager-gnome.1644.new/NetworkManager-gnome.changes
  2013-05-14 16:56:37.000000000 +0200
@@ -0,0 +1,629 @@
+-------------------------------------------------------------------
+Thu May  2 06:39:15 UTC 2013 - [email protected]
+
+- Add nm-applet-use-updated-probe-method.patch to use the updated
+  probe method (bnc#817585) 
+
+-------------------------------------------------------------------
+Wed Apr  3 03:03:52 UTC 2013 - [email protected]
+
+- Rebase nm-applet-probe-radius-server-cert.patch to probe the
+  certificate of the RADIUS server and set the subject for WPA-EAP
+  connections (bnc#574266, bnc#798793)
+
+-------------------------------------------------------------------
+Mon Feb  4 19:54:42 UTC 2013 - [email protected]
+
+- Fix nm-applet-private-connection.patch: Allow to select a BT
+  paired devices a PAN/NAP device. Without this fix,
+  gnome-control-center crashes at that moment.
+
+-------------------------------------------------------------------
+Sat Oct 27 09:01:22 UTC 2012 - [email protected]
+
+- Update to version 0.9.6.4:
+  + Better cooperation with GNOME Shell
+  + Fix connection editing from external tools when the editor is
+    already open
+  + Backport new libnm-gtk API to work with recent GNOME Control
+    Center versions
+  + Updated translations.
+
+-------------------------------------------------------------------
+Mon Aug 13 08:41:50 UTC 2012 - [email protected]
+
+- Update to version 0.9.6.2:
+  + Fix GNOME Bluetooth plugin DUN modem detection and setup.
+
+-------------------------------------------------------------------
+Tue Aug  7 18:20:32 UTC 2012 - [email protected]
+
+- Update to version 0.9.6.0:
+  + Only handle VPN secrets for GNOME Shell 3.3 and lower.
+
+-------------------------------------------------------------------
+Tue Jul 24 07:33:55 UTC 2012 - [email protected]
+
+- Update to version 0.9.5.96:
+  + Recognize PKCS#12 certificates imported from Firefox
+  + Pre-fill CDMA username/password in the mobile broadband wizard.
+
+-------------------------------------------------------------------
+Fri Jun 29 06:57:42 UTC 2012 - [email protected]
+
+- Update to version 0.9.5.95:
+  + Fixed UI mnemonics.
+  + Various crash and stability fixes.
+  + Allow appending DNS servers and domains in automatic addressing
+    mode.
+  + Fix defaults for PPP echo values.
+  + Show IPv6 addressing page for VPN plugins that support it.
+  + Port to GSettings and split out 0.8 -> 0.9 migration code into
+    standalone tool.
+- Pass --disable-migration to configure: no supported openSUSE
+  version has NetworkManager <= 0.8 anymore, so we do not need the
+  migration tool.
+- Replace gconf schema handling macros with glib variants.
+- Drop gconf2-devel BuildRequires: without the migration tool,
+  there is no need to access gconf anymore.
+
+-------------------------------------------------------------------
+Thu Jun 28 21:19:01 UTC 2012 - [email protected]
+
+- Add nm-applet-private-connection.patch: Create private
+  connections if the user is not authorized.
+  Some distributions do not allow the normal user to create a
+  system connection without the polkit authentication. This commit
+  checks the polkit policy and creates private connections if the
+  user is not authorized. [bnc#751211].
+- Add polkit-devel BuildRequires, as the above patch makes use
+  of it.
+- Add gnome-common BuildRequires and call to gnome-autogen.sh, as
+  above patch touches the build system.
+
+-------------------------------------------------------------------
+Sat Mar 24 09:54:49 UTC 2012 - [email protected]
+
+- Update to version 0.9.4.1:
+  + No change compared to 0.9.4.1.
+- Changes from version 0.9.4.0:
+  + Do not run our own secret agent when GNOME Shell is running.
+  + Several bug fixes.
+  + Updated translations.
+- Drop NetworkManager-gnome-OnlyShowIn.patch: this was implemented
+  with NotShowIn upstream.
+
+-------------------------------------------------------------------
+Tue Mar 20 16:29:59 UTC 2012 - [email protected]
+
+- Update to version 0.9.3.997:
+  + More flexible build-time warnings with
+    --enable-more-warnings=[yes|no|error]
+  + Removed unused PolicyKit configure check
+  + Lazily initialize the notification service for faster startup
+  + Fix various memory leaks
+  + Warn user if CA certificate is left blank in the editor for
+    802.1x
+  + Disabled creation of WPA-protected Ad-Hoc WiFi networks due to
+    kernel bugs
+- Remove polkit-devel BuildRequires: removed upstream.
+
+-------------------------------------------------------------------
+Fri Mar  2 19:21:56 UTC 2012 - [email protected]
+
+- Update to version 0.9.3.995:
+  + Updated translations.
+
+-------------------------------------------------------------------
+Sat Feb 18 16:11:03 UTC 2012 - [email protected]
+
+- Update to version 0.9.3.990:
+  + Fix interaction of single-connection edit mode with PolicyKit
+  + Add EAP-FAST support
+  + Make editor connection list sortable
+  + Ensure mobile broadband provider list is sensitized correctly
+- Drop NetworkManager-gnome-link-gkr.patch: fixed upstream.
+- Remove call to autoreconf: it was only needed for above patch.
+
+-------------------------------------------------------------------
+Wed Feb  8 20:49:26 UTC 2012 - [email protected]
+
+- Add NetworkManager-gnome-link-gkr.patch: Fix linking with
+  gnome-keyring in a gconf-helpers test program.
+- Add call to autoreconf in %prep, as above patch touches the build
+  system.
+
+-------------------------------------------------------------------
+Sat Nov 12 19:21:46 UTC 2011 - [email protected]
+
+- Update to version 0.9.2.0:
+  + Updated translations.
+- Pass --disable-more-warnings to configure to allow building with
+  gtk+ 3.3.
+- Really enable parallel build: fix typo smp_flags => smp_mflags.
+
+-------------------------------------------------------------------
+Mon Oct 31 17:32:22 UTC 2011 - [email protected]
+
+- Update to version 0.9.1.95:
+  + Select user's home directory by default for VPN import
+  + Show VPN details in the Connection Information dialog
+  + Allow auto-unlocking of GSM modems
+  + Fix crash of Bluetooth widget after pairing
+- Drop NetworkManager-gnome-bluetooth-crash.patch: fixed upstream.
+
+-------------------------------------------------------------------
+Fri Oct 28 13:58:51 UTC 2011 - [email protected]
+
+- Replace category SystemSetup by X-SuSE-ServiceConfiguration to
+  suppress rpmlint warnings
+
+-------------------------------------------------------------------
+Wed Oct 26 16:58:41 UTC 2011 - [email protected]
+
+- Modified categories in .desktop file so that it is grouped with 
+  "System" applications in the desktop menus (bnc#714333) 
+
+-------------------------------------------------------------------
+Thu Oct 13 13:24:27 UTC 2011 - [email protected]
+
+- Add NetworkManager-gnome-bluetooth-crash.patch: fix some crash in
+  gnome-control-center when disabling bluetooth.
+
+-------------------------------------------------------------------
+Wed Sep 21 19:06:48 UTC 2011 - [email protected]
+
+- Update to version 0.9.1.90:
+  + New private library for wireless and mobile dialogs
+  + iso-codes package used for translated country names in the
+    mobile broadband wizard
+- Add pkgconfig(iso-codes) BuildRequires and iso-codes Requires for
+  the new use of iso-codes.
+- Create libnm-gtk0 and libnm-gtk-devel subpackages, for the new
+  library.
+
+-------------------------------------------------------------------
+Sat Sep 17 09:52:39 UTC 2011 - [email protected]
+
+- Remove redundant tags/sections from specfile
+
+-------------------------------------------------------------------
+Wed Sep  7 08:36:15 UTC 2011 - [email protected]
+
+- Remove NetworkManager-glib BuildRequires: we don't need an
+  explicit BuildRequires for libraries.
+- Remove libglade2-devel, libgudev-1_0-devel, libiw-devel
+  BuildRequires: they are unneeded.
+- Change dbus-1-glib BuildRequires to dbus-1-glib-devel: we're
++++ 432 more lines (skipped)
++++ between /dev/null
++++ and 
/work/SRC/openSUSE:12.3:Update/.NetworkManager-gnome.1644.new/NetworkManager-gnome.changes

New:
----
  NetworkManager-gnome.changes
  NetworkManager-gnome.spec
  network-manager-applet-0.9.6.4.tar.xz
  nm-applet-private-connection.patch
  nm-applet-probe-radius-server-cert.patch
  nm-applet-use-updated-probe-method.patch
  nm-icons.tar.gz

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

Other differences:
------------------
++++++ NetworkManager-gnome.spec ++++++
#
# spec file for package NetworkManager-gnome
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           NetworkManager-gnome
Url:            http://www.gnome.org/projects/NetworkManager/
Version:        0.9.6.4
Release:        0
# FIXME: --disable-more-warnings should be dropped from configure when 
possible. Added with 0.9.2.0 for Gtk+ 3.3 build.
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  NetworkManager-devel >= 0.9.6
BuildRequires:  dbus-1-devel
BuildRequires:  dbus-1-glib-devel
BuildRequires:  gnome-bluetooth-devel
# Needed for patch0
BuildRequires:  gnome-common
BuildRequires:  gtk3-devel >= 3.0
BuildRequires:  intltool
BuildRequires:  libgnome-keyring-devel
BuildRequires:  libnotify-devel
BuildRequires:  libtool
# Needed by patch0
BuildRequires:  polkit-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(iso-codes)
Summary:        GNOME applications for use with NetworkManager
License:        GPL-2.0+
Group:          System/GUI/GNOME
Source:         
http://download.gnome.org/sources/network-manager-applet/0.9/network-manager-applet-%{version}.tar.xz
Source1:        nm-icons.tar.gz
# PATCH-FIX-UPSTREAM nm-applet-private-connection.patch bnc#751211 bgo#646187 
[email protected] -- Create private connections if the user is not 
authorized. Allows to create wifi connections without root access. Patch under 
discussion upstream.
Patch0:         nm-applet-private-connection.patch
# PATCH-FIX-UPSTREAM nm-applet-probe-radius-server-cert.patch bnc#574266 
[email protected] -- Probe the RADIUS server certificate
Patch1:         nm-applet-probe-radius-server-cert.patch
# PATCH-FIX-UPSTREAM nm-applet-use-updated-probe-method.patch bnc#817585 
[email protected] -- Use the updated probe method
Patch2:         nm-applet-use-updated-probe-method.patch
Provides:       NetworkManager-client
Requires:       NetworkManager >= 0.9.3
# needed for translated country names
Requires:       iso-codes
# mobile-broadband-provider-info is required for DUN capabilities. The BT 
plugin crashes without it.
Requires:       mobile-broadband-provider-info
Requires:       timezone
Recommends:     %{name}-lang
%glib2_gsettings_schema_requires

%description
This package contains GNOME utilities and applications for use with
NetworkManager, including a panel applet for wireless networks.

%package -n libnm-gtk0
Summary:        NetworkManager Gtk+ dialogs
Group:          System/Libraries

%description -n libnm-gtk0
This library provides GTK+ dialogs for NetworkManager integration.

%package -n libnm-gtk-devel
Summary:        NetworkManager Gtk+ dialogs -- Development Files
Group:          Development/Libraries/GNOME
Requires:       libnm-gtk0 = %{version}

%description -n libnm-gtk-devel
This library provides GTK+ dialogs for NetworkManager integration.

%lang_package
%prep
%setup -q -n network-manager-applet-%{version} -a 1
%patch0 -p1
%patch1 -p1
%patch2 -p1
translation-update-upstream

%build
# Needed for patch0
NOCONFIGURE=1 gnome-autogen.sh
%configure \
    --disable-static \
    --disable-maintainer-mode \
    --disable-more-warnings \
    --disable-migration
%__make %{?_smp_mflags}

%install
%makeinstall
find %{buildroot}%{_libdir} -name '*.la' -delete -print
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/nm-applet.desktop
%suse_update_desktop_file 
%{buildroot}%{_sysconfdir}/xdg/autostart/nm-applet.desktop
%suse_update_desktop_file -r nm-connection-editor GTK GNOME System 
X-SuSE-ServiceConfiguration
%find_lang nm-applet %{?no_lang_C}
cp -r nm-icons/* $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/

%post
%glib2_gsettings_schema_post
%desktop_database_post
%icon_theme_cache_post

%postun
%glib2_gsettings_schema_postun
%desktop_database_postun
%icon_theme_cache_postun

%post -n libnm-gtk0 -p /sbin/ldconfig

%postun -n libnm-gtk0 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING ChangeLog NEWS AUTHORS README CONTRIBUTING
%{_bindir}/nm-applet
%{_bindir}/nm-connection-editor
%{_libdir}/gnome-bluetooth/plugins/libnma.*
%{_datadir}/nm-applet
%{_datadir}/GConf/gsettings/nm-applet.convert
%{_datadir}/glib-2.0/schemas/org.gnome.nm-applet.gschema.xml
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/icons/hicolor/*/apps/*.svg
%{_sysconfdir}/xdg/autostart/nm-applet.desktop
%{_datadir}/applications/nm-applet.desktop
%{_datadir}/applications/nm-connection-editor.desktop

%files -n libnm-gtk0
%defattr(-,root,root)
%{_libdir}/libnm-gtk.so.*
%{_datadir}/libnm-gtk/

%files -n libnm-gtk-devel
%defattr(-,root,root)
%{_includedir}/libnm-gtk/
%{_libdir}/libnm-gtk.so
%{_libdir}/pkgconfig/libnm-gtk.pc

%files lang -f nm-applet.lang

%changelog
++++++ nm-applet-private-connection.patch ++++++
>From d646ee98751194e6bd7e2f57418a2a995c634924 Mon Sep 17 00:00:00 2001
From: Gary Ching-Pang Lin <[email protected]>
Date: Thu, 2 Feb 2012 18:08:56 +0800
Subject: [PATCH] Create private connections if the user is not authorized

Some distributions do not allow the normal user to create a system
connection without the polkit authentication. This commit checks
the polkit policy and creates private connections if the user is
not authorized.

https://bugzilla.gnome.org/show_bug.cgi?id=646187
---
 src/applet-device-cdma.c          |    6 ++++
 src/applet-device-gsm.c           |    6 ++++
 src/applet-device-wifi.c          |   12 +++++++
 src/applet-device-wimax.c         |    6 ++++
 src/applet-device-wired.c         |    6 ++++
 src/connection-editor/Makefile.am |    2 +
 src/connection-editor/ce-page.c   |   47 +++++++++++++++++++++++++++++
 src/gnome-bluetooth/Makefile.am   |    2 +
 src/gnome-bluetooth/bt-widget.c   |   59 +++++++++++++++++++++++++++++++++++++
 src/utils/Makefile.am             |    3 +-
 src/utils/utils.c                 |   40 +++++++++++++++++++++++++
 src/utils/utils.h                 |    2 +
 12 files changed, 190 insertions(+), 1 deletions(-)

Index: network-manager-applet-0.9.6.4/src/applet-device-cdma.c
===================================================================
--- network-manager-applet-0.9.6.4.orig/src/applet-device-cdma.c
+++ network-manager-applet-0.9.6.4/src/applet-device-cdma.c
@@ -145,6 +145,12 @@ mobile_wizard_done (NMAMobileWizard *wiz
                              NULL);
                g_free (uuid);
                g_free (id);
+               if (!utils_system_connection_authorized ()) {
+                       nm_setting_connection_add_permission 
((NMSettingConnection *)setting,
+                                                             "user",
+                                                             g_get_user_name(),
+                                                             NULL);
+               }
                nm_connection_add_setting (connection, setting);
        }
 
Index: network-manager-applet-0.9.6.4/src/applet-device-gsm.c
===================================================================
--- network-manager-applet-0.9.6.4.orig/src/applet-device-gsm.c
+++ network-manager-applet-0.9.6.4/src/applet-device-gsm.c
@@ -175,6 +175,12 @@ mobile_wizard_done (NMAMobileWizard *wiz
                              NULL);
                g_free (uuid);
                g_free (id);
+               if (!utils_system_connection_authorized ()) {
+                       nm_setting_connection_add_permission 
((NMSettingConnection *)setting,
+                                                             "user",
+                                                             g_get_user_name(),
+                                                             NULL);
+               }
                nm_connection_add_setting (connection, setting);
        }
 
Index: network-manager-applet-0.9.6.4/src/applet-device-wifi.c
===================================================================
--- network-manager-applet-0.9.6.4.orig/src/applet-device-wifi.c
+++ network-manager-applet-0.9.6.4/src/applet-device-wifi.c
@@ -460,6 +460,18 @@ _do_new_auto_connection (NMApplet *apple
                nm_connection_add_setting (connection, NM_SETTING (s_8021x));
        }
 
+       if (!utils_system_connection_authorized ()) {
+               s_con = nm_connection_get_setting_connection (connection);
+               if (!s_con) {
+                       s_con = (NMSettingConnection *) 
nm_setting_connection_new ();
+                       nm_connection_add_setting (connection, NM_SETTING 
(s_con));
+               }
+               nm_setting_connection_add_permission (s_con,
+                                                     "user",
+                                                     g_get_user_name(),
+                                                     NULL);
+       }
+
        /* If it's an 802.1x connection, we need more information, so pop up the
         * Dialog Of Doom.
         */
Index: network-manager-applet-0.9.6.4/src/applet-device-wimax.c
===================================================================
--- network-manager-applet-0.9.6.4.orig/src/applet-device-wimax.c
+++ network-manager-applet-0.9.6.4/src/applet-device-wimax.c
@@ -94,6 +94,12 @@ wimax_new_auto_connection (NMDevice *dev
                                  NM_SETTING_CONNECTION_UUID, uuid,
                                  NULL);
        g_free (uuid);
+       if (!utils_system_connection_authorized ()) {
+               nm_setting_connection_add_permission (s_con,
+                                                     "user",
+                                                     g_get_user_name(),
+                                                     NULL);
+       }
 
        nm_connection_add_setting (connection, NM_SETTING (s_con));
 
Index: network-manager-applet-0.9.6.4/src/applet-device-wired.c
===================================================================
--- network-manager-applet-0.9.6.4.orig/src/applet-device-wired.c
+++ network-manager-applet-0.9.6.4/src/applet-device-wired.c
@@ -86,6 +86,12 @@ wired_new_auto_connection (NMDevice *dev
                      NM_SETTING_CONNECTION_UUID, uuid,
                      NULL);
        g_free (uuid);
+       if (!utils_system_connection_authorized ()) {
+               nm_setting_connection_add_permission (s_con,
+                                                     "user",
+                                                     g_get_user_name(),
+                                                     NULL);
+       }
 
        nm_connection_add_setting (connection, NM_SETTING (s_con));
 
Index: network-manager-applet-0.9.6.4/src/connection-editor/Makefile.am
===================================================================
--- network-manager-applet-0.9.6.4.orig/src/connection-editor/Makefile.am
+++ network-manager-applet-0.9.6.4/src/connection-editor/Makefile.am
@@ -12,6 +12,7 @@ nm_connection_editor_CPPFLAGS = \
        -DDATADIR=\""$(datadir)"\" \
        -DNMALOCALEDIR=\"$(datadir)/locale\" \
        $(DBUS_CFLAGS) \
+       $(POLKIT_CFLAGS) \
        $(DISABLE_DEPRECATED) \
        -I${top_srcdir}/src/utils \
        -I${top_srcdir}/src/wireless-security \
@@ -67,6 +68,7 @@ nm_connection_editor_LDADD = \
        ${top_builddir}/src/libnm-gtk/libnm-gtk.la \
        $(GTK_LIBS) \
        $(NMA_LIBS) \
+       $(POLKIT_LIBS) \
        -lm
 
 uidir = $(datadir)/nm-applet
Index: network-manager-applet-0.9.6.4/src/connection-editor/ce-page.c
===================================================================
--- network-manager-applet-0.9.6.4.orig/src/connection-editor/ce-page.c
+++ network-manager-applet-0.9.6.4/src/connection-editor/ce-page.c
@@ -29,6 +29,8 @@
 
 #include <glib/gi18n.h>
 
+#include <polkit/polkit.h>
+
 #include <nm-setting-connection.h>
 #include <nm-utils.h>
 
@@ -490,6 +492,44 @@ ce_page_class_init (CEPageClass *page_cl
                              G_TYPE_NONE, 1, G_TYPE_POINTER);
 }
 
+static gboolean
+polkit_system_connection_authorized ()
+{
+       PolkitSubject *subject;
+       PolkitAuthority *authority;
+       PolkitAuthorizationResult *result;
+       GError *error = NULL;
+       static gboolean is_checked = FALSE;
+       static gboolean is_authorized = FALSE;
+
+       if (is_checked)
+               return is_authorized;
+
+       /* Check the polkit authorization */
+       authority = polkit_authority_get_sync (NULL, NULL);
+       subject = polkit_unix_process_new (getpid ());
+       result = polkit_authority_check_authorization_sync (authority,
+                                                           subject,
+                                                           
"org.freedesktop.NetworkManager.settings.modify.system",
+                                                           NULL,
+                                                           
POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE,
+                                                           NULL,
+                                                           &error);
+       if (error || !result) {
+               g_warning ("%s: failed to check polkit authorization! %s", 
__func__,
+                          error ? error->message : "(unknown)");
+               g_clear_error (&error);
+       } else if (polkit_authorization_result_get_is_authorized (result)) {
+               is_authorized = TRUE;
+       }
+       g_object_unref (result);
+       g_object_unref (authority);
+       g_object_unref (subject);
+
+       is_checked = TRUE;
+
+       return is_authorized;
+}
 
 NMConnection *
 ce_page_new_connection (const char *format,
@@ -524,6 +564,13 @@ ce_page_new_connection (const char *form
        g_free (uuid);
        g_free (id);
 
+       if (!polkit_system_connection_authorized ()) {
+               nm_setting_connection_add_permission (s_con,
+                                                     "user",
+                                                     g_get_user_name(),
+                                                     NULL);
+       }
+
        return connection;
 }
 
Index: network-manager-applet-0.9.6.4/src/gnome-bluetooth/Makefile.am
===================================================================
--- network-manager-applet-0.9.6.4.orig/src/gnome-bluetooth/Makefile.am
+++ network-manager-applet-0.9.6.4/src/gnome-bluetooth/Makefile.am
@@ -7,6 +7,7 @@ INCLUDES = \
        -I${top_srcdir}/src/utils \
        -I${top_srcdir}/src/libnm-gtk \
        $(GNOME_BLUETOOTH_CFLAGS) \
+       $(POLKIT_CFLAGS) \
        $(DISABLE_DEPRECATED) \
        $(WARN_CFLAGS)
 
@@ -28,6 +29,7 @@ libnma_la_LIBADD = \
        $(top_builddir)/src/marshallers/libmarshallers.la \
        $(top_builddir)/src/utils/libutils.la \
        $(top_builddir)/src/libnm-gtk/libnm-gtk.la \
+       $(POLKIT_LIBS) \
        $(GNOME_BLUETOOTH_LIBS)
 endif
 
Index: network-manager-applet-0.9.6.4/src/gnome-bluetooth/bt-widget.c
===================================================================
--- network-manager-applet-0.9.6.4.orig/src/gnome-bluetooth/bt-widget.c
+++ network-manager-applet-0.9.6.4/src/gnome-bluetooth/bt-widget.c
@@ -34,6 +34,7 @@
 #include <bluetooth-client.h>
 #include <nm-remote-settings.h>
 #include <nm-remote-connection.h>
+#include <polkit/polkit.h>
 
 #include "nma-bt-device.h"
 
@@ -162,6 +163,45 @@ get_device_iter (GtkTreeModel *model, co
        return FALSE;
 }
 
+static gboolean
+polkit_system_connection_authorized ()
+{
+       PolkitSubject *subject;
+       PolkitAuthority *authority;
+       PolkitAuthorizationResult *result;
+       GError *error = NULL;
+       static gboolean is_checked = FALSE;
+       static gboolean is_authorized = FALSE;
+
+       if (is_checked)
+               return is_authorized;
+
+       /* Check the polkit authorization */
+       authority = polkit_authority_get_sync (NULL, NULL);
+       subject = polkit_unix_process_new (getpid ());
+       result = polkit_authority_check_authorization_sync (authority,
+                                                           subject,
+                                                           
"org.freedesktop.NetworkManager.settings.modify.system",
+                                                           NULL,
+                                                           
POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE,
+                                                           NULL,
+                                                           &error);
+       if (error || !result) {
+               g_warning ("%s: failed to check polkit authorization! %s", 
__func__,
+                          error ? error->message : "(unknown)");
+               g_clear_error (&error);
+       } else if (polkit_authorization_result_get_is_authorized (result)) {
+               is_authorized = TRUE;
+       }
+       g_object_unref (result);
+       g_object_unref (authority);
+       g_object_unref (subject);
+
+       is_checked = TRUE;
+
+       return is_authorized;
+}
+
 /*******************************************************************/
 
 static void
Index: network-manager-applet-0.9.6.4/src/utils/utils.c
===================================================================
--- network-manager-applet-0.9.6.4.orig/src/utils/utils.c
+++ network-manager-applet-0.9.6.4/src/utils/utils.c
@@ -27,6 +27,8 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
+#include <polkit/polkit.h>
+
 #include <nm-setting-connection.h>
 #include <nm-utils.h>
 
@@ -360,3 +362,41 @@ utils_show_error_dialog (const char *tit
        }
 }
 
+gboolean
+utils_system_connection_authorized ()
+{
+       PolkitSubject *subject;
+       PolkitAuthority *authority;
+       PolkitAuthorizationResult *result;
+       GError *error = NULL;
+       static gboolean is_checked = FALSE;
+       static gboolean is_authorized = FALSE;
+
+       if (is_checked)
+               return is_authorized;
+
+       /* Check the polkit authorization */
+       authority = polkit_authority_get_sync (NULL, NULL);
+       subject = polkit_unix_process_new (getpid ());
+       result = polkit_authority_check_authorization_sync (authority,
+                                                           subject,
+                                                           
"org.freedesktop.NetworkManager.settings.modify.system",
+                                                           NULL,
+                                                           
POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE,
+                                                           NULL,
+                                                           &error);
+       if (error || !result) {
+               g_warning ("%s: failed to check polkit authorization! %s", 
__func__,
+                          error ? error->message : "(unknown)");
+               g_clear_error (&error);
+       } else if (polkit_authorization_result_get_is_authorized (result)) {
+               is_authorized = TRUE;
+       }
+       g_object_unref (result);
+       g_object_unref (authority);
+       g_object_unref (subject);
+
+       is_checked = TRUE;
+
+       return is_authorized;
+}
Index: network-manager-applet-0.9.6.4/src/utils/utils.h
===================================================================
--- network-manager-applet-0.9.6.4.orig/src/utils/utils.h
+++ network-manager-applet-0.9.6.4/src/utils/utils.h
@@ -61,5 +61,7 @@ typedef enum  {
        NMA_ERROR_GENERIC
 } NMAError;
 
+gboolean utils_system_connection_authorized ();
+
 #endif /* UTILS_H */
 
Index: network-manager-applet-0.9.6.4/configure.ac
===================================================================
--- network-manager-applet-0.9.6.4.orig/configure.ac
+++ network-manager-applet-0.9.6.4/configure.ac
@@ -138,6 +138,10 @@ older (< 0.9) nm-applet releases.])])
 fi
 AM_CONDITIONAL(BUILD_MIGRATION_TOOL, test "$enable_migration" = "yes")
 
+PKG_CHECK_MODULES(POLKIT, [polkit-gobject-1])
+AC_SUBST(POLKIT_CFLAGS)
+AC_SUBST(POLKIT_LIBS)
+
 PKG_CHECK_MODULES(GNOME_KEYRING, [gnome-keyring-1])
 AC_SUBST(GNOME_KEYRING_CFLAGS)
 AC_SUBST(GNOME_KEYRING_LIBS)
Index: network-manager-applet-0.9.6.4/src/utils/Makefile.am
===================================================================
--- network-manager-applet-0.9.6.4.orig/src/utils/Makefile.am
+++ network-manager-applet-0.9.6.4/src/utils/Makefile.am
@@ -11,8 +11,9 @@ libutils_la_SOURCES = \
 libutils_la_CPPFLAGS = \
        $(GTK_CFLAGS) \
        $(NMA_CFLAGS) \
+       $(POLKIT_CFLAGS) \
        -DDATADIR=\""$(datadir)"\" \
        $(DISABLE_DEPRECATED) \
        -I${top_srcdir}/src
 
-libutils_la_LIBADD = $(GTK_LIBS) $(NMA_LIBS)
+libutils_la_LIBADD = $(GTK_LIBS) $(NMA_LIBS) $(POLKIT_LIBS)
Index: network-manager-applet-0.9.6.4/src/gnome-bluetooth/nma-bt-device.c
===================================================================
--- network-manager-applet-0.9.6.4.orig/src/gnome-bluetooth/nma-bt-device.c
+++ network-manager-applet-0.9.6.4/src/gnome-bluetooth/nma-bt-device.c
@@ -34,6 +34,8 @@
 #include <glib.h>
 #include <glib/gi18n-lib.h>
 
+#include <polkit/polkit.h>
+
 #include <nm-remote-settings.h>
 #include <nm-remote-connection.h>
 
@@ -227,6 +229,44 @@ recheck_services_enabled (NmaBtDevice *s
 
 /*********************************************************************/
 
+polkit_system_connection_authorized ()
+{
+       PolkitSubject *subject;
+       PolkitAuthority *authority;
+       PolkitAuthorizationResult *result;
+       GError *error = NULL;
+       static gboolean is_checked = FALSE;
+       static gboolean is_authorized = FALSE;
+
+       if (is_checked)
+               return is_authorized;
+
+       /* Check the polkit authorization */
+       authority = polkit_authority_get_sync (NULL, NULL);
+       subject = polkit_unix_process_new (getpid ());
+       result = polkit_authority_check_authorization_sync (authority,
+                                                           subject,
+                                                           
"org.freedesktop.NetworkManager.settings.modify.system",
+                                                           NULL,
+                                                           
POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE,
+                                                           NULL,
+                                                           &error);
+       if (error || !result) {
+               g_warning ("%s: failed to check polkit authorization! %s", 
__func__,
+                          error ? error->message : "(unknown)");
+               g_clear_error (&error);
+       } else if (polkit_authorization_result_get_is_authorized (result)) {
+               is_authorized = TRUE;
+       }
+       g_object_unref (result);
+       g_object_unref (authority);
+       g_object_unref (subject);
+
+       is_checked = TRUE;
+
+       return is_authorized;
+}
+
 const char *
 nma_bt_device_get_bdaddr (NmaBtDevice *device)
 {
@@ -362,6 +402,12 @@ dun_new_cdma (NMAMobileWizardAccessMetho
                      NULL);
        g_free (uuid);
        g_free (id);
+       if (!polkit_system_connection_authorized ()) {
+               nm_setting_connection_add_permission ((NMSettingConnection 
*)setting,
+                                                      "user",
+                                                      g_get_user_name(),
+                                                      NULL);
+        }
        nm_connection_add_setting (connection, setting);
 
        return connection;
@@ -408,6 +454,12 @@ dun_new_gsm (NMAMobileWizardAccessMethod
                      NULL);
        g_free (uuid);
        g_free (id);
+        if (!polkit_system_connection_authorized ()) {
+               nm_setting_connection_add_permission ((NMSettingConnection 
*)setting,
+                                                      "user",
+                                                      g_get_user_name(),
+                                                      NULL);
+        }                      
        nm_connection_add_setting (connection, setting);
 
        return connection;
@@ -859,6 +911,12 @@ add_pan_connection (NmaBtDevice *self)
                      NULL);
        g_free (id);
        g_free (uuid);
+        if (!polkit_system_connection_authorized ()) {
+               nm_setting_connection_add_permission ((NMSettingConnection 
*)setting,
+                                                      "user",
+                                                      g_get_user_name(),
+                                                      NULL);
+        }
        nm_connection_add_setting (connection, setting);
 
        /* The Bluetooth settings */
++++++ nm-applet-probe-radius-server-cert.patch ++++++
++++ 1354 lines (skipped)

++++++ nm-applet-use-updated-probe-method.patch ++++++
>From b2dd55c617832f167726daec79742ad651242af3 Mon Sep 17 00:00:00 2001
From: Gary Ching-Pang Lin <[email protected]>
Date: Thu, 25 Apr 2013 11:24:00 +0800
Subject: [PATCH 1/2] wifi: Use the updated probe method

---
 src/libnm-gtk/nm-wifi-dialog.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/libnm-gtk/nm-wifi-dialog.c b/src/libnm-gtk/nm-wifi-dialog.c
index 7b2557a..043af5d 100644
--- a/src/libnm-gtk/nm-wifi-dialog.c
+++ b/src/libnm-gtk/nm-wifi-dialog.c
@@ -313,7 +313,6 @@ gboolean
 nma_wifi_dialog_probe_cert (NMAWifiDialog *self)
 {
        NMAWifiDialogPrivate *priv;
-       NMSettingWireless *s_wireless;
        NMDeviceWifi *wifi;
        guint id;
 
@@ -322,8 +321,7 @@ nma_wifi_dialog_probe_cert (NMAWifiDialog *self)
        priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
        wifi = NM_DEVICE_WIFI (priv->device);
 
-       s_wireless = nm_connection_get_setting_wireless (priv->connection);
-       if (!nm_device_wifi_probe_cert (wifi, nm_setting_wireless_get_ssid 
(s_wireless)))
+       if (!nm_device_wifi_probe_cert (wifi, priv->connection))
                return FALSE;
 
        id = g_timeout_add_seconds (30,
-- 
1.8.1.4


>From 3a35017f2a354116f8c5019fa971c1c26219245f Mon Sep 17 00:00:00 2001
From: Gary Ching-Pang Lin <[email protected]>
Date: Thu, 25 Apr 2013 11:36:21 +0800
Subject: [PATCH 2/2] wifi: show the note widget only if necessary

---
 src/wireless-security/eap-method-peap.c | 4 ++--
 src/wireless-security/eap-method-ttls.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/wireless-security/eap-method-peap.c 
b/src/wireless-security/eap-method-peap.c
index a6bf868..71fd6a5 100644
--- a/src/wireless-security/eap-method-peap.c
+++ b/src/wireless-security/eap-method-peap.c
@@ -455,6 +455,7 @@ eap_method_peap_new (WirelessSecurity *ws_parent,
                          ws_parent);
 
        widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, 
"eap_peap_note_label"));
+       gtk_widget_hide (widget);
        if (s_8021x) {
                NMSetting8021xCKScheme cert_scheme;
                cert_scheme = nm_setting_802_1x_get_ca_cert_scheme (s_8021x);
@@ -462,8 +463,7 @@ eap_method_peap_new (WirelessSecurity *ws_parent,
                        gtk_label_set_text (GTK_LABEL (widget),
                                            _("<b>Note:</b> Server hash is used 
instead of CA certificate"));
                        gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
-               } else {
-                       gtk_widget_hide (widget);
+                       gtk_widget_show (widget);
                }
        }
 
diff --git a/src/wireless-security/eap-method-ttls.c 
b/src/wireless-security/eap-method-ttls.c
index b32f8f3..0b3df60 100644
--- a/src/wireless-security/eap-method-ttls.c
+++ b/src/wireless-security/eap-method-ttls.c
@@ -433,6 +433,7 @@ eap_method_ttls_new (WirelessSecurity *ws_parent,
                          ws_parent);
 
        widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, 
"eap_ttls_note_label"));
+       gtk_widget_hide (widget);
        if (s_8021x) {
                NMSetting8021xCKScheme cert_scheme;
                cert_scheme = nm_setting_802_1x_get_ca_cert_scheme (s_8021x);
@@ -440,8 +441,7 @@ eap_method_ttls_new (WirelessSecurity *ws_parent,
                        gtk_label_set_text (GTK_LABEL (widget),
                                            _("<b>Note:</b> Server hash is used 
instead of CA certificate"));
                        gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
-               } else {
-                       gtk_widget_hide (widget);
+                       gtk_widget_show (widget);
                }
        }
 
-- 
1.8.1.4

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to