summaryrefslogtreecommitdiffstats
path: root/lib/libaccess/ldapauth.h
blob: 409aa6e96ac9043832ade7cf13e5efafcadba81c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/** BEGIN COPYRIGHT BLOCK
 * Copyright 2001 Sun Microsystems, Inc.
 * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
 * All rights reserved.
 * END COPYRIGHT BLOCK **/

#ifndef LDAP_AUTH_H
#define LDAP_AUTH_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ldap/ldap.h"

const int LDAP_ACL_SUCCESS = 0;
const int LDAP_ACL_FAILED = -1;

extern int ldap_auth_userdn_groupdn (LDAP *ld, char *userdn,
				     char *groupdn);
extern int ldap_auth_uid_groupdn (LDAP *ld, char *uid,
				  char *groupdn);
extern int ldap_auth_uid_groupid (LDAP *ld, char *uid,
				  char *groupid);
extern int ldap_auth_userdn_groupid (LDAP *ld, char *userdn,
				     char *groupid);
extern int ldap_auth_userdn_attrfilter (LDAP *ld, char *userdn,
					char *attrfilter);
extern int ldap_auth_uid_attrfilter (LDAP *ld, char *uid,
				     char *attrfilter);
extern int ldap_auth_userdn_password (LDAP *ld, char *userdn,
				      char *password);
extern int ldap_find_uid (LDAP *ld, char *uid, LDAPMessage **res);
extern int ldap_auth_uid_password (LDAP *ld, char *uid,
				   char *password);
extern LDAP *init_ldap();

#ifdef __cplusplus
}
#endif

#endif /* LDAP_AUTH_H */