From: Arran Cudbard-Bell Date: Sat, 20 Jan 2024 02:17:46 +0000 (-0600) Subject: Add "secret" call_env flag. Not currently respected because we don't print anything... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4a395bcbff62337806dcae3df3679406b829813;p=thirdparty%2Ffreeradius-server.git Add "secret" call_env flag. Not currently respected because we don't print anything, but we don't want to lose the secret flag during conversions --- diff --git a/src/lib/unlang/call_env.h b/src/lib/unlang/call_env.h index eaf2d9ee2ad..e3f2f006302 100644 --- a/src/lib/unlang/call_env.h +++ b/src/lib/unlang/call_env.h @@ -81,9 +81,10 @@ typedef enum CC_HINT(flag_enum) { CALL_ENV_FLAG_PARSE_ONLY = (1 << 6), //!< The result of parsing will not be evaluated at runtime. CALL_ENV_FLAG_ATTRIBUTE = (1 << 7), //!< Tmpl must contain an attribute reference. CALL_ENV_FLAG_SUBSECTION = (1 << 8), //!< This is a subsection. - CALL_ENV_FLAG_PARSE_MISSING = (1 << 9) //!< If this subsection is missing, still parse it. Useful for cases where + CALL_ENV_FLAG_PARSE_MISSING = (1 << 9), //!< If this subsection is missing, still parse it. Useful for cases where ///< there is a callback which always needs to be run to set up required ///< data structures. + CALL_ENV_FLAG_SECRET = (1 << 10), //!< The value is a secret, and should not be logged. } call_env_flags_t; DIAG_ON(attributes) @@ -123,6 +124,8 @@ DIAG_ON(attributes) #define call_env_is_subsection(_flags) ((_flags) & CALL_ENV_FLAG_SUBSECTION) #define call_env_parse_missing(_flags) ((_flags) & CALL_ENV_FLAG_PARSE_MISSING) + +#define call_env_secret(_flags) ((_flags) & CALL_ENV_FLAG_SECRET) /** @} */ /** Callback for performing custom parsing of a #CONF_PAIR