From: Kurt Zeilenga Date: Fri, 11 Jan 2002 20:47:24 +0000 (+0000) Subject: Additional system schema checks X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~182 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d30ab4c113806391596c02a39db5ddac00b07d98;p=openldap Additional system schema checks --- diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index 75193d9381..19e0c04f04 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -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;