* Fixed bug in the LDAP domain backend, do not try to check if an address

is already defined if there is no record for that address.
* Fixed bug in the YAML account backend.  A user may not exist, then
  its password is not findable and thus can not be crypted!


git-svn-id: svn+ssh://svn.luon.net/svn/ildus/trunk@16 65a33f86-aa00-0410-91be-cd1bf5efb309
This commit is contained in:
paul 2005-12-29 22:33:07 +00:00
parent 82d09e2039
commit 83a868f5f0
2 changed files with 5 additions and 2 deletions

View File

@ -22,6 +22,7 @@ module Ildus::Server::AccountBackend
case config['crypt'].to_sym
when :unix
regged_pass = @db[user]
return false if regged_pass.nil?
self.auth = (pass.crypt(regged_pass) == regged_pass)
else
raise "unsupported crypt type: #{config['crypt']}"

View File

@ -67,10 +67,12 @@ module Ildus::Server::DomainBackend
raise Handler::HostNotFoundError if entry.nil?
if addr.ipv4?
return false if entry['aRecord'][0] == addr.to_s
record = entry['aRecord']
return false if record and record[0] == addr.to_s
@ldap.modify(entry['dn'][0], {"aRecord" => [addr.to_s]})
elsif addr.ipv6?
return false if entry['aAAARecord'][0] == addr.to_s
record = entry['aAAARecord']
return false if record and record[0] == addr.to_s
@ldap.modify(entry['dn'][0], {"aAAARecord" => [addr.to_s]})
else
return false