| 1 |
pippijn |
1.1 |
/* |
| 2 |
|
|
* Copyright © 2005 Atheme Development Group |
| 3 |
pippijn |
1.2 |
* Rights to this code are as documented in doc/pod/license.pod. |
| 4 |
pippijn |
1.1 |
* |
| 5 |
|
|
* POSIX-style crypt(3) wrapper. |
| 6 |
|
|
* |
| 7 |
pippijn |
1.2 |
* $Id: posix.C,v 1.1 2007-07-19 08:24:53 pippijn Exp $ |
| 8 |
pippijn |
1.1 |
*/ |
| 9 |
|
|
|
| 10 |
|
|
#include "atheme.h" |
| 11 |
|
|
|
| 12 |
|
|
static char const rcsid[] = "$Id"; |
| 13 |
|
|
|
| 14 |
|
|
struct crypto_posix_listeners : callback::has_listeners |
| 15 |
|
|
{ |
| 16 |
|
|
}; |
| 17 |
|
|
|
| 18 |
|
|
crypto_posix_listeners listeners; |
| 19 |
|
|
|
| 20 |
pippijn |
1.2 |
DECLARE_MODULE_V1 ("crypto/posix", false, _modinit, _moddeinit, "$Id: posix.C,v 1.1 2007-07-19 08:24:53 pippijn Exp $", "The Ermyth Team <http://ermyth.schmorp.de>"); |
| 21 |
pippijn |
1.1 |
|
| 22 |
|
|
static char * |
| 23 |
|
|
posix_crypt_string (char *key, char *salt) |
| 24 |
|
|
{ |
| 25 |
|
|
return crypt (key, salt); |
| 26 |
|
|
} |
| 27 |
|
|
|
| 28 |
|
|
void |
| 29 |
|
|
_modinit (module_t *m) |
| 30 |
|
|
{ |
| 31 |
|
|
crypt_string = &posix_crypt_string; |
| 32 |
|
|
|
| 33 |
|
|
crypto_module_loaded = true; |
| 34 |
|
|
} |
| 35 |
|
|
|
| 36 |
|
|
void |
| 37 |
|
|
_moddeinit (void) |
| 38 |
|
|
{ |
| 39 |
|
|
crypt_string = &generic_crypt_string; |
| 40 |
|
|
|
| 41 |
|
|
crypto_module_loaded = false; |
| 42 |
|
|
} |
| 43 |
|
|
|
| 44 |
|
|
/* vim:cinoptions=>s,e0,n0,f0,{0,}0,^0,=s,ps,t0,c3,+s,(2s,us,)20,*30,gs,hs |
| 45 |
|
|
* vim:ts=8 |
| 46 |
|
|
* vim:sw=8 |
| 47 |
|
|
* vim:noexpandtab |
| 48 |
|
|
*/ |