Bug #1602
Util::Ldap::Connection initialize() doesn't pass user/password
| Status: | Duplicate | Start date: | 09/23/2008 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Affected Puppet version: | 0.25.0 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
The Util::Ldap::Connection::initialize() function does not pass the ldapuser and ldappassword parameters as documented in the configuration reference. The (old?) Util::Ldap::Connection::connect() function does, so here’s a patch to apply it’s connection parameter management to Util::Ldap::Connection::initialize():
—– /home/eburrows/tmp/puppet/util/ldap/connection.rb 2008-09-22 12:09:05.852808000 -0700 +++ /usr/lib/site_ruby/1.8/puppet/util/ldap/connection.rb 2008-09-22 13:10:22.000000000 -0700 @@ -10,14 +10,25 @@
# Return a default connection, using our default settings.
def self.instance
ssl = if Puppet[:ldaptls]:tlselsif Puppet[:ldapssl]trueelsefalseendnew(Puppet[:ldapserver], Puppet[:ldapport], :ssl => ssl)+
if Puppet[:ldaptls]ssl = :tlselsif Puppet[:ldapssl]ssl = trueelsessl = falseend+
options = {:ssl => ssl}+
if user = Puppet[:ldapuser] and user != ""options[:user] = userendif password = Puppet[:ldappassword] and password != ""options[:password] = passwordend+
new(Puppet[:ldapserver], Puppet[:ldapport], options)end
def close
Related issues
History
Updated by Luke Kanies over 3 years ago
Duplicaes #1521.
Updated by Luke Kanies over 3 years ago
- Status changed from Unreviewed to Duplicate