Bug #1602

Util::Ldap::Connection initialize() doesn't pass user/password

Added by Erik Burrows over 3 years ago. Updated over 3 years ago.

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]
    
  •            :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


Related issues

duplicates Puppet - Bug #1521: ldapuser and ldappassword options being ignored Closed 08/19/2008

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

Also available in: Atom PDF