Commit a5b0e5c0 authored by CeRiAl's avatar CeRiAl

Global: New name, more fixes

parent 4580be1c
...@@ -27,11 +27,11 @@ m4/intltool.m4 ...@@ -27,11 +27,11 @@ m4/intltool.m4
m4/libtool.m4 m4/libtool.m4
m4/lt*.m4 m4/lt*.m4
auth-dialog/nm-l2tp-auth-dialog auth-dialog/nm-ipsec-l2tp-auth-dialog
nm-l2tp-service.name nm-ipsec-l2tp-service.name
nm-l2tp.desktop nm-ipsec-l2tp.desktop
src/nm-l2tp-pppd-service-glue.h src/nm-ipsec-l2tp-pppd-service-glue.h
src/nm-l2tp-service src/nm-ipsec-l2tp-service
.autotools .autotools
.cproject .cproject
......
Ismail Khatib <ikhatib@gmail.com>
Based on NetworkManager-l2tp by:
Alexey Torkhov <atorkhov@gmail.com> Alexey Torkhov <atorkhov@gmail.com>
Sergey Prokhorov <me@seriyps.ru> Sergey Prokhorov <me@seriyps.ru>
Ismail Khatib <ikhatib@gmail.com>
Based on NetworkManager-pptp by: Based on NetworkManager-pptp by:
Antony Mee <eemynotna@gmail.com> Antony Mee <eemynotna@gmail.com>
......
...@@ -7,13 +7,13 @@ SUBDIRS += auth-dialog properties po ...@@ -7,13 +7,13 @@ SUBDIRS += auth-dialog properties po
endif endif
dbusservicedir = $(sysconfdir)/dbus-1/system.d dbusservicedir = $(sysconfdir)/dbus-1/system.d
dbusservice_DATA = nm-l2tp-service.conf dbusservice_DATA = nm-ipsec-l2tp-service.conf
nmvpnservicedir = $(sysconfdir)/NetworkManager/VPN nmvpnservicedir = $(sysconfdir)/NetworkManager/VPN
nmvpnservice_DATA = nm-l2tp-service.name nmvpnservice_DATA = nm-ipsec-l2tp-service.name
desktopfile = nm-l2tp.desktop.in desktopfile = nm-ipsec-l2tp.desktop.in
iconfile = gnome-mime-application-x-l2tp-settings.png iconfile = gnome-mime-application-x-ipsec-l2tp-settings.png
if WITH_GNOME if WITH_GNOME
# FIXME: uncomment when nmce gets --import support # FIXME: uncomment when nmce gets --import support
...@@ -26,14 +26,14 @@ if WITH_GNOME ...@@ -26,14 +26,14 @@ if WITH_GNOME
#icon_DATA = $(iconfile) #icon_DATA = $(iconfile)
endif endif
nm-l2tp-service.name: $(srcdir)/nm-l2tp-service.name.in nm-ipsec-l2tp-service.name: $(srcdir)/nm-ipsec-l2tp-service.name.in
sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|g' \ sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|g' \
-e 's|[@]PLUGINDIR[@]|$(libdir)/NetworkManager|g' \ -e 's|[@]PLUGINDIR[@]|$(libdir)/NetworkManager|g' \
$< >$@ $< >$@
DISTCHECK_CONFIGURE_FLAGS = --enable-more-warnings=yes DISTCHECK_CONFIGURE_FLAGS = --enable-more-warnings=yes
EXTRA_DIST = nm-l2tp-service.name.in \ EXTRA_DIST = nm-ipsec-l2tp-service.name.in \
$(dbusservice_DATA) \ $(dbusservice_DATA) \
$(desktopfile) \ $(desktopfile) \
$(iconfile) \ $(iconfile) \
......
L2TP support for NetworkManager IPSec-L2TP support for NetworkManager
=============================== =====================================
This version has IPSEC support and can connect to a Sonicwall
Uses xl2tpd and (optional) openswan. Uses xl2tpd and (optional) openswan.
...@@ -13,4 +11,19 @@ Build ...@@ -13,4 +11,19 @@ Build
make make
sudo make install sudo make install
Ubuntu users see README.ubuntu file. Debian and Ubuntu
\ No newline at end of file =================
The Debian and Ubuntu GNOME packages don't have reasonable defaults,
so you have to give ./configure every path manually.
./configure \
--prefix=/usr --localstatedir=/etc --sysconfdir=/etc \
--sharedstatedir=/var/lib --libexecdir=/usr/lib/NetworkManager \
--infodir=/usr/share/info --mandir=/usr/share/man \
--with-pppd-plugin-dir=/usr/lib/pppd/2.4.5 \
--with-dist-version=<my_build_ver>
You'll need at least the following installed:
sudo apt-get install xl2tpd openswan
The Debian and Ubuntu GNOME packages don't have reasonable defaults,
so you have to give ./configure every path manually.
./configure \
--prefix=/usr --localstatedir=/etc --sysconfdir=/etc \
--sharedstatedir=/var/lib --libexecdir=/usr/lib/NetworkManager \
--infodir=/usr/share/info --mandir=/usr/share/man \
--with-pppd-plugin-dir=/usr/lib/pppd/2.4.5 \
--with-dist-version=<my_build_ver>
You'll need at least the following installed:
sudo apt-get install xl2tpd openswan
INCLUDES = -I${top_srcdir} INCLUDES = -I${top_srcdir}
libexec_PROGRAMS = nm-l2tp-auth-dialog libexec_PROGRAMS = nm-ipsec-l2tp-auth-dialog
nm_l2tp_auth_dialog_CPPFLAGS = \ nm_ipsec_l2tp_auth_dialog_CPPFLAGS = \
$(NM_CFLAGS) \ $(NM_CFLAGS) \
$(GLIB_CFLAGS) \ $(GLIB_CFLAGS) \
$(GTK_CFLAGS) \ $(GTK_CFLAGS) \
...@@ -13,12 +13,12 @@ nm_l2tp_auth_dialog_CPPFLAGS = \ ...@@ -13,12 +13,12 @@ nm_l2tp_auth_dialog_CPPFLAGS = \
-DG_DISABLE_DEPRECATED \ -DG_DISABLE_DEPRECATED \
-DVERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
nm_l2tp_auth_dialog_SOURCES = \ nm_ipsec_l2tp_auth_dialog_SOURCES = \
main.c \ main.c \
vpn-password-dialog.c \ vpn-password-dialog.c \
vpn-password-dialog.h vpn-password-dialog.h
nm_l2tp_auth_dialog_LDADD = \ nm_ipsec_l2tp_auth_dialog_LDADD = \
$(NM_LIBS) \ $(NM_LIBS) \
$(GTK_LIBS) \ $(GTK_LIBS) \
$(GNOMEKEYRING_LIBS) $(GNOMEKEYRING_LIBS)
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include <nm-setting-vpn.h> #include <nm-setting-vpn.h>
#include <nm-vpn-plugin-utils.h> #include <nm-vpn-plugin-utils.h>
#include "src/nm-l2tp-service.h" #include <src/nm-ipsec-l2tp-service.h>
#include "vpn-password-dialog.h" #include "vpn-password-dialog.h"
#define KEYRING_UUID_TAG "connection-uuid" #define KEYRING_UUID_TAG "connection-uuid"
...@@ -126,7 +126,7 @@ get_secrets (const char *vpn_uuid, ...@@ -126,7 +126,7 @@ get_secrets (const char *vpn_uuid,
if (in_pw) if (in_pw)
pw = gnome_keyring_memory_strdup (in_pw); pw = gnome_keyring_memory_strdup (in_pw);
else else
pw = keyring_lookup_secret (vpn_uuid, NM_L2TP_KEY_PASSWORD); pw = keyring_lookup_secret (vpn_uuid, NM_IPSEC_L2TP_KEY_PASSWORD);
} }
/* Don't ask if the passwords is unused */ /* Don't ask if the passwords is unused */
...@@ -149,7 +149,7 @@ get_secrets (const char *vpn_uuid, ...@@ -149,7 +149,7 @@ get_secrets (const char *vpn_uuid,
g_key_file_set_string (keyfile, UI_KEYFILE_GROUP, "Description", prompt); g_key_file_set_string (keyfile, UI_KEYFILE_GROUP, "Description", prompt);
g_key_file_set_string (keyfile, UI_KEYFILE_GROUP, "Title", _("Authenticate VPN")); g_key_file_set_string (keyfile, UI_KEYFILE_GROUP, "Title", _("Authenticate VPN"));
keyfile_add_entry_info (keyfile, NM_L2TP_KEY_PASSWORD, pw ? pw : "", _("Password:"), TRUE, allow_interaction); keyfile_add_entry_info (keyfile, NM_IPSEC_L2TP_KEY_PASSWORD, pw ? pw : "", _("Password:"), TRUE, allow_interaction);
keyfile_print_stdout (keyfile); keyfile_print_stdout (keyfile);
g_key_file_unref (keyfile); g_key_file_unref (keyfile);
...@@ -242,7 +242,7 @@ main (int argc, char *argv[]) ...@@ -242,7 +242,7 @@ main (int argc, char *argv[])
gtk_init (&argc, &argv); gtk_init (&argc, &argv);
context = g_option_context_new ("- l2tp auth dialog"); context = g_option_context_new ("- ipsec-l2tp auth dialog");
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE); g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
g_option_context_parse (context, &argc, &argv, NULL); g_option_context_parse (context, &argc, &argv, NULL);
g_option_context_free (context); g_option_context_free (context);
...@@ -252,8 +252,8 @@ main (int argc, char *argv[]) ...@@ -252,8 +252,8 @@ main (int argc, char *argv[])
return 1; return 1;
} }
if (strcmp (vpn_service, NM_DBUS_SERVICE_L2TP) != 0) { if (strcmp (vpn_service, NM_DBUS_SERVICE_IPSEC_L2TP) != 0) {
fprintf (stderr, "This dialog only works with the '%s' service\n", NM_DBUS_SERVICE_L2TP); fprintf (stderr, "This dialog only works with the '%s' service\n", NM_DBUS_SERVICE_IPSEC_L2TP);
return 1; return 1;
} }
...@@ -263,10 +263,10 @@ main (int argc, char *argv[]) ...@@ -263,10 +263,10 @@ main (int argc, char *argv[])
return 1; return 1;
} }
nm_vpn_plugin_utils_get_secret_flags (secrets, NM_L2TP_KEY_PASSWORD, &pw_flags); nm_vpn_plugin_utils_get_secret_flags (secrets, NM_IPSEC_L2TP_KEY_PASSWORD, &pw_flags);
if (!get_secrets (vpn_uuid, vpn_name, retry, allow_interaction, external_ui_mode, if (!get_secrets (vpn_uuid, vpn_name, retry, allow_interaction, external_ui_mode,
g_hash_table_lookup (secrets, NM_L2TP_KEY_PASSWORD), g_hash_table_lookup (secrets, NM_IPSEC_L2TP_KEY_PASSWORD),
&password, &password,
pw_flags)) pw_flags))
return 1; return 1;
...@@ -274,7 +274,7 @@ main (int argc, char *argv[]) ...@@ -274,7 +274,7 @@ main (int argc, char *argv[])
if (!external_ui_mode) { if (!external_ui_mode) {
/* dump the passwords to stdout */ /* dump the passwords to stdout */
if (password) if (password)
printf ("%s\n%s\n", NM_L2TP_KEY_PASSWORD, password); printf ("%s\n%s\n", NM_IPSEC_L2TP_KEY_PASSWORD, password);
printf ("\n\n"); printf ("\n\n");
gnome_keyring_memory_free (password); gnome_keyring_memory_free (password);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
srcdir=`dirname $0` srcdir=`dirname $0`
test -z "$srcdir" && srcdir=. test -z "$srcdir" && srcdir=.
REQUIRED_AUTOMAKE_VERSION=1.9 REQUIRED_AUTOMAKE_VERSION=1.9
PKG_NAME=NetworkManager-l2tp PKG_NAME=NetworkManager-ipsec-l2tp
(test -f $srcdir/configure.ac \ (test -f $srcdir/configure.ac \
&& test -f $srcdir/auth-dialog/main.c) || { && test -f $srcdir/auth-dialog/main.c) || {
......
AC_PREREQ(2.59) AC_PREREQ(2.59)
AC_INIT(NetworkManager-l2tp, 0.9.8.5, root@seriyps.ru, NetworkManager-l2tp) AC_INIT(NetworkManager-ipsec-l2tp, 0.0.1.0, ikhatib@gmail.com, NetworkManager-ipsec-l2tp)
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2 subdir-objects]) AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2 subdir-objects])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
...@@ -51,10 +51,10 @@ AC_CHECK_FUNCS(select socket uname) ...@@ -51,10 +51,10 @@ AC_CHECK_FUNCS(select socket uname)
dnl dnl
dnl GNOME support dnl GNOME support
dnl dnl
AC_ARG_WITH(gnome, AS_HELP_STRING([--without-gnome], [Build NetworkManager-l2tp without GNOME support, e.g. vpn service only])) AC_ARG_WITH(gnome, AS_HELP_STRING([--without-gnome], [Build NetworkManager-ipsec-l2tp without GNOME support, e.g. vpn service only]))
AM_CONDITIONAL(WITH_GNOME, test x"$with_gnome" != xno) AM_CONDITIONAL(WITH_GNOME, test x"$with_gnome" != xno)
GETTEXT_PACKAGE=NetworkManager-l2tp GETTEXT_PACKAGE=NetworkManager-ipsec-l2tp
AC_SUBST(GETTEXT_PACKAGE) AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package]) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
......
...@@ -3,18 +3,17 @@ ...@@ -3,18 +3,17 @@
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig> <busconfig>
<policy user="root"> <policy user="root">
<allow own="org.freedesktop.NetworkManager.l2tp"/> <allow own="org.freedesktop.NetworkManager.ipsec-l2tp"/>
<allow send_destination="org.freedesktop.NetworkManager.l2tp"/> <allow send_destination="org.freedesktop.NetworkManager.ipsec-l2tp"/>
<allow own="org.freedesktop.NetworkManager.l2tp-ppp"/> <allow own="org.freedesktop.NetworkManager.ipsec-l2tp-ppp"/>
<allow send_destination="org.freedesktop.NetworkManager.l2tp-ppp"/> <allow send_destination="org.freedesktop.NetworkManager.ipsec-l2tp-ppp"/>
</policy> </policy>
<policy context="default"> <policy context="default">
<deny own="org.freedesktop.NetworkManager.l2tp"/> <deny own="org.freedesktop.NetworkManager.ipsec-l2tp"/>
<deny send_destination="org.freedesktop.NetworkManager.l2tp"/> <deny send_destination="org.freedesktop.NetworkManager.ipsec-l2tp"/>
<deny own="org.freedesktop.NetworkManager.l2tp-ppp"/> <deny own="org.freedesktop.NetworkManager.ipsec-l2tp-ppp"/>
<deny send_destination="org.freedesktop.NetworkManager.l2tp-ppp"/> <deny send_destination="org.freedesktop.NetworkManager.ipsec-l2tp-ppp"/>
</policy> </policy>
</busconfig> </busconfig>
[VPN Connection]
name=ipsec-l2tp
service=org.freedesktop.NetworkManager.ipsec-l2tp
program=@LIBEXECDIR@/nm-ipsec-l2tp-service
[GNOME]
auth-dialog=@LIBEXECDIR@/nm-ipsec-l2tp-auth-dialog
properties=@PLUGINDIR@/libnm-ipsec-l2tp-properties
supports-external-ui-mode=true
[Desktop Entry] [Desktop Entry]
_Name=L2TP VPN Connection Manager _Name=IPSec-L2TP VPN Connection Manager
_GenericName=L2TP VPN Connection Manager _GenericName=IPSec-L2TP VPN Connection Manager
_Comment=Add, Remove, and Edit L2TP VPN Connections _Comment=Add, Remove, and Edit IPSec-L2TP VPN Connections
Exec=nm-vpn-properties --import-service org.freedesktop.NetworkManager.l2tp --import-file %f Exec=nm-vpn-properties --import-service org.freedesktop.NetworkManager.ipsec-l2tp --import-file %f
Icon=gnome-mime-application-x-l2tp-settings Icon=gnome-mime-application-x-ipsec-l2tp-settings
Terminal=false Terminal=false
Type=Application Type=Application
Categories=GNOME;Network; Categories=GNOME;Network;
......
[VPN Connection]
name=l2tp
service=org.freedesktop.NetworkManager.l2tp
program=@LIBEXECDIR@/nm-l2tp-service
[GNOME]
auth-dialog=@LIBEXECDIR@/nm-l2tp-auth-dialog
properties=@PLUGINDIR@/libnm-l2tp-properties
supports-external-ui-mode=true
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
# Please keep this file sorted alphabetically. # Please keep this file sorted alphabetically.
auth-dialog/main.c auth-dialog/main.c
auth-dialog/vpn-password-dialog.c auth-dialog/vpn-password-dialog.c
nm-l2tp.desktop.in nm-ipsec-l2tp.desktop.in
properties/advanced-dialog.c properties/advanced-dialog.c
properties/import-export.c properties/import-export.c
properties/ipsec-dialog.c properties/ipsec-dialog.c
properties/nm-l2tp.c properties/nm-ipsec-l2tp.c
[type: gettext/glade]properties/nm-l2tp-dialog.ui [type: gettext/glade]properties/nm-ipsec-l2tp-dialog.ui
src/nm-l2tp-service.c src/nm-ipsec-l2tp-service.c
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
plugindir = $(libdir)/NetworkManager plugindir = $(libdir)/NetworkManager
plugin_LTLIBRARIES = libnm-l2tp-properties.la plugin_LTLIBRARIES = libnm-ipsec-l2tp-properties.la
INCLUDES = -I${top_srcdir} INCLUDES = -I${top_srcdir}
libnm_l2tp_properties_la_SOURCES = \ libnm_ipsec_l2tp_properties_la_SOURCES = \
nm-l2tp.c \ nm-ipsec-l2tp.c \
nm-l2tp.h \ nm-ipsec-l2tp.h \
ipsec-dialog.c \ ipsec-dialog.c \
ipsec-dialog.h \ ipsec-dialog.h \
advanced-dialog.c \ advanced-dialog.c \
...@@ -14,9 +14,9 @@ libnm_l2tp_properties_la_SOURCES = \ ...@@ -14,9 +14,9 @@ libnm_l2tp_properties_la_SOURCES = \
import-export.h import-export.h
uidir = $(datadir)/gnome-vpn-properties/l2tp uidir = $(datadir)/gnome-vpn-properties/l2tp
ui_DATA = nm-l2tp-dialog.ui ui_DATA = nm-ipsec-l2tp-dialog.ui
libnm_l2tp_properties_la_CFLAGS = \ libnm_ipsec_l2tp_properties_la_CFLAGS = \
$(GLIB_CFLAGS) \ $(GLIB_CFLAGS) \
$(GTK_CFLAGS) \ $(GTK_CFLAGS) \
$(NM_CFLAGS) \ $(NM_CFLAGS) \
...@@ -26,11 +26,11 @@ libnm_l2tp_properties_la_CFLAGS = \ ...@@ -26,11 +26,11 @@ libnm_l2tp_properties_la_CFLAGS = \
-DG_DISABLE_DEPRECATED \ -DG_DISABLE_DEPRECATED \
-DVERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
libnm_l2tp_properties_la_LIBADD = \ libnm_ipsec_l2tp_properties_la_LIBADD = \
$(GTK_LIBS) \ $(GTK_LIBS) \
$(NM_LIBS) $(NM_LIBS)
libnm_l2tp_properties_la_LDFLAGS = \ libnm_ipsec_l2tp_properties_la_LDFLAGS = \
-avoid-version -avoid-version
CLEANFILES = *.bak *~ CLEANFILES = *.bak *~
......
This diff is collapsed.
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
#include <nm-setting-ip4-config.h> #include <nm-setting-ip4-config.h>
#include "import-export.h" #include "import-export.h"
#include "nm-l2tp.h" #include "nm-ipsec-l2tp.h"
#include "../src/nm-l2tp-service.h" #include "../src/nm-ipsec-l2tp-service.h"
#define CONN_SECTION "connection" #define CONN_SECTION "connection"
#define VPN_SECTION "vpn" #define VPN_SECTION "vpn"
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
/* /*
[connection] [connection]
name = my-l2tp-connection name = my-ipsec-l2tp-connection
[vpn] [vpn]
# password-flags = 1 (int) # password-flags = 1 (int)
...@@ -89,32 +89,32 @@ typedef struct { ...@@ -89,32 +89,32 @@ typedef struct {
} VpnImportExportProperty; } VpnImportExportProperty;
static VpnImportExportProperty vpn_properties[] = { static VpnImportExportProperty vpn_properties[] = {
{ NM_L2TP_KEY_GATEWAY, G_TYPE_STRING, TRUE }, { NM_IPSEC_L2TP_KEY_GATEWAY, G_TYPE_STRING, TRUE },
{ NM_L2TP_KEY_USER, G_TYPE_STRING, FALSE }, { NM_IPSEC_L2TP_KEY_USER, G_TYPE_STRING, FALSE },
{ NM_L2TP_KEY_DOMAIN, G_TYPE_STRING, FALSE }, { NM_IPSEC_L2TP_KEY_DOMAIN, G_TYPE_STRING, FALSE },
{ NM_L2TP_KEY_REFUSE_EAP, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_REFUSE_EAP, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_REFUSE_PAP, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_REFUSE_PAP, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_REFUSE_CHAP, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_REFUSE_CHAP, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_REFUSE_MSCHAP, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_REFUSE_MSCHAP, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_REFUSE_MSCHAPV2, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_REFUSE_MSCHAPV2, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_REQUIRE_MPPE, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_REQUIRE_MPPE, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_REQUIRE_MPPE_40, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_REQUIRE_MPPE_40, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_REQUIRE_MPPE_128, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_REQUIRE_MPPE_128, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_MPPE_STATEFUL, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_MPPE_STATEFUL, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_NOBSDCOMP, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_NOBSDCOMP, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_NODEFLATE, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_NODEFLATE, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_NO_VJ_COMP, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_NO_VJ_COMP, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_NO_PCOMP, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_NO_PCOMP, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_NO_ACCOMP, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_NO_ACCOMP, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_LCP_ECHO_FAILURE, G_TYPE_UINT, FALSE }, { NM_IPSEC_L2TP_KEY_LCP_ECHO_FAILURE, G_TYPE_UINT, FALSE },
{ NM_L2TP_KEY_LCP_ECHO_INTERVAL, G_TYPE_UINT, FALSE }, { NM_IPSEC_L2TP_KEY_LCP_ECHO_INTERVAL, G_TYPE_UINT, FALSE },
/* { NM_L2TP_KEY_PASSWORD"-flags", G_TYPE_UINT, FALSE }, */ /* { NM_IPSEC_L2TP_KEY_PASSWORD"-flags", G_TYPE_UINT, FALSE }, */
{ NM_L2TP_KEY_IPSEC_ENABLE, G_TYPE_BOOLEAN, FALSE }, { NM_IPSEC_L2TP_KEY_IPSEC_ENABLE, G_TYPE_BOOLEAN, FALSE },
{ NM_L2TP_KEY_IPSEC_GATEWAY_ID, G_TYPE_STRING, FALSE }, { NM_IPSEC_L2TP_KEY_IPSEC_GATEWAY_ID, G_TYPE_STRING, FALSE },
{ NM_L2TP_KEY_IPSEC_GROUP_NAME, G_TYPE_STRING, FALSE }, { NM_IPSEC_L2TP_KEY_IPSEC_GROUP_NAME, G_TYPE_STRING, FALSE },
{ NM_L2TP_KEY_IPSEC_PSK, G_TYPE_STRING, FALSE }, { NM_IPSEC_L2TP_KEY_IPSEC_PSK, G_TYPE_STRING, FALSE },
{ NM_L2TP_KEY_IPSEC_RSA, G_TYPE_STRING, FALSE }, { NM_IPSEC_L2TP_KEY_IPSEC_RSA, G_TYPE_STRING, FALSE },
{ NM_L2TP_KEY_IPSEC_RSA_PW, G_TYPE_STRING, FALSE }, { NM_IPSEC_L2TP_KEY_IPSEC_RSA_PW, G_TYPE_STRING, FALSE },
{ NULL, G_TYPE_NONE, FALSE } { NULL, G_TYPE_NONE, FALSE }
}; };
...@@ -134,8 +134,8 @@ static void ...@@ -134,8 +134,8 @@ static void
ip4_import_error (GError **error, const char *message, const char *key, const char *val) ip4_import_error (GError **error, const char *message, const char *key, const char *val)
{ {
g_set_error (error, g_set_error (error,
L2TP_PLUGIN_UI_ERROR, IPSEC_L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_INVALID_PROPERTY, IPSEC_L2TP_PLUGIN_UI_ERROR_INVALID_PROPERTY,
message, message,
key, key,
val); val);
...@@ -165,8 +165,8 @@ import_ip4 (GKeyFile *keyfile, NMSettingIP4Config *s_ip4, GError **error) ...@@ -165,8 +165,8 @@ import_ip4 (GKeyFile *keyfile, NMSettingIP4Config *s_ip4, GError **error)
continue; continue;
g_set_error (error, g_set_error (error,
L2TP_PLUGIN_UI_ERROR, IPSEC_L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_MISSING_PROPERTY, IPSEC_L2TP_PLUGIN_UI_ERROR_MISSING_PROPERTY,
_("Required property %s missing"), _("Required property %s missing"),
prop.name); prop.name);
return FALSE; return FALSE;
...@@ -362,7 +362,7 @@ import_ip4 (GKeyFile *keyfile, NMSettingIP4Config *s_ip4, GError **error) ...@@ -362,7 +362,7 @@ import_ip4 (GKeyFile *keyfile, NMSettingIP4Config *s_ip4, GError **error)
} }
/** /**
* Create new L2TP VPN connection using data from .ini - like file located at #path * Create new IPSec-L2TP VPN connection using data from .ini - like file located at #path
* *
* Returns: a newly allocated #NMConnection on success or %NULL on failure * Returns: a newly allocated #NMConnection on success or %NULL on failure
**/ **/
...@@ -381,9 +381,9 @@ do_import (const char *path, GError **error) ...@@ -381,9 +381,9 @@ do_import (const char *path, GError **error)
keyfile = g_key_file_new (); keyfile = g_key_file_new ();
if (!g_key_file_load_from_file (keyfile, path, 0, error)) { if (!g_key_file_load_from_file (keyfile, path, 0, error)) {
g_set_error (error, g_set_error (error,
L2TP_PLUGIN_UI_ERROR, IPSEC_L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_FILE_NOT_L2TP, IPSEC_L2TP_PLUGIN_UI_ERROR_FILE_NOT_IPSEC_L2TP,
_("does not look like a L2TP VPN connection (parse failed)")); _("does not look like a IPSEC-L2TP VPN connection (parse failed)"));
return NULL; return NULL;
} }
...@@ -392,13 +392,13 @@ do_import (const char *path, GError **error) ...@@ -392,13 +392,13 @@ do_import (const char *path, GError **error)
nm_connection_add_setting (connection, NM_SETTING (s_con)); nm_connection_add_setting (connection, NM_SETTING (s_con));
s_vpn = NM_SETTING_VPN (nm_setting_vpn_new ()); s_vpn = NM_SETTING_VPN (nm_setting_vpn_new ());
g_object_set (s_vpn, NM_SETTING_VPN_SERVICE_TYPE, NM_DBUS_SERVICE_L2TP, NULL); g_object_set (s_vpn, NM_SETTING_VPN_SERVICE_TYPE, NM_DBUS_SERVICE_IPSEC_L2TP, NULL);
nm_connection_add_setting (connection, NM_SETTING (s_vpn)); nm_connection_add_setting (connection, NM_SETTING (s_vpn));
s_ip4 = NM_SETTING_IP4_CONFIG (nm_setting_ip4_config_new ()); s_ip4 = NM_SETTING_IP4_CONFIG (nm_setting_ip4_config_new ());
nm_connection_add_setting (connection, NM_SETTING (s_ip4)); nm_connection_add_setting (connection, NM_SETTING (s_ip4));
/* g_message("Start importing L2TP."); */ /* g_message("Start importing IPSec-L2TP."); */
value = g_key_file_get_string(keyfile, CONN_SECTION, "id", error); value = g_key_file_get_string(keyfile, CONN_SECTION, "id", error);
g_object_set (G_OBJECT (s_con), g_object_set (G_OBJECT (s_con),
...@@ -416,8 +416,8 @@ do_import (const char *path, GError **error) ...@@ -416,8 +416,8 @@ do_import (const char *path, GError **error)
continue; continue;
g_set_error (error, g_set_error (error,
L2TP_PLUGIN_UI_ERROR, IPSEC_L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_MISSING_PROPERTY, IPSEC_L2TP_PLUGIN_UI_ERROR_MISSING_PROPERTY,
_("Required property %s missing"), _("Required property %s missing"),
prop.name); prop.name);
g_key_file_free (keyfile); g_key_file_free (keyfile);
...@@ -434,8 +434,8 @@ do_import (const char *path, GError **error) ...@@ -434,8 +434,8 @@ do_import (const char *path, GError **error)
if (int_val == 0 && *error){ if (int_val == 0 && *error){
g_clear_error(error); g_clear_error(error);
g_set_error (error, g_set_error (error,
L2TP_PLUGIN_UI_ERROR, IPSEC_L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_INVALID_PROPERTY, IPSEC_L2TP_PLUGIN_UI_ERROR_INVALID_PROPERTY,
_("Property %s can't be parsed as integer."), _("Property %s can't be parsed as integer."),
prop.name); prop.name);
g_key_file_free (keyfile); g_key_file_free (keyfile);
...@@ -451,8 +451,8 @@ do_import (const char *path, GError **error) ...@@ -451,8 +451,8 @@ do_import (const char *path, GError **error)
if (!bool_val) { if (!bool_val) {
g_clear_error(error); g_clear_error(error);
g_set_error (error, g_set_error (error,
L2TP_PLUGIN_UI_ERROR, IPSEC_L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_INVALID_PROPERTY, IPSEC_L2TP_PLUGIN_UI_ERROR_INVALID_PROPERTY,
_("Property %s can't be parsed as boolean. Only 'true' and 'false' allowed."), _("Property %s can't be parsed as boolean. Only 'true' and 'false' allowed."),
prop.name); prop.name);
g_key_file_free (keyfile); g_key_file_free (keyfile);
...@@ -478,7 +478,7 @@ do_import (const char *path, GError **error) ...@@ -478,7 +478,7 @@ do_import (const char *path, GError **error)
return NULL; return NULL;
} }
/* g_message("Imported L2TP."); */ /* g_message("Imported IPSec-L2TP."); */
return connection; return connection;
} }
...@@ -587,7 +587,7 @@ export_ip4(NMSettingIP4Config *s_ip4, GKeyFile *keyfile, GError **error) ...@@ -587,7 +587,7 @@ export_ip4(NMSettingIP4Config *s_ip4, GKeyFile *keyfile, GError **error)
} }
/** /**
* Exports L2TP connection #connection to .ini - like file named #path * Exports IPSec-L2TP connection #connection to .ini - like file named #path
* *
* Returns: %TRUE on success or %FALSE on failure * Returns: %TRUE on success or %FALSE on failure
**/ **/
...@@ -611,7 +611,7 @@ do_export (const char *path, NMConnection *connection, GError **error) ...@@ -611,7 +611,7 @@ do_export (const char *path, NMConnection *connection, GError **error)
export_file = g_key_file_new (); export_file = g_key_file_new ();
g_key_file_set_comment(export_file, NULL, NULL, NM_DBUS_SERVICE_L2TP, error); g_key_file_set_comment(export_file, NULL, NULL, NM_DBUS_SERVICE_IPSEC_L2TP, error);
value = nm_setting_connection_get_id(s_con); value = nm_setting_connection_get_id(s_con);
g_key_file_set_string(export_file, CONN_SECTION, "id", value); g_key_file_set_string(export_file, CONN_SECTION, "id", value);
...@@ -623,8 +623,8 @@ do_export (const char *path, NMConnection *connection, GError **error) ...@@ -623,8 +623,8 @@ do_export (const char *path, NMConnection *connection, GError **error)
if (!value && prop.required){ if (!value && prop.required){
g_key_file_free(export_file); g_key_file_free(export_file);
g_set_error(error, g_set_error(error,
L2TP_PLUGIN_UI_ERROR, IPSEC_L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_MISSING_PROPERTY, IPSEC_L2TP_PLUGIN_UI_ERROR_MISSING_PROPERTY,
_("Missing required property '%s'"), _("Missing required property '%s'"),
prop.name); prop.name);
return FALSE; return FALSE;
...@@ -653,8 +653,8 @@ do_export (const char *path, NMConnection *connection, GError **error) ...@@ -653,8 +653,8 @@ do_export (const char *path, NMConnection *connection, GError **error)
if (!(file = fopen (path, "w"))) { if (!(file = fopen (path, "w"))) {
g_set_error(error, g_set_error(error,
L2TP_PLUGIN_UI_ERROR, IPSEC_L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_FILE_NOT_READABLE, IPSEC_L2TP_PLUGIN_UI_ERROR_FILE_NOT_READABLE,
_("Couldn't open file for writing.")); _("Couldn't open file for writing."));
g_key_file_free (export_file); g_key_file_free (export_file);
return FALSE; return FALSE;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* nm-l2tp-service - L2TP VPN integration with NetworkManager /* nm-ipsec-l2tp-service - IPSec-L2TP VPN integration with NetworkManager
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
......
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