]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
key off of state, and not just '&'
authorAlan T. DeKok <aland@freeradius.org>
Mon, 2 Sep 2024 13:51:15 +0000 (09:51 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 2 Sep 2024 18:00:19 +0000 (14:00 -0400)
src/lib/unlang/compile.c

index bcd193e624efdf2cf7d14d66f74f1c526e91a5cf..71f703ffade812af3d0c0a2416d46aef265155f6 100644 (file)
@@ -2426,7 +2426,12 @@ static bool transaction_ok(CONF_SECTION *cs)
                         */
                        if (*name == '&') continue;
 
-                       if (fr_table_value_by_str(transaction_keywords, name, -1) < 0) goto fail;
+                       if (fr_list_assignment_op[cf_section_name2_quote(cs)]) continue;
+
+                       if (fr_table_value_by_str(transaction_keywords, name, -1) < 0) {
+                               cf_log_err(ci, "Invalid keyword in 'transaction'");
+                               return false;
+                       }
 
                        if (!transaction_ok(subcs)) return false;
 
@@ -2438,6 +2443,11 @@ static bool transaction_ok(CONF_SECTION *cs)
                        cp = cf_item_to_pair(ci);
                        name = cf_pair_attr(cp);
 
+                       /*
+                        *      If there's a value then it's not a module call.
+                        */
+                       if (cf_pair_value(cp)) continue;
+
                        if (*name == '&') continue;
 
                        /*
@@ -2447,14 +2457,9 @@ static bool transaction_ok(CONF_SECTION *cs)
                                continue;
                        }
 
-                       /*
-                        *      For now, don't support expansions on the LHS.
-                        *
-                        *      And don't support in-line functions.
-                        */
-               fail:
-                       cf_log_err(ci, "Unexpected contents in 'transaction'");
+                       cf_log_err(ci, "Invalid module reference in 'transaction'");
                        return false;
+
                } else {
                        continue;
                }