Commit 9673d4c5 authored by Michael Biebl's avatar Michael Biebl

Imported Upstream version 0.8.4

parent 598b2edb
......@@ -29,6 +29,8 @@ endif
nm-openvpn-service.name: $(srcdir)/nm-openvpn-service.name.in
sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|g' $< >$@
DISTCHECK_CONFIGURE_FLAGS = --with-tests=yes
EXTRA_DIST = nm-openvpn-service.name.in \
$(dbusservice_DATA) \
$(desktopfile) \
......
......@@ -164,8 +164,6 @@ EXEEXT = @EXEEXT@
FGREP = @FGREP@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......@@ -292,6 +290,7 @@ nmvpnservicedir = $(sysconfdir)/NetworkManager/VPN
nmvpnservice_DATA = nm-openvpn-service.name
desktopfile = nm-openvpn.desktop.in
iconfile = gnome-mime-application-x-openvpn-settings.png
DISTCHECK_CONFIGURE_FLAGS = --with-tests=yes
EXTRA_DIST = nm-openvpn-service.name.in \
$(dbusservice_DATA) \
$(desktopfile) \
......
......@@ -11,6 +11,7 @@ This is a new stable release of network-manager-openvpn. Notable changes includ
* Allow larger renegotiation intervals
* Handle secrets for system connections
* Fix handling of various HTTP proxy password issues
* Export HTTP and SOCKS proxy authentication files
=======================================================
network-manager-openvpn-0.8.2
......
......@@ -11,7 +11,6 @@ nm_openvpn_auth_dialog_CPPFLAGS = \
-DUIDIR=\""$(uidir)"\" \
-DBINDIR=\""$(bindir)"\" \
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \
-DVERSION=\"$(VERSION)\"
......
......@@ -111,8 +111,6 @@ EXEEXT = @EXEEXT@
FGREP = @FGREP@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......@@ -605,7 +603,6 @@ uninstall-am: uninstall-libexecPROGRAMS
-DUIDIR=\""$(uidir)"\" \
-DBINDIR=\""$(bindir)"\" \
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \
-DVERSION=\"$(VERSION)\"
......
......@@ -107,8 +107,6 @@ EXEEXT = @EXEEXT@
FGREP = @FGREP@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......
......@@ -105,8 +105,6 @@ EXEEXT = @EXEEXT@
FGREP = @FGREP@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......
This diff is collapsed.
AC_PREREQ(2.52)
AC_INIT(NetworkManager-openvpn, 0.8.3.995, dcbw@redhat.com, NetworkManager-openvpn)
AC_INIT(NetworkManager-openvpn, 0.8.4, dcbw@redhat.com, NetworkManager-openvpn)
AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-bzip2])
AM_MAINTAINER_MODE
......@@ -66,10 +66,10 @@ AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
PKG_CHECK_MODULES(NETWORK_MANAGER,
NetworkManager >= 0.8.3
libnm-util >= 0.8.3
libnm-glib >= 0.8.3
libnm-glib-vpn >= 0.8.3)
NetworkManager >= 0.8.4
libnm-util >= 0.8.4
libnm-glib >= 0.8.4
libnm-glib-vpn >= 0.8.4)
AC_SUBST(NETWORK_MANAGER_CFLAGS)
AC_SUBST(NETWORK_MANAGER_LIBS)
......@@ -78,10 +78,6 @@ if test x"$with_gnome" != xno; then
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0)
AC_SUBST(GDK_PIXBUF_CFLAGS)
AC_SUBST(GDK_PIXBUF_LIBS)
PKG_CHECK_MODULES(GCONF, gconf-2.0)
AC_SUBST(GCONF_CFLAGS)
AC_SUBST(GCONF_LIBS)
......
......@@ -24,7 +24,6 @@ libnm_openvpn_properties_la_CFLAGS = \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \
-DVERSION=\"$(VERSION)\"
......
......@@ -177,8 +177,6 @@ EXEEXT = @EXEEXT@
FGREP = @FGREP@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......@@ -320,7 +318,6 @@ libnm_openvpn_properties_la_CFLAGS = \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \
-DVERSION=\"$(VERSION)\"
......
......@@ -112,7 +112,7 @@ unquote (const char *line, char **leftover)
*p = *item;
}
if (leftover && *item)
*leftover = item + 1;
*leftover = g_strdup (item + 1);
g_free (tmp);
return unquoted;
......@@ -133,8 +133,13 @@ handle_path_item (const char *line,
return FALSE;
file = unquote (line + strlen (tag), leftover);
if (!file)
if (!file) {
if (leftover) {
g_free (*leftover);
leftover = NULL;
}
return FALSE;
}
/* If file isn't an absolute file name, add the default path */
if (!g_path_is_absolute (file))
......@@ -536,6 +541,7 @@ do_import (const char *path, char **lines, GError **error)
NM_OPENVPN_KEY_STATIC_KEY_DIRECTION,
leftover,
s_vpn);
g_free (leftover);
have_sk = TRUE;
continue;
}
......@@ -546,6 +552,7 @@ do_import (const char *path, char **lines, GError **error)
NM_OPENVPN_KEY_TA_DIR,
leftover,
s_vpn);
g_free (leftover);
continue;
}
......@@ -687,6 +694,8 @@ do_export (const char *path, NMConnection *connection, GError **error)
const char *proxy_server = NULL;
const char *proxy_port = NULL;
const char *proxy_retry = NULL;
const char *proxy_username = NULL;
const char *proxy_password = NULL;
s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
g_assert (s_con);
......@@ -872,12 +881,39 @@ do_export (const char *path, NMConnection *connection, GError **error)
proxy_server = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_PROXY_SERVER);
proxy_port = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_PROXY_PORT);
proxy_retry = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_PROXY_RETRY);
proxy_username = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_HTTP_PROXY_USERNAME);
proxy_password = nm_setting_vpn_get_secret (s_vpn, NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD);
if (!strcmp (proxy_type, "http") && proxy_server && proxy_port) {
char *authfile, *authcontents, *base, *dirname;
if (!proxy_port)
proxy_port = "8080";
fprintf (f, "http-proxy %s %s\n", proxy_server, proxy_port);
/* If there's a username, need to write an authfile */
base = g_path_get_basename (path);
dirname = g_path_get_dirname (path);
authfile = g_strdup_printf ("%s/%s-httpauthfile", dirname, base);
g_free (base);
g_free (dirname);
fprintf (f, "http-proxy %s %s%s%s\n",
proxy_server,
proxy_port,
proxy_username ? " " : "",
proxy_username ? authfile : "");
if (proxy_retry && !strcmp (proxy_retry, "yes"))
fprintf (f, "http-proxy-retry\n");
/* Write out the authfile */
if (proxy_username) {
authcontents = g_strdup_printf ("%s\n%s\n",
proxy_username,
proxy_password ? proxy_password : "");
g_file_set_contents (authfile, authcontents, -1, NULL);
g_free (authcontents);
}
g_free (authfile);
} else if (!strcmp (proxy_type, "socks") && proxy_server && proxy_port) {
if (!proxy_port)
proxy_port = "1080";
......
......@@ -27,7 +27,7 @@ test_import_export_LDADD = \
if WITH_TESTS
check-local: test-import-export
$(abs_builddir)/test-import-export $(abs_srcdir)/conf
$(abs_builddir)/test-import-export $(abs_srcdir)/conf $(abs_builddir)/conf
endif
......@@ -148,8 +148,6 @@ EXEEXT = @EXEEXT@
FGREP = @FGREP@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......@@ -705,7 +703,7 @@ uninstall-am:
@WITH_TESTS_TRUE@check-local: test-import-export
@WITH_TESTS_TRUE@ $(abs_builddir)/test-import-export $(abs_srcdir)/conf
@WITH_TESTS_TRUE@ $(abs_builddir)/test-import-export $(abs_srcdir)/conf $(abs_builddir)/conf
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
......
......@@ -10,6 +10,7 @@ EXTRA_DIST = \
tun-opts.conf \
proxy-http.ovpn \
httpauthfile \
proxy-socks.ovpn
proxy-socks.ovpn \
proxy-http-with-auth.ovpn
......@@ -83,8 +83,6 @@ EXEEXT = @EXEEXT@
FGREP = @FGREP@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......@@ -215,7 +213,8 @@ EXTRA_DIST = \
tun-opts.conf \
proxy-http.ovpn \
httpauthfile \
proxy-socks.ovpn
proxy-socks.ovpn \
proxy-http-with-auth.ovpn
all: all-am
......
client
dev tun
proto tcp
topology subnet
rport 2352
remote test.server.com 443
nobind
persist-key
persist-tun
user openvpn
group openvpn
http-proxy-retry
http-proxy proxy.domain.tld 3128 httpauthfile basic
ca cacert.pem
cipher AES-256-CBC
reneg-sec 0
auth-user-pass
auth-nocache
ping 30
ping-exit 120
# random comment
script-security 2
This diff is collapsed.
......@@ -116,8 +116,6 @@ EXEEXT = @EXEEXT@
FGREP = @FGREP@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
......
......@@ -287,9 +287,12 @@ nm_openvpn_disconnect_management_socket (NMOpenvpnPlugin *plugin)
if (!io_data)
return;
g_source_remove (io_data->socket_channel_eventid);
g_io_channel_shutdown (io_data->socket_channel, FALSE, NULL);
g_io_channel_unref (io_data->socket_channel);
if (io_data->socket_channel_eventid)
g_source_remove (io_data->socket_channel_eventid);
if (io_data->socket_channel) {
g_io_channel_shutdown (io_data->socket_channel, FALSE, NULL);
g_io_channel_unref (io_data->socket_channel);
}
g_free (io_data->username);
g_free (io_data->proxy_username);
......@@ -779,7 +782,7 @@ nm_openvpn_start_openvpn_binary (NMOpenvpnPlugin *plugin,
add_openvpn_arg (args, "--http-proxy");
add_openvpn_arg (args, tmp2);
add_openvpn_arg (args, tmp3 ? tmp3 : "8080");
add_openvpn_arg (args, "'auto'"); /* Automatic proxy auth method detection */
add_openvpn_arg (args, "auto"); /* Automatic proxy auth method detection */
if (tmp4)
add_openvpn_arg (args, "--http-proxy-retry");
} else if (!strcmp (tmp, "socks")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment