This allows parsing functions to access fields in the structure for previously parsed values... and potentially adds ordering issues, so don't reorder the CONF_PARSER entries that have functions!
*
* @param[in] ctx to allocate any data in.
* @param[out] out Where to write the result of parsing.
+ * @param[in] parent The base address of the structure.
* @param[in] ci The #CONF_SECTION or #CONF_PAIR to parse.
* @param[in] rule Parse rules - How the #CONF_PAIR or #CONF_SECTION should be converted.
* @return
* - 0 on success.
* - -1 on failure.
*/
-typedef int (* cf_parse_t)(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
+typedef int (* cf_parse_t)(TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
/** Defines a #CONF_PAIR to C data type mapping
*
/*
* Type validation and conversion
*/
-int cf_pair_parse_value(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule)
- CC_HINT(nonnull(2, 3, 4));
+int cf_pair_parse_value(TALLOC_CTX *ctx, void *out, void *base, CONF_ITEM *ci, CONF_PARSER const *rule)
+ CC_HINT(nonnull(2, 4, 5));
int cf_pair_parse(TALLOC_CTX *ctx, CONF_SECTION *cs, char const *name,
unsigned int type, void *data, char const *dflt, FR_TOKEN dflt_quote) CC_HINT(nonnull(2,3));
int cf_section_parse(TALLOC_CTX *ctx, void *base, CONF_SECTION *cs);
#endif
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
-static int chain_verify_mode_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int chain_verify_mode_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
#endif
-static int certificate_format_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int certificate_format_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
static CONF_PARSER cache_config[] = {
{ FR_CONF_OFFSET("virtual_server", FR_TYPE_STRING, fr_tls_conf_t, session_cache_server) },
* - 0 on success.
* - -1 on failure.
*/
-static int chain_verify_mode_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int chain_verify_mode_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
fr_tls_chain_verify_mode_t type;
char const *type_str;
* - 0 on success.
* - -1 on failure.
*/
-static int certificate_format_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int certificate_format_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
int type;
char const *type_str;
*
* @param[in] ctx to allocate any dynamic buffers in.
* @param[out] out Where to write the parsed value.
+ * @param[in] base address of the structure out points into.
+ * May be NULL in the case of manual parsing.
* @param[in] ci to parse.
* @param[in] rule to parse to. May contain flags.
* @return
* - 0 on success.
* - -1 on failure.
*/
-int cf_pair_parse_value(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule)
+int cf_pair_parse_value(TALLOC_CTX *ctx, void *out, UNUSED void *base, CONF_ITEM *ci, CONF_PARSER const *rule)
{
int rcode = 0;
bool attribute, required, secret, file_input, cant_be_empty, tmpl, file_exists;
*
* @param[in] ctx To allocate arrays and values in.
* @param[out] out Where to write the result.
+ * @param[in] base address of the structure out points into.
+ * May be NULL in the case of manual parsing.
* @param[in] cs to search for matching #CONF_PAIR in.
* @param[in] rule to parse #CONF_PAIR with.
* @return
* - -1 on error.
* - -2 if deprecated.
*/
-static int CC_HINT(nonnull(3,4)) cf_pair_parse_internal(TALLOC_CTX *ctx, void *out,
+static int CC_HINT(nonnull(4,5)) cf_pair_parse_internal(TALLOC_CTX *ctx, void *out, void *base,
CONF_SECTION *cs, CONF_PARSER const *rule)
{
bool multi, required, deprecated;
func = cf_pair_parse_value;
}
- ret = func(value_ctx, entry, cf_pair_to_item(cp), rule);
+ ret = func(value_ctx, entry, base, cf_pair_to_item(cp), rule);
if (ret < 0) {
talloc_free(array);
talloc_free(dflt_cp);
func = rule->func;
}
- ret = func(ctx, out, cf_pair_to_item(cp), rule);
+ ret = func(ctx, out, base, cf_pair_to_item(cp), rule);
if (ret < 0) {
talloc_free(dflt_cp);
return -1;
.quote = dflt_quote
};
- return cf_pair_parse_internal(ctx, data, cs, &rule);
+ return cf_pair_parse_internal(ctx, data, NULL, cs, &rule);
}
/** Pre-allocate a config section structure to allow defaults to be set
* For now we have a horrible hack where only multi-subsections get an array of structures
* of the appropriate size.
*
- * @param[in] ctx to allocate any additional structures under.
- * @param[out] out pointer to a struct/pointer to fill with data.
- * @param[in] cs to parse.
- * @param[in] rule to parse the subcs with.
+ * @param[in] ctx to allocate any additional structures under.
+ * @param[out] out pointer to a struct/pointer to fill with data.
+ * @param[in] base address of the structure out points into.
+ * May be NULL in the case of manual parsing.
+ * @param[in] cs to parse.
+ * @param[in] rule to parse the subcs with.
* @return
* - 0 on success.
* - -1 on general error.
* - -2 if a deprecated #CONF_ITEM was found.
*/
-static int cf_subsection_parse(TALLOC_CTX *ctx, void *out, CONF_SECTION *cs, CONF_PARSER const *rule)
+static int cf_subsection_parse(TALLOC_CTX *ctx, void *out, void *base, CONF_SECTION *cs, CONF_PARSER const *rule)
{
CONF_SECTION *subcs = NULL;
int count = 0, i = 0, ret;
* if it wants to continue after doing its stuff.
*/
if (cf_section_rules_push(subcs, rules) < 0) return -1;
- if (rule->func) return rule->func(ctx, out, cf_section_to_item(subcs), rule);
+ if (rule->func) return rule->func(ctx, out, base, cf_section_to_item(subcs), rule);
/*
* FIXME: We shouldn't allow nested structures like this.
return -1;
}
if (rule->func) {
- ret = rule->func(ctx, buff, cf_section_to_item(subcs), rule);
+ ret = rule->func(ctx, buff, base, cf_section_to_item(subcs), rule);
if (ret < 0) {
talloc_free(array);
return ret;
* Handle subsections specially
*/
if (FR_BASE_TYPE(rule->type) == FR_TYPE_SUBSECTION) {
- ret = cf_subsection_parse(ctx, data, cs, rule);
+ ret = cf_subsection_parse(ctx, data, base, cs, rule);
if (ret < 0) goto finish;
continue;
} /* else it's a CONF_PAIR */
/*
* Parse the pair we found, or a default value.
*/
- ret = cf_pair_parse_internal(ctx, data, cs, rule);
+ ret = cf_pair_parse_internal(ctx, data, base, cs, rule);
switch (ret) {
case 1: /* Used default (or not present) */
if (is_set) *is_set = false;
((rule_p->type & FR_TYPE_ON_READ) != 0) &&
(strcmp(rule_p->name, name1) == 0)) {
(void) _cf_section_rule_push(cs, rule_p, cd->item.filename, cd->item.lineno);
- (void) rule_p->func(ctx, NULL, cf_section_to_item(cs), rule_p);
+ (void) rule_p->func(ctx, NULL, NULL, cf_section_to_item(cs), rule_p);
return cs;
}
}
((rule->type & FR_TYPE_ON_READ) != 0)) {
(void) cf_section_rules_push(cs, rule);
- (void) rule->func(ctx, NULL, cf_section_to_item(cs), rule);
+ (void) rule->func(ctx, NULL, NULL, cf_section_to_item(cs), rule);
}
}
}
*
**********************************************************************/
-static int reverse_lookups_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int hostname_lookups_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int reverse_lookups_parse(TALLOC_CTX *ctx, void *out, void *parent,CONF_ITEM *ci, CONF_PARSER const *rule);
+static int hostname_lookups_parse(TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int num_networks_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int num_workers_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int num_networks_parse(TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int num_workers_parse(TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int talloc_memory_limit_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int talloc_pool_size_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int talloc_memory_limit_parse(TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int talloc_pool_size_parse(TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int max_request_time_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int max_request_time_parse(TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int name_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int name_parse(TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
/*
* Log destinations
CONF_PARSER_TERMINATOR
};
-static int reverse_lookups_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule)
+static int reverse_lookups_parse(TALLOC_CTX *ctx, void *out, void *parent,
+ CONF_ITEM *ci, CONF_PARSER const *rule)
{
int ret;
- if ((ret = cf_pair_parse_value(ctx, out, ci, rule)) < 0) return ret;
+ if ((ret = cf_pair_parse_value(ctx, out, parent, ci, rule)) < 0) return ret;
memcpy(&fr_reverse_lookups, out, sizeof(fr_reverse_lookups));
return 0;
}
-static int hostname_lookups_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule)
+static int hostname_lookups_parse(TALLOC_CTX *ctx, void *out, void *parent,
+ CONF_ITEM *ci, CONF_PARSER const *rule)
{
int ret;
- if ((ret = cf_pair_parse_value(ctx, out, ci, rule)) < 0) return ret;
+ if ((ret = cf_pair_parse_value(ctx, out, parent, ci, rule)) < 0) return ret;
memcpy(&fr_hostname_lookups, out, sizeof(fr_hostname_lookups));
return 0;
}
-static int talloc_memory_limit_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule)
+static int talloc_memory_limit_parse(TALLOC_CTX *ctx, void *out, void *parent,
+ CONF_ITEM *ci, CONF_PARSER const *rule)
{
int ret;
size_t value;
- if ((ret = cf_pair_parse_value(ctx, out, ci, rule)) < 0) return ret;
+ if ((ret = cf_pair_parse_value(ctx, out, parent, ci, rule)) < 0) return ret;
memcpy(&value, out, sizeof(value));
return 0;
}
-static int talloc_pool_size_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule)
+static int talloc_pool_size_parse(TALLOC_CTX *ctx, void *out, void *parent,
+ CONF_ITEM *ci, CONF_PARSER const *rule)
{
int ret;
size_t value;
- if ((ret = cf_pair_parse_value(ctx, out, ci, rule)) < 0) return ret;
+ if ((ret = cf_pair_parse_value(ctx, out, parent, ci, rule)) < 0) return ret;
memcpy(&value, out, sizeof(value));
return 0;
}
-static int max_request_time_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule)
+static int max_request_time_parse(TALLOC_CTX *ctx, void *out, void *parent,
+ CONF_ITEM *ci, CONF_PARSER const *rule)
{
int ret;
uint32_t value;
- if ((ret = cf_pair_parse_value(ctx, out, ci, rule)) < 0) return ret;
+ if ((ret = cf_pair_parse_value(ctx, out, parent, ci, rule)) < 0) return ret;
memcpy(&value, out, sizeof(value));
}
-static int num_networks_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule)
+static int num_networks_parse(TALLOC_CTX *ctx, void *out, void *parent,
+ CONF_ITEM *ci, CONF_PARSER const *rule)
{
int ret;
uint32_t value;
- if ((ret = cf_pair_parse_value(ctx, out, ci, rule)) < 0) return ret;
+ if ((ret = cf_pair_parse_value(ctx, out, parent, ci, rule)) < 0) return ret;
memcpy(&value, out, sizeof(value));
return 0;
}
-static int num_workers_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule)
+static int num_workers_parse(TALLOC_CTX *ctx, void *out, void *parent,
+ CONF_ITEM *ci, CONF_PARSER const *rule)
{
int ret;
uint32_t value;
- if ((ret = cf_pair_parse_value(ctx, out, ci, rule)) < 0) return ret;
+ if ((ret = cf_pair_parse_value(ctx, out, parent, ci, rule)) < 0) return ret;
memcpy(&value, out, sizeof(value));
/** Configured server name takes precedence over default values
*
*/
-static int name_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule)
+static int name_parse(TALLOC_CTX *ctx, void *out, void *parent,
+ CONF_ITEM *ci, CONF_PARSER const *rule)
{
if (*((char **)out)) talloc_free(*((char **)out)); /* Free existing buffer */
- return cf_pair_parse_value(ctx, out, ci, rule); /* Set new value */
+ return cf_pair_parse_value(ctx, out, parent, ci, rule); /* Set new value */
}
*/
static CONF_SECTION *virtual_server_root;
-static int listen_on_read(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int server_on_read(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int listen_on_read(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int server_on_read(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
-static int listen_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int server_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int listen_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int server_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
static const CONF_PARSER listen_on_read_config[] = {
{ FR_CONF_OFFSET("listen", FR_TYPE_SUBSECTION | FR_TYPE_MULTI | FR_TYPE_OK_MISSING | FR_TYPE_ON_READ,
*
* @param[in] ctx to allocate data in.
* @param[out] out always NULL
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_SECTION containing the listen section.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int listen_on_read(UNUSED TALLOC_CTX *ctx, UNUSED void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int listen_on_read(UNUSED TALLOC_CTX *ctx, UNUSED void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
CONF_SECTION *listen_cs = cf_item_to_section(ci);
CONF_SECTION *server_cs = cf_item_to_section(cf_parent(ci));
*
* @param[in] ctx to allocate data in.
* @param[out] out Where to our listen configuration. Is a #fr_virtual_server_t structure.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_SECTION containing the listen section.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int server_on_read(UNUSED TALLOC_CTX *ctx, UNUSED void *out, UNUSED CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int server_on_read(UNUSED TALLOC_CTX *ctx, UNUSED void *out, UNUSED void *parent,
+ UNUSED CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
/*
*
* @param[in] ctx to allocate data in.
* @param[out] out Where to our listen configuration. Is a #fr_virtual_listen_t structure.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_SECTION containing the listen section.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int listen_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int listen_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
fr_virtual_listen_t *listen = talloc_get_type_abort(out, fr_virtual_listen_t); /* Pre-allocated for us */
CONF_SECTION *listen_cs = cf_item_to_section(ci);
*
* @param[in] ctx to allocate data in.
* @param[out] out Where to our listen configuration. Is a #fr_virtual_server_t structure.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_SECTION containing the listen section.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int server_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int server_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
fr_virtual_server_t *server = talloc_get_type_abort(out, fr_virtual_server_t);
CONF_SECTION *server_cs = cf_item_to_section(ci);
#include "proto_control.h"
extern fr_app_t proto_control;
-static int type_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int transport_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int transport_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
static CONF_PARSER const limit_config[] = {
{ FR_CONF_OFFSET("idle_timeout", FR_TYPE_TIMEVAL, proto_control_t, io.idle_timeout), .dflt = "30.0" } ,
*
* @param[in] ctx to allocate data in (instance of proto_control).
* @param[out] out Where to write a dl_instance_t containing the module handle and instance.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the type module.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int type_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
// char const *type_str = cf_pair_value(cf_item_to_pair(ci));
CONF_SECTION *listen_cs = cf_item_to_section(cf_parent(ci));
* - 0 on success.
* - -1 on failure.
*/
-static int transport_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int transport_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *name = cf_pair_value(cf_item_to_pair(ci));
dl_instance_t *parent_inst;
#include "proto_detail.h"
extern fr_app_t proto_detail;
-static int type_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int transport_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int transport_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
#if 0
/*
*
* @param[in] ctx to allocate data in (instance of proto_detail).
* @param[out] out Where to write a dl_instance_t containing the module handle and instance.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the type module.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int type_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *type_str = cf_pair_value(cf_item_to_pair(ci));
CONF_SECTION *listen_cs = cf_item_to_section(cf_parent(ci));
* - 0 on success.
* - -1 on failure.
*/
-static int transport_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int transport_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *name = cf_pair_value(cf_item_to_pair(ci));
dl_instance_t *parent_inst;
#include "proto_dhcpv4.h"
extern fr_app_t proto_dhcpv4;
-static int priority_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
-static int type_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int transport_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int priority_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int transport_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
static const CONF_PARSER priority_config[] = {
{ FR_CONF_OFFSET("DHCP-Discover", FR_TYPE_UINT32, proto_dhcpv4_t, priorities[FR_DHCP_DISCOVER]),
{ NULL }
};
-static int priority_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int priority_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
int32_t priority;
*
* @param[in] ctx to allocate data in (instance of proto_dhcpv4).
* @param[out] out Where to write a dl_instance_t containing the module handle and instance.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the type module.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int type_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
static char const *type_lib_table[] = {
[FR_DHCP_DISCOVER] = "base",
*
* @param[in] ctx to allocate data in (instance of proto_dhcpv4).
* @param[out] out Where to write a dl_instance_t containing the module handle and instance.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the type module.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int transport_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int transport_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *name = cf_pair_value(cf_item_to_pair(ci));
dl_instance_t *parent_inst;
extern fr_app_t proto_radius;
-static int type_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int transport_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int priority_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int transport_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int priority_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
static CONF_PARSER const limit_config[] = {
{ FR_CONF_OFFSET("cleanup_delay", FR_TYPE_TIMEVAL, proto_radius_t, io.cleanup_delay), .dflt = "5.0" } ,
{ NULL }
};
-static int priority_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int priority_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
int32_t priority;
* - 0 on success.
* - -1 on failure.
*/
-static int type_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
static char const *type_lib_table[] = {
[FR_CODE_ACCESS_REQUEST] = "auth",
* - 0 on success.
* - -1 on failure.
*/
-static int transport_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int transport_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *name = cf_pair_value(cf_item_to_pair(ci));
dl_instance_t *parent_inst;
#include "proto_vmps.h"
extern fr_app_t proto_vmps;
-static int priority_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
-static int type_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int transport_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int priority_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, CONF_PARSER const *rule);
+static int transport_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, CONF_PARSER const *rule);
static const CONF_PARSER priority_config[] = {
{ FR_CONF_OFFSET("VMPS-Join-Request", FR_TYPE_UINT32, proto_vmps_t, priorities[FR_VMPS_PACKET_TYPE_VALUE_VMPS_JOIN_REQUEST]),
{ NULL }
};
-static int priority_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int priority_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
int32_t priority;
*
* @param[in] ctx to allocate data in (instance of proto_vmps).
* @param[out] out Where to write a dl_instance_t containing the module handle and instance.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the type module.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int type_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *type_str = cf_pair_value(cf_item_to_pair(ci));
CONF_SECTION *listen_cs = cf_item_to_section(cf_parent(ci));
*
* @param[in] ctx to allocate data in (instance of proto_vmps).
* @param[out] out Where to write a dl_instance_t containing the module handle and instance.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the type module.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int transport_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int transport_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *name = cf_pair_value(cf_item_to_pair(ci));
dl_instance_t *parent_inst;
#include <openssl/rsa.h>
#include <openssl/x509.h>
-static int digest_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
-static int cipher_rsa_padding_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
-static int cipher_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
-
-static int cipher_rsa_private_key_file_load(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
-static int cipher_rsa_certificate_file_load(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int digest_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int cipher_rsa_padding_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int cipher_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+
+static int cipher_rsa_private_key_file_load(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int cipher_rsa_certificate_file_load(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
typedef enum {
RLM_CIPHER_TYPE_INVALID = 0,
*
* @param[in] ctx to allocate data in.
* @param[out] out EVP_MD representing the OpenSSL digest type.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the digest.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int digest_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int digest_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
EVP_MD const *md;
char const *type_str;
*
* @param[in] ctx to allocate data in.
* @param[out] out Padding type.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the padding type..
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int cipher_rsa_padding_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci,
- UNUSED CONF_PARSER const *rule)
+static int cipher_rsa_padding_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
int type;
char const *type_str;
*
* @param[in] ctx to allocate data in.
* @param[out] out Cipher enumeration type.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the type module.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int cipher_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int cipher_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
cipher_type_t type;
char const *type_str;
* function anyway.
* @param[out] out Where to write the EVP_PKEY * representing the
* certificate we just loaded.
+ * @param[in] parent Base structure address.
* @param[in] ci Config item containing the certificate path.
* @param[in] rule this callback was attached to.
* @return
* - -1 on failure.
* - 0 on success.
*/
-static int cipher_rsa_private_key_file_load(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci,
- UNUSED CONF_PARSER const *rule)
+static int cipher_rsa_private_key_file_load(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
FILE *fp;
char const *filename;
* function anyway.
* @param[out] out Where to write the EVP_PKEY * representing the
* certificate we just loaded.
+ * @param[in] parent Base structure address.
* @param[in] ci Config item containing the certificate path.
* @param[in] rule this callback was attached to.
* @return
* - -1 on failure.
* - 0 on success.
*/
-static int cipher_rsa_certificate_file_load(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci,
- UNUSED CONF_PARSER const *rule)
+static int cipher_rsa_certificate_file_load(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
FILE *fp;
char const *filename;
rlm_rcode_t rcode; //!< The result of the submodule.
} eap_auth_rctx_t;
-static int submodule_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
-static int eap_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int submodule_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int eap_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
static const CONF_PARSER module_config[] = {
{ FR_CONF_OFFSET("default_eap_type", FR_TYPE_VOID, rlm_eap_t, default_method),
*
* @param[in] ctx to allocate data in (instance of rlm_eap_t).
* @param[out] out Where to write a dl_instance_t containing the module handle and instance.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the type module.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int submodule_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int submodule_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *name = cf_pair_value(cf_item_to_pair(ci));
CONF_SECTION *eap_cs = cf_item_to_section(cf_parent(ci));
*
* @param[in] ctx unused.
* @param[out] out Where to write the #eap_type_t value we found.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the EAP method.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int eap_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int eap_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *default_method_name = cf_pair_value(cf_item_to_pair(ci));
eap_type_t method;
#include <freeradius-devel/rad_assert.h>
-static int auth_type_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int auth_type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
/*
* EAP-GTC is just ASCII data carried inside of the EAP session.
*
* @param[in] ctx to allocate data.
* @param[out] out Where to write the auth_type we created or resolved.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the auth_type.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int auth_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int auth_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *auth_type = cf_pair_value(cf_item_to_pair(ci));
#include <freeradius-devel/rad_assert.h>
-static int auth_type_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int auth_type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
typedef struct {
bool with_ntdomain_hack;
static CONF_PARSER submodule_config[] = {
{ FR_CONF_OFFSET("with_ntdomain_hack", FR_TYPE_BOOL, rlm_eap_mschapv2_t, with_ntdomain_hack), .dflt = "no" },
- { FR_CONF_OFFSET("auth_type", FR_TYPE_VOID, rlm_eap_mschapv2_t, auth_type), .func = auth_type_parse, .dflt = "mschap" },
+ { FR_CONF_OFFSET("auth_type", FR_TYPE_VOID, rlm_eap_mschapv2_t, auth_type), .func = auth_type_parse, .dflt = "mschap" },
{ FR_CONF_OFFSET("send_error", FR_TYPE_BOOL, rlm_eap_mschapv2_t, send_error), .dflt = "no" },
{ FR_CONF_OFFSET("identity", FR_TYPE_STRING, rlm_eap_mschapv2_t, identity) },
CONF_PARSER_TERMINATOR
*
* @param[in] ctx to allocate data.
* @param[out] out Where to write the auth_type we created or resolved.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the auth_type.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int auth_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int auth_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *auth_type = cf_pair_value(cf_item_to_pair(ci));
#include "eap_peap.h"
-static int auth_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
+static int auth_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule);
typedef struct rlm_eap_peap_t {
char const *tls_conf_name; //!< TLS configuration.
*
* @param[in] ctx to allocate data.
* @param[out] out Where to write the auth_type we created or resolved.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the auth_type.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int auth_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int auth_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *auth_type = cf_pair_value(cf_item_to_pair(ci));
#include "rlm_radius.h"
-static int transport_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int type_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int status_check_type_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
-static int status_check_update_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int transport_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int status_check_type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
+static int status_check_update_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, CONF_PARSER const *rule);
static CONF_PARSER const status_checks_config[] = {
{ FR_CONF_OFFSET("type", FR_TYPE_VOID, rlm_radius_t, status_check),
/** Set which types of packets we can parse
*
* @param[in] ctx to allocate data in (instance of rlm_radius).
- * @param[out] out Where to write the parsed data
+ * @param[out] out Where to write the parsed data.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the type module.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *type_str = cf_pair_value(cf_item_to_pair(ci));
CONF_SECTION *cs = cf_item_to_section(cf_parent(ci));
*
* @param[in] ctx to allocate data in (instance of proto_radius).
* @param[out] out Where to write a dl_instance_t containing the module handle and instance.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the type module.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int transport_parse(TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int transport_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *name = cf_pair_value(cf_item_to_pair(ci));
dl_instance_t *parent_inst;
/** Allow for Status-Server ping checks
*
* @param[in] ctx to allocate data in (instance of proto_radius).
- * @param[out] out Where to write our parsed data
+ * @param[out] out Where to write our parsed data.
+ * @param[in] parent Base structure address.
* @param[in] ci #CONF_PAIR specifying the name of the type module.
* @param[in] rule unused.
* @return
* - 0 on success.
* - -1 on failure.
*/
-static int status_check_type_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int status_check_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
char const *type_str = cf_pair_value(cf_item_to_pair(ci));
CONF_SECTION *cs = cf_item_to_section(cf_parent(ci));
* - 0 on success.
* - -1 on failure.
*/
-static int status_check_update_parse(UNUSED TALLOC_CTX *ctx, void *out, CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
+static int status_check_update_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
+ CONF_ITEM *ci, UNUSED CONF_PARSER const *rule)
{
int rcode;
CONF_SECTION *cs;