src/server/daemon/ldap_auth.h

changeset 415
d938228c382e
parent 256
19259b6c5cf7
child 467
4d038bc6f86e
equal deleted inserted replaced
414:99a34860c105 415:d938228c382e
30 #define LDAP_AUTH_H 30 #define LDAP_AUTH_H
31 31
32 #include "../public/auth.h" 32 #include "../public/auth.h"
33 #include <sys/types.h> 33 #include <sys/types.h>
34 #include <ldap.h> 34 #include <ldap.h>
35 #include <ucx/map.h> 35 #include <cx/map.h>
36 36
37 #include "config.h" 37 #include "config.h"
38 38
39 #ifdef __cplusplus 39 #ifdef __cplusplus
40 extern "C" { 40 extern "C" {
59 }; 59 };
60 60
61 struct ldap_group_cache { 61 struct ldap_group_cache {
62 LDAPGroup *first; 62 LDAPGroup *first;
63 LDAPGroup *last; 63 LDAPGroup *last;
64 UcxMap *map; 64 CxMap *map;
65 }; 65 };
66 66
67 struct ldap_auth_db { 67 struct ldap_auth_db {
68 AuthDB authdb; 68 AuthDB authdb;
69 LDAPConfig config; 69 LDAPConfig config;
94 94
95 AuthDB* create_ldap_authdb(ServerConfiguration *cfg, const char *name, LDAPConfig *conf); 95 AuthDB* create_ldap_authdb(ServerConfiguration *cfg, const char *name, LDAPConfig *conf);
96 96
97 LDAP* get_ldap_session(LDAPAuthDB *authdb); 97 LDAP* get_ldap_session(LDAPAuthDB *authdb);
98 98
99 User* ldap_get_user(AuthDB *sb, char *username); 99 User* ldap_get_user(AuthDB *sb, const char *username);
100 100
101 LDAPGroup* ldap_get_group(LDAPAuthDB *authdb, char *group); 101 LDAPGroup* ldap_get_group(LDAPAuthDB *authdb, const char *group);
102 102
103 int ldap_user_verify_password(User *user, char *password); 103 int ldap_user_verify_password(User *user, const char *password);
104 int ldap_user_check_group(User *user, char *group); 104 int ldap_user_check_group(User *user, const char *group);
105 void ldap_user_free(User *user); 105 void ldap_user_free(User *user);
106 106
107 #ifdef __cplusplus 107 #ifdef __cplusplus
108 } 108 }
109 #endif 109 #endif

mercurial