From: Alan T. DeKok Date: Thu, 22 Aug 2024 16:24:17 +0000 (-0400) Subject: add "listen" state for proto ldap sync X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2807384dd1efc02e55864617da8c78e06af97d9;p=thirdparty%2Ffreeradius-server.git add "listen" state for proto ldap sync --- diff --git a/src/lib/server/cf_file.c b/src/lib/server/cf_file.c index 818d13daaee..9cc8c71d083 100644 --- a/src/lib/server/cf_file.c +++ b/src/lib/server/cf_file.c @@ -2402,6 +2402,11 @@ check_for_eol: css->allow_locals = true; break; } + + if (strcmp(css->name1, "listen") == 0) { + css->unlang = CF_UNLANG_LISTEN; + break; + } break; /* @@ -2462,6 +2467,14 @@ check_for_eol: css->unlang = CF_UNLANG_DICTIONARY; css->allow_locals = true; break; + + case CF_UNLANG_LISTEN: + if (strcmp(css->name1, "update") == 0) { + css->unlang = CF_UNLANG_ASSIGNMENT; + } else { + css->unlang = CF_UNLANG_LISTEN; + } + break; } add_section: diff --git a/src/lib/server/cf_priv.h b/src/lib/server/cf_priv.h index ae8bffd2d5e..0abf2888ebc 100644 --- a/src/lib/server/cf_priv.h +++ b/src/lib/server/cf_priv.h @@ -92,6 +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_t; /** A section grouping multiple #CONF_PAIR