summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-11-10 18:48:18 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-11-10 18:48:18 +0000
commit17562fe0dcf00f8df8fa8a5d4ddc794b26a87a70 (patch)
tree8837171b2ef7b308442b6990d77d51c29ccda977 /net-misc/networkmanager-openvpn/files
parentpunt old wrt #340329 (diff)
downloadgentoo-2-17562fe0dcf00f8df8fa8a5d4ddc794b26a87a70.tar.gz
gentoo-2-17562fe0dcf00f8df8fa8a5d4ddc794b26a87a70.tar.bz2
gentoo-2-17562fe0dcf00f8df8fa8a5d4ddc794b26a87a70.zip
punt old wrt #340329
(Portage version: 2.2.0_alpha4/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/networkmanager-openvpn/files')
-rw-r--r--net-misc/networkmanager-openvpn/files/networkmanager-openvpn-0.3.2_p20070621-service-name.patch17
-rw-r--r--net-misc/networkmanager-openvpn/files/networkmanager-openvpn-0.7.1-glibc2.10.fix.patch119
2 files changed, 0 insertions, 136 deletions
diff --git a/net-misc/networkmanager-openvpn/files/networkmanager-openvpn-0.3.2_p20070621-service-name.patch b/net-misc/networkmanager-openvpn/files/networkmanager-openvpn-0.3.2_p20070621-service-name.patch
deleted file mode 100644
index 1c127ed70ed0..000000000000
--- a/net-misc/networkmanager-openvpn/files/networkmanager-openvpn-0.3.2_p20070621-service-name.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Fixes bug http://bugzilla.gnome.org/show_bug.cgi?id=447577
-
-Index: openvpn/nm-openvpn-service.name.in
-===================================================================
---- openvpn/nm-openvpn-service.name.in (revision 2653)
-+++ openvpn/nm-openvpn-service.name.in (working copy)
-@@ -1,8 +1,8 @@
- [VPN Connection]
- name=openvpn
- service=org.freedesktop.NetworkManager.openvpn
--program=@bindir@/nm-openvpn-service
-+program=@BINDIR@/nm-openvpn-service
-
- [GNOME]
--auth-dialog=@libexecdir@/nm-openvpn-auth-dialog
-+auth-dialog=@LIBEXECDIR@/nm-openvpn-auth-dialog
- properties=@prefix@/${LIB}/libnm-openvpn-properties
diff --git a/net-misc/networkmanager-openvpn/files/networkmanager-openvpn-0.7.1-glibc2.10.fix.patch b/net-misc/networkmanager-openvpn/files/networkmanager-openvpn-0.7.1-glibc2.10.fix.patch
deleted file mode 100644
index f630476a1648..000000000000
--- a/net-misc/networkmanager-openvpn/files/networkmanager-openvpn-0.7.1-glibc2.10.fix.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From 27192957d887915a23f186a34c3bb85af3faba3a Mon Sep 17 00:00:00 2001
-From: Dan Williams <dcbw@redhat.com>
-Date: Tue, 14 Jul 2009 10:51:33 +0000
-Subject: don't use sscanf
-
-besides the fact that for some reason sscanf wasn't working, it's evil
-and confusing, and we don't even need to use it. Also add the ability
-to set OPENVPN_DEBUG to get more info out of openvpn.
----
-diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
-index 346df20..6cde642 100644
---- a/src/nm-openvpn-service.c
-+++ b/src/nm-openvpn-service.c
-@@ -287,6 +287,35 @@ ovpn_quote_string (const char *unquoted)
- return quoted;
- }
-
-+/* sscanf is evil, and since we can't use glib regexp stuff since it's still
-+ * too new for some distros, do a simple match here.
-+ */
-+static char *
-+get_detail (const char *input, const char *prefix)
-+{
-+ char *ret = NULL;
-+ guint32 i = 0;
-+ const char *p, *start;
-+
-+ g_return_val_if_fail (prefix != NULL, NULL);
-+
-+ if (!g_str_has_prefix (input, prefix))
-+ return NULL;
-+
-+ /* Grab characters until the next ' */
-+ p = start = input + strlen (prefix);
-+ while (*p) {
-+ if (*p == '\'') {
-+ ret = g_malloc0 (i + 1);
-+ strncpy (ret, start, i);
-+ break;
-+ }
-+ p++, i++;
-+ }
-+
-+ return ret;
-+}
-+
- static gboolean
- handle_management_socket (NMVPNPlugin *plugin,
- GIOChannel *source,
-@@ -295,7 +324,7 @@ handle_management_socket (NMVPNPlugin *plugin,
- {
- NMOpenvpnPluginIOData *io_data = NM_OPENVPN_PLUGIN_GET_PRIVATE (plugin)->io_data;
- gboolean again = TRUE;
-- char *str = NULL, *auth, *buf;
-+ char *str = NULL, *auth = NULL, *buf;
- gsize written;
-
- if (!(condition & G_IO_IN))
-@@ -307,7 +336,8 @@ handle_management_socket (NMVPNPlugin *plugin,
- if (strlen (str) < 1)
- goto out;
-
-- if (sscanf (str, ">PASSWORD:Need '%a[^']'", &auth) > 0) {
-+ auth = get_detail (str, ">PASSWORD:Need '");
-+ if (auth) {
- if (strcmp (auth, "Auth") == 0) {
- if (io_data->username != NULL && io_data->password != NULL) {
- char *quser, *qpass;
-@@ -351,8 +381,11 @@ handle_management_socket (NMVPNPlugin *plugin,
- *out_failure = NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED;
- again = FALSE;
- }
-- free (auth);
-- } else if (sscanf (str, ">PASSWORD:Verification Failed: '%a[^']'", &auth) > 0) {
-+ g_free (auth);
-+ }
-+
-+ auth = get_detail (str, ">PASSWORD:Verification Failed: '");
-+ if (auth) {
- if (!strcmp (auth, "Auth"))
- nm_warning ("Password verification failed");
- else if (!strcmp (auth, "Private Key"))
-@@ -360,7 +393,7 @@ handle_management_socket (NMVPNPlugin *plugin,
- else
- nm_warning ("Unknown verification failed: %s", auth);
-
-- free (auth);
-+ g_free (auth);
-
- if (out_failure)
- *out_failure = NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED;
-@@ -688,6 +721,7 @@ nm_openvpn_start_openvpn_binary (NMOpenvpnPlugin *plugin,
- add_openvpn_arg (args, "--auth");
- add_openvpn_arg (args, auth);
- }
-+ add_openvpn_arg (args, "--auth-nocache");
-
- /* TA */
- tmp = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_TA);
-@@ -700,9 +734,14 @@ nm_openvpn_start_openvpn_binary (NMOpenvpnPlugin *plugin,
- add_openvpn_arg (args, tmp);
- }
-
-- /* Syslog */
-- add_openvpn_arg (args, "--syslog");
-- add_openvpn_arg (args, "nm-openvpn");
-+ if (getenv ("OPENVPN_DEBUG")) {
-+ add_openvpn_arg (args, "--verb");
-+ add_openvpn_arg (args, "10");
-+ } else {
-+ /* Syslog */
-+ add_openvpn_arg (args, "--syslog");
-+ add_openvpn_arg (args, "nm-openvpn");
-+ }
-
- /* Punch script security in the face; this option was added to OpenVPN 2.1-rc9
- * and defaults to disallowing any scripts, a behavior change from previous
---
-cgit v0.8.2