]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Allow !* to work
authorAlan T. DeKok <aland@freeradius.org>
Fri, 13 Nov 2009 13:15:51 +0000 (14:15 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 14 Nov 2009 09:18:14 +0000 (10:18 +0100)
The code to delete all attributes (as documented in unlang) was
previously added in evaluate.c.  But the parser hadn't been updated,
so it was impossible to actually use that functionality.

src/main/conffile.c
src/main/evaluate.c
src/main/modcall.c

index 23d01c656a6a06cdf88957fecd9c76e6511a22fa..406285bae64b1b25f7d709be38a3a607072b5f47 100644 (file)
@@ -1511,6 +1511,7 @@ static int cf_section_read(const char *filename, int *lineno, FILE *fp,
                case T_OP_SUB:
                case T_OP_LE:
                case T_OP_GE:
+               case T_OP_CMP_FALSE:
                        if (!this || (strcmp(this->name1, "update") != 0)) {
                                radlog(L_ERR, "%s[%d]: Invalid operator in assignment",
                                       filename, *lineno);
index 6ecd947d8fdc6aedbace59716f84f08edf224b32..96283dad9bc6c6b27dafec3964bbf6ff0ee96f96 100644 (file)
@@ -774,8 +774,7 @@ int radius_evaluate_condition(REQUEST *request, int modreturn, int depth,
                 */
                token = gettoken(&p, comp, sizeof(comp));
                if ((token < T_OP_NE) || (token > T_OP_CMP_EQ) ||
-                   (token == T_OP_CMP_TRUE) ||
-                   (token == T_OP_CMP_FALSE)) {
+                   (token == T_OP_CMP_TRUE)) {
                        radlog(L_ERR, "Expected comparison at: %s", comp);
                        return FALSE;
                }
index c19f0e271a1a97e96246a19371247986e9f02d93..9143c0812171ce0ffa80ec5aaf0afbb1cdda485a 100644 (file)
@@ -1360,6 +1360,7 @@ static modcallable *do_compile_modupdate(modcallable *parent,
                    (vp->operator != T_OP_SUB) &&
                    (vp->operator != T_OP_LE) &&
                    (vp->operator != T_OP_GE) &&
+                   (vp->operator != T_OP_CMP_FALSE) &&
                    (vp->operator != T_OP_SET)) {
                        pairfree(&head);
                        pairfree(&vp);