+ if (aci_get_part(&bv, 0, '=', &left) < 0
+ || aci_get_part(&bv, 1, '=', &right) < 0)
+ {
+ if (aci_strbvcmp(attr, &bv) == 0)
+ return(1);
+ } else if (val == NULL) {
+ if (aci_strbvcmp(attr, &left) == 0)
+ return(1);
+ } else {
+ if (aci_strbvcmp(attr, &left) == 0) {
+ /* this is experimental code that implements a
+ * simple (prefix) match of the attribute value.
+ * the ACI draft does not provide for aci's that
+ * apply to specific values, but it would be
+ * nice to have. If the <attr> part of an aci's
+ * rights list is of the form <attr>=<value>,
+ * that means the aci applies only to attrs with
+ * the given value. Furthermore, if the attr is
+ * of the form <attr>=<value>*, then <value> is
+ * treated as a prefix, and the aci applies to
+ * any value with that prefix.
+ *
+ * Ideally, this would allow r.e. matches.
+ */
+ if (aci_get_part(&right, 0, '*', &left) < 0
+ || right.bv_len <= left.bv_len)
+ {
+ if (aci_strbvcmp(val->bv_val, &right) == 0)
+ return(1);
+ } else if (val->bv_len >= left.bv_len) {
+ if (strncasecmp( val->bv_val, left.bv_val, left.bv_len ) == 0)
+ return(1);
+ }
+ }