+ }
+
+ i = find_arg_with_value(ua, "strip_prefix");
+ if (i >= 0) {
+ strip_prefix = ua->argv[i];
+ }
+
+ i = find_arg_with_value(ua, "add_prefix");
+ if (i >= 0) {
+ add_prefix = ua->argv[i];
+ }
+
+ i = find_arg_with_value(ua, "add_suffix");
+ if (i >= 0) {
+ add_suffix = ua->argv[i];
+ }
+
+ i = find_arg_with_value(ua, "regexwhere");
+ if (i >= 0) {
+ rx.RegexWhere = ua->argv[i];
+ }
+
+ if (strip_prefix || add_suffix || add_prefix) {
+ int len = bregexp_get_build_where_size(strip_prefix, add_prefix, add_suffix);
+ regexp = (char *)bmalloc(len * sizeof(char));
+
+ bregexp_build_where(regexp, len, strip_prefix, add_prefix, add_suffix);
+ rx.RegexWhere = regexp;
+ }
+
+ /* TODO: add acl for regexwhere ? */
+
+ if (rx.RegexWhere) {
+ if (!acl_access_ok(ua, Where_ACL, rx.RegexWhere)) {
+ ua->error_msg(_("\"RegexWhere\" specification not authorized.\n"));
+ goto bail_out;
+ }
+ }
+
+ if (rx.where) {