summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_openvpn_server.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-02 17:07:06 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-02 17:07:06 +0000
commitc61e4626269fb099f4b7e9c12ceaeffd163c968f (patch)
treefe99cd1c66aa9e456bc9b16de0f462bfc982c249 /usr/local/www/vpn_openvpn_server.php
parenta13ce628f8a2c1292bf222387ea59cd63e9b9234 (diff)
downloadpfsense-c61e4626269fb099f4b7e9c12ceaeffd163c968f.zip
pfsense-c61e4626269fb099f4b7e9c12ceaeffd163c968f.tar.gz
Allow the GUI auth API to be used for doing authentication against authentication servers specified. Teach Openvpn to use this API. Allow openvpn to authenticate against multiple servers that can be selected on the server configuration page.
Diffstat (limited to 'usr/local/www/vpn_openvpn_server.php')
-rw-r--r--usr/local/www/vpn_openvpn_server.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php
index c58942f..87328e0 100644
--- a/usr/local/www/vpn_openvpn_server.php
+++ b/usr/local/www/vpn_openvpn_server.php
@@ -265,7 +265,7 @@ if ($_POST) {
if ($_POST['disable'] == "yes")
$server['disable'] = true;
$server['mode'] = $pconfig['mode'];
- $server['authmode'] = $pconfig['authmode'];
+ $server['authmode'] = implode(",", $pconfig['authmode']);
$server['protocol'] = $pconfig['protocol'];
list($server['interface'], $server['ipaddr']) = explode ("|",$pconfig['interface']);
$server['local_port'] = $pconfig['local_port'];
@@ -338,6 +338,7 @@ if ($_POST) {
header("Location: vpn_openvpn_server.php");
exit;
}
+ $pconfig['authmode'] = implode(",", $pconfig['authmode']);
}
include("head.inc");
@@ -545,12 +546,13 @@ function netbios_change() {
<tr id="authmodetr" style="display:none">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Backend for authentication");?></td>
<td width="78%" class="vtable">
- <select name='authmode' id='authmode' class="formselect">
- <option value="local" <?php if ($pconfig['authmode'] == "local") echo "selected";?>>Local authentication database</option>
+ <select name='authmode[]' id='authmode' class="formselect" multiple="true" size="<?php echo count($auth_servers) + 1; ?>">
+ <?php $authmodes = explode(",", $pconfig['authmode']); ?>
+ <option value="local" <?php if (in_array("local", $authmodes)) echo "selected";?>>Local authentication database</option>
<?php
foreach ($auth_servers as $auth_server):
$selected = "";
- if ($pconfig['authmode'] == $auth_server['name'])
+ if (in_array($auth_server['name'], $authmodes))
$selected = "selected";
?>
<option value="<?=$auth_server['name'];?>" <?=$selected;?>><?=$auth_server['name'];?></option>
OpenPOWER on IntegriCloud