mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Additional system schema checks
This commit is contained in:
parent
2d09d18de5
commit
d30ab4c113
@ -103,8 +103,9 @@ int slap_bv2ad(
|
||||
desc.ad_cname = *bv;
|
||||
name = bv->bv_val;
|
||||
options = strchr(name, ';');
|
||||
if (options != NULL)
|
||||
if (options != NULL) {
|
||||
desc.ad_cname.bv_len = options - name;
|
||||
}
|
||||
desc.ad_type = at_bvfind( &desc.ad_cname );
|
||||
if( desc.ad_type == NULL ) {
|
||||
*text = "attribute type undefined";
|
||||
@ -115,6 +116,11 @@ int slap_bv2ad(
|
||||
desc.ad_lang.bv_len = 0;
|
||||
desc.ad_lang.bv_val = NULL;
|
||||
|
||||
if( is_at_operational( desc.ad_type ) && options != NULL ) {
|
||||
*text = "operational attribute with options undefined";
|
||||
return rtn;
|
||||
}
|
||||
|
||||
/* parse options in place */
|
||||
for( ; options != NULL; ) {
|
||||
name = options+1;
|
||||
|
Loading…
Reference in New Issue
Block a user