aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc19
-rwxr-xr-xconfig/openvpn-client-export/vpn_openvpn_export.php2
-rw-r--r--config/sarg/sarg.inc2
-rw-r--r--config/sarg/sarg_schedule.xml4
-rw-r--r--config/squid-reverse/squid.inc4
5 files changed, 17 insertions, 14 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index 3c478553..710c5539 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -61,7 +61,7 @@ function openvpn_client_export_deinstall() {
conf_mount_ro();
}
-function openvpn_client_export_prefix($srvid, $usrid = null) {
+function openvpn_client_export_prefix($srvid, $usrid = null, $crtid = null) {
global $config;
// lookup server settings
@@ -75,12 +75,13 @@ function openvpn_client_export_prefix($srvid, $usrid = null) {
$prot = ($settings['protocol'] == 'UDP' ? 'udp' : $settings['protocol']);
$port = $settings['local_port'];
- $username = "";
- //$config['openvpn']['openvpn-server'];
+ $filename_addition = "";
if ($usrid && is_numeric($usrid))
- $username = "-".$config['system']['user'][$usrid]['name'];
+ $filename_addition = "-".$config['system']['user'][$usrid]['name'];
+ if ($crtid && is_numeric($crtid) && function_exists("cert_get_cn"))
+ $filename_addition = "-".cert_get_cn($config['cert'][$crtid]['crt']);
- return "{$host}-{$prot}-{$port}{$username}";
+ return "{$host}-{$prot}-{$port}{$filename_addition}";
}
function openvpn_client_pem_to_pk12($outpath, $outpass, $crtpath, $keypath, $capath = false) {
@@ -225,7 +226,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $quotese
$conf .= "http-proxy {$proxy['ip']} {$proxy['port']} ";
if ($proxy['proxy_authtype'] != "none") {
if (!isset($proxy['passwdfile']))
- $proxy['passwdfile'] = openvpn_client_export_prefix($srvid, $usrid) . "-proxy";
+ $proxy['passwdfile'] = openvpn_client_export_prefix($srvid, $usrid, $crtid) . "-proxy";
$conf .= " {$proxy['passwdfile']} {$proxy['proxy_authtype']}";
}
$conf .= "{$nl}";
@@ -240,7 +241,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $quotese
}
// add key settings
- $prefix = openvpn_client_export_prefix($srvid, $usrid);
+ $prefix = openvpn_client_export_prefix($srvid, $usrid, $crtid);
$cafile = "{$prefix}-ca.crt";
if($nokeys == false) {
if ($expformat == "inline") {
@@ -487,7 +488,7 @@ function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $quot
exec("/bin/cp {$tempdir}/{$client_install_exe} {$tempdir}/openvpn-install.exe");
// write configuration file
- $prefix = openvpn_client_export_prefix($srvid, $usrid);
+ $prefix = openvpn_client_export_prefix($srvid, $usrid, $crtid);
$cfgfile = "{$confdir}/{$prefix}-config.ovpn";
if (!empty($proxy) && $proxy['proxy_authtype'] != "none") {
$proxy['passwdfile'] = "{$prefix}-password";
@@ -589,7 +590,7 @@ function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $usead
$tempdir = $tempdir . "/Viscosity.visc/";
// write cofiguration file
- $prefix = openvpn_client_export_prefix($srvid, $usrid);
+ $prefix = openvpn_client_export_prefix($srvid, $usrid, $crtid);
if (!empty($proxy) && $proxy['proxy_authtype'] != "none") {
$proxy['passwdfile'] = "config-password";
$pwdfle = "{$proxy['user']}\n";
diff --git a/config/openvpn-client-export/vpn_openvpn_export.php b/config/openvpn-client-export/vpn_openvpn_export.php
index e7c94ae6..85d44177 100755
--- a/config/openvpn-client-export/vpn_openvpn_export.php
+++ b/config/openvpn-client-export/vpn_openvpn_export.php
@@ -172,7 +172,7 @@ if (!empty($act)) {
}
}
- $exp_name = openvpn_client_export_prefix($srvid, $usrid);
+ $exp_name = openvpn_client_export_prefix($srvid, $usrid, $crtid);
if(substr($act, 0, 4) == "conf") {
switch ($act) {
diff --git a/config/sarg/sarg.inc b/config/sarg/sarg.inc
index a6dbb081..5d0a91a5 100644
--- a/config/sarg/sarg.inc
+++ b/config/sarg/sarg.inc
@@ -71,7 +71,7 @@ function sarg_resync() {
global $config;
if (($_POST['Submit'] == 'Save') || !isset($_POST['Submit']))
sync_package_sarg();
- if ($_POST['Submit'] == 'Force udpate now')
+ if ($_POST['Submit'] == 'Force update now')
run_sarg();
}
diff --git a/config/sarg/sarg_schedule.xml b/config/sarg/sarg_schedule.xml
index 4a7309af..0c452335 100644
--- a/config/sarg/sarg_schedule.xml
+++ b/config/sarg/sarg_schedule.xml
@@ -153,7 +153,7 @@
<size>5</size>
<description><![CDATA[How often extract users from active directory and verify changes<br>
Valid options are minutes(m), hours(h), days(d)<br>
- Sample: To update every hour, use 1h<br><br>]]>&lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Force udpate now&quot;&gt;&lt;br&gt;</description>
+ Sample: To update every hour, use 1h<br><br>]]>&lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Force update now&quot;&gt;&lt;br&gt;</description>
<required/>
</field>
<field>
@@ -221,4 +221,4 @@
<custom_php_resync_config_command>
sarg_resync();
</custom_php_resync_config_command>
-</packagegui> \ No newline at end of file
+</packagegui>
diff --git a/config/squid-reverse/squid.inc b/config/squid-reverse/squid.inc
index 7d48390d..4212861e 100644
--- a/config/squid-reverse/squid.inc
+++ b/config/squid-reverse/squid.inc
@@ -1868,7 +1868,9 @@ function squid_do_xmlrpc_sync($sync_to_ip, $username, $password) {
$xml['squidcache'] = $config['installedpackages']['squidcache'];
$xml['squidnac'] = $config['installedpackages']['squidnac'];
$xml['squidtraffic'] = $config['installedpackages']['squidtraffic'];
- $xml['squidreverse'] = $config['installedpackages']['squidreverse'];
+ $xml['squidreversegeneral'] = $config['installedpackages']['squidreversegeneral'];
+ $xml['squidreversepeer'] = $config['installedpackages']['squidreversepeer'];
+ $xml['squidreverseuri'] = $config['installedpackages']['squidreverseuri'];
$xml['squidauth'] = $config['installedpackages']['squidauth'];
$xml['squidusers'] = $config['installedpackages']['squidusers'];
/* assemble xmlrpc payload */