1 |
diff -Nur smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/40userAuth smeserver-openvpn-bridge-2.0-lib64/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/40userAuth |
2 |
--- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/40userAuth 2013-06-05 14:43:29.830868859 +0200 |
3 |
+++ smeserver-openvpn-bridge-2.0-lib64/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/40userAuth 2013-06-06 11:59:41.919182924 +0200 |
4 |
@@ -2,9 +2,25 @@ |
5 |
{ |
6 |
my $userAuth = ${'openvpn-bridge'}{userAuth} || 'CrtWithPass'; |
7 |
if ($userAuth eq 'CrtWithPass'){ |
8 |
- my $plugin_dir = (-d "/usr/share/openvpn/plugin/lib") ? |
9 |
- '/usr/share/openvpn/plugin/lib':'/usr/lib/openvpn/plugin/lib'; |
10 |
- $OUT .= "plugin ".$plugin_dir."/openvpn-auth-pam.so login\n"; |
11 |
+ # This the the old default location of the plugin |
12 |
+ my $plugin = "/usr/share/openvpn/plugin/lib/openvpn-auth-pam.so"; |
13 |
+ # This is the new (since openvpn 2.3.1-2) of the plugin, for x86 |
14 |
+ if ( -e "/usr/lib/openvpn/plugins/openvpn-plugin-auth-pam.so" ){ |
15 |
+ $plugin = "/usr/lib/openvpn/plugins/openvpn-plugin-auth-pam.so"; |
16 |
+ } |
17 |
+ # Same for x86_64 |
18 |
+ elsif ( -e "/usr/lib64/openvpn/plugins/openvpn-plugin-auth-pam.so" ){ |
19 |
+ $plugin = "/usr/lib64/openvpn/plugins/openvpn-plugin-auth-pam.so"; |
20 |
+ } |
21 |
+ # This is the location for openvpn before 2.3.1-2 |
22 |
+ elsif ( -e "/usr/lib/openvpn/plugin/lib/openvpn-auth-pam.so" ){ |
23 |
+ $plugin = "/usr/lib/openvpn/plugin/lib/openvpn-auth-pam.so"; |
24 |
+ } |
25 |
+ # Same for x86_64 |
26 |
+ elsif ( -e "/usr/lib64/openvpn/plugin/lib/openvpn-auth-pam.so" ){ |
27 |
+ $plugin = "/usr/lib64/openvpn/plugin/lib/openvpn-auth-pam.so"; |
28 |
+ } |
29 |
+ $OUT .= "plugin " . $plugin . " login\n"; |
30 |
} |
31 |
$OUT .= ''; |
32 |
} |