~ubuntu-branches/ubuntu/natty/freeradius/natty-updates

« back to all changes in this revision

Viewing changes to src/modules/rlm_smsotp/rlm_smsotp.h

  • Committer: Bazaar Package Importer
  • Author(s): Josip Rodin
  • Date: 2009-11-23 03:57:37 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20091123035737-zsgtzhfych8hir68
Tags: 2.1.7+dfsg-1
* Adopting the package, closes: #536623.
* New upstream version, closes: #513484.
  + Fixes the blooper in unlang evaluation logic, closes: #526175.
* Used quilt (and added README.source), and moved upstream file patching
  into debian/patches/. The source is no longer in collab-maint git
  (to make it simpler for me to finally get this out the door), but
  kept the .gitignore should we need that again.
* Dropped the dialup_admin/bin/backup_radacct patch (integrated upstream).
* Dropped the raddb/Makefile patch (problem no longer exists upstream).
* Dropped the lib/packet.c lib/radius.c main/listen.c patches (was from
  upstream 2.0.5 anyway).
* Dropped references to otp.conf, it no longer exists upstream.
  Keep removing the conffile statoverride in prerm.
* Dropped references to snmp.conf, it no longer exists upstream.
  Keep removing the conffile statoverride in prerm.
* Ship /etc/freeradius/modules/* in the freeradius package.
* Stop shipping sites-enabled symlinks in the package and instead create
  them only on initial install, thanks to Matej Vela, closes: #533396.
* Add export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" to the init script
  at the request of John Morrissey, closes: #550143.
* Stop installing /var/run/freeradius in the package to silence Lintian.
  The init script already recreates it at will.
* Remove executable bit from example.pl to silence Lintian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#define SMSOTP_SOCKET "/var/run/smsotp_socket"
 
2
#define SMSOTP_CHALLENGEMESSAGE "Enter Mobile PIN"
 
3
#define SMSOTP_AUTHTYPE "smsotp-reply"
 
4
 
 
5
/*
 
6
 *      Define a structure for our module configuration.
 
7
 *
 
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.
 
11
 */
 
12
 
 
13
typedef struct smsotp_fd_t {
 
14
  pthread_mutex_t       mutex;
 
15
  const char            *path;  /* allows diff instances to use diff sockets */
 
16
  int                   fd;
 
17
  struct smsotp_fd_t    *next;
 
18
} smsotp_fd_t;
 
19
 
 
20
typedef struct rlm_smsotp_t {
 
21
        char *smsotp_socket;
 
22
        char *smsotp_challengemessage;
 
23
        char *smsotp_authtype;
 
24
} rlm_smsotp_t;
 
25
 
 
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 *);
 
30
 
 
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__)