Set the userdb path to be /etc/courier/userdb.
[hcoop/debian/courier-authlib.git] / auth.h
CommitLineData
d9898ee8 1#ifndef authlib_auth_h
2#define authlib_auth_h
3
4/*
5** Copyright 1998 - 2004 Double Precision, Inc. See COPYING for
6** distribution information.
7*/
8
9#if HAVE_CONFIG_H
10#include "courier_auth_config.h"
11#endif
12#include <sys/types.h>
13#include "courierauth.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19static const char auth_h_rcsid[]="$Id: auth.h,v 1.11 2004/10/21 00:10:48 mrsam Exp $";
20
21
22/* authcheckpassword is the general password validation routine.
23** It returns 0 if the password matches the encrypted password.
24*/
25
26int authcheckpassword(const char *, /* password */
27 const char *); /* encrypted password */
28
29 /*
30 ** authcryptpasswd is a password hashing function, used to create
31 ** new password. password is the cleartext password.
32 ** encryption_hint is a hint to the type of hashing to be used
33 ** (NULL means use a default hash function).
34 */
35
36char *authcryptpasswd(const char *password,
37 const char *encryption_hint);
38
39
40int auth_sys_common( int (*auth_pre_func)(const char *,
41 const char *,
42 int (*)(struct authinfo *,
43 void *),
44 void *),
45 const char *user,
46 const char *pass,
47 const char *service,
48 int (*callback_func)(struct authinfo *, void *),
49 void *callback_arg);
50
51#ifdef __cplusplus
52}
53#endif
54
55#endif