Mailinglist Archive: opensuse-commit (2092 mails)
| < Previous | Next > |
commit NetworkManager
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Fri, 03 Aug 2007 21:52:29 +0200
- Message-id: <20070803195230.254C4678180@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package NetworkManager
checked in at Fri Aug 3 21:52:29 CEST 2007.
--------
--- NetworkManager/NetworkManager.changes 2007-05-15 10:19:43.000000000 +0200
+++ /mounts/work_src_done/STABLE/NetworkManager/NetworkManager.changes 2007-08-03 14:14:49.467269000 +0200
@@ -1,0 +2,18 @@
+Fri Aug 3 12:00:44 CEST 2007 - sbrabec@xxxxxxx
+
+- Updated gnome-patch-translation support.
+
+-------------------------------------------------------------------
+Fri Aug 3 11:30:17 CEST 2007 - tambet@xxxxxxx
+
+- Update to the latest version from upstream:
+ Add support for 2-phase authentication.
+ Add support for rfkill switch.
+- Add an editor for stored wireless networks.
+- Fix the packaging bug where the log file was not owned by the package
+ (Novell #280464).
+- Fix the issue where NM doesn't honor YaST Static IP Settings
+ (Novell #271757).
+- Fix the packaging issue to not require gnome-panel (Novell #229291).
+
+-------------------------------------------------------------------
Old:
----
NetworkManager-0.6.4.tar.gz
nm-0.6-branch.patch
nm-dbus-request-name-flags-fix-thoenig-01.patch
nm-madwifi-strength-rml.patch
New:
----
NetworkManager-0.6.5.tar.bz2
network-manager-applet-0.6.5.tar.bz2
nm-0.6.5-killswitch-fix.patch
nm-191251.patch
nm-222902.patch
nm-243959.patch
nm-271757.patch
nm-applet-0.6.5-build.patch
nm-applet-editor.patch
nm-applet-fallback.patch
nm-editor.tgz
nm-save-passwds-in-keyring.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ NetworkManager.spec ++++++
--- /var/tmp/diff_new_pack.ee8717/_old 2007-08-03 21:49:53.000000000 +0200
+++ /var/tmp/diff_new_pack.ee8717/_new 2007-08-03 21:49:53.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package NetworkManager (Version 0.6.4)
+# spec file for package NetworkManager (Version 0.6.5)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,7 +11,7 @@
# norootforbuild
Name: NetworkManager
-BuildRequires: dhcdbd gconf2-devel gnome-keyring-devel gnome-panel-devel gnome-patch-translation hal-devel intltool iproute2 libgcrypt-devel libglade2-devel libgpg-error-devel libnl-devel libnotify-devel libtool wireless-tools wpa_supplicant
+BuildRequires: dhcdbd fdupes gconf2-devel gnome-keyring-devel gnome-patch-translation hal-devel intltool iproute2 libgcrypt-devel libglade2-devel libgnomeui-devel libgpg-error-devel libnl-devel libnotify-devel libtool wireless-tools wpa_supplicant
%if %suse_version > 1010
BuildRequires: dbus-1-glib-devel
%else
@@ -28,28 +28,36 @@
%define libnl_version 1.0-6
%define dhcdbd_version 1.12-19
%define sysconfig_version 0.50.9-13.3
-License: GNU General Public License (GPL)
+License: GPL v2 or later
Group: Productivity/Networking/System
URL: http://www.gnome.org/projects/NetworkManager/
Autoreqprov: on
-Version: 0.6.4
-Release: 93
+Version: 0.6.5
+Release: 1
Summary: Network Link Manager and User Applications
-Source0: NetworkManager-%{version}.tar.gz
-Source1: nm-icons.tar.gz
-Source2: nfs
-Source3: nm-disconnect-wireless-on-exit.sh
-Patch0: nm-0.6-branch.patch
-Patch1: nm-make-wireless-menu-item-inactive-rml.patch
-Patch2: nm-configure-networking-rml.patch
-Patch3: nm-never-restart-nm-applet-rml.patch
-Patch4: nm-madwifi-strength-rml.patch
-Patch5: nm-wireless-driver-workarounds-rml.patch
-Patch6: nm-resolv-conf-header-rml.patch
-Patch7: nm-fix-adhoc-icon-rml.patch
-Patch8: nm-fallback.patch
-Patch9: nm-applet-disconnect-on-exit.patch
-Patch10: nm-dbus-request-name-flags-fix-thoenig-01.patch
+Source0: NetworkManager-%{version}.tar.bz2
+Source1: network-manager-applet-%{version}.tar.bz2
+Source2: nm-editor.tgz
+Source3: nm-icons.tar.gz
+Source4: nfs
+Source5: nm-disconnect-wireless-on-exit.sh
+Patch0: nm-wireless-driver-workarounds-rml.patch
+Patch1: nm-resolv-conf-header-rml.patch
+Patch2: nm-fallback.patch
+Patch3: nm-222902.patch
+Patch4: nm-191251.patch
+Patch5: nm-0.6.5-killswitch-fix.patch
+Patch6: nm-271757.patch
+Patch7: nm-applet-0.6.5-build.patch
+Patch8: nm-make-wireless-menu-item-inactive-rml.patch
+Patch9: nm-configure-networking-rml.patch
+Patch10: nm-never-restart-nm-applet-rml.patch
+Patch11: nm-fix-adhoc-icon-rml.patch
+Patch12: nm-applet-disconnect-on-exit.patch
+Patch13: nm-243959.patch
+Patch14: nm-applet-fallback.patch
+Patch15: nm-save-passwds-in-keyring.patch
+Patch16: nm-applet-editor.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: sysconfig >= %{sysconfig_version} /usr/bin/sed
Recommends: %{name}-client
@@ -85,7 +93,6 @@
Group: System/GUI/GNOME
Provides: %{name}-client
Requires: %{name} = %{version}-%{release}
-Requires: gnome-panel libgnomesu
Requires: dbus-1 >= %{dbus_version}
Requires: dbus-1-glib >= %{dbus_version}
Requires: hal >= %{hal_version}
@@ -147,23 +154,36 @@
Robert Love <rml@xxxxxxxxxx>
%prep
-%setup -b 1
+%setup -a 1 -a 2 -a 3
+cd nm-applet-0.6.5
gnome-patch-translation-prepare
+cd ..
%patch0 -p1
-%patch1 -p0
-%patch2 -p0
-%patch3 -p0
-%patch4 -p0
-%patch5 -p0
-%patch6 -p0
-%patch7 -p0
-%patch8 -p1
-%patch9 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+mv editor nm-applet-0.6.5/
+# applet
+%patch7 -p1
+%patch8 -p0
+%patch9 -p0
%patch10 -p0
+%patch11 -p0
+%patch12 -p0
+%patch13 -p0
+%patch14 -p0
+%patch15 -p0
+%patch16 -p1
+cd nm-applet-0.6.5
gnome-patch-translation-update
+# Prepare directory for gnome-patch-translation-collect:
+mv gnome-patch-translation ..
+cd ..
%build
-sed -i s/" --sm-disable"// nm-applet.desktop
intltoolize --force
autoreconf
%configure\
@@ -172,21 +192,41 @@
--with-gcrypt=yes\
--with-distro=suse
make %{?jobs:-j%jobs}
+# applet
+pushd nm-applet-0.6.5
+ sed -i s/" --sm-disable"// nm-applet.desktop
+ autoreconf -i
+ intltoolize --force
+ %configure\
+ --disable-static\
+ --with-notify
+ make
+popd
%install
+
+%fdupes -s $RPM_BUILD_ROOT
%makeinstall
+mkdir -p $RPM_BUILD_ROOT/var/log/
+touch $RPM_BUILD_ROOT/var/log/NetworkManager
+# applet
+pushd nm-applet-0.6.5
+ make install DESTDIR=$RPM_BUILD_ROOT
+popd
%find_lang %{name}
-cp -r ../nm-icons/* $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/
+%find_lang nm-applet
+cat nm-applet.lang >> %{name}.lang
+cp -r nm-icons/* $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/
cp test/nm-tool $RPM_BUILD_ROOT%{_bindir}/
cp test/nm-online $RPM_BUILD_ROOT%{_bindir}/
-install %{S:2} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/
-cp %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/NetworkManager/
+install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/
+cp %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/NetworkManager/
%clean
rm -rf $RPM_BUILD_ROOT
%post
-%run_ldconfig
+/sbin/ldconfig
if [ "$1" = 1 ]; then
if grep "network_manager.*always" etc/YaST2/ProductFeatures &> /dev/null; then
sed -i '/^NETWORKMANAGER=.*no/s/no/yes/' etc/sysconfig/network/config
@@ -194,8 +234,11 @@
fi
fi
-%postun
-%run_ldconfig
+%postun -p /sbin/ldconfig
+
+%post glib -p /sbin/ldconfig
+
+%postun glib -p /sbin/ldconfig
%files -f %{name}.lang
%defattr(-,root,root)
@@ -209,13 +252,17 @@
%{_sbindir}/*
%{_sysconfdir}/dbus-1/system.d/NetworkManager.conf
%{_sysconfdir}/NetworkManager
+%ghost %config(noreplace) /var/log/NetworkManager
%files gnome
%defattr(-,root,root)
%{_bindir}/nm-applet
%{_bindir}/nm-vpn-properties
+%{_bindir}/nm-editor
%{_datadir}/gnome/autostart/nm-applet.desktop
%{_datadir}/nm-applet
+%{_datadir}/nm-editor
+%{_datadir}/applications/nm-editor.desktop
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/gnome-vpn-properties
%{_sysconfdir}/dbus-1/system.d/nm-applet.conf
@@ -232,6 +279,18 @@
%{_libdir}/libnm_glib.so.*
%changelog
+* Fri Aug 03 2007 - sbrabec@xxxxxxx
+- Updated gnome-patch-translation support.
+* Fri Aug 03 2007 - tambet@xxxxxxx
+- Update to the latest version from upstream:
+ Add support for 2-phase authentication.
+ Add support for rfkill switch.
+- Add an editor for stored wireless networks.
+- Fix the packaging bug where the log file was not owned by the package
+ (Novell #280464).
+- Fix the issue where NM doesn't honor YaST Static IP Settings
+ (Novell #271757).
+- Fix the packaging issue to not require gnome-panel (Novell #229291).
* Tue May 15 2007 - pgajdos@xxxxxxx
- removed invalid PreReq: gtk2 >= {%%gtk_version} gnome-icon-theme
- added Requires: gtk2 >= {%%gtk_version}
++++++ nm-0.6.5-killswitch-fix.patch ++++++
Index: NetworkManager-0.6.5/src/NetworkManager.c
===================================================================
--- NetworkManager-0.6.5.orig/src/NetworkManager.c
+++ NetworkManager-0.6.5/src/NetworkManager.c
@@ -826,6 +826,10 @@ void nm_hal_init (NMData *data)
nm_add_initial_killswitch_devices (data);
nm_add_initial_devices (data);
}
+
+ /* If there weren't any killswitches, mark hardware RF to on */
+ if (g_slist_length (data->killswitch_list) == 0)
+ data->hw_rf_enabled = TRUE;
}
++++++ nm-0.6-branch.patch -> nm-191251.patch ++++++
++++ 25457 lines (skipped)
++++ between NetworkManager/nm-0.6-branch.patch
++++ and /mounts/work_src_done/STABLE/NetworkManager/nm-191251.patch
++++++ nm-0.6-branch.patch -> nm-222902.patch ++++++
++++ 25361 lines (skipped)
++++ between NetworkManager/nm-0.6-branch.patch
++++ and /mounts/work_src_done/STABLE/NetworkManager/nm-222902.patch
++++++ nm-0.6-branch.patch -> nm-243959.patch ++++++
++++ 25393 lines (skipped)
++++ between NetworkManager/nm-0.6-branch.patch
++++ and /mounts/work_src_done/STABLE/NetworkManager/nm-243959.patch
++++++ nm-0.6-branch.patch -> nm-271757.patch ++++++
++++ 25459 lines (skipped)
++++ between NetworkManager/nm-0.6-branch.patch
++++ and /mounts/work_src_done/STABLE/NetworkManager/nm-271757.patch
++++++ nm-applet-0.6.5-build.patch ++++++
--- NetworkManager-0.6.5/nm-applet-0.6.5/src/Makefile.am.buildfix 2007-02-02 10:53:26.000000000 -0500
+++ NetworkManager-0.6.5/nm-applet-0.6.5/src/Makefile.am 2007-03-15 14:20:32.000000000 -0400
@@ -2,6 +2,9 @@
bin_PROGRAMS = nm-applet
+INCLUDES = -I${top_srcdir}/../include \
+ -I${top_srcdir}/../libnm-util
+
nm_applet_CPPFLAGS = \
$(DBUS_CFLAGS) \
$(GTHREAD_CFLAGS) \
@@ -12,7 +15,6 @@
$(GCONF_CFLAGS) \
$(LIBGNOMEUI_CFLAGS) \
$(GNOME_KEYRING_CFLAGS) \
- $(NM_CFLAGS) \
-DICONDIR=\""$(datadir)/icons"\" \
-DGLADEDIR=\""$(gladedir)"\" \
-DBINDIR=\""$(bindir)"\" \
@@ -112,7 +114,7 @@
$(GCONF_LIBS) \
$(LIBGNOMEUI_LIBS) \
$(GNOME_KEYRING_LIBS) \
- $(NM_LIBS) \
+ -L${top_srcdir}/../libnm-util $(top_builddir)/../libnm-util/libnm-util.la \
$(NULL)
if WITH_NOTIFY
--- NetworkManager-0.6.5/nm-applet-0.6.5/configure.ac.buildfix 2007-03-15 11:51:49.000000000 -0400
+++ NetworkManager-0.6.5/nm-applet-0.6.5/configure.ac 2007-03-15 16:33:34.000000000 -0400
@@ -18,10 +18,10 @@
dnl This doesn't depend on gnome support, only on gnome-common, autogen already
dnl uses gnome-autogen
dnl
-GNOME_COMMON_INIT
-GNOME_DEBUG_CHECK
-GNOME_COMPILE_WARNINGS([maximum])
-GNOME_MAINTAINER_MODE_DEFINES
+dnl GNOME_COMMON_INIT
+dnl GNOME_DEBUG_CHECK
+dnl GNOME_COMPILE_WARNINGS([maximum])
+dnl GNOME_MAINTAINER_MODE_DEFINES
dnl
dnl Required headers
@@ -112,10 +112,6 @@
AC_SUBST(GOBJECT_CFLAGS)
AC_SUBST(GOBJECT_LIBS)
-PKG_CHECK_MODULES(NM, NetworkManager)
-AC_SUBST(NM_CFLAGS)
-AC_SUBST(NM_LIBS)
-
AC_ARG_WITH(notify, AC_HELP_STRING([--with-notify], [Use libnotify]), enable_notify=$withval, enable_notify=auto)
PKG_CHECK_MODULES(GTK, gtk+-2.0)
++++++ nm-applet-disconnect-on-exit.patch ++++++
--- /var/tmp/diff_new_pack.ee8717/_old 2007-08-03 21:49:54.000000000 +0200
+++ /var/tmp/diff_new_pack.ee8717/_new 2007-08-03 21:49:54.000000000 +0200
@@ -1,7 +1,8 @@
-diff -urN NetworkManager-0.6.4/gnome/applet/applet.c NetworkManager-new/gnome/applet/applet.c
---- NetworkManager-0.6.4/gnome/applet/applet.c 2006-11-10 13:25:14.000000000 +0200
-+++ NetworkManager-new/gnome/applet/applet.c 2006-11-10 13:24:22.000000000 +0200
-@@ -1195,6 +1195,48 @@
+Index: nm-applet-0.6.5/src/applet.c
+===================================================================
+--- nm-applet-0.6.5/src/applet.c.orig
++++ nm-applet-0.6.5/src/applet.c
+@@ -1195,6 +1195,48 @@ done:
}
@@ -50,7 +51,7 @@
/*
* nma_redraw_timeout
*
-@@ -1984,7 +2026,13 @@
+@@ -1984,7 +2026,13 @@ static void nma_set_wireless_enabled_cb
state = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget));
if (applet->wireless_enabled != state)
@@ -64,7 +65,7 @@
}
-@@ -1996,7 +2044,13 @@
+@@ -1996,7 +2044,13 @@ static void nma_set_networking_enabled_c
state = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget));
if ((applet->nm_state == NM_STATE_ASLEEP && state) || (applet->nm_state != NM_STATE_ASLEEP && !state))
@@ -78,7 +79,7 @@
}
-@@ -2574,6 +2628,36 @@
+@@ -2577,6 +2631,36 @@ static void G_GNUC_NORETURN nma_destroy
}
@@ -115,22 +116,23 @@
/*
* nma_get_instance
*
-@@ -2645,6 +2729,11 @@
- if (!applet->connection)
- nma_start_dbus_connection_watch (applet);
+@@ -2656,6 +2740,11 @@ static GtkWidget * nma_get_instance (NMA
+ g_signal_connect (applet, "destroy", G_CALLBACK (nma_destroy), NULL);
+ g_signal_connect (applet, "style-set", G_CALLBACK (nma_theme_change_cb), NULL);
+ g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
+ update_network_state,
+ g_object_ref (applet),
+ (GDestroyNotify) g_object_unref);
+
- /* Load pixmaps and create applet widgets */
- nma_setup_widgets (applet);
+ return GTK_WIDGET (applet);
+ }
-diff -urN NetworkManager-0.6.4/gnome/applet/applet.h NetworkManager-new/gnome/applet/applet.h
---- NetworkManager-0.6.4/gnome/applet/applet.h 2006-11-10 13:25:13.000000000 +0200
-+++ NetworkManager-new/gnome/applet/applet.h 2006-11-10 13:18:58.000000000 +0200
-@@ -156,6 +156,9 @@
+Index: nm-applet-0.6.5/src/applet.h
+===================================================================
+--- nm-applet-0.6.5/src/applet.h.orig
++++ nm-applet-0.6.5/src/applet.h
+@@ -157,6 +157,9 @@ void nma_set_state (NMApplet *ap
void nma_set_running (NMApplet *applet, gboolean running);
void nma_update_state (NMApplet *applet);
@@ -140,9 +142,10 @@
int nm_null_safe_strcmp (const char *s1, const char *s2);
#endif
-diff -urN NetworkManager-0.6.4/gnome/applet/main.c NetworkManager-new/gnome/applet/main.c
---- NetworkManager-0.6.4/gnome/applet/main.c 2006-11-10 13:25:14.000000000 +0200
-+++ NetworkManager-new/gnome/applet/main.c 2006-11-10 13:18:48.000000000 +0200
+Index: nm-applet-0.6.5/src/main.c
+===================================================================
+--- nm-applet-0.6.5/src/main.c.orig
++++ nm-applet-0.6.5/src/main.c
@@ -36,7 +36,14 @@
static void session_die (GnomeClient *client, gpointer client_data)
{
++++++ nm-applet-editor.patch ++++++
Index: NetworkManager-0.6.5/nm-applet-0.6.5/configure.ac
===================================================================
--- NetworkManager-0.6.5.orig/nm-applet-0.6.5/configure.ac
+++ NetworkManager-0.6.5/nm-applet-0.6.5/configure.ac
@@ -249,6 +249,7 @@ fi
AC_OUTPUT([
Makefile
src/Makefile
+editor/Makefile
icons/Makefile
po/Makefile.in
])
Index: NetworkManager-0.6.5/nm-applet-0.6.5/Makefile.am
===================================================================
--- NetworkManager-0.6.5.orig/nm-applet-0.6.5/Makefile.am
+++ NetworkManager-0.6.5/nm-applet-0.6.5/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = src icons po
+SUBDIRS = src editor icons po
EXTRA_DIST = \
CONTRIBUTING \
Index: NetworkManager-0.6.5/nm-applet-0.6.5/po/POTFILES.in
===================================================================
--- NetworkManager-0.6.5.orig/nm-applet-0.6.5/po/POTFILES.in
+++ NetworkManager-0.6.5/nm-applet-0.6.5/po/POTFILES.in
@@ -19,3 +19,11 @@ src/wso-wep-hex.c
src/wso-wep-passphrase.c
src/wso-wpa-eap.c
src/wso-wpa-psk.c
+editor/bssid-editor-dialog.c
+editor/editor-app.c
+editor/editor-gconf-helper.c
+editor/editor-keyring-helper.c
+editor/widget-wso-wep.c
+editor/widget-wso-wpa-enterprise.c
+editor/widget-wso-wpa-personal.c
+editor/editor.glade
Index: NetworkManager-0.6.5/nm-applet-0.6.5/src/applet.c
===================================================================
--- NetworkManager-0.6.5.orig/nm-applet-0.6.5/src/applet.c
+++ NetworkManager-0.6.5/nm-applet-0.6.5/src/applet.c
@@ -1614,6 +1614,28 @@ static void nma_menu_add_custom_essid_it
}
+static void edit_essid_items_selected (GtkWidget *menu_item, NMApplet *applet)
+{
+ g_spawn_command_line_async ("nm-editor", NULL);
+}
+
+
+static void nma_menu_add_edit_essid_item (GtkWidget *menu, NMApplet *applet)
+{
+ GtkWidget *menu_item;
+ GtkWidget *label;
+
+ menu_item = gtk_menu_item_new ();
+ label = gtk_label_new_with_mnemonic (_("_Edit Wireless Networks..."));
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_container_add (GTK_CONTAINER (menu_item), label);
+ gtk_widget_show_all (menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+ g_signal_connect (menu_item, "activate", G_CALLBACK (edit_essid_items_selected), applet);
+}
+
+
+
static void new_network_item_selected (GtkWidget *menu_item, NMApplet *applet)
{
nma_other_network_dialog_run (applet, TRUE);
@@ -2014,6 +2036,7 @@ static void nma_menu_add_devices (GtkWid
nma_menu_add_separator_item (menu);
nma_menu_add_custom_essid_item (menu, applet);
nma_menu_add_create_network_item (menu, applet);
+ nma_menu_add_edit_essid_item (menu, applet);
}
}
Index: NetworkManager-0.6.5/nm-applet-0.6.5/editor/Makefile.am
===================================================================
--- NetworkManager-0.6.5.orig/nm-applet-0.6.5/editor/Makefile.am
+++ NetworkManager-0.6.5/nm-applet-0.6.5/editor/Makefile.am
@@ -1,6 +1,6 @@
NULL=
-INCLUDES = -I${top_srcdir} -I${top_srcdir}/utils -I${top_srcdir}/include -I${top_srcdir}/libnm-util
+INCLUDES = -I${top_srcdir}/../include -I${top_srcdir}/../libnm-util
bin_PROGRAMS = nm-editor
@@ -55,8 +55,8 @@ nm_editor_LDADD = \
$(GCONF_LIBS) \
$(LIBGNOMEUI_LIBS) \
$(GNOME_KEYRING_LIBS) \
- $(top_builddir)/utils/libnmutils.la \
- $(top_builddir)/libnm-util/libnm-util.la \
+ $(top_builddir)/../utils/libnmutils.la \
+ $(top_builddir)/../libnm-util/libnm-util.la \
$(NULL)
Index: NetworkManager-0.6.5/nm-applet-0.6.5/editor/editor-app.c
===================================================================
--- NetworkManager-0.6.5.orig/nm-applet-0.6.5/editor/editor-app.c
+++ NetworkManager-0.6.5/nm-applet-0.6.5/editor/editor-app.c
@@ -197,7 +197,7 @@ gboolean quit_editor(WE_DATA *we_data)
if(we_data != NULL)
{
if(we_data->editor_xml != NULL)
- g_free(we_data->editor_xml);
+ g_object_unref(we_data->editor_xml);
if(we_data->gconf_client != NULL)
g_object_unref(we_data->gconf_client);
if(we_data->glade_file != NULL)
@@ -894,7 +894,7 @@ void update_security_widget(gint option,
if(we_data->sub_xml != NULL)
{
- g_free(we_data->sub_xml);
+ g_object_unref(we_data->sub_xml);
we_data->sub_xml = NULL;
}
++++++ nm-applet-fallback.patch ++++++
Index: nm-applet-0.6.5/src/applet-dbus-devices.c
===================================================================
--- nm-applet-0.6.5/src/applet-dbus-devices.c.orig
+++ nm-applet-0.6.5/src/applet-dbus-devices.c
@@ -1266,7 +1266,7 @@ void nma_dbus_device_remove_one_device (
*
*/
void nma_dbus_set_device (DBusConnection *connection, NetworkDevice *dev, const char *essid,
- WirelessSecurityOption * opt)
+ gboolean fallback, WirelessSecurityOption * opt)
{
DBusMessage * message;
gboolean success = TRUE;
@@ -1285,6 +1285,7 @@ void nma_dbus_set_device (DBusConnection
/* Build up the required args */
dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev_path,
DBUS_TYPE_STRING, &essid,
+ DBUS_TYPE_BOOLEAN, &fallback,
DBUS_TYPE_INVALID);
/* If we have specific wireless security options, add them */
Index: nm-applet-0.6.5/src/applet-dbus-devices.h
===================================================================
--- nm-applet-0.6.5/src/applet-dbus-devices.h.orig
+++ nm-applet-0.6.5/src/applet-dbus-devices.h
@@ -49,7 +49,7 @@ void nma_dbus_device_remove_one_device
void nma_dbus_device_update_one_network (NMApplet *applet, const char *dev_path, const char *net_path, const char *active_net_path);
void nma_dbus_device_remove_one_network (NMApplet *applet, const char *dev_path, const char *net_path);
void nma_dbus_update_strength (NMApplet *applet, const char *dev_path, const char *net_path, int strength);
-void nma_dbus_set_device (DBusConnection *connection, NetworkDevice *dev, const char *essid, WirelessSecurityOption *opt);
+void nma_dbus_set_device (DBusConnection *connection, NetworkDevice *dev, const char *essid, gboolean fallback, WirelessSecurityOption *opt);
void nma_dbus_create_network (DBusConnection *connection, NetworkDevice *dev, const char *essid, WirelessSecurityOption *opt);
void nma_free_data_model (NMApplet *applet);
Index: nm-applet-0.6.5/src/applet-dbus-info.c
===================================================================
--- nm-applet-0.6.5/src/applet-dbus-info.c.orig
+++ nm-applet-0.6.5/src/applet-dbus-info.c
@@ -428,7 +428,7 @@ nmi_dbus_get_network_properties (DBusCon
char * escaped_network = NULL;
char * essid = NULL;
gint timestamp = -1;
- gboolean trusted = FALSE;
+ gboolean fallback = FALSE;
DBusMessageIter iter, array_iter;
GConfClient * client;
NMGConfWSO * gconf_wso;
@@ -468,9 +468,9 @@ nmi_dbus_get_network_properties (DBusCon
if (!nm_gconf_get_int_helper (client, GCONF_PATH_WIRELESS_NETWORKS, "timestamp", escaped_network, ×tamp) || (timestamp < 0))
timestamp = 0;
- /* Trusted status */
- if (!nm_gconf_get_bool_helper (client, GCONF_PATH_WIRELESS_NETWORKS, "trusted", escaped_network, &trusted))
- trusted = FALSE;
+ /* Fallback status */
+ if (!nm_gconf_get_bool_helper (client, GCONF_PATH_WIRELESS_NETWORKS, "fallback", escaped_network, &fallback))
+ fallback = FALSE;
/* Grab the list of stored access point BSSIDs */
gconf_key = g_strdup_printf ("%s/%s/bssids", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
@@ -501,8 +501,8 @@ nmi_dbus_get_network_properties (DBusCon
/* Second arg: Timestamp (INT32) */
dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT32, ×tamp);
- /* Third arg: Trusted (BOOLEAN) */
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &trusted);
+ /* Third arg: Fallback? (BOOLEAN) */
+ dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &fallback);
/* Fourth arg: List of AP BSSIDs (ARRAY, STRING) */
dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING, &array_iter);
@@ -861,12 +861,14 @@ static void
nmi_save_network_info (NMApplet *applet,
const char *essid,
gboolean automatic,
+ gboolean fallback,
const char *bssid,
NMGConfWSO * gconf_wso)
{
- char * key;
- GConfEntry * gconf_entry;
- char * escaped_network;
+ char * key;
+ GConfEntry * gconf_entry;
+ char * escaped_network;
+ GConfValue * value;
g_return_if_fail (applet != NULL);
g_return_if_fail (essid != NULL);
@@ -897,9 +899,18 @@ nmi_save_network_info (NMApplet *applet,
g_free (key);
}
+ /*
+ * XXX: We don't want to move a network from fallback to non-fallback because the user
+ * connected via other means. We need a better way to do this.
+ */
+ key = g_strdup_printf ("%s/%s/fallback", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
+ value = gconf_client_get (applet->gconf_client, key, NULL);
+ if (!value || value->type != GCONF_VALUE_BOOL || (!gconf_value_get_bool (value) && fallback))
+ gconf_client_set_bool (applet->gconf_client, key, fallback, NULL);
+ g_free (key);
+
if (bssid && (strlen (bssid) >= 11))
{
- GConfValue * value;
GSList * new_bssid_list = NULL;
gboolean found = FALSE;
@@ -994,6 +1005,7 @@ nmi_dbus_update_network_info (DBusConnec
NMApplet * applet = (NMApplet *) user_data;
char * essid = NULL;
gboolean automatic;
+ gboolean fallback;
NMGConfWSO * gconf_wso = NULL;
DBusMessageIter iter;
char * bssid;
@@ -1024,7 +1036,15 @@ nmi_dbus_update_network_info (DBusConnec
}
dbus_message_iter_get_basic (&iter, &automatic);
- /* Third argument: Access point's BSSID */
+ /* Third argument: Fallback? (BOOLEAN) */
+ if (!dbus_message_iter_next (&iter) || (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_BOOLEAN))
+ {
+ nm_warning ("%s:%d - message argument 'fallback' was invalid.", __FILE__, __LINE__);
+ goto out;
+ }
+ dbus_message_iter_get_basic (&iter, &fallback);
+
+ /* Fourth argument: Access point's BSSID */
if (!dbus_message_iter_next (&iter) || (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_STRING))
{
nm_warning ("%s:%d - message argument 'bssid' was invalid.", __FILE__, __LINE__);
@@ -1042,7 +1062,7 @@ nmi_dbus_update_network_info (DBusConnec
goto out;
}
- nmi_save_network_info (applet, essid, automatic, bssid, gconf_wso);
+ nmi_save_network_info (applet, essid, automatic, fallback, bssid, gconf_wso);
g_object_unref (G_OBJECT (gconf_wso));
out:
Index: nm-applet-0.6.5/src/applet.c
===================================================================
--- nm-applet-0.6.5/src/applet.c.orig
+++ nm-applet-0.6.5/src/applet.c
@@ -1352,7 +1352,7 @@ static void nma_menu_item_activate (GtkM
if ((tag = g_object_get_data (G_OBJECT (item), "network")))
net = network_device_get_wireless_network_by_essid (dev, tag);
- nma_dbus_set_device (applet->connection, dev, net ? wireless_network_get_essid (net) : NULL, NULL);
+ nma_dbus_set_device (applet->connection, dev, net ? wireless_network_get_essid (net) : NULL, FALSE, NULL);
network_device_unref (dev);
nmi_dbus_signal_user_interface_activated (applet->connection);
Index: nm-applet-0.6.5/src/applet.glade
===================================================================
--- nm-applet-0.6.5/src/applet.glade.orig
+++ nm-applet-0.6.5/src/applet.glade
@@ -426,7 +426,7 @@ You have chosen to log in to the wireles
<child>
<widget class="GtkTable" id="table1">
<property name="visible">True</property>
- <property name="n_rows">4</property>
+ <property name="n_rows">5</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
<property name="row_spacing">6</property>
@@ -548,8 +548,8 @@ You have chosen to log in to the wireles
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@@ -569,8 +569,8 @@ WEP 64/128-bit ASCII
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
@@ -589,9 +589,31 @@ WEP 64/128-bit ASCII
<packing>
<property name="left_attach">0</property>
<property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="fallback_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Fallback on this Network</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options">fill</property>
+ <property name="y_options"></property>
</packing>
</child>
</widget>
Index: nm-applet-0.6.5/src/nm-gconf-wso-wpa-eap.c
===================================================================
--- nm-applet-0.6.5/src/nm-gconf-wso-wpa-eap.c.orig
+++ nm-applet-0.6.5/src/nm-gconf-wso-wpa-eap.c
@@ -346,3 +346,80 @@ nm_gconf_wso_wpa_eap_get_type (void)
}
return type;
}
+
+typedef struct {
+ GtkComboBox *combo;
+ gint value;
+} ComboSelectInfo;
+
+static gboolean
+combo_select (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data)
+{
+ ComboSelectInfo *info = user_data;
+ GValue val = { 0, };
+ gint i;
+
+ gtk_tree_model_get_value (model, iter, 1, &val);
+ i = g_value_get_int (&val);
+
+ if (i == info->value) {
+ gtk_combo_box_set_active_iter (info->combo, iter);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/* Ugh. Please avert your eyes. */
+void
+nm_gconf_wpa_eap_populate_dialog (NMGConfWSOWPA_EAP *wso, GladeXML *xml)
+{
+ GtkWidget *widget;
+ GtkTreeModel *model;
+ ComboSelectInfo info;
+
+ g_return_if_fail (wso != NULL);
+ g_return_if_fail (xml != NULL);
+
+ if (wso->priv->identity != NULL) {
+ widget = glade_xml_get_widget (xml, "wpa_eap_identity_entry");
+ gtk_entry_set_text (GTK_ENTRY (widget), wso->priv->identity);
+ }
+
+ if (wso->priv->passwd != NULL) {
+ widget = glade_xml_get_widget (xml, "wpa_eap_passwd_entry");
+ gtk_entry_set_text (GTK_ENTRY (widget), wso->priv->passwd);
+ }
+
+ if (wso->priv->anon_identity != NULL) {
+ widget = glade_xml_get_widget (xml, "wpa_eap_anon_identity_entry");
+ gtk_entry_set_text (GTK_ENTRY (widget), wso->priv->anon_identity);
+ }
+
+ widget = glade_xml_get_widget (xml, "wpa_eap_eap_method_combo");
+ info.combo = GTK_COMBO_BOX (widget);
+ info.value = wso->priv->eap_method;
+ gtk_tree_model_foreach (gtk_combo_box_get_model (info.combo),
+ combo_select, &info);
+
+ widget = glade_xml_get_widget (xml, "wpa_eap_key_type_combo");
+ info.combo = GTK_COMBO_BOX (widget);
+ info.value = wso->priv->key_type;
+ gtk_tree_model_foreach (gtk_combo_box_get_model (info.combo),
+ combo_select, &info);
+
+ if (wso->priv->client_cert_file != NULL && g_file_test (wso->priv->client_cert_file, G_FILE_TEST_EXISTS)) {
+ widget = glade_xml_get_widget (xml, "wpa_eap_client_cert_file_chooser_button");
+ gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), wso->priv->client_cert_file);
+ }
+
+ if (wso->priv->ca_cert_file != NULL && g_file_test (wso->priv->ca_cert_file, G_FILE_TEST_EXISTS)) {
+ widget = glade_xml_get_widget (xml, "wpa_eap_ca_cert_file_chooser_button");
+ gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), wso->priv->ca_cert_file);
+ }
+
+ if (wso->priv->private_key_file != NULL && g_file_test (wso->priv->private_key_file, G_FILE_TEST_EXISTS)) {
+ widget = glade_xml_get_widget (xml, "wpa_eap_private_key_file_chooser_button");
+ gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), wso->priv->private_key_file);
+ }
+}
Index: nm-applet-0.6.5/src/nm-gconf-wso-wpa-eap.h
===================================================================
--- nm-applet-0.6.5/src/nm-gconf-wso-wpa-eap.h.orig
+++ nm-applet-0.6.5/src/nm-gconf-wso-wpa-eap.h
@@ -59,4 +59,7 @@ NMGConfWSOWPA_EAP * nm_gconf_wso_wpa_eap
NMGConfWSOWPA_EAP * nm_gconf_wso_wpa_eap_new_deserialize_gconf (GConfClient *client, const char *network, int we_cipher);
+/* Ugh. Please avert your eyes. */
+void nm_gconf_wpa_eap_populate_dialog (NMGConfWSOWPA_EAP *wso, GladeXML *xml);
+
#endif /* NM_GCONF_WSO_WPA_EAP_H */
Index: nm-applet-0.6.5/src/other-network-dialog.c
===================================================================
--- nm-applet-0.6.5/src/other-network-dialog.c.orig
+++ nm-applet-0.6.5/src/other-network-dialog.c
@@ -410,19 +410,24 @@ static void nma_ond_response_cb (GtkDial
WirelessSecurityOption * opt;
GtkComboBox * security_combo;
GtkTreeIter iter;
+ GtkWidget * fallback_button;
char * str;
NetworkDevice * dev;
+ gboolean fallback;
gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter);
gtk_tree_model_get (model, &iter, NAME_COLUMN, &str, DEV_COLUMN, &dev, -1);
+ fallback_button = glade_xml_get_widget (xml, "fallback_button");
+ fallback = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fallback_button));
+
security_combo = GTK_COMBO_BOX (glade_xml_get_widget (xml, "security_combo"));
opt = wsm_get_option_for_active (wsm, security_combo);
if (create_network)
nma_dbus_create_network (applet->connection, dev, essid, opt);
else
- nma_dbus_set_device (applet->connection, dev, essid, opt);
+ nma_dbus_set_device (applet->connection, dev, essid, fallback, opt);
}
}
Index: nm-applet-0.6.5/src/passphrase-dialog.c
===================================================================
--- nm-applet-0.6.5/src/passphrase-dialog.c.orig
+++ nm-applet-0.6.5/src/passphrase-dialog.c
@@ -37,6 +37,9 @@
#include "NetworkManager.h"
#include "wireless-security-manager.h"
+#include "nm-gconf-wso-wpa-eap.h"
+#include "wso-private.h"
+
static GladeXML *get_dialog_xml (GtkWidget *dialog)
{
g_return_val_if_fail (dialog != NULL, NULL);
@@ -269,6 +272,24 @@ nmi_passphrase_dialog_new (NMApplet *app
g_signal_connect (G_OBJECT (dialog), "response", GTK_SIGNAL_FUNC (nmi_passphrase_dialog_response_received), dialog);
+ /* Ugh. Avert your eyes, please. */
+ {
+ /* Pre-populate the dialog if we have information about this network. */
+ NMGConfWSO *wso;
+ const char *essid;
+ char *escaped_network;
+
+ essid = wireless_network_get_essid (net);
+ escaped_network = gconf_escape_key (essid, strlen (essid));
+ wso = nm_gconf_wso_new_deserialize_gconf (applet->gconf_client, escaped_network);
+ g_free (escaped_network);
+
+ if (wso != NULL && NM_IS_GCONF_WSO_WPA_EAP (wso)) {
+ WirelessSecurityOption *wso_widget = wsm_get_option_for_active (wsm, GTK_COMBO_BOX (security_combo));
+ nm_gconf_wpa_eap_populate_dialog (NM_GCONF_WSO_WPA_EAP (wso), wso_widget->uixml);
+ }
+ }
+
/* Bash focus-stealing prevention in the face */
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ALWAYS);
gtk_widget_realize (dialog);
++++++ nm-configure-networking-rml.patch ++++++
--- /var/tmp/diff_new_pack.ee8717/_old 2007-08-03 21:49:54.000000000 +0200
+++ /var/tmp/diff_new_pack.ee8717/_new 2007-08-03 21:49:54.000000000 +0200
@@ -1,12 +1,8 @@
-? gnome/applet/applet.gladep
-Index: gnome/applet/applet.c
+Index: nm-applet-0.6.5/src/applet.c
===================================================================
-RCS file: /cvs/gnome/NetworkManager/gnome/applet/applet.c,v
-retrieving revision 1.112.2.3
-diff -u -r1.112.2.3 applet.c
---- gnome/applet/applet.c 9 Mar 2006 21:51:24 -0000 1.112.2.3
-+++ gnome/applet/applet.c 15 Mar 2006 16:01:28 -0000
-@@ -271,16 +271,43 @@
+--- nm-applet-0.6.5/src/applet.c.orig
++++ nm-applet-0.6.5/src/applet.c
+@@ -273,16 +273,43 @@ static gboolean nma_update_info (NMApple
return TRUE;
}
@@ -15,7 +11,7 @@
+static gboolean nma_run_yast (GtkWidget *info_dialog)
{
- GtkWidget *info_dialog;
-+ char *argv[] = { "/usr/bin/gnomesu", "/sbin/yast2", "lan", NULL };
++ char *argv[] = { "/opt/gnome/bin/gnomesu", "/sbin/yast2", "lan", NULL };
+ GError *err = NULL;
- info_dialog = glade_xml_get_widget (applet->info_dialog_xml, "info_dialog");
@@ -54,14 +50,14 @@
}
}
-@@ -1822,10 +1849,42 @@
+@@ -1742,10 +1769,42 @@ static void nma_menu_add_vpn_menu (GtkWi
}
+static void nma_config_dialup_cb (GtkMenu *item, gpointer data)
+{
-+ char *modem_argv[] = { "/usr/bin/gnomesu", "/sbin/yast2", "modem", NULL };
-+ char *isdn_argv[] = { "/usr/bin/gnomesu", "/sbin/yast2", "isdn", NULL };
++ char *modem_argv[] = { "/opt/gnome/bin/gnomesu", "/sbin/yast2", "modem", NULL };
++ char *isdn_argv[] = { "/opt/gnome/bin/gnomesu", "/sbin/yast2", "isdn", NULL };
+ char **argv;
+ gboolean modem = (gboolean) data;
+ GError *err = NULL;
@@ -97,7 +93,7 @@
GSList *elt;
g_return_if_fail (menu != NULL);
-@@ -1855,6 +1914,14 @@
+@@ -1777,6 +1836,14 @@ static void nma_menu_add_dialup_menu (Gt
gtk_menu_shell_append (GTK_MENU_SHELL (dialup_menu), GTK_WIDGET (disconnect_item));
}
@@ -112,7 +108,7 @@
gtk_menu_item_set_submenu (item, GTK_WIDGET (dialup_menu));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), GTK_WIDGET (item));
gtk_widget_show_all (GTK_WIDGET (item));
-@@ -2570,6 +2637,9 @@
+@@ -2518,6 +2585,9 @@ static void G_GNUC_NORETURN nma_destroy
*/
static GtkWidget * nma_get_instance (NMApplet *applet)
{
@@ -122,7 +118,7 @@
gtk_widget_hide (GTK_WIDGET (applet));
applet->nm_running = FALSE;
-@@ -2589,6 +2659,15 @@
+@@ -2545,6 +2615,15 @@ static GtkWidget * nma_get_instance (NMA
}
applet->info_dialog_xml = glade_xml_new (applet->glade_file, "info_dialog", NULL);
@@ -138,14 +134,11 @@
applet->gconf_client = gconf_client_get_default ();
if (!applet->gconf_client)
-Index: gnome/applet/applet.glade
+Index: nm-applet-0.6.5/src/applet.glade
===================================================================
-RCS file: /cvs/gnome/NetworkManager/gnome/applet/applet.glade,v
-retrieving revision 1.4.2.2
-diff -u -r1.4.2.2 applet.glade
---- gnome/applet/applet.glade 10 Mar 2006 16:38:19 -0000 1.4.2.2
-+++ gnome/applet/applet.glade 15 Mar 2006 16:01:28 -0000
-@@ -852,24 +852,9 @@
+--- nm-applet-0.6.5/src/applet.glade.orig
++++ nm-applet-0.6.5/src/applet.glade
+@@ -855,24 +855,9 @@ WEP 64/128-bit ASCII
<property name="spacing">6</property>
<child internal-child="action_area">
@@ -171,7 +164,7 @@
</widget>
<packing>
<property name="padding">0</property>
-@@ -924,7 +909,7 @@
+@@ -927,7 +912,7 @@ WEP 64/128-bit ASCII
<widget class="GtkTable" id="table1">
<property name="border_width">1</property>
<property name="visible">True</property>
@@ -179,15 +172,11 @@
+ <property name="n_rows">16</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
-@@ -1689,6 +1674,165 @@
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
-+ <property name="x_options">fill</property>
-+ <property name="y_options"></property>
-+ </packing>
-+ </child>
+ <property name="row_spacing">6</property>
+@@ -1696,6 +1681,165 @@ WEP 64/128-bit ASCII
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="closebutton1">
@@ -343,6 +332,10 @@
+ <property name="right_attach">2</property>
+ <property name="top_attach">14</property>
+ <property name="bottom_attach">15</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
++ <property name="x_options">fill</property>
++ <property name="y_options"></property>
++ </packing>
++ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
++++++ nm-fallback.patch ++++++
++++ 786 lines (skipped)
++++ between NetworkManager/nm-fallback.patch
++++ and /mounts/work_src_done/STABLE/NetworkManager/nm-fallback.patch
++++++ nm-fix-adhoc-icon-rml.patch ++++++
--- /var/tmp/diff_new_pack.ee8717/_old 2007-08-03 21:49:54.000000000 +0200
+++ /var/tmp/diff_new_pack.ee8717/_new 2007-08-03 21:49:54.000000000 +0200
@@ -1,11 +1,8 @@
-Index: gnome/applet/applet.c
+Index: nm-applet-0.6.5/src/applet.c
===================================================================
-RCS file: /cvs/gnome/NetworkManager/gnome/applet/applet.c,v
-retrieving revision 1.112.2.6
-diff -u -r1.112.2.6 applet.c
---- gnome/applet/applet.c 17 May 2006 20:03:56 -0000 1.112.2.6
-+++ gnome/applet/applet.c 17 May 2006 20:49:51 -0000
-@@ -2593,7 +2593,7 @@
+--- nm-applet-0.6.5/src/applet.c.orig
++++ nm-applet-0.6.5/src/applet.c
+@@ -2741,7 +2741,7 @@ nma_icons_load_from_disk (NMApplet *appl
ICON_LOAD(applet->no_connection_icon, "nm-no-connection");
ICON_LOAD(applet->wired_icon, "nm-device-wired");
++++++ nm-make-wireless-menu-item-inactive-rml.patch ++++++
--- /var/tmp/diff_new_pack.ee8717/_old 2007-08-03 21:49:54.000000000 +0200
+++ /var/tmp/diff_new_pack.ee8717/_new 2007-08-03 21:49:54.000000000 +0200
@@ -1,14 +1,8 @@
- gnome/applet/menu-items.c | 9 ---------
- 1 files changed, 9 deletions(-)
-
-Index: gnome/applet/menu-items.c
+Index: nm-applet-0.6.5/src/menu-items.c
===================================================================
-RCS file: /cvs/gnome/NetworkManager/gnome/applet/menu-items.c,v
-retrieving revision 1.6
-diff -u -u -r1.6 menu-items.c
---- gnome/applet/menu-items.c 30 Jun 2005 14:31:24 -0000 1.6
-+++ gnome/applet/menu-items.c 30 Jun 2005 19:06:51 -0000
-@@ -112,14 +112,6 @@
+--- nm-applet-0.6.5.orig/src/menu-items.c
++++ nm-applet-0.6.5/src/menu-items.c
+@@ -112,14 +112,6 @@ struct NMWirelessMenuItem
};
@@ -23,7 +17,7 @@
NMWirelessMenuItem *wireless_menu_item_new (void)
{
NMWirelessMenuItem *item = g_malloc0 (sizeof (NMWirelessMenuItem));
-@@ -131,7 +123,6 @@
+@@ -129,7 +121,6 @@ NMWirelessMenuItem *wireless_menu_item_n
/* Make sure it looks slightly different if the label determines the width of the widget */
item->label = GTK_LABEL (gtk_label_new (NULL));
gtk_misc_set_padding (GTK_MISC (item->label), 6, 0);
++++++ nm-never-restart-nm-applet-rml.patch ++++++
--- /var/tmp/diff_new_pack.ee8717/_old 2007-08-03 21:49:54.000000000 +0200
+++ /var/tmp/diff_new_pack.ee8717/_new 2007-08-03 21:49:54.000000000 +0200
@@ -1,17 +1,13 @@
-? gnome/applet/.main.c.swp
-Index: gnome/applet/main.c
+Index: nm-applet-0.6.5/src/main.c
===================================================================
-RCS file: /cvs/gnome/NetworkManager/gnome/applet/main.c,v
-retrieving revision 1.10
-diff -u -r1.10 main.c
---- gnome/applet/main.c 3 Feb 2006 15:34:27 -0000 1.10
-+++ gnome/applet/main.c 3 Feb 2006 16:28:09 -0000
-@@ -52,7 +52,7 @@
+--- nm-applet-0.6.5.orig/src/main.c
++++ nm-applet-0.6.5/src/main.c
+@@ -50,7 +50,7 @@ int main (int argc, char *argv[])
GNOME_PARAM_NONE, GNOME_PARAM_NONE);
client = gnome_master_client ();
- gnome_client_set_restart_style (client, GNOME_RESTART_ANYWAY);
+ gnome_client_set_restart_style (client, GNOME_RESTART_NEVER);
- g_signal_connect (client, "save_yourself", G_CALLBACK (session_save), NULL);
- g_signal_connect (client, "die", G_CALLBACK (session_die), NULL);
+ bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
++++++ nm-resolv-conf-header-rml.patch ++++++
--- /var/tmp/diff_new_pack.ee8717/_old 2007-08-03 21:49:54.000000000 +0200
+++ /var/tmp/diff_new_pack.ee8717/_new 2007-08-03 21:49:54.000000000 +0200
@@ -1,16 +1,8 @@
---- src/named-manager/Makefile.am
-+++ src/named-manager/Makefile.am
-@@ -4,6 +4,6 @@
-
- libnamed_manager_la_SOURCES = nm-named-manager.h nm-named-manager.c
-
--libnamed_manager_la_CPPFLAGS = $(DBUS_CFLAGS) $(GTHREAD_CFLAGS) -DNM_PKGDATADIR=\"$(pkgdatadir)\" -DNM_LOCALSTATEDIR=\"$(localstatedir)\" -DDBUS_API_SUBJECT_TO_CHANGE
-+libnamed_manager_la_CPPFLAGS = $(DBUS_CFLAGS) $(GTHREAD_CFLAGS) -DNM_PKGDATADIR=\"$(pkgdatadir)\" -DNM_LOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\" -DDBUS_API_SUBJECT_TO_CHANGE
-
- libnamed_manager_la_LIBADD = $(DBUS_LIBS) $(GTHREAD_LIBS)
---- src/named-manager/nm-named-manager.c
-+++ src/named-manager/nm-named-manager.c
-@@ -367,7 +367,15 @@
+Index: NetworkManager-0.6.5/src/named-manager/nm-named-manager.c
+===================================================================
+--- NetworkManager-0.6.5.orig/src/named-manager/nm-named-manager.c
++++ NetworkManager-0.6.5/src/named-manager/nm-named-manager.c
+@@ -367,7 +367,15 @@ rewrite_resolv_conf (NMNamedManager *mgr
if ((f = fopen (tmp_resolv_conf, "w")) == NULL)
goto lose;
@@ -19,7 +11,7 @@
+ goto lose;
+ if (fprintf (f, "# Modified_by: NetworkManager\n") < 0)
+ goto lose;
-+ if (fprintf (f, "# Process: " SBINDIR "/NetworkManager\n") < 0)
++ if (fprintf (f, "# Process: /usr/bin/NetworkManager\n") < 0)
+ goto lose;
+ if (fprintf (f, "# Process_id: %d\n", getpid ()) < 0)
+ goto lose;
@@ -27,4 +19,3 @@
goto lose;
searches = compute_searches (mgr, config);
-
++++++ nm-save-passwds-in-keyring.patch ++++++
Index: nm-applet-0.6.5/src/applet-dbus-info.c
===================================================================
--- nm-applet-0.6.5/src/applet-dbus-info.c.orig
+++ nm-applet-0.6.5/src/applet-dbus-info.c
@@ -39,6 +39,7 @@
#include "passphrase-dialog.h"
#include "nm-utils.h"
#include "nm-gconf-wso.h"
+#include "nm-gconf-wso-wpa-eap.h"
#include "gconf-helpers.h"
#include "dbus-method-dispatcher.h"
#include "dbus-helpers.h"
@@ -73,6 +74,7 @@ typedef struct NMGetNetworkKeyCBData
{
NMApplet *applet;
DBusMessage *message;
+ NMGConfWSO *gconf_wso;
NetworkDevice *dev;
char *net_path;
char *essid;
@@ -83,6 +85,7 @@ static void free_network_key_cb_data (NM
if (cb_data)
{
dbus_message_unref (cb_data->message);
+ g_object_unref (cb_data->gconf_wso);
network_device_unref (cb_data->dev);
g_free (cb_data->net_path);
g_free (cb_data->essid);
@@ -92,6 +95,37 @@ static void free_network_key_cb_data (NM
}
+static void
+nmi_dbus_get_eap_key_callback (GnomeKeyringResult result,
+ GList *found_list,
+ gpointer data)
+{
+ NMGetNetworkKeyCBData * cb_data = (NMGetNetworkKeyCBData*) data;
+ NMApplet * applet = cb_data->applet;
+ DBusMessage * message = cb_data->message;
+ NMGConfWSO * gconf_wso = cb_data->gconf_wso;
+ NetworkDevice * dev = cb_data->dev;
+ char * net_path = cb_data->net_path;
+
+ if (result == GNOME_KEYRING_RESULT_OK) {
+ GnomeKeyringFound * found;
+
+ found = found_list->data;
+ nm_gconf_wso_wpa_eap_set_password (NM_GCONF_WSO_WPA_EAP (gconf_wso),
+ found->secret,
+ strlen (found->secret));
+ nmi_dbus_return_user_key (applet->connection, message, gconf_wso);
+ } else {
+ WirelessNetwork *net;
+
+ nmi_passphrase_dialog_destroy (applet);
+ if ((net = network_device_get_wireless_network_by_nm_path (dev, net_path)))
+ applet->passphrase_dialog = nmi_passphrase_dialog_new (applet, 0, dev, net, message);
+ }
+
+ free_network_key_cb_data (cb_data);
+}
+
static void nmi_dbus_get_network_key_callback (GnomeKeyringResult result,
GList *found_list,
gpointer data)
@@ -99,26 +133,30 @@ static void nmi_dbus_get_network_key_cal
NMGetNetworkKeyCBData * cb_data = (NMGetNetworkKeyCBData*) data;
NMApplet * applet = cb_data->applet;
DBusMessage * message = cb_data->message;
+ NMGConfWSO * gconf_wso = cb_data->gconf_wso;
NetworkDevice * dev = cb_data->dev;
char * net_path = cb_data->net_path;
char * essid = cb_data->essid;
- if (result == GNOME_KEYRING_RESULT_OK)
- {
- gchar * escaped_network;
- GnomeKeyringFound * found;
- NMGConfWSO * gconf_wso;
+ if (result == GNOME_KEYRING_RESULT_OK) {
+ GnomeKeyringFound *found = (GnomeKeyringFound *) found_list->data;
+ nm_gconf_wso_set_key (gconf_wso, found->secret, strlen (found->secret));
- escaped_network = gconf_escape_key (essid, strlen (essid));
- gconf_wso = nm_gconf_wso_new_deserialize_gconf (applet->gconf_client, escaped_network);
- g_free (escaped_network);
+ if (nm_gconf_wso_get_we_cipher (gconf_wso) == NM_AUTH_TYPE_WPA_EAP &&
+ nm_gconf_wso_wpa_eap_have_passwd (NM_GCONF_WSO_WPA_EAP (gconf_wso))) {
- found = found_list->data;
- nm_gconf_wso_set_key (gconf_wso, found->secret, strlen (found->secret));
- nmi_dbus_return_user_key (applet->connection, message, gconf_wso);
- }
- else
- {
+ gnome_keyring_find_itemsv (GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ nmi_dbus_get_eap_key_callback,
+ cb_data,
+ NULL,
+ "eap-essid",
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ essid,
+ NULL);
+ return; /* Don't free cb_data */
+ } else
+ nmi_dbus_return_user_key (applet->connection, message, gconf_wso);
+ } else {
WirelessNetwork *net;
nmi_passphrase_dialog_destroy (applet);
@@ -222,6 +260,7 @@ nmi_dbus_get_key_for_network (DBusConnec
cb_data->essid = g_strdup (essid);
cb_data->message = message;
dbus_message_ref (message);
+ cb_data->gconf_wso = nm_gconf_wso_new_deserialize_gconf (applet->gconf_client, escaped_network);
cb_data->dev = dev;
network_device_ref (dev);
cb_data->net_path = g_strdup (net_path);
@@ -234,16 +273,38 @@ nmi_dbus_get_key_for_network (DBusConnec
gtk_menu_shell_deactivate (GTK_MENU_SHELL (applet->dropdown_menu));
/* Get the essid key, if any, from the keyring */
- gnome_keyring_find_itemsv (GNOME_KEYRING_ITEM_GENERIC_SECRET,
- (GnomeKeyringOperationGetListCallback) nmi_dbus_get_network_key_callback,
- cb_data,
- NULL,
- "essid",
- GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
- essid,
- NULL);
+ if (!NM_IS_GCONF_WSO_WPA_EAP (cb_data->gconf_wso) ||
+ (NM_IS_GCONF_WSO_WPA_EAP (cb_data->gconf_wso) &&
+ nm_gconf_wso_wpa_eap_have_private_key_passwd (NM_GCONF_WSO_WPA_EAP (cb_data->gconf_wso)))) {
+
+ /* Not WPA-EAP or WPA-EAP and have private key password */
+ gnome_keyring_find_itemsv (GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ nmi_dbus_get_network_key_callback,
+ cb_data,
+ NULL,
+ "essid",
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ essid,
+ NULL);
+ } else if (NM_IS_GCONF_WSO_WPA_EAP (cb_data->gconf_wso) &&
+ nm_gconf_wso_wpa_eap_have_passwd (NM_GCONF_WSO_WPA_EAP (cb_data->gconf_wso))) {
+
+ /* WPA-EAP, no private key password, user password */
+ gnome_keyring_find_itemsv (GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ nmi_dbus_get_eap_key_callback,
+ cb_data,
+ NULL,
+ "eap-essid",
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ essid,
+ NULL);
+ } else {
+ free_network_key_cb_data (cb_data);
+ new_key = TRUE;
+ }
}
- else
+
+ if (new_key)
{
/* We only ask the user for a new key when we know about the network from NM,
* since throwing up a dialog with a random essid from somewhere is a security issue.
@@ -255,6 +316,8 @@ nmi_dbus_get_key_for_network (DBusConnec
}
}
+ g_free (escaped_network);
+
return NULL;
}
@@ -850,6 +913,62 @@ save_network_info_keyring_cb (GnomeKeyri
nm_warning ("Error saving secret for wireless network '%s' in keyring: %d", (char *) user_data, result);
}
+
+static void
+save_one_secret (const char *description, const char *essid, const char *name, const char *key)
+{
+ GnomeKeyringAttributeList *attributes;
+ GnomeKeyringAttribute attr;
+ GnomeKeyringResult ret;
+ guint32 item_id;
+
+ attributes = gnome_keyring_attribute_list_new ();
+ attr.name = g_strdup (name);
+ attr.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
+ attr.value.string = g_strdup (essid);
+ g_array_append_val (attributes, attr);
+
+ ret = gnome_keyring_item_create_sync (NULL,
+ GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ description,
+ attributes,
+ key,
+ TRUE,
+ &item_id);
+ if (ret != GNOME_KEYRING_RESULT_OK)
+ nm_warning ("Error saving secret for wireless network '%s' in keyring: %d", essid, ret);
+
+ gnome_keyring_attribute_list_free (attributes);
+}
+
+static void
+save_secrets (NMGConfWSO *gconf_wso, const char *essid)
+{
+ int we_cipher;
+ const char *key;
+ char *description;
+
+ we_cipher = nm_gconf_wso_get_we_cipher (gconf_wso);
+ if (we_cipher == IW_AUTH_CIPHER_NONE)
+ /* That was easy */
+ return;
+
+ key = nm_gconf_wso_get_key (gconf_wso);
+ if (key) {
+ description = g_strdup_printf (_("Passphrase for wireless network %s"), essid);
+ save_one_secret (description, essid, "essid", key);
+ g_free (description);
+ }
+
+ if (we_cipher == NM_AUTH_TYPE_WPA_EAP) {
+ key = nm_gconf_wso_wpa_eap_get_password (NM_GCONF_WSO_WPA_EAP (gconf_wso));
+ if (key) {
+ description = g_strdup_printf (_("EAP password for wireless network %s"), essid);
+ save_one_secret (description, essid, "eap-essid", key);
+ g_free (description);
+ }
+ }
+}
/*
* nmi_save_network_info
@@ -958,32 +1077,7 @@ nmi_save_network_info (NMApplet *applet,
}
/* Stuff the encryption key into the keyring */
- if (nm_gconf_wso_get_we_cipher (gconf_wso) != IW_AUTH_CIPHER_NONE)
- {
- GnomeKeyringAttributeList * attributes;
- GnomeKeyringAttribute attr;
- char * display_name;
-
- display_name = g_strdup_printf (_("Passphrase for wireless network %s"), essid);
-
- attributes = gnome_keyring_attribute_list_new ();
- attr.name = g_strdup ("essid");
- attr.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
- attr.value.string = g_strdup (essid);
- g_array_append_val (attributes, attr);
-
- gnome_keyring_item_create (NULL,
- GNOME_KEYRING_ITEM_GENERIC_SECRET,
- display_name,
- attributes,
- nm_gconf_wso_get_key (gconf_wso),
- TRUE,
- save_network_info_keyring_cb,
- g_strdup (essid),
- (GDestroyNotify) g_free);
- g_free (display_name);
- gnome_keyring_attribute_list_free (attributes);
- }
+ save_secrets (gconf_wso, essid);
out:
g_free (escaped_network);
Index: nm-applet-0.6.5/src/nm-gconf-wso-wpa-eap.c
===================================================================
--- nm-applet-0.6.5/src/nm-gconf-wso-wpa-eap.c.orig
+++ nm-applet-0.6.5/src/nm-gconf-wso-wpa-eap.c
@@ -49,6 +49,9 @@ struct _NMGConfWSOWPA_EAPPrivate
const char * private_key_file;
const char * client_cert_file;
const char * ca_cert_file;
+
+ gboolean have_passwd;
+ gboolean have_private_key_passwd;
};
@@ -78,14 +81,21 @@ nm_gconf_wso_wpa_eap_new_deserialize_dbu
/* Success, build up our security object */
security = g_object_new (NM_TYPE_GCONF_WSO_WPA_EAP, NULL);
nm_gconf_wso_set_we_cipher (NM_GCONF_WSO (security), we_cipher);
- if (private_key_passwd && strlen (private_key_passwd) > 0)
+ if (private_key_passwd && strlen (private_key_passwd) > 0) {
+ security->priv->have_private_key_passwd = TRUE;
nm_gconf_wso_set_key (NM_GCONF_WSO (security), private_key_passwd, strlen (private_key_passwd));
+ }
security->priv->wpa_version = wpa_version;
security->priv->key_type = key_type;
security->priv->eap_method = NM_EAP_TO_EAP_METHOD (eap_method);
security->priv->phase2_type = NM_EAP_TO_PHASE2_METHOD (eap_method);
security->priv->key_mgmt = IW_AUTH_KEY_MGMT_802_1X;
- security->priv->identity = g_strdup (identity);
+
+ if (passwd) {
+ security->priv->have_passwd = TRUE;
+ security->priv->passwd = g_strdup (passwd);
+ }
+
security->priv->passwd = g_strdup (passwd);
security->priv->anon_identity = g_strdup (anon_identity);
security->priv->private_key_file = g_strdup (private_key_file);
@@ -102,7 +112,6 @@ nm_gconf_wso_wpa_eap_new_deserialize_gco
{
NMGConfWSOWPA_EAP * security = NULL;
char * identity = NULL;
- char * passwd = NULL;
char * anon_identity = NULL;
char * private_key_file = NULL;
char * client_cert_file = NULL;
@@ -112,6 +121,8 @@ nm_gconf_wso_wpa_eap_new_deserialize_gco
int key_type = 0;
int phase2_type = 0;
int key_mgmt = 0;
+ gboolean have_passwd = FALSE;
+ gboolean have_private_key_passwd = FALSE;
g_return_val_if_fail (client != NULL, NULL);
g_return_val_if_fail (network != NULL, NULL);
@@ -155,12 +166,6 @@ nm_gconf_wso_wpa_eap_new_deserialize_gco
nm_gconf_get_string_helper (client,
GCONF_PATH_WIRELESS_NETWORKS,
- WPA_EAP_PREFIX"passwd",
- network,
- &passwd);
-
- nm_gconf_get_string_helper (client,
- GCONF_PATH_WIRELESS_NETWORKS,
WPA_EAP_PREFIX"anon_identity",
network,
&anon_identity);
@@ -183,6 +188,18 @@ nm_gconf_wso_wpa_eap_new_deserialize_gco
network,
&ca_cert_file);
+ nm_gconf_get_bool_helper (client,
+ GCONF_PATH_WIRELESS_NETWORKS,
+ WPA_EAP_PREFIX"passwd",
+ network,
+ &have_passwd);
+
+ nm_gconf_get_bool_helper (client,
+ GCONF_PATH_WIRELESS_NETWORKS,
+ WPA_EAP_PREFIX"private_key_passwd",
+ network,
+ &have_private_key_passwd);
+
/* Success, build up our security object */
security = g_object_new (NM_TYPE_GCONF_WSO_WPA_EAP, NULL);
nm_gconf_wso_set_we_cipher (NM_GCONF_WSO (security), we_cipher);
@@ -192,14 +209,14 @@ nm_gconf_wso_wpa_eap_new_deserialize_gco
security->priv->phase2_type = phase2_type;
security->priv->key_mgmt = IW_AUTH_KEY_MGMT_802_1X;
security->priv->identity = g_strdup (identity);
- security->priv->passwd = g_strdup (passwd);
security->priv->anon_identity = g_strdup (anon_identity);
security->priv->private_key_file = g_strdup (private_key_file);
security->priv->client_cert_file = g_strdup (client_cert_file);
security->priv->ca_cert_file = g_strdup (ca_cert_file);
+ security->priv->have_passwd = have_passwd;
+ security->priv->have_private_key_passwd = have_private_key_passwd;
g_free (identity);
- g_free (passwd);
g_free (anon_identity);
g_free (private_key_file);
g_free (client_cert_file);
@@ -262,13 +279,6 @@ real_serialize_gconf (NMGConfWSO *instan
g_free (key);
}
- if (self->priv->passwd && strlen (self->priv->passwd) > 0)
- {
- key = g_strdup_printf ("%s/%s/%spasswd", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX);
- gconf_client_set_string (client, key, self->priv->passwd, NULL);
- g_free (key);
- }
-
if (self->priv->anon_identity && strlen (self->priv->anon_identity) > 0)
{
key = g_strdup_printf ("%s/%s/%sanon_identity", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX);
@@ -297,6 +307,18 @@ real_serialize_gconf (NMGConfWSO *instan
g_free (key);
}
+ /* Only update these if we have any security information. NM happens to send blank
+ security every now and then */
+ if (self->priv->passwd || nm_gconf_wso_get_key (instance)) {
+ key = g_strdup_printf ("%s/%s/%spasswd", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX);
+ gconf_client_set_bool (client, key, self->priv->have_passwd, NULL);
+ g_free (key);
+
+ key = g_strdup_printf ("%s/%s/%sprivate_key_passwd", GCONF_PATH_WIRELESS_NETWORKS, network, WPA_EAP_PREFIX);
+ gconf_client_set_bool (client, key, self->priv->have_private_key_passwd, NULL);
+ g_free (key);
+ }
+
return TRUE;
}
@@ -423,3 +445,42 @@ nm_gconf_wpa_eap_populate_dialog (NMGCon
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), wso->priv->private_key_file);
}
}
+
+void
+nm_gconf_wso_wpa_eap_set_password (NMGConfWSOWPA_EAP *wso, const char *passwd, int passwd_len)
+{
+ g_return_if_fail (NM_IS_GCONF_WSO_WPA_EAP (wso));
+ g_return_if_fail (passwd != NULL);
+ g_return_if_fail (passwd_len > 0);
+
+ if (wso->priv->passwd)
+ g_free (wso->priv->passwd);
+
+ wso->priv->passwd = g_malloc0 (passwd_len + 1);
+ memcpy (wso->priv->passwd, passwd, passwd_len);
+ wso->priv->have_passwd = TRUE;
+}
+
+const char *
+nm_gconf_wso_wpa_eap_get_password (NMGConfWSOWPA_EAP *wso)
+{
+ g_return_val_if_fail (NM_IS_GCONF_WSO_WPA_EAP (wso), NULL);
+
+ return wso->priv->passwd;
+}
+
+gboolean
+nm_gconf_wso_wpa_eap_have_private_key_passwd (NMGConfWSOWPA_EAP *wso)
+{
+ g_return_val_if_fail (NM_IS_GCONF_WSO_WPA_EAP (wso), FALSE);
+
+ return wso->priv->have_private_key_passwd;
+}
+
+gboolean
+nm_gconf_wso_wpa_eap_have_passwd (NMGConfWSOWPA_EAP *wso)
+{
+ g_return_val_if_fail (NM_IS_GCONF_WSO_WPA_EAP (wso), FALSE);
+
+ return wso->priv->have_passwd;
+}
Index: nm-applet-0.6.5/src/nm-gconf-wso-wpa-eap.h
===================================================================
--- nm-applet-0.6.5/src/nm-gconf-wso-wpa-eap.h.orig
+++ nm-applet-0.6.5/src/nm-gconf-wso-wpa-eap.h
@@ -61,5 +61,9 @@ NMGConfWSOWPA_EAP * nm_gconf_wso_wpa_eap
/* Ugh. Please avert your eyes. */
void nm_gconf_wpa_eap_populate_dialog (NMGConfWSOWPA_EAP *wso, GladeXML *xml);
+void nm_gconf_wso_wpa_eap_set_password (NMGConfWSOWPA_EAP *wso, const char *passwd, int passwd_len);
+const char *nm_gconf_wso_wpa_eap_get_password (NMGConfWSOWPA_EAP *wso);
+gboolean nm_gconf_wso_wpa_eap_have_private_key_passwd (NMGConfWSOWPA_EAP *wso);
+gboolean nm_gconf_wso_wpa_eap_have_passwd (NMGConfWSOWPA_EAP *wso);
#endif /* NM_GCONF_WSO_WPA_EAP_H */
++++++ nm-wireless-driver-workarounds-rml.patch ++++++
--- /var/tmp/diff_new_pack.ee8717/_old 2007-08-03 21:49:54.000000000 +0200
+++ /var/tmp/diff_new_pack.ee8717/_new 2007-08-03 21:49:55.000000000 +0200
@@ -1,6 +1,34 @@
---- src/nm-device-802-11-wireless.c.old 2006-11-10 12:28:06.000000000 +0200
-+++ src/nm-device-802-11-wireless.c 2006-11-10 12:28:40.000000000 +0200
-@@ -354,23 +354,15 @@
+Index: NetworkManager-0.6.5/src/nm-device-802-11-wireless.c
+===================================================================
+--- NetworkManager-0.6.5.orig/src/nm-device-802-11-wireless.c
++++ NetworkManager-0.6.5/src/nm-device-802-11-wireless.c
+@@ -116,9 +116,10 @@ static gboolean process_scan_results (NM
+ guint32 res_buf_len);
+ static void schedule_scan (NMDevice80211Wireless *self);
+
+-static int wireless_qual_to_percent (const struct iw_quality *qual,
+- const struct iw_quality *max_qual,
+- const struct iw_quality *avg_qual);
++static int wireless_qual_to_percent (NMDevice *dev,
++ const struct iw_quality *qual,
++ const struct iw_quality *max_qual,
++ const struct iw_quality *avg_qual);
+
+ static gboolean is_associated (NMDevice80211Wireless *self);
+
+@@ -190,8 +191,9 @@ nm_device_802_11_wireless_update_signal_
+ #endif
+ if (iw_get_stats (nm_dev_sock_get_fd (sk), iface, &stats, &range, has_range) == 0)
+ {
+- percent = wireless_qual_to_percent (&stats.qual, (const iwqual *)(&self->priv->max_qual),
+- (const iwqual *)(&self->priv->avg_qual));
++ percent = wireless_qual_to_percent (NM_DEVICE (self), &stats.qual,
++ (const iwqual *)(&self->priv->max_qual),
++ (const iwqual *)(&self->priv->avg_qual));
+ }
+ nm_dev_sock_close (sk);
+ }
+@@ -350,23 +352,15 @@ get_wireless_capabilities (NMDevice80211
if ((data_len >= minlen) && range->we_version_compiled >= 18)
{
@@ -33,7 +61,35 @@
}
return caps;
-@@ -2695,13 +2687,11 @@
+@@ -1234,7 +1228,8 @@ nm_device_802_11_wireless_get_signal_str
+ *
+ */
+ static int
+-wireless_qual_to_percent (const struct iw_quality *qual,
++wireless_qual_to_percent (NMDevice *dev,
++ const struct iw_quality *qual,
+ const struct iw_quality *max_qual,
+ const struct iw_quality *avg_qual)
+ {
+@@ -1263,7 +1258,7 @@ max_qual->updated);
+ * are free to use whatever they want to calculate "Link Quality".
+ */
+ if ((max_qual->qual != 0) && !(max_qual->updated & IW_QUAL_QUAL_INVALID) && !(qual->updated & IW_QUAL_QUAL_INVALID))
+- percent = (int)(100 * ((double)qual->qual / (double)max_qual->qual));
++ percent = (int) (100 * ((double) qual->qual / (double) max_qual->qual));
+
+ /* If the driver doesn't specify a complete and valid quality, we have two options:
+ *
+@@ -1329,7 +1324,7 @@ max_qual->updated);
+ }
+
+ /* If the quality percent was 0 or doesn't exist, then try to use signal levels instead */
+- if ((percent < 1) && (level_percent >= 0))
++ if ((percent < 1 || !strcmp (nm_device_get_driver (dev), "ath_pci")) && (level_percent >= 0))
+ percent = level_percent;
+
+ #ifdef IW_QUAL_DEBUG
+@@ -2636,13 +2631,11 @@ supplicant_status_cb (GIOChannel *source
}
@@ -48,7 +104,7 @@
return NM_SUPPLICANT_TIMEOUT;
}
-@@ -2910,6 +2900,8 @@
+@@ -2762,6 +2755,8 @@ supplicant_interface_init (NMDevice80211
struct wpa_ctrl * ctrl = NULL;
char * socket_path;
const char * iface = nm_device_get_iface (NM_DEVICE (self));
@@ -57,7 +113,7 @@
gboolean success = FALSE;
int tries = 0;
-@@ -2926,9 +2918,21 @@
+@@ -2778,9 +2773,19 @@ supplicant_interface_init (NMDevice80211
goto exit;
}
@@ -68,8 +124,6 @@
+ kernel_driver = nm_device_get_driver (NM_DEVICE (self));
+ if (!strcmp (kernel_driver, "ath_pci"))
+ wpa_driver = "madwifi";
-+ else if (!strcmp (kernel_driver, "prism54"))
-+ wpa_driver = "prism54";
+ else
+ wpa_driver = "wext";
+
@@ -80,7 +134,7 @@
goto exit;
wpa_ctrl_close (ctrl);
-@@ -2964,7 +2968,8 @@
+@@ -2816,7 +2821,8 @@ supplicant_send_network_config (NMDevice
struct wpa_ctrl * ctrl;
gboolean is_adhoc;
char * hex_essid = NULL;
@@ -90,7 +144,7 @@
guint32 caps;
gboolean supports_wpa;
-@@ -2986,12 +2991,39 @@
+@@ -2838,12 +2844,39 @@ supplicant_send_network_config (NMDevice
|| (caps & NM_802_11_CAP_PROTO_WPA2);
/* Use "AP_SCAN 2" if:
@@ -131,3 +185,13 @@
/* Tell wpa_supplicant that we'll do the scanning */
if (!nm_utils_supplicant_request_with_check (ctrl, "OK", __func__, NULL, ap_scan))
+@@ -3522,7 +3555,8 @@ process_scan_results (NMDevice80211Wirel
+ nm_ap_set_freq (ap, iw_freq2float(&(iwe->u.freq)));
+ break;
+ case IWEVQUAL:
+- nm_ap_set_strength (ap, wireless_qual_to_percent (&(iwe->u.qual),
++ nm_ap_set_strength (ap, wireless_qual_to_percent (&dev->parent,
++ &(iwe->u.qual),
+ (const iwqual *)(&dev->priv->max_qual),
+ (const iwqual *)(&dev->priv->avg_qual)));
+ break;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |