summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/leap/bitmask/vpn/helpers/linux/bitmask-root9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/leap/bitmask/vpn/helpers/linux/bitmask-root b/src/leap/bitmask/vpn/helpers/linux/bitmask-root
index 3f6c1e74..6b8f3206 100755
--- a/src/leap/bitmask/vpn/helpers/linux/bitmask-root
+++ b/src/leap/bitmask/vpn/helpers/linux/bitmask-root
@@ -130,7 +130,7 @@ ALLOWED_FLAGS = {
"--tls-cipher": ["CIPHER"],
"--cipher": ["CIPHER"],
"--auth": ["CIPHER"],
- "--management": ["DIR", "UNIXSOCKET"],
+ "--management": ["DIR||IP", "UNIXSOCKET||NUMBER"],
"--management-client-user": ["USER"],
"--cert": ["FILE"],
"--key": ["FILE"],
@@ -138,6 +138,7 @@ ALLOWED_FLAGS = {
"--fragment": ["NUMBER"],
"--keepalive": ["NUMBER", "NUMBER"],
"--verb": ["NUMBER"],
+ "--management-client": [],
}
PARAM_FORMATS = {
@@ -392,8 +393,10 @@ def parse_openvpn_flags(args):
(SCRIPT, flag_name))
return None
for param, param_type in zip(flag_params, required_params):
- if PARAM_FORMATS[param_type](param):
- result.append(param)
+ for tpe in param_type.split("||"):
+ if PARAM_FORMATS[tpe](param):
+ result.append(param)
+ break
else:
log("%s: ERROR: Bad argument %s" %
(SCRIPT, param))