Interfaces with the PAM library to allow auth via PAM.
More...
#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/modules.h>
#include "config.h"
Go to the source code of this file.
|
static rlm_rcode_t | CC_HINT (nonnull) |
|
static int | do_pam (REQUEST *request, char const *username, char const *passwd, char const *pamauth) |
| Check the users password against the standard UNIX password table + PAM. More...
|
|
static int | mod_instantiate (UNUSED CONF_SECTION *conf, void *instance) |
|
static int | pam_conv (int num_msg, struct pam_message const **msg, struct pam_response **resp, void *appdata_ptr) |
| Dialogue between RADIUS and PAM modules. More...
|
|
Interfaces with the PAM library to allow auth via PAM.
- Id:
- 44bd3ec1ae93180b7510b4ecd5a42745cd01eb37
- Note
- This was taken from the hacks that miguel a.l. paraz map@i.nosp@m.phil.nosp@m..net did on radiusd-cistron-1.5.3 and migrated to a separate file. That, in fact, was again based on the original stuff from Jeph Blaize jblai.nosp@m.ze@k.nosp@m.iva.n.nosp@m.et done in May 1997.
- Copyright
- 2000,2006 The FreeRADIUS server project
-
1997 Jeph Blaize jblai.nosp@m.ze@k.nosp@m.iva.n.nosp@m.et
-
1999 miguel a.l. paraz map@i.nosp@m.phil.nosp@m..net
Definition in file rlm_pam.c.
Definition at line 59 of file rlm_pam.c.
Data Fields |
bool |
error |
True if pam_conv failed. |
char const * |
password |
Password to provide to PAM when prompted. |
REQUEST * |
request |
The current request. |
char const * |
username |
Username to provide to PAM when prompted. |
Definition at line 50 of file rlm_pam.c.
Data Fields |
char const * |
pam_auth_name |
|
#define COPY_STRING |
( |
|
s | ) |
((s) ? strdup(s) : NULL) |
static int do_pam |
( |
REQUEST * |
request, |
|
|
char const * |
username, |
|
|
char const * |
passwd, |
|
|
char const * |
pamauth |
|
) |
| |
|
static |
Check the users password against the standard UNIX password table + PAM.
- Note
- For most flexibility, passing a pamauth type to this function allows you to have multiple authentication types (i.e. multiple files associated with radius in /etc/pam.d).
- Parameters
-
request | The current request. |
username | User to authenticate. |
passwd | Password to authenticate with, |
pamauth | Type of PAM authentication. |
- Returns
- 0 on success.
- -1 on failure.
Definition at line 147 of file rlm_pam.c.
static int pam_conv |
( |
int |
num_msg, |
|
|
struct pam_message const ** |
msg, |
|
|
struct pam_response ** |
resp, |
|
|
void * |
appdata_ptr |
|
) |
| |
|
static |
Dialogue between RADIUS and PAM modules.
Uses PAM's appdata_ptr so it's thread safe, and doesn't have any nasty static variables hanging around.
Definition at line 80 of file rlm_pam.c.
Initial value:= {
}
#define CONF_PARSER_TERMINATOR
#define FR_CONF_OFFSET(_n, _t, _s, _f)
String of printable characters.
Definition at line 54 of file rlm_pam.c.
Initial value:= {
.name = "pam",
.methods = {
},
}
static const CONF_PARSER module_config[]
#define RLM_TYPE_THREAD_UNSAFE
Module is not threadsafe.
static rlm_rcode_t mod_authenticate(void *instance, REQUEST *request) CC_HINT(nonnull)
static int mod_instantiate(UNUSED CONF_SECTION *conf, void *instance)
struct rlm_pam_t rlm_pam_t
0 methods index for authenticate section.
Definition at line 245 of file rlm_pam.c.