[Ietf-not43] FIRS demonstration
Leif Johansson
leifj at it.su.se
Sat Jul 26 11:11:49 EDT 2003
Eric A. Hall wrote:
>I've scratched up a very rough v0.01 FIRS demonstration system which
>illustrates how it can work (not necessarily how it will work). This
>includes a text-based Perl client and an LDAP database, both of which are
>running on the test system.
>
>
<snip>
A couple of comments on the code ...
You should add version=>3 to your Net::LDAP->new - as it is you are using
LDAPv2 which is doesn't support controls so you will never receive a control
as the result of your bind from a typical ldap servers.
Now I haven't read the FIRS draft (yet) so I am only guessing that FIRS is
supposed to return a control on bind. However (apart from the fact that
this
requires LDAPv3) the usual way to look for a supported control is to lookup
the root-DSE entry and look for the oid in the supportedControl attribute.
I am not sure if this is a critique of the code or of the draft though :-)
sub isFIRSServer()
{
my $ldap = shift;
my $res =
$ldap->search(base=>'',filter=>'objectClass=*',scope=>'base',attrs=>'+');
$res->code && die $res->error;
my $e = $res->pop_entry();
die "No root-DSE" unless $e;
grep /^1.3.6.1.4.1.7161.1.0.0$/,$e->get_value('supportedControl');
}
Cheers Leif
More information about the Ietf-not43
mailing list