1
#define SMSOTP_SOCKET "/var/run/smsotp_socket"
2
#define SMSOTP_CHALLENGEMESSAGE "Enter Mobile PIN"
3
#define SMSOTP_AUTHTYPE "smsotp-reply"
6
* Define a structure for our module configuration.
8
* These variables do not need to be in a structure, but it's
9
* a lot cleaner to do so, and a pointer to the structure can
10
* be used as the instance handle.
13
typedef struct smsotp_fd_t {
14
pthread_mutex_t mutex;
15
const char *path; /* allows diff instances to use diff sockets */
17
struct smsotp_fd_t *next;
20
typedef struct rlm_smsotp_t {
22
char *smsotp_challengemessage;
23
char *smsotp_authtype;
26
static void _smsotp_pthread_mutex_init(pthread_mutex_t *, const pthread_mutexattr_t *, const char *);
27
static void _smsotp_pthread_mutex_lock(pthread_mutex_t *, const char *);
28
static int _smsotp_pthread_mutex_trylock(pthread_mutex_t *, const char *);
29
static void _smsotp_pthread_mutex_unlock(pthread_mutex_t *, const char *);
31
#define smsotp_pthread_mutex_init(a, b) _smsotp_pthread_mutex_init((a), (b), __func__)
32
#define smsotp_pthread_mutex_lock(a) _smsotp_pthread_mutex_lock((a), __func__)
33
#define smsotp_pthread_mutex_trylock(a) _smsotp_pthread_mutex_trylock((a), __func__)
34
#define smsotp_pthread_mutex_unlock(a) _smsotp_pthread_mutex_unlock((a), __func__)