mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
add bverb_to_mask() API
This commit is contained in:
parent
8ac5a02eb2
commit
c458df6441
@ -880,14 +880,21 @@ done:
|
||||
/* restrictops, allows, disallows, requires, loglevel */
|
||||
|
||||
int
|
||||
verb_to_mask(const char *word, slap_verbmasks *v) {
|
||||
bverb_to_mask(struct berval *bword, slap_verbmasks *v) {
|
||||
int i;
|
||||
for(i = 0; !BER_BVISNULL(&v[i].word); i++) {
|
||||
if(!strcasecmp(word, v[i].word.bv_val)) break;
|
||||
if(!ber_bvstrcasecmp(bword, &v[i].word)) break;
|
||||
}
|
||||
return(i);
|
||||
}
|
||||
|
||||
int
|
||||
verb_to_mask(const char *word, slap_verbmasks *v) {
|
||||
struct berval bword;
|
||||
ber_str2bv( word, 0, 0, &bword );
|
||||
return bverb_to_mask( &bword, v );
|
||||
}
|
||||
|
||||
int
|
||||
verbs_to_mask(int argc, char *argv[], slap_verbmasks *v, slap_mask_t *m) {
|
||||
int i, j;
|
||||
|
@ -589,6 +589,8 @@ LDAP_SLAPD_F (int) read_config LDAP_P(( const char *fname, const char *dir ));
|
||||
LDAP_SLAPD_F (void) config_destroy LDAP_P ((void));
|
||||
LDAP_SLAPD_F (char **) slap_str2clist LDAP_P((
|
||||
char ***, char *, const char * ));
|
||||
LDAP_SLAPD_F (int) bverb_to_mask LDAP_P((
|
||||
struct berval *bword, slap_verbmasks *v ));
|
||||
LDAP_SLAPD_F (int) verb_to_mask LDAP_P((
|
||||
const char *word, slap_verbmasks *v ));
|
||||
LDAP_SLAPD_F (int) verbs_to_mask LDAP_P((
|
||||
|
Loading…
Reference in New Issue
Block a user