]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove & from default values for module configurations
authorAlan T. DeKok <aland@freeradius.org>
Sat, 8 Mar 2025 17:32:15 +0000 (12:32 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 8 Mar 2025 19:22:46 +0000 (14:22 -0500)
src/modules/rlm_cache/drivers/rlm_cache_redis/rlm_cache_redis.c
src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c
src/modules/rlm_ldap/rlm_ldap.c
src/modules/rlm_redis_ippool/rlm_redis_ippool.c
src/modules/rlm_rest/rlm_rest.c
src/modules/rlm_totp/rlm_totp.c
src/modules/rlm_winbind/rlm_winbind.c

index b0d471f1622bc94f284f056504865e4091533b8a..75e73937bd364911aefaf08083932fdcc512da3d 100644 (file)
@@ -87,12 +87,12 @@ static int mod_instantiate(module_inst_ctx_t const *mctx)
        /*
         *      These never change, so do it once on instantiation
         */
-       if (tmpl_afrom_attr_str(driver, NULL, &driver->created_attr, "&Cache-Created", NULL) <= 0) {
+       if (tmpl_afrom_attr_str(driver, NULL, &driver->created_attr, "Cache-Created", NULL) <= 0) {
                ERROR("Cache-Created attribute not defined");
                return -1;
        }
 
-       if (tmpl_afrom_attr_str(driver, NULL, &driver->expires_attr, "&Cache-Expires", NULL) <= 0) {
+       if (tmpl_afrom_attr_str(driver, NULL, &driver->expires_attr, "Cache-Expires", NULL) <= 0) {
                ERROR("Cache-Expires attribute not defined");
                return -1;
        }
index df329a4d3e4e4c8f8cdd1e80692c22b6ade0983b..0c7f867ef4a533cd6a48b5c1f1879df854dcaf31 100644 (file)
@@ -490,7 +490,7 @@ failure:
                                }
 
                                RDEBUG2("Adding stored attributes to parent");
-                               log_request_pair_list(L_DBG_LVL_2, request, NULL, &data->mppe_keys, "&parent.reply.");
+                               log_request_pair_list(L_DBG_LVL_2, request, NULL, &data->mppe_keys, "parent.reply.");
                                MEM(fr_pair_list_copy(ms, &ms->vp_group, &data->mppe_keys) >= 0);
                        } else {
                                RDEBUG2("No stored attributes to copy to parent");
index 26a18716270d50715509d33a12db20bc015be588..45667674645f2e241ef5d5e54043ab50d23327d1 100644 (file)
@@ -195,7 +195,7 @@ static const call_env_method_t authenticate_method_env = {
                                                { FR_CALL_ENV_PARSE_OFFSET("password_attribute", FR_TYPE_STRING,
                                                                          CALL_ENV_FLAG_ATTRIBUTE | CALL_ENV_FLAG_REQUIRED | CALL_ENV_FLAG_NULLABLE | CALL_ENV_FLAG_BARE_WORD_ATTRIBUTE,
                                                                          ldap_auth_call_env_t, password, password_tmpl),
-                                                                         .pair.dflt = "&User-Password", .pair.dflt_quote = T_BARE_WORD },
+                                                                         .pair.dflt = "User-Password", .pair.dflt_quote = T_BARE_WORD },
                                                { FR_CALL_ENV_SUBSECTION("sasl", NULL, CALL_ENV_FLAG_NONE, sasl_call_env) },
                                                CALL_ENV_TERMINATOR
                                         })) },
