summaryrefslogtreecommitdiffstats
path: root/etc/inc/openvpn.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r--etc/inc/openvpn.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index 1e7e9b8..c528f67 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -392,7 +392,9 @@ function openvpn_reconfigure($mode,& $settings) {
$firstsed = 1;
$sed .= "\"{$authcfg}\"";
}
- $sed .= ");";
+ $sed .= ");\\\n";
+ if (isset($settings['strictusercn']))
+ $sed .= "\$strictusercn = true;";
mwexec("/bin/cat /etc/inc/openvpn.auth-user.php | /usr/bin/sed 's/\/\/<template>/{$sed}/g' > {$g['varetc_path']}/openvpn/{$mode_id}.php");
mwexec("/bin/chmod a+x {$g['varetc_path']}/openvpn/{$mode_id}.php");
$conf .= "auth-user-pass-verify {$g['varetc_path']}/openvpn/{$mode_id}.php via-env\n";
OpenPOWER on IntegriCloud