Commit ed7e3c3e authored by Franco Fichtner's avatar Franco Fichtner

src: fix syntax errors

parent 25bd166a
...@@ -75,13 +75,13 @@ function getNasIP() ...@@ -75,13 +75,13 @@ function getNasIP()
/* setup syslog logging */ /* setup syslog logging */
openlog("openvpn", LOG_ODELAY, LOG_AUTH); openlog("openvpn", LOG_ODELAY, LOG_AUTH);
if (count($argv) > 3) { if (count($argv) > 6) {
$authmodes = explode(",", $5); $authmodes = explode(',', $argv[5]);
$username = $1; $username = $argv[1];
$password = urldecode($2); $password = urldecode($argv[2]);
$common_name = $3; $common_name = $argv[3];
$modeid = $6; $modeid = $argv[6];
$strictusercn = $4 == "false" ? false : true; $strictusercn = $argv[4] == 'false' ? false : true;
} else { } else {
/* read data from environment */ /* read data from environment */
$username = getenv("username"); $username = getenv("username");
...@@ -194,5 +194,3 @@ if (isset($_GET)) ...@@ -194,5 +194,3 @@ if (isset($_GET))
echo "OK"; echo "OK";
else else
exit(0); exit(0);
?>
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