index 1a0f89663b8fa6cd5fa3b658b757b1dd7aa6916f..e5d0b5c7471f3d454f8a661fe059e608f7f839da 100644 (file)
@@ -196,7 +196,7 @@ static const call_env_method_t redis_ippool_alloc_method_env = {
                                     .pair.dflt = "%{%{Requested-IP-Address} || %{Net.Src.IP}}", .pair.dflt_quote = T_DOUBLE_QUOTED_STRING },
                { FR_CALL_ENV_PARSE_ONLY_OFFSET("allocated_address_attr", FR_TYPE_VOID, CALL_ENV_FLAG_ATTRIBUTE | CALL_ENV_FLAG_REQUIRED, redis_ippool_alloc_call_env_t, allocated_address_attr) },
                { FR_CALL_ENV_PARSE_ONLY_OFFSET("range_attr", FR_TYPE_VOID, CALL_ENV_FLAG_ATTRIBUTE | CALL_ENV_FLAG_REQUIRED, redis_ippool_alloc_call_env_t, range_attr),
-                                              .pair.dflt = "&reply.IP-Pool.Range", .pair.dflt_quote = T_BARE_WORD },
+                                              .pair.dflt = "reply.IP-Pool.Range", .pair.dflt_quote = T_BARE_WORD },
                { FR_CALL_ENV_PARSE_ONLY_OFFSET("expiry_attr", FR_TYPE_VOID, CALL_ENV_FLAG_ATTRIBUTE, redis_ippool_alloc_call_env_t, expiry_attr) },
                CALL_ENV_TERMINATOR
        }
