Merge branch 'debian'
[hcoop/debian/courier-authlib.git] / authpgsql.h
1 #ifndef authpgsql_h
2 #define authpgsql_h
3
4 #include "courier_auth_config.h"
5 #include <stdlib.h>
6 #include <string.h>
7 #include <sys/types.h>
8 #include <libpq-fe.h>
9
10 /*
11 #include <errmsg.h>
12 */
13 struct authpgsqluserinfo {
14 char *username;
15 char *fullname;
16 char *cryptpw;
17 char *clearpw;
18 char *home;
19 char *maildir;
20 char *quota;
21 char *options;
22 uid_t uid;
23 gid_t gid;
24 } ;
25
26 extern struct authpgsqluserinfo *auth_pgsql_getuserinfo(const char *,
27 const char *service);
28 extern void auth_pgsql_cleanup();
29
30 extern int auth_pgsql_setpass(const char *, const char *, const char *);
31
32 struct authinfo;
33
34 extern int auth_pgsql_pre(const char *, const char *,
35 int (*)(struct authinfo *, void *), void *arg);
36
37 #endif