NetworkManager-libreswan/0006-Fix-prcoessing-of-nm-openswan-dialog.ui-file-and-add.patch
Avesh Agarwal 08f137fc11 New upstream release 0.9.8.4
- Fixed 926225
- Fixed dependency to libreswan.
- Created a new sub package NetworkManager-openswan-gnome
- Various other spec file fixes.
- Additional code changes are as follows:
- Fixed an issue where proper network stack is not loaded unless
  _stackmanager is run before starting pluto daemon service.
- Fixed the termination operation of pluto daemon to comply with
  libreswan changes.
- Fixed various debug messages.
- Fixed initiation of pluto daemon by this plugin to reflect the
  changes in libreaswan.
- Fixed defaults values for more parameters to help the VPN
  connection stay more reliable.
- Rewrote pluto watch API which watches the pluto process for its status.
  Fixed memory leak issues as not all child processes were reaped correctly.
  Also g_spwan_close_pid was not being called after children were reaped.
  Also modified debugs and added more to help with debugging in the future.
- Fixed an issue where nm-openswan service is searching for ipsec binary in
  both /sbin and /usr/sbin leading to same operation twice, as /sbin is just
  symlink to /usr/sbin, so removed /sbin from the search paths.
- Fixed some libreswan related macro changes.
- Fixed netmask issue when sending IP information to the nm openswan
  plugin service.
- Fixed the current code as it does not set the default route field
  NM_VPN_PLUGIN_IP4_CONFIG_NEVER_DEFAULT when sending VPN information
  to nm-openswan plugin. This fix sets the field to TRUE.
- Fixed some issues found by coverity scan.
- Fixed an issue where writing configuration on stdin should not end with
  \n as it gives error. It used to work previously, but not with latest
  NetworkManager versions.
- libreswan related fixes, as some macros have been modified after forking
  to libreswan from openswan.
- openswan/libreswan does not provide tun0 interface, so fixed the code
  where it sends tun0 interface.
- Fix prcoessing of nm-openswan-dialog.ui file and added more error notifications.
- Fixed dead code based on coverity scan.
- Fixed gnomekeyring lib dependencies.
- Fixed Networkmanager and related lib dependencies.
- Fixed gtk label max width issue by setting it to 35.
- NM-openswan was missing support for nm-openswan-auth-dialog.desktop.in.in.
  So added a new nm-openswan-auth-dialog.desktop.in.in, and modified related
  Makefile and configure.ac files.
2013-12-10 17:51:36 -05:00

60 lines
2.0 KiB
Diff

From bc55d220fe7fe7b377aa21d1e2c153d54716e4ec Mon Sep 17 00:00:00 2001
From: Avesh Agarwal <avagarwa@redhat.com>
Date: Tue, 10 Dec 2013 13:50:05 -0500
Subject: [PATCH 06/20] Fix prcoessing of nm-openswan-dialog.ui file and added
more error notifications.
---
properties/nm-openswan.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/properties/nm-openswan.c b/properties/nm-openswan.c
index c13de36..e164e85 100644
--- a/properties/nm-openswan.c
+++ b/properties/nm-openswan.c
@@ -462,7 +462,7 @@ save_one_password (NMSettingVPN *s_vpn,
const char *secret_key,
const char *type_key)
{
- NMSettingSecretFlags flags;
+ NMSettingSecretFlags flags = NM_SETTING_SECRET_FLAG_NONE;
const char *data_val = NULL, *password;
GtkWidget *entry, *combo;
@@ -577,6 +577,7 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error)
{
NMVpnPluginUiWidgetInterface *object;
OpenswanPluginUiWidgetPrivate *priv;
+ char *ui_file;
NMSettingVPN *s_vpn;
gboolean is_new = TRUE;
@@ -591,15 +592,23 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error)
priv = OPENSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (object);
+ ui_file = g_strdup_printf ("%s/%s", UIDIR, "nm-openswan-dialog.ui");
priv->builder = gtk_builder_new ();
g_assert (priv->builder);
gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
- if (gtk_builder_add_from_file (priv->builder, UIDIR "/nm-openswan-dialog.ui", error) == 0) {
+ if (!gtk_builder_add_from_file (priv->builder, ui_file, error)) {
+ g_warning ("Couldn't load builder file: %s",
+ error && *error ? (*error)->message : "(unknown)");
+ g_clear_error (error);
+ g_set_error (error, OPENSWAN_PLUGIN_UI_ERROR, 0,
+ "could not load required resources at %s", ui_file);
+ g_free (ui_file);
g_object_unref (object);
return NULL;
}
+ g_free (ui_file);
priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "openswan-vbox"));
if (!priv->widget) {
--
1.8.3.1