mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Added dn_issuffixbv() like dn_issuffix, but with bervals.
This commit is contained in:
parent
984c29bc5f
commit
ebadb3737f
@ -450,6 +450,18 @@ char **dn_subtree(
|
||||
}
|
||||
|
||||
|
||||
dn_issuffixbv(
|
||||
const struct berval *dn,
|
||||
const struct berval *suffix
|
||||
)
|
||||
{
|
||||
if (suffix->bv_len > dn->bv_len)
|
||||
return 0;
|
||||
|
||||
return( strcmp( dn->bv_val + dn->bv_len - suffix->bv_len,
|
||||
suffix->bv_val ) == 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* dn_issuffix - tells whether suffix is a suffix of dn. Both dn
|
||||
* and suffix must be normalized.
|
||||
|
@ -329,6 +329,7 @@ LDAP_SLAPD_F (char **) dn_subtree LDAP_P(( Backend *be, const char *dn ));
|
||||
LDAP_SLAPD_F (char *) dn_rdn LDAP_P(( Backend *be, const char *dn ));
|
||||
LDAP_SLAPD_F (int) dn_rdnlen LDAP_P(( Backend *be, const char *dn ));
|
||||
LDAP_SLAPD_F (int) dn_issuffix LDAP_P(( const char *dn, const char *suffix ));
|
||||
LDAP_SLAPD_F (int) dn_issuffixbv LDAP_P(( const struct berval *dn, const struct berval *suffix ));
|
||||
LDAP_SLAPD_F (int) rdn_validate LDAP_P(( const char* str ));
|
||||
LDAP_SLAPD_F (char *) rdn_attr_value LDAP_P(( const char * rdn ));
|
||||
LDAP_SLAPD_F (char *) rdn_attr_type LDAP_P(( const char * rdn ));
|
||||
|
Loading…
Reference in New Issue
Block a user