From: Alan T. DeKok Date: Thu, 13 Dec 2018 19:23:13 +0000 (-0500) Subject: remove old check X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3db19294e73a44c2d615ea2093953aec15419de;p=thirdparty%2Ffreeradius-server.git remove old check attributes can be on both sides of the condition --- diff --git a/src/lib/server/cond_tokenize.c b/src/lib/server/cond_tokenize.c index 138bfd13cb4..8e453d98640 100644 --- a/src/lib/server/cond_tokenize.c +++ b/src/lib/server/cond_tokenize.c @@ -1019,16 +1019,8 @@ static ssize_t cond_tokenize(TALLOC_CTX *ctx, fr_cond_t **pcond, char const **er } same_type: - return_0("Attribute comparisons must be of the same data type"); - } + *error = "Attribute comparisons must be of the same data type"; - /* - * Without a cast, we can't compare "foo" to User-Name, - * it has to be done the other way around. - */ - if ((c->data.map->rhs->type == TMPL_TYPE_ATTR) && - (c->data.map->lhs->type != TMPL_TYPE_ATTR)) { - *error = "Cannot use attribute reference on right side of condition"; return_0: if (lhs) talloc_free(lhs); if (rhs) talloc_free(rhs);