CONF_PARSER_TERMINATOR
};
-/*
- * Reference for accounting updates
- */
-static const conf_parser_t acct_section_config[] = {
- { FR_CONF_OFFSET_FLAGS("reference", CONF_FLAG_XLAT, ldap_acct_section_t, reference), .dflt = "." },
- CONF_PARSER_TERMINATOR
-};
-
static const conf_parser_t module_config[] = {
/*
* Pool config items
return 0;
}
-/** Parse an accounting sub section.
- *
- * Allocate a new ldap_acct_section_t and write the config data into it.
- *
- * @param[in] mctx rlm_ldap configuration.
- * @param[in] parent of the config section.
- * @param[out] config to write the sub section parameters to.
- * @return
- * - 0 on success.
- * - < 0 on failure.
- */
-static int parse_sub_section(module_inst_ctx_t const *mctx,
- CONF_SECTION *parent, ldap_acct_section_t **config,
- char const *name)
-{
- rlm_ldap_t *inst = talloc_get_type_abort(mctx->mi->data, rlm_ldap_t);
- CONF_SECTION *cs;
-
- cs = cf_section_find(parent, name, NULL);
- if (!cs) {
- DEBUG2("rlm_ldap (%s) - Couldn't find configuration for %s, will return NOOP for calls "
- "from this section", mctx->mi->name, name);
-
- return 0;
- }
-
- if (cf_section_rules_push(cs, acct_section_config) < 0) return -1;
-
- *config = talloc_zero(inst, ldap_acct_section_t);
- if (cf_section_parse(*config, *config, cs) < 0) {
- PERROR("rlm_ldap (%s) - Failed parsing configuration for section %s", mctx->mi->name, name);
-
- return -1;
- }
-
- (*config)->cs = cs;
-
- return 0;
-}
-
static int ldap_update_section_parse(TALLOC_CTX *ctx, call_env_parsed_head_t *out, tmpl_rules_t const *t_rules,
CONF_ITEM *ci,
UNUSED call_env_ctx_t const *cec, call_env_parser_t const *rule)
inst->handle_config.chase_referrals_unset = true; /* use OpenLDAP defaults */
}
- /*
- * If the configuration parameters can't be parsed, then fail.
- */
- if ((parse_sub_section(mctx, conf, &inst->accounting, "accounting") < 0) ||
- (parse_sub_section(mctx, conf, &inst->postauth, "post-auth") < 0)) {
- cf_log_err(conf, "Failed parsing configuration");
-
- goto error;
- }
-
/*
* Sanity checks for cacheable groups code.
*/
#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/ldap/base.h>
-typedef struct {
- CONF_SECTION *cs; //!< Section configuration.
-
- char const *reference; //!< Configuration reference string.
-} ldap_acct_section_t;
-
typedef struct {
/*
* Options
char const *profile_attr_suspend; //!< Attribute that identifies profiles to apply when the user's
///< account is suspended. May appear in userobj or groupobj.
- /*
- * Accounting
- */
- ldap_acct_section_t *postauth; //!< Modify mappings for post-auth.
- ldap_acct_section_t *accounting; //!< Modify mappings for accounting.
-
#ifdef WITH_EDIR
/*
* eDir support