Project

General

Profile

« Previous | Next » 

Revision 4848

Added by daigle over 15 years ago

enclose more references to ldap and mesg in the if (ldap) statement.

View differences:

ldapweb.cgi
678 678
    if ($ldap) {
679 679
    	$ldap->start_tls( verify => 'none');
680 680
    	$ldap->bind( version => 3, anonymous => 1);
681
			mesg = $ldap->search (
681
		$mesg = $ldap->search (
682 682
			base   => $base,
683 683
			filter => $filter,
684 684
			attrs => @$attref,
......
700 700
			}
701 701
        }
702 702
    	$ldap->unbind;   # take down session
703
    }
704 703

  
705
    # Follow references
706
    my @references = $mesg->references();
707
    for (my $i = 0; $i <= $#references; $i++) {
708
        my $uri = URI->new($references[$i]);
709
        my $host = $uri->host();
710
        my $path = $uri->path();
711
        $path =~ s/^\///;
712
        my $refFound = &findExistingAccounts($host, $path, $filter, $attref);
713
        if ($refFound) {
714
            $foundAccounts .= $refFound;
715
        }
704
    	# Follow references
705
    	my @references = $mesg->references();
706
    	for (my $i = 0; $i <= $#references; $i++) {
707
        	my $uri = URI->new($references[$i]);
708
        	my $host = $uri->host();
709
        	my $path = $uri->path();
710
        	$path =~ s/^\///;
711
        	my $refFound = &findExistingAccounts($host, $path, $filter, $attref);
712
        	if ($refFound) {
713
            	$foundAccounts .= $refFound;
714
        	}
715
    	}
716 716
    }
717 717

  
718 718
    #print "<p>Checking referrals...</p>\n";

Also available in: Unified diff