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

svn-commits at proxmox.com svn-commits at proxmox.com
Tue Aug 10 08:29:00 CEST 2010


Author: dietmar
Date: 2010-08-10 06:29:00 +0000 (Tue, 10 Aug 2010)
New Revision: 4952

Modified:
   pve-access-control/trunk/AccessControl.pm
   pve-access-control/trunk/ChangeLog
Log:
 	* AccessControl.pm (parse_domains): ignore case (always convert
	type to lower case), fix bug from Seth and test for 'ldaps'.

 


Modified: pve-access-control/trunk/AccessControl.pm
===================================================================
--- pve-access-control/trunk/AccessControl.pm	2010-08-10 06:23:52 UTC (rev 4951)
+++ pve-access-control/trunk/AccessControl.pm	2010-08-10 06:29:00 UTC (rev 4952)
@@ -1277,15 +1277,15 @@
 	next if $line =~ m/^\s*$/; # skip empty lines
 
 	if ($line =~ m/^(\S+):\s*(.+)\s*$/) {
-	    my $type = $1;
+	    my $type = lc($1);
 	    my $domains = $2;
 	    my $ignore = 0;
 
-	    if (($type ne "AD") && ($type ne "LDAP") && ($type ne "LDAPS")) {
+	    if (($type ne "ad") && ($type ne "ldap") && ($type ne "ldaps")) {
 		$ignore = 1;
 		warn "ignoring domains '$domains' - (unsupported authentication type '$type')\n";
 	    } else {
-		$ad = { type => lc($type), domains => [] };
+		$ad = { type => $type, domains => [] };
 
 		foreach my $domain (split_list($domains)) {
 		    if (!parse_domain_name ($domain, 1)) {
@@ -1323,9 +1323,9 @@
 	    }
 	    if (!$ad->{server}) {
 		warn "ignoring domain '$domains' - missing server attribute\n";
-	    } elsif ((($ad->{type} eq "ldap") || ($ad->{type} eq "ldap")) && (!$ad->{user_attr})) {
+	    } elsif ((($ad->{type} eq "ldap") || ($ad->{type} eq "ldaps")) && (!$ad->{user_attr})) {
 		warn "ignoring domain '$domains' - missing user attribute\n";
-	    } elsif ((($ad->{type} eq "ldap") || ($ad->{type} eq "ldap")) && (!$ad->{base_dn})) {
+	    } elsif ((($ad->{type} eq "ldap") || ($ad->{type} eq "ldaps")) && (!$ad->{base_dn})) {
 		warn "ignoring domain '$domains' - missing base_dn attribute\n";
 	    } else {
 	    push(@$connlist, $ad) if !$ignore;

Modified: pve-access-control/trunk/ChangeLog
===================================================================
--- pve-access-control/trunk/ChangeLog	2010-08-10 06:23:52 UTC (rev 4951)
+++ pve-access-control/trunk/ChangeLog	2010-08-10 06:29:00 UTC (rev 4952)
@@ -1,3 +1,8 @@
+2010-08-10  Proxmox Support Team  <support at proxmox.com>
+
+	* AccessControl.pm (parse_domains): ignore case (always convert
+	type to lower case), fix bug from Seth and test for 'ldaps'.
+
 2010-08-09  Seth Lauzon <seth.lauzon at gmail.com>
 
 	* AccessControl.pm (authenticate_user_ldap): changed the bind function




More information about the pve-devel mailing list