index cb61216dd80a754d73dc3dc40ff27a33287918b2..2963984c91c97416313a9e5c314b75309d984bcb 100644 (file)
@@ -188,9 +188,9 @@ static const conf_parser_t module_config[] = {
 #define REST_CALL_ENV_REQUEST_COMMON(_dflt_username, _dflt_password) \
        { FR_CALL_ENV_OFFSET("header", FR_TYPE_STRING, CALL_ENV_FLAG_MULTI, rlm_rest_call_env_t, request.header) }, \
        { FR_CALL_ENV_OFFSET("data", FR_TYPE_STRING, CALL_ENV_FLAG_CONCAT, rlm_rest_call_env_t, request.data) }, \
-       { FR_CALL_ENV_OFFSET("username", FR_TYPE_STRING, CALL_ENV_FLAG_SINGLE | CALL_ENV_FLAG_NULLABLE, \
+       { FR_CALL_ENV_OFFSET("username", FR_TYPE_STRING, CALL_ENV_FLAG_SINGLE | CALL_ENV_FLAG_NULLABLE | CALL_ENV_FLAG_BARE_WORD_ATTRIBUTE, \
                                rlm_rest_call_env_t, request.username), .pair.dflt_quote = T_BARE_WORD, _dflt_username }, \
-       { FR_CALL_ENV_OFFSET("password", FR_TYPE_STRING, CALL_ENV_FLAG_SINGLE | CALL_ENV_FLAG_NULLABLE | CALL_ENV_FLAG_SECRET, \
+       { FR_CALL_ENV_OFFSET("password", FR_TYPE_STRING, CALL_ENV_FLAG_SINGLE | CALL_ENV_FLAG_NULLABLE | CALL_ENV_FLAG_SECRET | CALL_ENV_FLAG_BARE_WORD_ATTRIBUTE, \
                                rlm_rest_call_env_t, request.password), .pair.dflt_quote = T_BARE_WORD, _dflt_password }, \
 
 #define REST_CALL_ENV_RESPONSE_COMMON \
@@ -234,7 +234,7 @@ static const call_env_method_t _var = { \
 }
 
 REST_CALL_ENV_SECTION(rest_call_env_authorize, "authorize",,);
-REST_CALL_ENV_SECTION(rest_call_env_authenticate, "authenticate", .pair.dflt = "&User-Name", .pair.dflt = "&User-Password");
+REST_CALL_ENV_SECTION(rest_call_env_authenticate, "authenticate", .pair.dflt = "User-Name", .pair.dflt = "User-Password");
 REST_CALL_ENV_SECTION(rest_call_env_post_auth, "post-auth",,);
 REST_CALL_ENV_SECTION(rest_call_env_accounting, "accounting",,);
 
index 9e6800ec4bfaf776927b5adfd62a4e698a5a2c94..1425a08b25e9c74acacba06284cefa1aad444d63 100644 (file)
@@ -42,14 +42,14 @@ typedef struct {
 static const call_env_method_t method_env = {
        FR_CALL_ENV_METHOD_OUT(rlm_totp_call_env_t),
        .env = (call_env_parser_t[]) {
-               { FR_CALL_ENV_OFFSET("secret", FR_TYPE_STRING, CALL_ENV_FLAG_NULLABLE, rlm_totp_call_env_t, secret),
-                                    .pair.dflt = "&control.TOTP.Secret", .pair.dflt_quote = T_BARE_WORD },
+               { FR_CALL_ENV_OFFSET("secret", FR_TYPE_STRING, CALL_ENV_FLAG_NULLABLE | CALL_ENV_FLAG_BARE_WORD_ATTRIBUTE, rlm_totp_call_env_t, secret),
+                                    .pair.dflt = "control.TOTP.Secret", .pair.dflt_quote = T_BARE_WORD },
 
-               { FR_CALL_ENV_OFFSET("key", FR_TYPE_STRING, CALL_ENV_FLAG_NULLABLE, rlm_totp_call_env_t, key),
-                                    .pair.dflt = "&control.TOTP.key", .pair.dflt_quote = T_BARE_WORD },
+               { FR_CALL_ENV_OFFSET("key", FR_TYPE_STRING, CALL_ENV_FLAG_NULLABLE | CALL_ENV_FLAG_BARE_WORD_ATTRIBUTE, rlm_totp_call_env_t, key),
+                                    .pair.dflt = "control.TOTP.key", .pair.dflt_quote = T_BARE_WORD },
 
-               { FR_CALL_ENV_OFFSET("user_password", FR_TYPE_STRING, CALL_ENV_FLAG_NULLABLE, rlm_totp_call_env_t, user_password),
-                                    .pair.dflt = "&request.TOTP.From-User", .pair.dflt_quote = T_BARE_WORD },
+               { FR_CALL_ENV_OFFSET("user_password", FR_TYPE_STRING, CALL_ENV_FLAG_NULLABLE | CALL_ENV_FLAG_BARE_WORD_ATTRIBUTE, rlm_totp_call_env_t, user_password),
+                                    .pair.dflt = "request.TOTP.From-User", .pair.dflt_quote = T_BARE_WORD },
 
                CALL_ENV_TERMINATOR
        }
index e0c6c6700d24c04e150e980b60ffabd940c9f29f..4c323e8f3ae399cd5793b00c62ffb6417409969e 100644 (file)
@@ -474,8 +474,8 @@ static const call_env_method_t winbind_auth_method_env = {
                { FR_CALL_ENV_OFFSET("username", FR_TYPE_STRING, CALL_ENV_FLAG_REQUIRED, winbind_auth_call_env_t, username) },
                { FR_CALL_ENV_OFFSET("domain", FR_TYPE_STRING, CALL_ENV_FLAG_NONE, winbind_auth_call_env_t, domain),
                        .pair.dflt = "", .pair.dflt_quote = T_SINGLE_QUOTED_STRING, .pair.func = domain_call_env_parse },
-               { FR_CALL_ENV_OFFSET("password", FR_TYPE_STRING, CALL_ENV_FLAG_SECRET, winbind_auth_call_env_t, password),
-                       .pair.dflt = "&User-Password", .pair.dflt_quote = T_BARE_WORD },
+               { FR_CALL_ENV_OFFSET("password", FR_TYPE_STRING, CALL_ENV_FLAG_SECRET | CALL_ENV_FLAG_BARE_WORD_ATTRIBUTE, winbind_auth_call_env_t, password),
+                       .pair.dflt = "User-Password", .pair.dflt_quote = T_BARE_WORD },
                CALL_ENV_TERMINATOR
        }
 };