| 1 | #ifndef authmysql_h |
| 2 | #define authmysql_h |
| 3 | |
| 4 | #include "courier_auth_config.h" |
| 5 | #include <stdlib.h> |
| 6 | #include <string.h> |
| 7 | #include <sys/types.h> |
| 8 | #include <mysql.h> |
| 9 | #include <errmsg.h> |
| 10 | |
| 11 | struct authmysqluserinfo { |
| 12 | char *username; |
| 13 | char *fullname; |
| 14 | char *cryptpw; |
| 15 | char *clearpw; |
| 16 | char *home; |
| 17 | char *maildir; |
| 18 | char *quota; |
| 19 | char *options; |
| 20 | uid_t uid; |
| 21 | gid_t gid; |
| 22 | } ; |
| 23 | |
| 24 | extern struct authmysqluserinfo *auth_mysql_getuserinfo(const char *, |
| 25 | const char *); |
| 26 | extern void auth_mysql_cleanup(); |
| 27 | |
| 28 | extern int auth_mysql_setpass(const char *, const char *, const char *); |
| 29 | |
| 30 | struct authinfo; |
| 31 | |
| 32 | extern int auth_mysql_pre(const char *, const char *, |
| 33 | int (*)(struct authinfo *, void *), void *arg); |
| 34 | |
| 35 | #endif |