+
+ } else if ( strncasecmp( left, "val", 3 ) == 0 ) {
+ if ( a->acl_attrval.bv_len ) {
+ fprintf( stderr,
+ "%s: line %d: attr val already specified in to clause.\n",
+ fname, lineno );
+ acl_usage();
+ }
+ if ( a->acl_attrs == NULL || a->acl_attrs[1].an_name.bv_val ) {
+ fprintf( stderr,
+ "%s: line %d: attr val requires a single attribute.\n",
+ fname, lineno );
+ acl_usage();
+ }
+ ber_str2bv( right, 0, 1, &a->acl_attrval );
+ if ( style && strcasecmp( style, "regex" ) == 0 ) {
+ int e = regcomp( &a->acl_attrval_re, a->acl_attrval.bv_val,
+ REG_EXTENDED | REG_ICASE | REG_NOSUB );
+ if ( e ) {
+ char buf[512];
+ regerror( e, &a->acl_attrval_re, buf, sizeof(buf) );
+ fprintf( stderr, "%s: line %d: "
+ "regular expression \"%s\" bad because of %s\n",
+ fname, lineno, right, buf );
+ acl_usage();
+ }
+ a->acl_attrval_style = ACL_STYLE_REGEX;
+ } else {
+ a->acl_attrval_style = ACL_STYLE_BASE;
+ }
+