+ struct berval bv;
+
+ if ( !strcasecmp( style, "baseObject" ) ||
+ !strcasecmp( style, "base" ) )
+ {
+ a->acl_attrval_style = ACL_STYLE_BASE;
+ } else if ( !strcasecmp( style, "onelevel" ) ||
+ !strcasecmp( style, "one" ) )
+ {
+ a->acl_attrval_style = ACL_STYLE_ONE;
+ } else if ( !strcasecmp( style, "subtree" ) ||
+ !strcasecmp( style, "sub" ) )
+ {
+ a->acl_attrval_style = ACL_STYLE_SUBTREE;
+ } else if ( !strcasecmp( style, "children" ) ) {
+ a->acl_attrval_style = ACL_STYLE_CHILDREN;
+ } else {
+ fprintf( stderr,
+ "%s: line %d: unknown val.<style> \"%s\" "
+ "for attributeType \"%s\" with DN syntax; "
+ "using \"base\"\n",
+ fname, lineno, style,
+ a->acl_attrs[0].an_desc->ad_cname.bv_val );
+ a->acl_attrval_style = ACL_STYLE_BASE;
+ }
+
+ bv = a->acl_attrval;
+ rc = dnNormalize( 0, NULL, NULL, &bv, &a->acl_attrval, NULL );
+ if ( rc != LDAP_SUCCESS ) {
+ fprintf( stderr,
+ "%s: line %d: unable to normalize DN \"%s\" "
+ "for attributeType \"%s\" (%d).\n",
+ fname, lineno, bv.bv_val,
+ a->acl_attrs[0].an_desc->ad_cname.bv_val, rc );
+ acl_usage();
+ }
+ ber_memfree( bv.bv_val );
+