]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove old check
authorAlan T. DeKok <aland@freeradius.org>
Thu, 13 Dec 2018 19:23:13 +0000 (14:23 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 13 Dec 2018 19:23:13 +0000 (14:23 -0500)
attributes can be on both sides of the condition

src/lib/server/cond_tokenize.c

index 138bfd13cb4d1140efab70d21083f7eee749e2e5..8e453d986405ab5fdf0efcb979d04b8cbf4f4c96 100644 (file)
@@ -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);