User Tools

Site Tools


password_authentication

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
password_authentication [2008/03/18 12:30]
kyxap
password_authentication [2013/12/15 13:31]
kyxap Page moved from stuff:openvpn:password_authentication to password_authentication
Line 24: Line 24:
 verb 3 verb 3
 </​code>​ </​code>​
 +
 ===== Скрипт /​usr/​local/​etc/​openvpn/​auth.pl ===== ===== Скрипт /​usr/​local/​etc/​openvpn/​auth.pl =====
 <code perl> <code perl>
Line 44: Line 45:
     chomp $password;     chomp $password;
     if ($username eq $thisUsername && $password eq $thisPassword) {     if ($username eq $thisUsername && $password eq $thisPassword) {
-        $isValidUser = 1;}+        $isValidUser = 1; 
 +        last; 
 +    ​}
 } }
 close PASSWORDS; close PASSWORDS;
Line 50: Line 53:
 if ($isValidUser == 1) { if ($isValidUser == 1) {
     print "​ERR\n";​     print "​ERR\n";​
-    exit 0;+    exit 1;
 } else { } else {
     print "​OK\n";​     print "​OK\n";​
-    exit 1;+    exit 0;
 } }
 </​code>​ </​code>​
password_authentication.txt · Last modified: 2013/12/15 17:02 by kyxap