Issue #1599 has been updated by luke. Status changed from Unreviewed to Duplicate
Duplicate of #1521. ---------------------------------------- Bug #1599: Util::Ldap::Connection initialize() doesn't pass user/password http://projects.reductivelabs.com/issues/show/1599 Author: eburrows Status: Duplicate Priority: Normal Assigned to: Category: Target version: Complexity: Unknown Affected version: 0.24.5 Keywords: The LDAP connection initialize() function does not pass the configuration-file specified username and password as described in the documentation. The (older?) util::ldap::manager connect() function does, but seems unused. Below is a patch to connection.rb that applies the username/password/ssltype passing logic to the connection::initialize() function. --- /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] - :tls - elsif Puppet[:ldapssl] - true - else - false - end - new(Puppet[:ldapserver], Puppet[:ldapport], :ssl => ssl) + + if Puppet[:ldaptls] + ssl = :tls + elsif Puppet[:ldapssl] + ssl = true + else + ssl = false + end + + options = {:ssl => ssl} + + if user = Puppet[:ldapuser] and user != "" + options[:user] = user + end + if password = Puppet[:ldappassword] and password != "" + options[:password] = password + end + + new(Puppet[:ldapserver], Puppet[:ldapport], options) end def close ---------------------------------------- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
