From: Alan T. DeKok Date: Sun, 25 Aug 2024 12:41:49 +0000 (-0400) Subject: more things can have "update" sections X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21a5ac02fe579e5524983774aa59a27a67d5cd25;p=thirdparty%2Ffreeradius-server.git more things can have "update" sections --- diff --git a/src/lib/server/cf_file.c b/src/lib/server/cf_file.c index a186133396f..15c5c72ac22 100644 --- a/src/lib/server/cf_file.c +++ b/src/lib/server/cf_file.c @@ -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; } diff --git a/src/lib/server/cf_priv.h b/src/lib/server/cf_priv.h index 0abf2888ebc..63cbfba9683 100644 --- a/src/lib/server/cf_priv.h +++ b/src/lib/server/cf_priv.h @@ -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