diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-07-05 12:42:29 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-07-05 12:42:29 +0200 |
commit | 7191007061b5ecf493251d5d260fdc4ad2b614e9 (patch) | |
tree | 3957a6bf041deae0710d197eb6b0f26a36d9227d /src | |
parent | b4c1e524d698081705e7485315a08ab348c268d2 (diff) |
Ignore user and group options
--HG--
extra : rebase_source : 42f96792241595a9c0358524b0a1f5e1628159c2
Diffstat (limited to 'src')
-rw-r--r-- | src/de/blinkt/openvpn/core/ConfigParser.java | 30 |
1 files changed, 16 insertions, 14 deletions
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<String> dev =getOption("dev",1,1); Vector<String> 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"); } |