]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
more things can have "update" sections
authorAlan T. DeKok <aland@freeradius.org>
Sun, 25 Aug 2024 12:41:49 +0000 (08:41 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 25 Aug 2024 12:41:49 +0000 (08:41 -0400)
src/lib/server/cf_file.c
src/lib/server/cf_priv.h

index a186133396f05a1547fd146c4f191c4aa3f7e986..15c5c72ac224162145b17dc04c7772b85364c80c 100644 (file)
@@ -2425,8 +2425,7 @@ alloc_section:
                 *      ldap sync has "update" a few levels down.
                 */
                if (strcmp(css->name1, "listen") == 0) {
-                       css->unlang = CF_UNLANG_LISTEN;
-                       break;
+                       css->unlang = CF_UNLANG_CAN_HAVE_UPDATE;
                }
                break;
 
@@ -2440,6 +2439,8 @@ alloc_section:
                    (strcmp(css->name1, "redundant-load-balance") == 0)) {
                        css->unlang = CF_UNLANG_ALLOW;
                        css->allow_locals = true;
+               } else {
+                       css->unlang = CF_UNLANG_CAN_HAVE_UPDATE;
                }
                break;
 
@@ -2484,11 +2485,11 @@ alloc_section:
                css->allow_locals = true;
                break;
 
-       case CF_UNLANG_LISTEN:
+       case CF_UNLANG_CAN_HAVE_UPDATE:
                if (strcmp(css->name1, "update") == 0) {
                        css->unlang = CF_UNLANG_ASSIGNMENT;
                } else {
-                       css->unlang = CF_UNLANG_LISTEN;
+                       css->unlang = CF_UNLANG_CAN_HAVE_UPDATE;
                }
                break;
        }
index 0abf2888ebc389be34cbcc20e62fa8239e9607d0..63cbfba9683a7a2df19dcfe48be55713cafd697d 100644 (file)
@@ -92,7 +92,7 @@ typedef enum {
        CF_UNLANG_EDIT,                         //!< only edit commands
        CF_UNLANG_ASSIGNMENT,                   //!< only assignments inside of map / update
        CF_UNLANG_DICTIONARY,                   //!< only local variable definitions
-       CF_UNLANG_LISTEN,                       //!< ldap sync has "update" in a "listen" section.
+       CF_UNLANG_CAN_HAVE_UPDATE,              //!< can have "update"
 } cf_unlang_t;
 
 /** A section grouping multiple #CONF_PAIR