The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Password normalisation functions. More...
#include <freeradius-devel/server/request.h>
Go to the source code of this file.
Functions | |
fr_pair_t * | password_find (bool *ephemeral, TALLOC_CTX *ctx, request_t *request, fr_dict_attr_t const *allowed_attrs[], size_t allowed_attrs_len, bool normify) |
Find a "known good" password in the control list of a request. More... | |
int | password_init (void) |
Load our dictionaries. More... | |
int | password_normalise_and_replace (request_t *request, bool normify) |
Find all password attributes in the control list of a request and normalise them. More... | |
Password normalisation functions.
Definition in file password.h.
fr_pair_t* password_find | ( | bool * | ephemeral, |
TALLOC_CTX * | ctx, | ||
request_t * | request, | ||
fr_dict_attr_t const * | allowed_attrs[], | ||
size_t | allowed_attrs_len, | ||
bool | normify | ||
) |
Find a "known good" password in the control list of a request.
Searches for a "known good" password attribute, and applies any processing and normification operations to it, returning a new normalised fr_pair_t.
The ctx passed in should be freed when the caller is done with the returned fr_pair_t, or alternatively, a persistent ctx may be used and the value of ephemeral checked. If ephemeral is false the returned pair MUST NOT BE FREED, it may be an attribute in the request->control_pairs list. If ephemeral is true, the returned pair MUST be freed, or added to one of the pair lists appropriate to the ctx passed in.
[out] | ephemeral | If true, the caller must use TALLOC_FREE to free the return value of this function. Alternatively 'ctx' can be freed, which is simpler and cleaner, but some people have religious objections to that. |
[in] | ctx | Ephemeral ctx to allocate new attributes in. |
[in] | request | The current request. |
[in] | allowed_attrs | Optional list of allowed attributes. |
[in] | allowed_attrs_len | Length of allowed attributes list. |
[in] | normify | Apply hex/base64 normalisation to attributes. |
Definition at line 954 of file password.c.
int password_init | ( | void | ) |
Load our dictionaries.
Definition at line 1044 of file password.c.
Find all password attributes in the control list of a request and normalise them.
[in] | request | The current request. |
[in] | normify | Apply hex/base64 normalisation to attributes. |
Definition at line 858 of file password.c.