Commit | Line | Data |
---|---|---|
d9898ee8 | 1 | #ifndef authmysql_h |
2 | #define authmysql_h | |
3 | ||
4 | #include "courier_auth_config.h" | |
5 | #include <stdlib.h> | |
d9898ee8 | 6 | #include <sys/types.h> |
7 | #include <mysql.h> | |
8 | #include <errmsg.h> | |
9 | ||
0e333c05 CE |
10 | #include <string> |
11 | ||
12 | class authmysqluserinfo { | |
13 | public: | |
14 | std::string username; | |
15 | std::string fullname; | |
16 | std::string cryptpw; | |
17 | std::string clearpw; | |
18 | std::string home; | |
19 | std::string maildir; | |
20 | std::string quota; | |
21 | std::string options; | |
d9898ee8 | 22 | uid_t uid; |
23 | gid_t gid; | |
0e333c05 CE |
24 | }; |
25 | ||
26 | bool auth_mysql_getuserinfo(const char *username, | |
27 | const char *service, | |
28 | authmysqluserinfo &uiret); | |
d9898ee8 | 29 | |
d9898ee8 | 30 | extern void auth_mysql_cleanup(); |
31 | ||
0e333c05 | 32 | extern bool auth_mysql_setpass(const char *, const char *, const char *); |
d9898ee8 | 33 | |
34 | struct authinfo; | |
35 | ||
36 | extern int auth_mysql_pre(const char *, const char *, | |
37 | int (*)(struct authinfo *, void *), void *arg); | |
38 | ||
0e333c05 CE |
39 | extern void auth_mysql_enumerate( void(*cb_func)(const char *name, |
40 | uid_t uid, | |
41 | gid_t gid, | |
42 | const char *homedir, | |
43 | const char *maildir, | |
44 | const char *options, | |
45 | void *void_arg), | |
46 | void *void_arg); | |
47 | ||
48 | ||
d9898ee8 | 49 | #endif |