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
46
struct
_jbl_ldap_host
{
47
Buffer
hostname
;
48
unsigned
short
port
;
49
int
useSSL
;
50
int
reqCert
;
51
};
52
53
54
struct
_jbl_ldap_dn
{
55
Buffer
base
;
56
Buffer
dnbind
;
57
Buffer
passwd
;
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
close_ldap_connection
void close_ldap_connection(LDAP *ld, JBXL_LDAP_Host **p_ldap_host, JBXL_LDAP_Dn **p_ldap_bind)
Definition
ldap_tool.c:367
del_LDAP_Dn
void del_LDAP_Dn(JBXL_LDAP_Dn **p_dn)
Definition
ldap_tool.c:448
free_LDAP_Host
void free_LDAP_Host(JBXL_LDAP_Host *host)
Definition
ldap_tool.c:399
open_ldap_connection
LDAP * open_ldap_connection(JBXL_LDAP_Host *ldap_host, JBXL_LDAP_Dn *ldap_bind)
Definition
ldap_tool.c:129
init_LDAP_Host
void init_LDAP_Host(JBXL_LDAP_Host *host)
Definition
ldap_tool.c:378
new_LDAP_Host
JBXL_LDAP_Host * new_LDAP_Host(void)
Definition
ldap_tool.c:418
new_LDAP_Dn
JBXL_LDAP_Dn * new_LDAP_Dn(void)
Definition
ldap_tool.c:428
simple_check_ldap_passwd
int simple_check_ldap_passwd(LDAP *ld, char *userid, char *passwd, JBXL_LDAP_Dn *ldap_bind)
Definition
ldap_tool.c:230
init_LDAP_Dn
void init_LDAP_Dn(JBXL_LDAP_Dn *dn)
Definition
ldap_tool.c:389
check_ldap_passwd
int check_ldap_passwd(LDAP *ld, JBXL_LDAP_Dn *user, JBXL_LDAP_Dn *ldap_bind)
Definition
ldap_tool.c:261
free_LDAP_Dn
void free_LDAP_Dn(JBXL_LDAP_Dn *dn)
Definition
ldap_tool.c:408
del_LDAP_Host
void del_LDAP_Host(JBXL_LDAP_Host **p_host)
Definition
ldap_tool.c:438
read_ldap_config
void read_ldap_config(char *fn, JBXL_LDAP_Host *ldap_host, JBXL_LDAP_Dn *ldap_bind)
Definition
ldap_tool.c:37
Buffer
Definition
buffer.h:35
_jbl_ldap_dn
Definition
ldap_tool.h:54
_jbl_ldap_dn::base
Buffer base
Definition
ldap_tool.h:55
_jbl_ldap_dn::passwd
Buffer passwd
Definition
ldap_tool.h:57
_jbl_ldap_dn::dnbind
Buffer dnbind
Definition
ldap_tool.h:56
_jbl_ldap_host
Definition
ldap_tool.h:46
_jbl_ldap_host::hostname
Buffer hostname
Definition
ldap_tool.h:47
_jbl_ldap_host::useSSL
int useSSL
Definition
ldap_tool.h:49
_jbl_ldap_host::port
unsigned short port
Definition
ldap_tool.h:48
_jbl_ldap_host::reqCert
int reqCert
Definition
ldap_tool.h:50
xtools.h
汎用拡張ツールヘッダ
xLib
ldap_tool.h
Generated on Sat Oct 12 2024 19:31:03 for JunkBox_Lib by
1.11.0