JunkBox_Lib  1.10.2
ldap_tool.h
Go to the documentation of this file.
1 #ifndef __JBXL_LDAP_TOOL_H_
2 #define __JBXL_LDAP_TOOL_H_
3 
21 #include "xtools.h"
22 
23 
24 #ifndef HAVE_LDAP_H
25 #ifndef DISABLE_LDAP
26 #define DISABLE_LDAP
27 #endif
28 #endif
29 
30 #ifdef DISABLE_LDAP
31 #undef ENABLE_LDAP
32 #endif
33 
34 
35 //
36 #ifdef ENABLE_LDAP
37 
38 
39 #ifndef LDAP_DEPRECATED
40  #define LDAP_DEPRECATED 1
41 #endif
42 
43 #include <ldap.h>
44 
45 
48  unsigned short port;
49  int useSSL;
50  int reqCert;
51 };
52 
53 
54 struct _jbl_ldap_dn {
58 };
59 
60 
61 typedef struct _jbl_ldap_host JBXL_LDAP_Host;
62 typedef struct _jbl_ldap_dn JBXL_LDAP_Dn;
63 
64 //
65 void read_ldap_config(char* fn, JBXL_LDAP_Host* ldap_host, JBXL_LDAP_Dn* ldap_bind);
66 LDAP* open_ldap_connection(JBXL_LDAP_Host* ldap_host, JBXL_LDAP_Dn* ldap_bind);
67 
68 int simple_check_ldap_passwd(LDAP* ld, char* userid, char* passwd, JBXL_LDAP_Dn* ldap_bind);
69 int check_ldap_passwd(LDAP* ld, JBXL_LDAP_Dn* user, JBXL_LDAP_Dn* ldap_bind);
70 void close_ldap_connection(LDAP* ld, JBXL_LDAP_Host** p_ldap_host, JBXL_LDAP_Dn** p_ldap_bind);
71 
72 void init_LDAP_Host(JBXL_LDAP_Host* host);
73 void init_LDAP_Dn(JBXL_LDAP_Dn* dn);
74 
75 void free_LDAP_Host(JBXL_LDAP_Host* host);
76 void free_LDAP_Dn(JBXL_LDAP_Dn* dn);
77 
78 JBXL_LDAP_Host* new_LDAP_Host(void);
79 JBXL_LDAP_Dn* new_LDAP_Dn(void);
80 
81 void del_LDAP_Host(JBXL_LDAP_Host** p_host);
82 void del_LDAP_Dn(JBXL_LDAP_Dn** p_dn);
83 
84 
85 #endif // ENABLE_LDAP
86 
87 #endif // __JBXL_LDAP_TOOL_H_
88 
LDAP * open_ldap_connection(JBXL_LDAP_Host *ldap_host, JBXL_LDAP_Dn *ldap_bind)
Definition: ldap_tool.c:129
void close_ldap_connection(LDAP *ld, JBXL_LDAP_Host **p_ldap_host, JBXL_LDAP_Dn **p_ldap_bind)
Definition: ldap_tool.c:367
JBXL_LDAP_Host * new_LDAP_Host(void)
Definition: ldap_tool.c:418
void del_LDAP_Dn(JBXL_LDAP_Dn **p_dn)
Definition: ldap_tool.c:448
void free_LDAP_Host(JBXL_LDAP_Host *host)
Definition: ldap_tool.c:399
void init_LDAP_Host(JBXL_LDAP_Host *host)
Definition: ldap_tool.c:378
int simple_check_ldap_passwd(LDAP *ld, char *userid, char *passwd, JBXL_LDAP_Dn *ldap_bind)
Definition: ldap_tool.c:230
JBXL_LDAP_Dn * new_LDAP_Dn(void)
Definition: ldap_tool.c:428
void init_LDAP_Dn(JBXL_LDAP_Dn *dn)
Definition: ldap_tool.c:389
int check_ldap_passwd(LDAP *ld, JBXL_LDAP_Dn *user, JBXL_LDAP_Dn *ldap_bind)
Definition: ldap_tool.c:261
void free_LDAP_Dn(JBXL_LDAP_Dn *dn)
Definition: ldap_tool.c:408
void del_LDAP_Host(JBXL_LDAP_Host **p_host)
Definition: ldap_tool.c:438
void read_ldap_config(char *fn, JBXL_LDAP_Host *ldap_host, JBXL_LDAP_Dn *ldap_bind)
Definition: ldap_tool.c:37
Definition: buffer.h:35
Buffer base
Definition: ldap_tool.h:55
Buffer passwd
Definition: ldap_tool.h:57
Buffer dnbind
Definition: ldap_tool.h:56
Buffer hostname
Definition: ldap_tool.h:47
unsigned short port
Definition: ldap_tool.h:48
汎用拡張ツールヘッダ