From 7191007061b5ecf493251d5d260fdc4ad2b614e9 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Fri, 5 Jul 2013 12:42:29 +0200 Subject: Ignore user and group options --HG-- extra : rebase_source : 42f96792241595a9c0358524b0a1f5e1628159c2 --- src/de/blinkt/openvpn/core/ConfigParser.java | 30 +++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/de/blinkt/openvpn/core/ConfigParser.java b/src/de/blinkt/openvpn/core/ConfigParser.java index 1a37f7cd..01a92bd7 100644 --- a/src/de/blinkt/openvpn/core/ConfigParser.java +++ b/src/de/blinkt/openvpn/core/ConfigParser.java @@ -1,5 +1,7 @@ package de.blinkt.openvpn.core; +import de.blinkt.openvpn.VpnProfile; + import java.io.BufferedReader; import java.io.IOException; import java.io.Reader; @@ -8,8 +10,6 @@ import java.util.HashMap; import java.util.Locale; import java.util.Vector; -import de.blinkt.openvpn.VpnProfile; - //! Openvpn Config FIle Parser, probably not 100% accurate but close enough // And rember, this is valid :) @@ -241,9 +241,10 @@ public class ConfigParser { "dhcp-release", "dhcp-renew", "dh", - "ip-win32", - "management-hold", - "management", + "group", + "ip-win32", + "management-hold", + "management", "management-query-passwords", "pause-exit", "persist-key", @@ -259,11 +260,12 @@ public class ConfigParser { "tmp-dir", "tun-ipv6", "topology", - "win-sys", - }; + "user", + "win-sys", + }; - // This method is far too long + // This method is far too long public VpnProfile convertProfile() throws ConfigParseError{ boolean noauthtypeset=true; VpnProfile np = new VpnProfile(CONVERTED_PROFILE); @@ -336,12 +338,12 @@ public class ConfigParser { Vector dev =getOption("dev",1,1); Vector devtype =getOption("dev-type",1,1); - if( (devtype !=null && devtype.get(1).equals("tun")) || - (dev!=null && dev.get(1).startsWith("tun")) || - (devtype ==null && dev == null) ) { - //everything okay - } else { - throw new ConfigParseError("Sorry. Only tun mode is supported. See the FAQ for more detail"); + if ((devtype != null && devtype.get(1).equals("tun")) || + (dev != null && dev.get(1).startsWith("tun")) || + (devtype == null && dev == null)) { + //everything okay + } else { + throw new ConfigParseError("Sorry. Only tun mode is supported. See the FAQ for more detail"); } -- cgit v1.2.3