Skip to content

Commit

Permalink
FilterMatch.pm: update matching rules known in OpenLDAP
Browse files Browse the repository at this point in the history
  • Loading branch information
marschap committed Nov 11, 2012
1 parent b6b5fcb commit 37c702c
Showing 1 changed file with 57 additions and 32 deletions.
89 changes: 57 additions & 32 deletions lib/Net/LDAP/FilterMatch.pm
Expand Up @@ -14,7 +14,7 @@ use strict;
use Net::LDAP::Filter; use Net::LDAP::Filter;
use Net::LDAP::Schema; use Net::LDAP::Schema;


our $VERSION = '0.20'; our $VERSION = '0.21';


sub import { sub import {
shift; shift;
Expand Down Expand Up @@ -50,37 +50,62 @@ sub _cis_approxMatch($$@);
sub _cis_substrings($$@); sub _cis_substrings($$@);
sub _exact_substrings($$@); sub _exact_substrings($$@);


# all known matches from the OL 2.2 schema, # all known matches from the OL 2.4 schema,
*_bitStringMatch = \&_exact_equalityMatch; #*_allComponentsMatch
*_caseExactIA5Match = \&_exact_equalityMatch; *_attributeCertificateExactMatch = \&_exact_equalityMatch;
*_caseExactIA5SubstringsMatch = \&_exact_substrings; *_attributeCertificateMatch = \&_exact_equalityMatch;
*_caseExactMatch = \&_exact_equalityMatch; *_authPasswordMatch = \&_exact_equalityMatch; # this needs to be reworked
*_caseExactOrderingMatch = \&_exact_orderingMatch; *_authzMatch = \&_exact_equalityMatch;
*_caseExactSubstringsMatch = \&_exact_substrings; *_bitStringMatch = \&_exact_equalityMatch;
*_caseIgnoreIA5Match = \&_cis_equalityMatch; *_caseExactIA5Match = \&_exact_equalityMatch;
*_caseIgnoreIA5SubstringsMatch = \&_cis_substrings; *_caseExactIA5SubstringsMatch = \&_exact_substrings;
*_caseIgnoreMatch = \&_cis_equalityMatch; *_caseExactMatch = \&_exact_equalityMatch;
*_caseIgnoreOrderingMatch = \&_cis_orderingMatch; *_caseExactOrderingMatch = \&_exact_orderingMatch;
*_caseIgnoreSubstringsMatch = \&_cis_substrings; *_caseExactSubstringsMatch = \&_exact_substrings;
*_certificateExactMatch = \&_exact_equalityMatch; *_caseIgnoreIA5Match = \&_cis_equalityMatch;
*_certificateMatch = \&_exact_equalityMatch; *_caseIgnoreIA5SubstringsMatch = \&_cis_substrings;
*_distinguishedNameMatch = \&_exact_equalityMatch; *_caseIgnoreListMatch = \&_cis_equalityMatch; # this needs to be reworked
*_generalizedTimeMatch = \&_exact_equalityMatch; *_caseIgnoreListSubstringsMatch = \&_cis_substrings; # this needs to be reworked
*_generalizedTimeOrderingMatch = \&_exact_orderingMatch; *_caseIgnoreMatch = \&_cis_equalityMatch;
*_integerFirstComponentMatch = \&_exact_equalityMatch; *_caseIgnoreOrderingMatch = \&_cis_orderingMatch;
*_integerMatch = \&_numeric_equalityMatch; *_caseIgnoreSubstringsMatch = \&_cis_substrings;
*_integerOrderingMatch = \&_numeric_orderingMatch; *_certificateExactMatch = \&_exact_equalityMatch;
*_numericStringMatch = \&_numeric_equalityMatch; *_certificateListExactMatch = \&_exact_equalityMatch; # this needs to be reworked
*_numericStringOrderingMatch = \&_numeric_orderingMatch; *_certificateListMatch = \&_exact_equalityMatch; # this needs to be reworked
*_numericStringSubstringsMatch = \&_numeric_substrings; *_certificateMatch = \&_exact_equalityMatch;
*_objectIdentifierFirstComponentMatch = \&_exact_equalityMatch; # this needs to be reworked #*_componentFilterMatch
*_objectIdentifierMatch = \&_exact_equalityMatch; *_CSNMatch = \&_exact_equalityMatch; # this may need to be reworked
*_octetStringMatch = \&_exact_equalityMatch; *_CSNOrderingMatch = \&_exact_orderingMatch; # this may need to be reworked
*_octetStringOrderingMatch = \&_exact_orderingMatch; *_CSNSIDMatch = \&_exact_equalityMatch; # this may need to be reworked
*_octetStringSubstringsMatch = \&_exact_substrings; #*_directoryComponentsMatch
*_telephoneNumberMatch = \&_exact_equalityMatch; *_directoryStringApproxMatch = \&_cis_approxMatch;
*_telephoneNumberSubstringsMatch = \&_exact_substrings; *_distinguishedNameMatch = \&_exact_equalityMatch;
*_uniqueMemberMatch = \&_cis_equalityMatch; # this needs to be reworked #*_dnOneLevelMatch
#*_dnSubordinateMatch
#*_dnSubtreeMatch
#*_dnSuperiorMatch
*_generalizedTimeMatch = \&_exact_equalityMatch;
*_generalizedTimeOrderingMatch = \&_exact_orderingMatch;
*_IA5StringApproxMatch = \&_cis_approxMatch;
*_integerFirstComponentMatch = \&_exact_equalityMatch;
*_integerMatch = \&_numeric_equalityMatch;
*_integerOrderingMatch = \&_numeric_orderingMatch;
*_numericStringMatch = \&_numeric_equalityMatch;
*_numericStringOrderingMatch = \&_numeric_orderingMatch;
*_numericStringSubstringsMatch = \&_numeric_substrings;
*_objectIdentifierFirstComponentMatch = \&_exact_equalityMatch; # this needs to be reworked
*_objectIdentifierMatch = \&_exact_equalityMatch;
*_octetStringMatch = \&_exact_equalityMatch;
*_octetStringOrderingMatch = \&_exact_orderingMatch;
*_octetStringSubstringsMatch = \&_exact_substrings;
#*_presentationAddressMatch
#*_protocolInformationMatch
#*_rdnMatch
*_telephoneNumberMatch = \&_exact_equalityMatch;
*_telephoneNumberSubstringsMatch = \&_exact_substrings;
*_uniqueMemberMatch = \&_cis_equalityMatch; # this needs to be reworked
*_UUIDMatch = \&_exact_equalityMatch; # this needs to be reworked
*_UUIDOrderingMatch = \&_exact_orderingMatch; # this needs to be reworked


sub match sub match
{ {
Expand Down

0 comments on commit 37c702c

Please sign in to comment.