From: Graham B. <gb...@po...> - 2000-07-28 10:29:24
|
On Fri, Jul 28, 2000 at 11:35:18AM +1000, David Bussenschutt wrote: > Anyone else see this as a potential for a new module (gee.. how about > ::Status or Well I think there will be possibilities beyond status for this kind of thing so I would really like to see something more general. > ::Util::Status ?) Net::LDAP::Util::Status is too deep IMO for such an API. It really should be Net::LDAP::Something. > containing functions/objects/whatever that query the ldap server to find > out what it's capable of? > ie: > is it "up"? - with an anonymous bind > is is "up"? - with a malformed packet request Do you really want to give the user control over what type of check to do ? > is it version 2 or version 3 compliant? > does it support ssl/sasl/whatever? > does it limit search requests? (and what are they) > does it have timeouts? (and what are they) IIRC, This is all avaliable from the root DSE. But I guess you are looking for a simpler approach than $dse = $ldap->root_dse; $dse->get('supportedVersions'); # I forget the attribute name > Mind you, if this was written, it'd be very tempting to include something > to test for "type" of ldap server eg Netscape/openldap/novell and introduce > server specific tests too.... is this a good or a bad thing? I am not sure there is a way to determine the server type. Not reliably anyway. > P.S. regarding the Ldap::Cooked (or whatever)... I for one like the option > of a simple "foolproof" API that is smart enough to figure out things like > the ldap version to talk with(currently 3 falling back to 2), You should bind to the version of which feature you need. If you don't use version 3 features bind as version 2. If you want v3 feature, falling back to binding as v2 is the wrong thing to do. > whether ssl > is supported on the server end (with a fall-back if its not), This is dangerous. If you want SSL it is normally for a reason, so falling back is REALLY the wrong thing. > if searches > are limited then automatically do multiple searches invisibly, etc etc. The Net::LDAPiranah module did this but I don't think it works with the latest version. But we will get it going again. Graham. |