]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Logic corrections
authorNick Porter <nick@portercomputing.co.uk>
Thu, 26 Jan 2023 11:57:31 +0000 (11:57 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 9 Feb 2023 18:37:28 +0000 (12:37 -0600)
src/lib/server/cond_tokenize.c
src/lib/unlang/compile.c

index 0e3108d277b15202ef754242dad49995c3e17165..cb8dba4150282caac0a2258b0d5e03cdcb342b72 100644 (file)
@@ -881,7 +881,7 @@ static CC_HINT(nonnull) int cond_forbid_groups(tmpl_t *vpt, fr_sbuff_t *in, fr_s
 {
        if (!tmpl_is_attr(vpt) || tmpl_attr_tail_is_unresolved(vpt)) return 0;
 
-       if (tmpl_is_list(vpt) || tmpl_attr_is_list_attr(tmpl_attr_tail(vpt))) {
+       if (tmpl_is_list(vpt)) {
                fr_strerror_const("Cannot use list references in condition");
                fr_sbuff_set(in, m_lhs);
                return -1;
index 9968d1fc9be50705101260c46a01ca7a4ddaf8f5..c029e2edf5990e1758cbad2f6b708c5b607d8eae 100644 (file)
@@ -897,7 +897,7 @@ int unlang_fixup_update(map_t *map, void *ctx)
        /*
         *      What exactly where you expecting to happen here?
         */
-       if (tmpl_is_attr(map->lhs) &&
+       if (tmpl_attr_tail_da_is_leaf(map->lhs) &&
            tmpl_is_list(map->rhs)) {
                cf_log_err(map->ci, "Can't copy list into an attribute");
                return -1;