The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
password.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16  */
17 
18 /**
19  * @file src/lib/server/password.h
20  * @brief Password normalisation functions
21  *
22  * @copyright 2019 The FreeRADIUS server project
23  * @copyright 2019 Arran Cudbard-Bell <a.cudbardb@freeradius.org>
24  */
25 RCSIDH(password_h, "$Id: 1207b891bd44e7e835532065708b1757358830f9 $")
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 #include <freeradius-devel/server/request.h>
32 
34 
35 fr_pair_t *password_find(bool *ephemeral, TALLOC_CTX *ctx, request_t *request,
36  fr_dict_attr_t const *allowed_attrs[],
37  size_t allowed_attrs_len, bool normify);
38 
39 int password_init(void);
40 
41 #ifdef __cplusplus
42 }
43 #endif
#define RCSIDH(h, id)
Definition: build.h:482
static ssize_t normify(normalise_t *action, uint8_t *buffer, size_t bufflen, char const *known_good, size_t len, size_t min_len)
Definition: password.c:400
int password_init(void)
Load our dictionaries.
Definition: password.c:1044
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.
Definition: password.c:954
int password_normalise_and_replace(request_t *request, bool normify)
Find all password attributes in the control list of a request and normalise them.
Definition: password.c:858
Stores an attribute, a value and various bits of other data.
Definition: pair.h:68