From: Alan T. DeKok Date: Tue, 27 Apr 2021 12:57:47 +0000 (-0400) Subject: remove redundant checks X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a14217f06d45d84780abb62ea1f79dac37fe7bf;p=thirdparty%2Ffreeradius-server.git remove redundant checks --- diff --git a/src/lib/server/users_file.c b/src/lib/server/users_file.c index 071668d7212..bf20496e452 100644 --- a/src/lib/server/users_file.c +++ b/src/lib/server/users_file.c @@ -449,12 +449,6 @@ check_item: goto fail_entry; } - if (!tmpl_is_attr(new_map->lhs)) { - ERROR("%s[%d]: LHS of regular expression check must be an attribute", - file, lineno); - goto fail_entry; - } - /* * The default rules say that the check * items look at the control list, but @@ -473,16 +467,6 @@ check_item: goto do_insert; } - /* - * @todo - update map_afrom_substr() to check for - * regexes, too. Maybe even normalize /foo/ =~ bar - */ - if (tmpl_contains_regex(new_map->lhs)) { - ERROR("%s[%d]: Unexpected regular expression on LHS of check item", - file, lineno, new_map->rhs->name); - goto fail_entry; - } - if (!tmpl_is_data(new_map->rhs) && !tmpl_is_exec(new_map->rhs) && !tmpl_contains_xlat(new_map->rhs)) { ERROR("%s[%d]: Invalid RHS '%s' for check item",