All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
rlm_attr_filter.c File Reference

Filter the contents of a list, allowing only certain attributes. More...

#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/modules.h>
#include <freeradius-devel/rad_assert.h>
#include <sys/stat.h>
#include <ctype.h>
#include <fcntl.h>
+ Include dependency graph for rlm_attr_filter.c:

Go to the source code of this file.

Data Structures

struct  rlm_attr_filter
 

Macros

#define RLM_AF_FUNC(_x, _y)
 

Typedefs

typedef struct rlm_attr_filter rlm_attr_filter_t
 

Functions

static int attr_filter_getfile (TALLOC_CTX *ctx, char const *filename, PAIR_LIST **pair_list)
 
static rlm_rcode_t CC_HINT (nonnull(1, 2))
 
static void check_pair (REQUEST *request, VALUE_PAIR *check_item, VALUE_PAIR *reply_item, int *pass, int *fail)
 
static int mod_instantiate (UNUSED CONF_SECTION *conf, void *instance)
 

Variables

static const CONF_PARSER module_config []
 
module_t rlm_attr_filter
 

Detailed Description

Filter the contents of a list, allowing only certain attributes.

Id:
0885e7a56bbfac0950a25e354794ad3429e9ab44

Definition in file rlm_attr_filter.c.


Data Structure Documentation

struct rlm_attr_filter

Definition at line 40 of file rlm_attr_filter.c.

+ Collaboration diagram for rlm_attr_filter:
Data Fields
PAIR_LIST * attrs
char const * filename
vp_tmpl_t * key
bool relaxed

Macro Definition Documentation

#define RLM_AF_FUNC (   _x,
  _y 
)
Value:
static rlm_rcode_t CC_HINT(nonnull) mod_##_x(void *instance, REQUEST *request) \
{ \
return attr_filter_common(instance, request, request->_y); \
}
static rlm_rcode_t CC_HINT(nonnull(1, 2))
enum rlm_rcodes rlm_rcode_t
Return codes indicating the result of the module call.

Definition at line 313 of file rlm_attr_filter.c.

Typedef Documentation

Function Documentation

static int attr_filter_getfile ( TALLOC_CTX *  ctx,
char const *  filename,
PAIR_LIST **  pair_list 
)
static

Definition at line 82 of file rlm_attr_filter.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static rlm_rcode_t CC_HINT ( nonnull(1, 2)  )
static

Definition at line 150 of file rlm_attr_filter.c.

+ Here is the call graph for this function:

static void check_pair ( REQUEST request,
VALUE_PAIR check_item,
VALUE_PAIR reply_item,
int *  pass,
int *  fail 
)
static

Definition at line 54 of file rlm_attr_filter.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mod_instantiate ( UNUSED CONF_SECTION conf,
void *  instance 
)
static

Definition at line 131 of file rlm_attr_filter.c.

+ Here is the call graph for this function:

Variable Documentation

const CONF_PARSER module_config[]
static
Initial value:
= {
{ FR_CONF_OFFSET("key", PW_TYPE_TMPL, rlm_attr_filter_t, key), .dflt = "&Realm", .quote = T_BARE_WORD },
{ FR_CONF_OFFSET("relaxed", PW_TYPE_BOOLEAN, rlm_attr_filter_t, relaxed), .dflt = "no" },
}
#define PW_TYPE_FILE_INPUT
File matching value must exist, and must be readable.
Definition: conffile.h:204
#define CONF_PARSER_TERMINATOR
Definition: conffile.h:289
A truth value.
Definition: radius.h:56
#define FR_CONF_OFFSET(_n, _t, _s, _f)
Definition: conffile.h:168
#define PW_TYPE_REQUIRED
Error out if no matching CONF_PAIR is found, and no dflt value is set.
Definition: conffile.h:200
#define PW_TYPE_TMPL
CONF_PAIR should be parsed as a template.
Definition: conffile.h:208

Definition at line 47 of file rlm_attr_filter.c.

Initial value:
= {
.magic = RLM_MODULE_INIT,
.name = "attr_filter",
.inst_size = sizeof(rlm_attr_filter_t),
.config = module_config,
.instantiate = mod_instantiate,
.methods = {
[MOD_PREACCT] = mod_preacct,
[MOD_PRE_PROXY] = mod_pre_proxy,
[MOD_POST_PROXY] = mod_post_proxy,
[MOD_RECV_COA] = mod_recv_coa,
[MOD_SEND_COA] = mod_send_coa
},
}
5 methods index for preproxy section.
Definition: modules.h:46
static rlm_rcode_t mod_accounting(void *instance, REQUEST *request)
Write accounting data to Couchbase documents.
static rlm_rcode_t mod_post_auth(void *instance, REQUEST *request) CC_HINT(nonnull)
7 methods index for postauth section.
Definition: modules.h:48
static rlm_rcode_t mod_authorize(void *instance, REQUEST *request)
Handle authorization requests using Couchbase document data.
#define RLM_MODULE_INIT
Definition: modules.h:86
#define RLM_TYPE_HUP_SAFE
Will be restarted on HUP.
Definition: modules.h:79
static int mod_instantiate(UNUSED CONF_SECTION *conf, void *instance)
struct rlm_attr_filter rlm_attr_filter_t
3 methods index for accounting section.
Definition: modules.h:44
static const CONF_PARSER module_config[]
6 methods index for postproxy section.
Definition: modules.h:47
2 methods index for preacct section.
Definition: modules.h:43
8 methods index for recvcoa section.
Definition: modules.h:50
9 methods index for sendcoa section.
Definition: modules.h:51
1 methods index for authorize section.
Definition: modules.h:42

Definition at line 336 of file rlm_attr_filter.c.