JunkBox_Lib 1.10.1
Loading...
Searching...
No Matches
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;
51};
52
53
59
60
61typedef struct _jbl_ldap_host JBXL_LDAP_Host;
62typedef struct _jbl_ldap_dn JBXL_LDAP_Dn;
63
64//
65void read_ldap_config(char* fn, JBXL_LDAP_Host* ldap_host, JBXL_LDAP_Dn* ldap_bind);
66LDAP* open_ldap_connection(JBXL_LDAP_Host* ldap_host, JBXL_LDAP_Dn* ldap_bind);
67
68int simple_check_ldap_passwd(LDAP* ld, char* userid, char* passwd, JBXL_LDAP_Dn* ldap_bind);
69int check_ldap_passwd(LDAP* ld, JBXL_LDAP_Dn* user, JBXL_LDAP_Dn* ldap_bind);
70void close_ldap_connection(LDAP* ld, JBXL_LDAP_Host** p_ldap_host, JBXL_LDAP_Dn** p_ldap_bind);
71
72void init_LDAP_Host(JBXL_LDAP_Host* host);
73void init_LDAP_Dn(JBXL_LDAP_Dn* dn);
74
75void free_LDAP_Host(JBXL_LDAP_Host* host);
76void free_LDAP_Dn(JBXL_LDAP_Dn* dn);
77
78JBXL_LDAP_Host* new_LDAP_Host(void);
79JBXL_LDAP_Dn* new_LDAP_Dn(void);
80
81void del_LDAP_Host(JBXL_LDAP_Host** p_host);
82void del_LDAP_Dn(JBXL_LDAP_Dn** p_dn);
83
84
85#endif // ENABLE_LDAP
86
87#endif // __JBXL_LDAP_TOOL_H_
88
void close_ldap_connection(LDAP *ld, JBXL_LDAP_Host **p_ldap_host, JBXL_LDAP_Dn **p_ldap_bind)
Definition ldap_tool.c:367
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
LDAP * open_ldap_connection(JBXL_LDAP_Host *ldap_host, JBXL_LDAP_Dn *ldap_bind)
Definition ldap_tool.c:129
void init_LDAP_Host(JBXL_LDAP_Host *host)
Definition ldap_tool.c:378
JBXL_LDAP_Host * new_LDAP_Host(void)
Definition ldap_tool.c:418
JBXL_LDAP_Dn * new_LDAP_Dn(void)
Definition ldap_tool.c:428
int simple_check_ldap_passwd(LDAP *ld, char *userid, char *passwd, JBXL_LDAP_Dn *ldap_bind)
Definition ldap_tool.c:230
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
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
汎用拡張ツールヘッダ