From: Chris R. <chr...@me...> - 2000-07-31 09:26:42
|
Graham Barr <gb...@po...> wrote: > On Mon, Jul 31, 2000 at 09:44:56AM +0100, Chris Ridd wrote: >> Mark Wilcox <mew...@un...> wrote: >> >> > What's listed here needs to be split into 2 objects. >> > >> > To test for connectity, it could be Net::LDAP::isUp($ldap,[callback => >> > \&callback]). by default it could try with anonymous bind. $ldap is an >> > open Net::LDAP connection. callback is an user defined function to >> > determine LDAP connection status. >> >> I'm sort of nervous about this because of the side-effects. How can we >> implement this without side-effects? [...] > connection is still live. Personally I would say just catch the errors > to any operation and re-connect if you need to. I agree. >> > As for things like what supported version,SASL,controls, etc. This all >> > should be in the server's root DSE (assuming it's LDAP 3, but an LDAP 2 >> > server can't give you this info). >> > >> > Thus we could have an object like Net::LDAP::DSE. >> >> No, that's too generic - servers have lots of DSEs and you are only >> talking about the root one. Net::LDAP::RootDSE would IMHO be a better >> choice. > > Hm, I see your point. But could we make a more generic Net::LDAP::DSE ? Is > it worth it ? Supporting other DSEs is tricky in LDAP because they're not really described properly in the LDAP RFCs, and the mechanism for getting them (via the manageDsaIT service control) is not a standard part of LDAP. The only commonality between DSEs is an attribute called dseType. The value is a named bitstring, eg "( entry $ admPoint )", or "( root )". If you want a more generic Net::LDAP::DSE, then it would need to hold the dseType, and construct the more specific RootDSE object if it found the dseType contained 'root'. >> I don't think there's a way to find if the first mode's supported. You >> can't go by vendor names and product versions, because administrators >> might feasibly disable LDAPS support. > > Sure there is. Just try to connect to the LDAPS port :) Which one? The default one? > Graham. Cheers, Chris |