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

Supports OTP authentication using SMS. More...

#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/modules.h>
#include <sys/un.h>
+ Include dependency graph for rlm_smsotp.c:

Go to the source code of this file.

Data Structures

struct  rlm_smsotp_t
 

Macros

#define WRITE_ALL(_a, _b, _c)   if (write_all(_a,_b,_c) < 0) goto done;
 

Typedefs

typedef struct rlm_smsotp_t rlm_smsotp_t
 

Functions

static int _mod_conn_free (int *fdp)
 
static rlm_rcode_t CC_HINT (nonnull)
 
static void * mod_conn_create (TALLOC_CTX *ctx, void *instance, struct timeval const *timeout)
 
static int mod_instantiate (CONF_SECTION *conf, void *instance)
 
static size_t read_all (int *fdp, char *buf, size_t len)
 
static int write_all (int *fdp, char const *buf, size_t len)
 

Variables

static const CONF_PARSER module_config []
 
module_t rlm_smsotp
 

Detailed Description

Supports OTP authentication using SMS.

Id:
61a40c71174e995a08f9d9a1c243f524b8d33155

Definition in file rlm_smsotp.c.


Data Structure Documentation

struct rlm_smsotp_t

Definition at line 31 of file rlm_smsotp.c.

+ Collaboration diagram for rlm_smsotp_t:
Data Fields
char const * authtype
char const * challenge
fr_connection_pool_t * pool
char const * socket

Macro Definition Documentation

#define WRITE_ALL (   _a,
  _b,
  _c 
)    if (write_all(_a,_b,_c) < 0) goto done;

Typedef Documentation

typedef struct rlm_smsotp_t rlm_smsotp_t

Function Documentation

static int _mod_conn_free ( int *  fdp)
static

Definition at line 45 of file rlm_smsotp.c.

+ Here is the caller graph for this function:

static rlm_rcode_t CC_HINT ( nonnull  )
static

Definition at line 179 of file rlm_smsotp.c.

+ Here is the call graph for this function:

static void* mod_conn_create ( TALLOC_CTX *  ctx,
void *  instance,
struct timeval const *  timeout 
)
static

Definition at line 51 of file rlm_smsotp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 156 of file rlm_smsotp.c.

+ Here is the call graph for this function:

static size_t read_all ( int *  fdp,
char *  buf,
size_t  len 
)
static

Definition at line 79 of file rlm_smsotp.c.

+ Here is the caller graph for this function:

static int write_all ( int *  fdp,
char const *  buf,
size_t  len 
)
static

Definition at line 126 of file rlm_smsotp.c.

Variable Documentation

const CONF_PARSER module_config[]
static
Initial value:
= {
{ FR_CONF_OFFSET("socket", PW_TYPE_STRING, rlm_smsotp_t, socket), .dflt = "/var/run/smsotp_socket" },
{ FR_CONF_OFFSET("challenge_message", PW_TYPE_STRING, rlm_smsotp_t, challenge), .dflt = "Enter Mobile PIN" },
{ FR_CONF_OFFSET("challenge_type", PW_TYPE_STRING, rlm_smsotp_t, authtype), .dflt = "smsotp-reply" },
}
#define CONF_PARSER_TERMINATOR
Definition: conffile.h:289
#define FR_CONF_OFFSET(_n, _t, _s, _f)
Definition: conffile.h:168
String of printable characters.
Definition: radius.h:33

Definition at line 38 of file rlm_smsotp.c.

module_t rlm_smsotp
Initial value:
= {
.magic = RLM_MODULE_INIT,
.name = "smsotp",
.inst_size = sizeof(rlm_smsotp_t),
.config = module_config,
.instantiate = mod_instantiate,
.methods = {
},
}
static int mod_instantiate(CONF_SECTION *conf, void *instance)
Definition: rlm_smsotp.c:156
static rlm_rcode_t mod_authorize(void *instance, REQUEST *request)
Handle authorization requests using Couchbase document data.
#define RLM_TYPE_THREAD_SAFE
Module is threadsafe.
Definition: modules.h:75
#define RLM_MODULE_INIT
Definition: modules.h:86
static rlm_rcode_t mod_authenticate(void *instance, REQUEST *request) CC_HINT(nonnull)
0 methods index for authenticate section.
Definition: modules.h:41
struct rlm_smsotp_t rlm_smsotp_t
static const CONF_PARSER module_config[]
Definition: rlm_smsotp.c:38
1 methods index for authorize section.
Definition: modules.h:42

Definition at line 321 of file rlm_smsotp.c.