[Ovirt-devel] Re: Modified LDAPConnection to work with an SRV record, then fallback to the ldap.yml file if necessary.

Darryl L. Pierce dpierce at redhat.com
Fri May 23 13:51:19 UTC 2008


+++ Perry N. Myers [22/05/08 20:33 -0400]:
>> +	dns.getresources("_ldap._tcp.#{`dnsdomainname`}",Resolv::DNS::Resource::IN::SRV).collect do |resource|
>> +	  @host = resource.address
>
> You're not getting the port from dns srv as well?  We should be getting 
> both host and port from the dns srv record.

Okay, I'll update and send a new patch out.

>> +    base = @@config["base"] if base == nil
>> +    host = @@config["host"] if host == nil
>> +    port = @@config["port"] if port == nil
>
> Where is base confgured from?  If it's the default obtained from ldap.yaml 
> it'll be wrong.  It would seem that you should calculate what base is using 
> the value of host.  i.e. if host is foo.bar.com then base should be 
> dc=bar,dc=com.

"base" is being pulled from ldap.yml as well. But I think determining it from
the hostname might not be correct, either, yes? For example, the server in
Boston is ovirt-freeipa.lab.bos.redhat.com but it's base is
dc=ovirt-devel,dc=redhat,dc=com which you couldn't determine from the
hostname.

-- 
Darryl L. Pierce <dpierce at redhat.com> - Phone: (919) 754-4383
Sr. Software Engineer -- Red Hat, Inc.
"In matters of style, swim with the current; 
In matters of principle, stand like a rock." - Thomas Jefferson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20080523/d4f67eed/attachment.sig>


More information about the ovirt-devel mailing list