Revision 4749
Added by walbridge almost 16 years ago
src/perl/ldapweb.cgi | ||
---|---|---|
86 | 86 |
} else { |
87 | 87 |
debug("No configuration set."); |
88 | 88 |
print "Content-type: text/html\n\n"; |
89 |
print 'Registry Error: The registry requires a skin name to continue.';
|
|
89 |
print 'LDAPweb Error: The registry requires a skin name to continue.';
|
|
90 | 90 |
exit(); |
91 | 91 |
} |
92 | 92 |
|
... | ... | |
173 | 173 |
$ldapConfig->{$o}{'dn'} = $ldapConfig->{$o}{'base'}; |
174 | 174 |
} |
175 | 175 |
} |
176 |
# XXX |
|
177 |
#use Data::Dumper; |
|
178 |
#print "Content-type: text/plain\n\n"; |
|
179 |
#print Dumper($ldapConfig); |
|
180 |
#exit; |
|
181 | 176 |
|
182 | 177 |
#--------------------------------------------------------------------------80c-> |
183 | 178 |
# Define the main program logic that calls subroutines to do the work |
... | ... | |
302 | 297 |
foundAccounts => $found }); |
303 | 298 |
# Otherwise, create a new user in the LDAP directory |
304 | 299 |
} else { |
305 |
#print("ingore create account\n"); |
|
306 | 300 |
createAccount($allParams); |
307 | 301 |
} |
308 | 302 |
|
... | ... | |
579 | 573 |
my $entry = ""; |
580 | 574 |
my $mesg; |
581 | 575 |
my $ldap; |
582 |
print("ldap server ", $ldapurl, "\n");
|
|
576 |
debug("ldap server: $ldapurl");
|
|
583 | 577 |
|
584 | 578 |
#if main ldap server is down, a html file containing warning message will be returned |
585 | 579 |
$ldap = Net::LDAP->new($ldapurl, timeout => $timeout) or handleGeneralServerFailure($ldapdownmessage); |
... | ... | |
677 | 671 |
my $ldap; |
678 | 672 |
|
679 | 673 |
my $foundAccounts = 0; |
680 |
#print("the ldapurl in findExstingAccounts is ", $ldapurl, "\n"); |
|
674 |
|
|
681 | 675 |
#if main ldap server is down, a html file containing warning message will be returned |
682 | 676 |
$ldap = Net::LDAP->new($ldapurl, timeout => $timeout) or handleGeneralServerFailure($ldapdownmessage); |
683 | 677 |
$ldap->start_tls( verify => 'none'); |
... | ... | |
768 | 762 |
|
769 | 763 |
my $o = $query->param('o'); |
770 | 764 |
|
771 |
my $ldapUsername = $ldapConfig->{$o}{'user'}; |
|
772 |
my $ldapPassword = $ldapConfig->{$o}{'password'}; |
|
773 | 765 |
my $searchBase = $ldapConfig->{$o}{'base'}; |
774 | 766 |
my $dnBase = $ldapConfig->{$o}{'dn'}; |
767 |
my $ldapUsername = $ldapConfig->{$o}{'user'} . ',' . $searchBase; |
|
768 |
my $ldapPassword = $ldapConfig->{$o}{'password'}; |
|
775 | 769 |
debug("LDAP connection to $ldapurl..."); |
776 | 770 |
#if main ldap server is down, a html file containing warning message will be returned |
777 | 771 |
my $ldap = Net::LDAP->new($ldapurl, timeout => $timeout) or handleGeneralServerFailure("The ldap server " . $ldapurl . " is down!"); |
... | ... | |
780 | 774 |
$ldap->start_tls( verify => 'none'); |
781 | 775 |
debug("Attempting to bind to LDAP server with dn = $ldapUsername, pwd = $ldapPassword"); |
782 | 776 |
$ldap->bind( version => 3, dn => $ldapUsername, password => $ldapPassword ); |
783 |
#print "Inserting new entry...\n"; |
|
777 |
|
|
784 | 778 |
my $dn = 'uid=' . $query->param('uid') . ',' . $dnBase; |
779 |
debug("Inserting new entry for: $dn"); |
|
785 | 780 |
|
786 | 781 |
# Create a hashed version of the password |
787 | 782 |
my $shapass = createSeededPassHash($query->param('userPassword')); |
Also available in: Unified diff
Fix problem with failing authentication for creating new accounts. (Bug #3725)