90 lines
3.5 KiB
Diff
90 lines
3.5 KiB
Diff
|
diff -urNp NetworkManager-openswan-0.8-cvs-patched/auth-dialog/main.c NetworkManager-openswan-0.8-current/auth-dialog/main.c
|
||
|
--- NetworkManager-openswan-0.8-cvs-patched/auth-dialog/main.c 2011-02-15 10:56:52.192317259 -0500
|
||
|
+++ NetworkManager-openswan-0.8-current/auth-dialog/main.c 2011-02-16 12:27:03.016111821 -0500
|
||
|
@@ -284,7 +284,6 @@ main (int argc, char *argv[])
|
||
|
char *password = NULL, *group_password = NULL;
|
||
|
char *upw_type = NULL, *gpw_type = NULL;
|
||
|
char buf[1];
|
||
|
- int ret;
|
||
|
GError *error = NULL;
|
||
|
GOptionContext *context;
|
||
|
GOptionEntry entries[] = {
|
||
|
@@ -357,6 +356,9 @@ main (int argc, char *argv[])
|
||
|
fflush (stdout);
|
||
|
|
||
|
/* wait for data on stdin */
|
||
|
- ret = fread (buf, sizeof (char), sizeof (buf), stdin);
|
||
|
+ if (fread (buf, sizeof (char), sizeof (buf), stdin) < sizeof(buf) && ferror(stdin)) {
|
||
|
+ fprintf(stderr,"error occured when reading from stdin in main.c in auth-dialog");
|
||
|
+ }
|
||
|
+
|
||
|
return 0;
|
||
|
}
|
||
|
diff -urNp NetworkManager-openswan-0.8-cvs-patched/properties/nm-openswan.c NetworkManager-openswan-0.8-current/properties/nm-openswan.c
|
||
|
--- NetworkManager-openswan-0.8-cvs-patched/properties/nm-openswan.c 2011-02-15 10:57:24.704317823 -0500
|
||
|
+++ NetworkManager-openswan-0.8-current/properties/nm-openswan.c 2011-02-16 12:27:47.200862374 -0500
|
||
|
@@ -261,7 +261,6 @@ pw_type_changed_helper (OpenswanPluginUi
|
||
|
OpenswanPluginUiWidgetPrivate *priv = OPENSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self);
|
||
|
const char *entry = NULL;
|
||
|
GtkWidget *widget;
|
||
|
- GtkTreeModel *model;
|
||
|
|
||
|
/* If the user chose "Not required", desensitize and clear the correct
|
||
|
* password entry.
|
||
|
@@ -280,7 +279,7 @@ pw_type_changed_helper (OpenswanPluginUi
|
||
|
widget = glade_xml_get_widget (priv->xml, entry);
|
||
|
g_assert (widget);
|
||
|
|
||
|
- model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
|
||
|
+ gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
|
||
|
switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combo))) {
|
||
|
case PW_TYPE_ASK:
|
||
|
case PW_TYPE_UNUSED:
|
||
|
@@ -488,11 +487,10 @@ static guint32
|
||
|
handle_one_pw_type (NMSettingVPN *s_vpn, GladeXML *xml, const char *name, const char *key)
|
||
|
{
|
||
|
GtkWidget *widget;
|
||
|
- GtkTreeModel *model;
|
||
|
guint32 pw_type;
|
||
|
|
||
|
widget = glade_xml_get_widget (xml, name);
|
||
|
- model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
|
||
|
+ gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
|
||
|
|
||
|
pw_type = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
|
||
|
switch (pw_type) {
|
||
|
@@ -617,12 +615,11 @@ save_one_password (GladeXML *xml,
|
||
|
GnomeKeyringResult ret;
|
||
|
GtkWidget *widget;
|
||
|
const char *password;
|
||
|
- GtkTreeModel *model;
|
||
|
gboolean saved = FALSE;
|
||
|
|
||
|
widget = glade_xml_get_widget (xml, combo);
|
||
|
g_assert (widget);
|
||
|
- model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
|
||
|
+ gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
|
||
|
if (gtk_combo_box_get_active (GTK_COMBO_BOX (widget)) == PW_TYPE_SAVE) {
|
||
|
widget = glade_xml_get_widget (xml, entry);
|
||
|
g_assert (widget);
|
||
|
diff -urNp NetworkManager-openswan-0.8-cvs-patched/src/nm-openswan-service.c NetworkManager-openswan-0.8-current/src/nm-openswan-service.c
|
||
|
--- NetworkManager-openswan-0.8-cvs-patched/src/nm-openswan-service.c 2011-02-15 10:57:21.422336210 -0500
|
||
|
+++ NetworkManager-openswan-0.8-current/src/nm-openswan-service.c 2011-02-16 12:32:50.003111577 -0500
|
||
|
@@ -379,11 +379,14 @@ write_config_option (int fd, const char
|
||
|
{
|
||
|
char * string;
|
||
|
va_list args;
|
||
|
- int x;
|
||
|
|
||
|
va_start (args, format);
|
||
|
string = g_strdup_vprintf (format, args);
|
||
|
- x = write (fd, string, strlen (string));
|
||
|
+
|
||
|
+ if ( write (fd, string, strlen (string)) == -1) {
|
||
|
+ nm_warning ("nm-openswan: error in write_config_option");
|
||
|
+ }
|
||
|
+
|
||
|
g_free (string);
|
||
|
va_end (args);
|
||
|
}
|