Re: Release: 0.7.1



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi David,

> Does this work? You have to set 'vendor' and 'pfs' string keys in
> gconf-editor manually; adding that to the UI is left as an exercise for
> the reader.
> 

Many thanks :) It works for me ;) Much better than patching vpnc like I
did to work around this issue. I had to modify your patch slightly to
get it work. The modified patch is below. It is against the latest
Ubuntu Jaunty package (0.7.1~rc4.20090316+bzr21-0ubuntu2).

Sorry but my C/GTK+ knowledge is a way to bad to make a proper patch for
the UI. Moreover, as I understand it, Dan wants to keep the number of
user settings as low as possible. Maybe the "Vendor" and the "Perfect
Forward Secrecy" option should go into an advanced tab.

If someone wants to test it, I can provide an Ubuntu package for Jaunty
(x86_64).

Many thanks again David :)

Regards,

Cyril


diff -Naur
network-manager-vpnc-0.7.1~rc4.20090316+bzr21/src/nm-vpnc-service.c
/usr/local/src/network-manager-vpnc-0.7.1~rc4.20090316+bzr21/src/nm-vpnc-service.c
- --- network-manager-vpnc-0.7.1~rc4.20090316+bzr21/src/nm-vpnc-service.c
2009-04-09 01:48:29.000000000 +0200
+++
/usr/local/src/network-manager-vpnc-0.7.1~rc4.20090316+bzr21/src/nm-vpnc-service.c
2009-04-26 13:42:29.537180649 +0200
@@ -57,6 +57,7 @@
 	GType type;
 	gint int_min;
 	gint int_max;
+	const char *conf_name;
 } ValidProperty;

 #define LEGACY_NAT_KEEPALIVE "NAT-Keepalive packet interval"
@@ -67,7 +68,8 @@
 	{ NM_VPNC_KEY_XAUTH_USER,            G_TYPE_STRING, 0, 0 },
 	{ NM_VPNC_KEY_DOMAIN,                G_TYPE_STRING, 0, 0 },
 	{ NM_VPNC_KEY_DHGROUP,               G_TYPE_STRING, 0, 0 },
- -	{ NM_VPNC_KEY_PERFECT_FORWARD,       G_TYPE_STRING, 0, 0 },
+	{ NM_VPNC_KEY_PERFECT_FORWARD,       G_TYPE_STRING, 0, 0, "Perfect
Forward Secrecy" },
+	{ NM_VPNC_KEY_VENDOR,                G_TYPE_STRING, 0, 0 },
 	{ NM_VPNC_KEY_APP_VERSION,           G_TYPE_STRING, 0, 0 },
 	{ NM_VPNC_KEY_SINGLE_DES,            G_TYPE_BOOLEAN, 0, 0 },
 	{ NM_VPNC_KEY_NO_ENCRYPTION,         G_TYPE_BOOLEAN, 0, 0 },
@@ -317,6 +319,7 @@
 write_one_property (const char *key, const char *value, gpointer user_data)
 {
 	WriteConfigInfo *info = (WriteConfigInfo *) user_data;
+	const char *conf_name = key;
 	GType type = G_TYPE_INVALID;
 	int i;

@@ -330,6 +333,8 @@
 		if (!strcmp (prop.name, (char *) key)) {
   			/* Property is ok */
   			type = prop.type;
+  			if (prop.conf_name)
+				conf_name = prop.conf_name;
 			break;
 		}
 	}
@@ -341,6 +346,8 @@
 		if (!strcmp (prop.name, (char *) key)) {
   			/* Property is ok */
   			type = prop.type;
+			if (prop.conf_name)
+				conf_name = prop.conf_name;
 			break;
 		}
 	}
@@ -360,10 +367,10 @@
 		return;

 	if (type == G_TYPE_STRING)
- -		write_config_option (info->fd, "%s %s\n", (char *) key, (char *)
value);
+		write_config_option (info->fd, "%s %s\n", (char *) conf_name, (char
*) value);
 	else if (type == G_TYPE_BOOLEAN) {
 		if (!strcmp (value, "yes"))
- -			write_config_option (info->fd, "%s\n", (char *) key);
+			write_config_option (info->fd, "%s\n", (char *) conf_name);
 	} else if (type == G_TYPE_INT) {
 		long int tmp_int;
 		char *tmp_str;
@@ -375,7 +382,7 @@
 		tmp_int = strtol (value, NULL, 10);
 		if (errno == 0) {
 			tmp_str = g_strdup_printf ("%ld", tmp_int);
- -			write_config_option (info->fd, "%s %s\n", (char *) key, tmp_str);
+			write_config_option (info->fd, "%s %s\n", (char *) conf_name, tmp_str);
 			g_free (tmp_str);
 		} else {
 			g_set_error (&info->error,
diff -Naur
network-manager-vpnc-0.7.1~rc4.20090316+bzr21/src/nm-vpnc-service.h
/usr/local/src/network-manager-vpnc-0.7.1~rc4.20090316+bzr21/src/nm-vpnc-service.h
- --- network-manager-vpnc-0.7.1~rc4.20090316+bzr21/src/nm-vpnc-service.h
2009-04-09 01:48:29.000000000 +0200
+++
/usr/local/src/network-manager-vpnc-0.7.1~rc4.20090316+bzr21/src/nm-vpnc-service.h
2009-04-26 13:13:37.181706376 +0200
@@ -46,7 +46,8 @@
 #define NM_VPNC_KEY_XAUTH_PASSWORD_TYPE "xauth-password-type"
 #define NM_VPNC_KEY_DOMAIN "Domain"
 #define NM_VPNC_KEY_DHGROUP "IKE DH Group"
- -#define NM_VPNC_KEY_PERFECT_FORWARD "Perfect Forward Secrecy"
+#define NM_VPNC_KEY_PERFECT_FORWARD "pfs"
+#define NM_VPNC_KEY_VENDOR "Vendor"
 #define NM_VPNC_KEY_APP_VERSION "Application Version"
 #define NM_VPNC_KEY_SINGLE_DES "Enable Single DES"
 #define NM_VPNC_KEY_NO_ENCRYPTION "Enable no encryption"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkn0TGkACgkQlYy8cEwUMaQtkQCfYqp0siSwIPFaH1CyWNj/beSu
j70AnA4wv642nnJkyv8wBzNj+qn+45eU
=xIJf
-----END PGP SIGNATURE-----


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]