[pve-devel] r4910 - pve-access-control/trunk

svn-commits at proxmox.com svn-commits at proxmox.com
Mon Jul 19 09:19:06 CEST 2010


Author: dietmar
Date: 2010-07-19 07:19:06 +0000 (Mon, 19 Jul 2010)
New Revision: 4910

Modified:
   pve-access-control/trunk/AccessControl.pm
   pve-access-control/trunk/ChangeLog
Log:
* AccessControl.pm: fixed timeout for ldap/AD errors and reduced to two seconds


Modified: pve-access-control/trunk/AccessControl.pm
===================================================================
--- pve-access-control/trunk/AccessControl.pm	2010-07-19 07:02:19 UTC (rev 4909)
+++ pve-access-control/trunk/AccessControl.pm	2010-07-19 07:19:06 UTC (rev 4910)
@@ -431,10 +431,7 @@
     
     if ($shadow_cfg->{users}->{$username}) {
 	my $encpw = crypt($password, $shadow_cfg->{users}->{$username}->{shadow});
-        if ($encpw ne $shadow_cfg->{users}->{$username}->{shadow}) {
-	    sleep(4);
-	    die "invalid credentials\n";
-	}
+        die "invalid credentials\n" if ($encpw ne $shadow_cfg->{users}->{$username}->{shadow});
     } else {
 	die "no password set\n";
     }
@@ -491,10 +488,7 @@
 
     $ldap->unbind();
 
-    if ($code) {
-	sleep(4);
-	die "$err\n";
-    }
+    die "$err\n" if ($code);
 }
 
 sub authenticate_user_ldap {
@@ -512,10 +506,7 @@
 
     $ldap->unbind();
 
-    if ($code) {
-	sleep(4);
-	die "$err\n";
-    }
+    die "$err\n" if ($code);
 }
 
 sub authenticate_user_domain {
@@ -584,7 +575,7 @@
     }
 
     die "domain \'$domain\' not defined\n" if !$found;
-
+    sleep(2) if $errmsg;
     die $errmsg || "internal error";
 }
 

Modified: pve-access-control/trunk/ChangeLog
===================================================================
--- pve-access-control/trunk/ChangeLog	2010-07-19 07:02:19 UTC (rev 4909)
+++ pve-access-control/trunk/ChangeLog	2010-07-19 07:19:06 UTC (rev 4910)
@@ -1,3 +1,7 @@
+2010-07-19  Seth Lauzon <seth.lauzon at gmail.com>
+
+	* AccessControl.pm: fixed timeout for ldap/AD errors and reduced to two seconds
+
 2010-07-16  Proxmox Support Team  <support at proxmox.com>
 
 	* AccessControl.pm (authenticate_user_domain): catch special



More information about the pve-devel mailing list