diff options
author | Luke Kanies <luke@madstop.com> | 2008-09-16 11:24:57 -0500 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-09-17 09:10:35 +1000 |
commit | 77f4fb67fc9efac8ab70c1fc83e86123401b8000 (patch) | |
tree | cd32c969c56a35d2412e4320bfe86ef93dde665e /lib/puppet | |
parent | a1a670b305252b2f4b4b2b0020303143addc3eb8 (diff) | |
download | puppet-77f4fb67fc9efac8ab70c1fc83e86123401b8000.tar.gz puppet-77f4fb67fc9efac8ab70c1fc83e86123401b8000.tar.xz puppet-77f4fb67fc9efac8ab70c1fc83e86123401b8000.zip |
Fixed #1521 -- ldap user and group are now used with the default connection
when available.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/util/ldap/connection.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/puppet/util/ldap/connection.rb b/lib/puppet/util/ldap/connection.rb index f6530f853..70fe303c5 100644 --- a/lib/puppet/util/ldap/connection.rb +++ b/lib/puppet/util/ldap/connection.rb @@ -17,7 +17,17 @@ class Puppet::Util::Ldap::Connection else false end - new(Puppet[:ldapserver], Puppet[:ldapport], :ssl => ssl) + + options = {} + options[:ssl] = ssl + if user = Puppet.settings[:ldapuser] and user != "" + options[:user] = user + if pass = Puppet.settings[:ldappassword] and pass != "" + options[:password] = pass + end + end + + new(Puppet[:ldapserver], Puppet[:ldapport], options) end def close |