Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

New Year & a new version of perl-ldap

13 views
Skip to first unread message

Peter Marschall

unread,
Jan 1, 2013, 8:27:57 AM1/1/13
to perl...@perl.org
Happy New Year,

I just released a new version of perl-ldapto CPAN: perl-ldap 0.52!
As usual, the changes in this version are listed at the end of this mail.

Get it at
http://search.cpan.org/dist/perl-ldap/
(as soon as it has been synchronized to you local CPAN mirror).

Of course, the GitHub repository has been updated too.

Enjoy
Peter

--
Peter Marschall
pe...@adpm.de


0.52 -- Tue Jan 1 13:54:22 CET 2013

Bug Fixes:
* fix PreRead & PostRead controls
* AD.pm: fix typo in documentation

Enhancements:
* add tests for PreRead & PostRead controls
* FAQ.pm: example for certificateExactMatch
* coding style overhaul:
* use single-quoted strings where possible
* 2 SPACEs before postfix if,unless,or,and
* SPACE after comma
* SPACE between if,elsif,unless,while,for and (
* make private lexical variables more private
* unquote identifiers before =>
* unquote identifiers used as hash keys

Brian Gaber

unread,
Jan 7, 2013, 2:54:32 PM1/7/13
to perl...@perl.org
I have OpenLDAP ldap with many groupOfNames groups. I want to determine if a user is a member of a specific group.

I would like return a True or False whether user is a member of group or not.

Thanks.

Brian

Clément OUDOT

unread,
Jan 9, 2013, 9:51:23 AM1/9/13
to Brian Gaber, perl...@perl.org
2013/1/7 Brian Gaber <Brian...@ssc-spc.gc.ca>:
> I have OpenLDAP ldap with many groupOfNames groups. I want to determine if a user is a member of a specific group.
>
> I would like return a True or False whether user is a member of group or not.

You can use the compare operation. See perldoc Net::LDAP :

compare ( DN, OPTIONS )
Compare values in an attribute in the entry given by "DN"
on the server. "DN" may be a string or a
Net::LDAP::Entry object.

attr => ATTR
The name of the attribute to compare.

value => VALUE
The value to compare with.

control => CONTROL
control => [ CONTROL, ... ]
See "CONTROLS" below.

callback => CALLBACK
See "CALLBACKS" below.

Example

$mesg = $ldap->compare( $dn,
attr => 'cn',
value => 'Graham Barr'
);


Clément.
0 new messages