ruby-ldap3 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/COPYING +24 -0
- data/ChangeLog +842 -0
- data/FAQ +58 -0
- data/LICENSE +28 -0
- data/NOTES +193 -0
- data/README +279 -0
- data/TODO +15 -0
- data/clientauth.c +605 -0
- data/conn.c +1918 -0
- data/entry.c +342 -0
- data/extconf.rb +310 -0
- data/ldap.c +650 -0
- data/lib/ldap/control.rb +50 -0
- data/lib/ldap/ldif.rb +564 -0
- data/lib/ldap/schema.rb +135 -0
- data/misc.c +512 -0
- data/mod.c +359 -0
- data/rbldap.h +207 -0
- data/saslconn.c +242 -0
- data/sslconn.c +377 -0
- data/test/add.rb +31 -0
- data/test/add2.rb +31 -0
- data/test/add3.rb +33 -0
- data/test/bind-ldaps.rb +25 -0
- data/test/bind-sasl.rb +17 -0
- data/test/bind-ssl.rb +25 -0
- data/test/bind.rb +34 -0
- data/test/compare.rb +17 -0
- data/test/conf.rb +12 -0
- data/test/delete.rb +13 -0
- data/test/ext.rb +49 -0
- data/test/misc1.rb +49 -0
- data/test/misc2.rb +40 -0
- data/test/modrdn.rb +23 -0
- data/test/moz_cert.rb +104 -0
- data/test/search.rb +20 -0
- data/test/search2.rb +34 -0
- data/test/search3.rb +23 -0
- data/test/setup.rb +38 -0
- data/test/subschema.rb +21 -0
- data/test/tc_conn.rb +123 -0
- data/test/tc_ldif.rb +174 -0
- data/test/tc_schema.rb +32 -0
- data/test/tc_search.rb +137 -0
- data/test/ts_ldap.rb +8 -0
- data/win/winlber.h +21 -0
- data/win/winldap.h +324 -0
- data/win/wldap32.def +257 -0
- metadata +97 -0
data/FAQ
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
FAQ
|
2
|
+
---
|
3
|
+
|
4
|
+
Q. How do I add/modify binary data?
|
5
|
+
|
6
|
+
A. Create a LDAP::Mod object with the flag LDAP::LDAP_MOD_BVALUES as follows:
|
7
|
+
|
8
|
+
entry = [
|
9
|
+
LDAP::mod(LDAP::LDAP_MOD_ADD|LDAP_MOD_BVALUES, 'jpegPhoto', [jpeg_img]),
|
10
|
+
LDAP::mod(LDAP::LDAP_MOD_ADD, 'cn', ['Takaaki Tateishi']) #, ...
|
11
|
+
]
|
12
|
+
conn.add("dc=localhost, dc=localdomain", entry)
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
Q. Is there shortcut method for adding/modifying entries?
|
17
|
+
|
18
|
+
A. Yes, there is. You can directly give LDAP::Conn#add/modify hash data as
|
19
|
+
follows:
|
20
|
+
|
21
|
+
entry = {
|
22
|
+
'objectclass' => [ 'top', 'person' ] #, ...
|
23
|
+
}
|
24
|
+
conn.add( "cn=foobar, dc=localhost, dc=localdomain", entry )
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
Q. Can I use SASL authentication?
|
29
|
+
|
30
|
+
A. Yes, it works for me using Cyrus SASL and Kerberos V via GSSAPI.
|
31
|
+
Use LDAP::Conn#sasl_bind. Your mileage may vary.
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
Q. Can I put a limit on the number of results returned by the server?
|
36
|
+
|
37
|
+
A. Yes, as of version 0.9.4, you can. Set the size limit using
|
38
|
+
LDAP::Conn#set_option and then check for LDAP::Conn#search or
|
39
|
+
LDAP::Conn#search2 having exceeded this limit, by using LDAP::Conn#err:
|
40
|
+
|
41
|
+
conn = LDAP::Conn.new( 'localhost', 389 )
|
42
|
+
|
43
|
+
# Limit the results set to a maximum of 10.
|
44
|
+
conn.set_option( LDAP::LDAP_OPT_SIZELIMIT, 10 )
|
45
|
+
|
46
|
+
conn.search2( 'dc=localhost,dc=localdomain',
|
47
|
+
LDAP::LDAP_SCOPE_SUBTREE, '(objectClass=*)' )
|
48
|
+
|
49
|
+
if conn.err == LDAP::LDAP_SIZELIMIT_EXCEEDED
|
50
|
+
# Results set was truncated by server.
|
51
|
+
end
|
52
|
+
|
53
|
+
Note that LDAP::LDAP_SIZELIMIT_EXCEEDED may occur even when you have not
|
54
|
+
put an explicit limit on the number of results to be returned. The server
|
55
|
+
will likely have its own maximum configured, so it can be important to
|
56
|
+
check for this condition on all of your calls to LDAP::Conn#search and
|
57
|
+
LDAP::Conn#search2.
|
58
|
+
|
data/LICENSE
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
BSD 3-Clause License
|
2
|
+
|
3
|
+
Copyright (c) 2025, Shane Curcuru
|
4
|
+
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
7
|
+
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
9
|
+
list of conditions and the following disclaimer.
|
10
|
+
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
13
|
+
and/or other materials provided with the distribution.
|
14
|
+
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
16
|
+
contributors may be used to endorse or promote products derived from
|
17
|
+
this software without specific prior written permission.
|
18
|
+
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/NOTES
ADDED
@@ -0,0 +1,193 @@
|
|
1
|
+
0.10.0
|
2
|
+
-----
|
3
|
+
* Project forked, renamed to ruby-ldap3, porting to Ruby 3.x with previous PRs
|
4
|
+
|
5
|
+
0.9.20
|
6
|
+
-----
|
7
|
+
* Added support of LDAP_OPT_X_TLS_NEWCTX.
|
8
|
+
Thanks to Kouhei Sutou.
|
9
|
+
|
10
|
+
|
11
|
+
0.9.19
|
12
|
+
-----
|
13
|
+
* Fixed parsing of LDIF with CR LF line separators (GH-38).
|
14
|
+
Thanks to doppelreim.
|
15
|
+
|
16
|
+
|
17
|
+
0.9.18
|
18
|
+
-----
|
19
|
+
* backout issue32 to compile for ruby-1.8.x.
|
20
|
+
Thanks to SUENAGA Hiroki.
|
21
|
+
|
22
|
+
|
23
|
+
0.9.17
|
24
|
+
-----
|
25
|
+
|
26
|
+
* Use ruby object to keep LDAP search result instead of libldap's data structure.
|
27
|
+
* Use macro Check_LDAPENTRY for assertion inside native extension codes.
|
28
|
+
* Remove assertion code from macro GET_LDAPENTRY_DATA (GH-31).
|
29
|
+
Thanks to SUENAGA Hiroki.
|
30
|
+
|
31
|
+
|
32
|
+
0.9.16
|
33
|
+
-----
|
34
|
+
|
35
|
+
* Fixed undefined method 'each' in LDAP::LDIF.mods_to_ldif (GH-26).
|
36
|
+
Thanks to Francesco Malvezzi.
|
37
|
+
|
38
|
+
|
39
|
+
0.9.15
|
40
|
+
-----
|
41
|
+
|
42
|
+
* Accept nil for new_parent_dn for rename. Thanks to Kouhei Sutou.
|
43
|
+
|
44
|
+
|
45
|
+
0.9.14
|
46
|
+
-----
|
47
|
+
|
48
|
+
* Fixed option parsing bug for LDAP::Conn.sasl_bind. Thanks to Brian Leake.
|
49
|
+
* Added possibility to use :nocanon option in rb_ldap_conn_sasl_bind.
|
50
|
+
See ldap_set_option(3) for more information. Thanks to Brian Leake.
|
51
|
+
* Added function conn.rename(dn, new_rdn, new_parent_dn, delete_old_rdn, sctrls, cctrls) => self
|
52
|
+
Modify the RDN of the entry with DN, dn, giving it the new RDN in parent new_parent_dn,
|
53
|
+
new_rdn. If delete_old_rdn is true, the old RDN value will be deleted from the entry.
|
54
|
+
Thanks to Marek Veber.
|
55
|
+
* Added option LDAP_OPT_NETWORK_TIMEOUT for openLDAP. Thanks to David Campbell.
|
56
|
+
* Fixed build error with GCC 4.8.1. Thanks to Kouhei Sutou.
|
57
|
+
* Add missing ldap_raname_s() function availability check. Thanks to Kouhei Sutou.
|
58
|
+
|
59
|
+
|
60
|
+
0.9.13
|
61
|
+
-----
|
62
|
+
|
63
|
+
* Prevent SyntaxError raised under Ruby 2.0.0 by line 107 regex
|
64
|
+
(invalid multibyte escape)
|
65
|
+
|
66
|
+
|
67
|
+
0.9.12
|
68
|
+
-----
|
69
|
+
|
70
|
+
* On windows, the default ldap library became wldap32;
|
71
|
+
* Fixed compile with ruby 1.9.2.
|
72
|
+
|
73
|
+
Thank to Hiroki Najima!
|
74
|
+
|
75
|
+
* Fixed many memory leaks;
|
76
|
+
* Added functions:
|
77
|
+
LDAP::Conn.open_uri(uri);
|
78
|
+
LDAP::explode_dn(dn, notypes);
|
79
|
+
LDAP::explode_rdn(rdn, notypes).
|
80
|
+
|
81
|
+
Thanks to Marek Veber and Antonio Terceiro!
|
82
|
+
|
83
|
+
* Fixed bug in ldap/ldif.rb (GH-6).
|
84
|
+
|
85
|
+
Thanks to bbense.
|
86
|
+
|
87
|
+
* Fixed LDAP::Mod data corruption.
|
88
|
+
|
89
|
+
Thanks to Aprotim Sanyal!
|
90
|
+
|
91
|
+
* Enable client certificate authentication for mozilla ldap 6.0 only.
|
92
|
+
|
93
|
+
Thanks to Yuri Arabadji!
|
94
|
+
|
95
|
+
|
96
|
+
0.9.11
|
97
|
+
-----
|
98
|
+
|
99
|
+
Allow passing SASL interaction options
|
100
|
+
|
101
|
+
This adds a hash parameter "options" to LDAP::Conn.sasl_bind, which
|
102
|
+
can take :authzid, :authcid, and :realm (and corresponding strings),
|
103
|
+
for SASL authentication.
|
104
|
+
|
105
|
+
Also, refactored the rb_scan_args inside rb_ldap_conn_sasl_bind to use
|
106
|
+
C's case fallthrough, leading to less code repetition.
|
107
|
+
|
108
|
+
Tnahks to Anthony M. Martinez.
|
109
|
+
|
110
|
+
|
111
|
+
0.9.10
|
112
|
+
-----
|
113
|
+
|
114
|
+
Added controls and referral extraction to #search_ext and #search_ext2.
|
115
|
+
Thanks to Michael Granger.
|
116
|
+
|
117
|
+
|
118
|
+
0.9.9
|
119
|
+
-----
|
120
|
+
|
121
|
+
Supported OpenLDAP 2.4.15 and higher. Thanks to Milos Jakubicek.
|
122
|
+
Gem Packaging Support. Thanks to S. Potter [mbbx6spp].
|
123
|
+
|
124
|
+
|
125
|
+
0.9.8
|
126
|
+
-----
|
127
|
+
|
128
|
+
Supported Ruby 1.9.x.
|
129
|
+
|
130
|
+
|
131
|
+
0.9.7
|
132
|
+
-----
|
133
|
+
|
134
|
+
LDAP_MOD_DELETE and LDAP_MOD_REPLACE were reversed in win/winldap.h, so
|
135
|
+
deletion and replacement operations did not work on Win32 systems.
|
136
|
+
|
137
|
+
|
138
|
+
0.9.6
|
139
|
+
-----
|
140
|
+
|
141
|
+
A segfault on FreeBSD when using AMD64 was fixed for this release.
|
142
|
+
|
143
|
+
The only other changes are minor clarifications of the documentation.
|
144
|
+
|
145
|
+
|
146
|
+
0.9.5
|
147
|
+
-----
|
148
|
+
|
149
|
+
The Windows build is now believed to work out of the box. It has been tested
|
150
|
+
on Windows XP SP2, using SVC C++ 6.0 to build the software. Thanks to Chris
|
151
|
+
Scharf <scharfie@gmail.com> for his work in this area and willingness to work
|
152
|
+
with me on fixing the problems.
|
153
|
+
|
154
|
+
|
155
|
+
0.9.4
|
156
|
+
-----
|
157
|
+
|
158
|
+
LDAP::Conn#search, LDAP::Conn#search2, LDAP::Conn#search_ext and
|
159
|
+
LDAP::Conn#search_ext2 have been modified to treat LDAP_SIZELIMIT_EXCEEDED as
|
160
|
+
success.
|
161
|
+
|
162
|
+
After using any of these four methods, the user should use LDAP::Conn#err to
|
163
|
+
check whether the error status of the Conn object is
|
164
|
+
LDAP::LDAP_SIZELIMIT_EXCEEDED. If true, the results set has been truncated by
|
165
|
+
the server.
|
166
|
+
|
167
|
+
Previously, LDAP_SIZELIMIT_EXCEEDED would raise an exception and no results
|
168
|
+
would be returned, which is not the correct behaviour if the user has
|
169
|
+
deliberately put a limit on the number of results to be returned, as might be
|
170
|
+
done in order to spare the server.
|
171
|
+
|
172
|
+
|
173
|
+
0.9.3
|
174
|
+
-----
|
175
|
+
|
176
|
+
The usability of the library on Windows platforms is currently a case of 'suck
|
177
|
+
it and see'. Some people report the code working, others report immediate
|
178
|
+
segfaults; yet others say that it worked after they made some minor
|
179
|
+
alterations to the code in order to get it to build.
|
180
|
+
|
181
|
+
Differences in Windows platform used, chosen compiler and version, plus the
|
182
|
+
variety of servers with which the code is used, conspire to result in the
|
183
|
+
exact facts of the matter not yet having been ascertained.
|
184
|
+
|
185
|
+
Most people seemed to experience some difficulty in getting the code to build
|
186
|
+
on Windows, so some effort has gone into making this better for the 0.9.3
|
187
|
+
release. This work is difficult, since I do not have a Windows build
|
188
|
+
environment at my disposal.
|
189
|
+
|
190
|
+
If you are a Windows user and you found that the code did not work in its
|
191
|
+
original form, but you managed to get it to work after some alterations, I
|
192
|
+
would be very grateful if you wrote to me to let me know what changes were
|
193
|
+
needed. Please include precise details of your build platform.
|
data/README
ADDED
@@ -0,0 +1,279 @@
|
|
1
|
+
# Ruby/LDAP3 -- A Ruby extension library for LDAP
|
2
|
+
|
3
|
+
## FORKED from bearded/ruby-ldap v0.9.20 to support Ruby 3.x
|
4
|
+
|
5
|
+
## IMPORTANT: This software may not be actively maintained!
|
6
|
+
|
7
|
+
Copyright (C) 2000-2004 Takaaki Tateishi <ttate@users.sourceforge.net>
|
8
|
+
Copyright (C) 2005-2006 Ian Macdonald <ian@caliban.org>
|
9
|
+
Copyright (C) 2009 Alexey Chebotar <alexey.chebotar@gmail.com>
|
10
|
+
-------------------------------------------------------------------------------
|
11
|
+
|
12
|
+
DESCRIPTION
|
13
|
+
|
14
|
+
Ruby/LDAP is a Ruby extension library that provides an interface to the LDAP
|
15
|
+
API as described in RFC1823.
|
16
|
+
-------------------------------------------------------------------------------
|
17
|
+
|
18
|
+
REQUIREMENT
|
19
|
+
|
20
|
+
* Ruby 3.x
|
21
|
+
* OpenLDAP, Netscape SDK, Windows 2003 or Windows XP
|
22
|
+
-------------------------------------------------------------------------------
|
23
|
+
|
24
|
+
PORTS
|
25
|
+
|
26
|
+
* FreeBSD ("Akinori -Aki- MUSHA" <knu@idaemons.org>)
|
27
|
+
* Debian (Akira Yamada <akira@ruby-lang.org>)
|
28
|
+
-------------------------------------------------------------------------------
|
29
|
+
|
30
|
+
BUILDING
|
31
|
+
|
32
|
+
extconf.rb will try to use the OpenLDAP 2 or Netscape SDK libraries and guess
|
33
|
+
paths to some header files and libraries from the position of ldap.h. If you'd
|
34
|
+
like to see the available options for extconf.rb, run it with '--help' option.
|
35
|
+
|
36
|
+
$ ruby extconf.rb [--with-openldap1|--with-openldap2|--with-netscape|--with-wldap32]
|
37
|
+
$ make
|
38
|
+
|
39
|
+
This will create ldap.so, which you can either manually copy into place or
|
40
|
+
install with:
|
41
|
+
|
42
|
+
$ make install
|
43
|
+
|
44
|
+
If you're building the software on Windows, you may need to use nmake instead
|
45
|
+
of make.
|
46
|
+
-------------------------------------------------------------------------------
|
47
|
+
|
48
|
+
LICENSE
|
49
|
+
|
50
|
+
See COPYING.
|
51
|
+
-------------------------------------------------------------------------------
|
52
|
+
|
53
|
+
AVAILABLE CLASSES and METHODS
|
54
|
+
|
55
|
+
LDAP::LDAP_VERSION
|
56
|
+
LDAP::LDAP_MAX_VERSION
|
57
|
+
LDAP::VERSION
|
58
|
+
LDAP::MAJOR_VERSION
|
59
|
+
LDAP::MINOR_VERSION
|
60
|
+
LDAP::LDAP_PORT
|
61
|
+
LDAP::LDAPS_PORT
|
62
|
+
LDAP::LDAP_API_INFO_VERSION
|
63
|
+
LDAP::LDAP_VENDOR_NAME
|
64
|
+
LDAP::LDAP_VENDOR_VERSION
|
65
|
+
LDAP::LDAP_API_VERSION
|
66
|
+
LDAP.err2string(errcode)
|
67
|
+
LDAP.dn2ufn(dn)
|
68
|
+
LDAP.mod(mod_op, mod_type, mod_vals) (= LDAP::Mod.new)
|
69
|
+
LDAP.hash2mods(mod_op, hash)
|
70
|
+
LDAP.entry2hash(entry) (= entry.to_hash)
|
71
|
+
LDAP::Conn.new(host = "localhost", port = LDAP::LDAP_PORT)
|
72
|
+
: conn (raise LDAP::Error)
|
73
|
+
LDAP::Conn.open(host = "localhost", port = LDAP::LDAP_PORT)
|
74
|
+
: conn (raise LDAP::Error)
|
75
|
+
LDAP::Conn#simple_bind(dn = nil, password = nil) { ... }
|
76
|
+
: conn (raise LDAP::ResultError)
|
77
|
+
LDAP::Conn#bind(dn = nil, password = nil,
|
78
|
+
method = LDAP::LDAP_AUTH_SIMPLE) {|conn| ... }
|
79
|
+
(raise LDAP::ResultError)
|
80
|
+
LDAP::Conn#bind(dn = nil, password = nil,
|
81
|
+
method = LDAP::LDAP_AUTH_SIMPLE) : conn
|
82
|
+
(raise LDAP::ResultError)
|
83
|
+
LDAP::Conn#sasl_bind(dn = nil, mech = nil, cred = nil,
|
84
|
+
sctrls=nil, cctrls=nil) {|conn| ... }
|
85
|
+
(raise LDAP::ResultError)
|
86
|
+
LDAP::Conn#sasl_bind(dn = nil, mech = nil, cred = nil,
|
87
|
+
sctrls=nil, cctrls=nil) : conn
|
88
|
+
(raise LDAP::ResultError)
|
89
|
+
LDAP::Conn#bound? : true || false
|
90
|
+
LDAP::Conn#unbind() (raise LDAP::ResultError)
|
91
|
+
LDAP::Conn#start_tls
|
92
|
+
LDAP::Conn#perror(str)
|
93
|
+
LDAP::Conn#result2error(ldap_msg) : errcode
|
94
|
+
LDAP::Conn#err2string(errcode) : errmsg
|
95
|
+
LDAP::Conn#get_errno : errcode [if available]
|
96
|
+
LDAP::Conn#search(basedn, scope, filter, attrs = nil, attrsonly = false,
|
97
|
+
sec = 0, usec = 0,
|
98
|
+
s_attr = nil, s_proc = nil) {|entry| ... }
|
99
|
+
: conn (raise LDAP::ResultError)
|
100
|
+
LDAP::Conn#search2(basedn, scope, filter, attrs = nil, attrsonly = false,
|
101
|
+
sec = 0, usec = 0,
|
102
|
+
s_attr = nil, s_proc = nil) {|entry_as_hash| ... }
|
103
|
+
: conn (if a block is given) /
|
104
|
+
Array of Hash (if no block is given)
|
105
|
+
(raise LDAP::ResultError)
|
106
|
+
LDAP::Conn#search_ext(basedn, scope, filter, attrs = nil,
|
107
|
+
attrsonly = false, serverctrls, clientctrls,
|
108
|
+
sec = 0, usec = 0,
|
109
|
+
s_attr = nil, s_proc = nil) {|entry| ... }
|
110
|
+
: conn (raise LDAP::ResultError)
|
111
|
+
LDAP::Conn#search_ext2(basedn, scope, filter, attrs = nil,
|
112
|
+
attrsonly = false,
|
113
|
+
serverctrls, clientctrls, sec = 0, usec = 0,
|
114
|
+
s_attr = nil, s_proc = nil) {|entry_as_hash| ... }
|
115
|
+
: conn (if a block is given) /
|
116
|
+
Array of Hash (if no block is given)
|
117
|
+
(raise LDAP::ResultError)
|
118
|
+
LDAP::Conn#add(dn, ldap_mods) : self (raise LDAP::ResultError)
|
119
|
+
LDAP::Conn#add_ext(dn, ldap_mods, serverctrls, clientctrls)
|
120
|
+
: self (raise LDAP::ResultError)
|
121
|
+
LDAP::Conn#modify(dn, ldap_mods) : self (raise LDAP::ResultError)
|
122
|
+
LDAP::Conn#modify_ext(dn, ldap_mods, serverctrls, clientctrls)
|
123
|
+
: self (raise LDAP::ResultError)
|
124
|
+
LDAP::Conn#modrdn(olddn, newdn, delete) : self (raise LDAP::ResultError)
|
125
|
+
LDAP::Conn#delete(dn) : self (raise LDAP::ResultError)
|
126
|
+
LDAP::Conn#delete(dn, serverctrls, clientctrls) : self
|
127
|
+
(raise LDAP::ResultError)
|
128
|
+
LDAP::Conn#compare(dn, attr, val) : self
|
129
|
+
LDAP::Conn#compare_ext(dn, attr, val, serverctrls, clientctrls) : self
|
130
|
+
LDAP::Conn#set_option(opt, data) : self (raise LDAP::ResultError)
|
131
|
+
LDAP::Conn#get_option(opt) : data (raise LDAP::ResultError)
|
132
|
+
LDAP::Conn#schema(base = nil, attrs = nil,
|
133
|
+
sec = 0, usec = 0) : LDAP::Schema
|
134
|
+
LDAP::Conn#root_dse(attrs = nil, sec = 0, usec = 0) : Array of Hash
|
135
|
+
LDAP::SSLConn.new(host = 'localhost', port = LDAP_PORT,
|
136
|
+
start_tls = false, sctrls=nil, cctrls=nil)
|
137
|
+
: conn (raise LDAP::Error)
|
138
|
+
LDAP::Mod.new(mod_op, mod_type, mod_vals) : ldap_mod
|
139
|
+
LDAP::Mod#inspect : String
|
140
|
+
LDAP::Mod#mod_op : mod_op
|
141
|
+
LDAP::Mod#mod_type : mod_type
|
142
|
+
LDAP::Mod#mod_vals : mod_vals
|
143
|
+
LDAP::Mod#mod_op=(mod_op)
|
144
|
+
LDAP::Mod#mod_type=(mod_type)
|
145
|
+
LDAP::Mod#mod_vals=(mod_vals)
|
146
|
+
LDAP::Entry#get_dn : dn
|
147
|
+
LDAP::Entry#get_values : vals
|
148
|
+
LDAP::Entry#get_attributes : attrs
|
149
|
+
LDAP::Entry#dn (= get_dn)
|
150
|
+
LDAP::Entry#vals (= get_values)
|
151
|
+
LDAP::Entry#[] (= get_values)
|
152
|
+
LDAP::Entry#attrs (= get_attributes)
|
153
|
+
LDAP::Entry#to_hash : Hash
|
154
|
+
LDAP::Entry#inspect : String
|
155
|
+
LDAP::Control.new : LDAP::Control
|
156
|
+
LDAP::Control#oid : String
|
157
|
+
LDAP::Control#oid=(oid) : oid
|
158
|
+
LDAP::Control#critical : true || false
|
159
|
+
LDAP::Control#critical? : true || false
|
160
|
+
LDAP::Control#critical=(crit) : crit
|
161
|
+
LDAP::Control#value : String
|
162
|
+
LDAP::Control#value=(val) : val
|
163
|
+
LDAP::Control#inspect : String
|
164
|
+
|
165
|
+
SSLConn is a subclass of Conn, so its objects have access to the same methods
|
166
|
+
as Conn objects.
|
167
|
+
|
168
|
+
In ldap/schema.rb:
|
169
|
+
|
170
|
+
LDAP::Conn#schema(attrs = nil, sec = 0, usec = 0) : schema
|
171
|
+
LDAP::Schema#must(oc) : attributes
|
172
|
+
LDAP::Schema#may(oc) : attributes
|
173
|
+
LDAP::Schema#names(attr) : names
|
174
|
+
LDAP::Schema#sup(oc) : object class
|
175
|
+
|
176
|
+
In ldap/control.rb:
|
177
|
+
|
178
|
+
LDAP::Control.encode(array) : String
|
179
|
+
LDAP::Control#decode : Array
|
180
|
+
|
181
|
+
In ldap/ldif.rb:
|
182
|
+
|
183
|
+
LDAP::Entry#to_ldif : LDAP::LDIF::Entry
|
184
|
+
LDAP::Entry#to_s : Alias of LDAP::Entry#to_ldif
|
185
|
+
LDAP::Mod#to_ldif(dn) : LDAP::LDIF::Mod
|
186
|
+
LDAP::Mod#to_s(dn) : Alias of LDAP::Mod#to_ldif
|
187
|
+
LDAP::Record.new(dn, change_type, attrs, mods=nil, ctrls=nil)
|
188
|
+
LDAP::Record#send(conn) : self
|
189
|
+
LDAP::Record#clean : self
|
190
|
+
LDAP::LDIF.mods_to_ldif( dn, *mods )
|
191
|
+
LDAP::LDIF.parse_entry(lines) : LDAP::Record (raise LDAP::LDIFError)
|
192
|
+
LDAP::LDIF.parse_file(file, sort=false)
|
193
|
+
: self (if a block is given) /
|
194
|
+
Array (if no block is given)
|
195
|
+
|
196
|
+
See also test/*.rb for examples.
|
197
|
+
-------------------------------------------------------------------------------
|
198
|
+
|
199
|
+
REFERENCES
|
200
|
+
|
201
|
+
* T. Howes, M. Smith (University of Michigan): RFC1823, The LDAP Application
|
202
|
+
Program Interface, August 1995
|
203
|
+
* T. Howes (University of Michigan): RFC1960, A String Representation of LDAP
|
204
|
+
Search Filters, June 1996
|
205
|
+
* M. Wahl, Critical Angle Inc, T. Hows, Netscape Communications Gorp., S.
|
206
|
+
Kille, Isode Limited: Lightweight Directory Access Protocol (v3), December
|
207
|
+
1997
|
208
|
+
* M. Wahl, Critical Angle Inc., A. Coulbeck, Isode Inc., T. Howes, Netscape
|
209
|
+
Communications Corp., S. Kille, Isode Limited: December 1997
|
210
|
+
* M .Wahl, Critical Angle Inc., S. Kille, Isode Ltd., T. Howes, Netscape
|
211
|
+
Communications Corp.: Lightweight Directory Access Protocol (v3): UTF-8
|
212
|
+
String Representation of Distinguished Names, December 1997
|
213
|
+
* T. Howes, Netscape Communications Gorp.: The String Representation of LDAP
|
214
|
+
Search Filters, December 1997
|
215
|
+
* F. Yergeau (Alis Technologies): RFC2279, UTF-8, a transformation format of
|
216
|
+
ISO 10646, October 1998
|
217
|
+
* Netscape Communications Corp.: Netscape Directory SDK
|
218
|
+
* C. Weider, A. Herron, A. Anantha, T. Howes: RFC2696, LDAP Control
|
219
|
+
Extension for Simple Paged Results Manipulation, September 1999
|
220
|
+
* Luiz Ernesto Pinheiro Malere: LDAP Linux HOWTO, February 2000
|
221
|
+
* G. Good: RFC2849, The LDAP Data Interchange Format (LDIF) - Technical
|
222
|
+
Specification, June 2000.
|
223
|
+
* Tim Howes, Mark Smith: Understanding and Deploying LDAP Directory Servers
|
224
|
+
* The OpenLDAP Project: OpenLDAP 2.2 Administrator's Guide, February 2004
|
225
|
+
|
226
|
+
Here are some URLs that contain useful information about LDAP:
|
227
|
+
|
228
|
+
* University of Michigan
|
229
|
+
http://www.umich.edu/~dirsvcs/ldap/
|
230
|
+
* OpenLDAP Project
|
231
|
+
http://www.openldap.org/
|
232
|
+
* Netscape Communications
|
233
|
+
http://developer.netscape.com/docs/manuals/communicator/ldap45.htm
|
234
|
+
* Netscape Directory SDK
|
235
|
+
https://wiki.mozilla.org/Directory
|
236
|
+
* Active Directory Service Interfaces Overview
|
237
|
+
http://www.microsoft.com/windows2000/techinfo/howitworks/activedirectory/
|
238
|
+
adsilinks.asp
|
239
|
+
* LDAP schema repository
|
240
|
+
http://www.hklc.com/ldapschema/
|
241
|
+
http://ldap.hklc.com/
|
242
|
+
* Object Identifiers Registry
|
243
|
+
http://www.alvestrand.no/harald/objectid/
|
244
|
+
-------------------------------------------------------------------------------
|
245
|
+
|
246
|
+
THANKS
|
247
|
+
|
248
|
+
This list maybe not correct. If you notice mistakes of this list, please point out.
|
249
|
+
|
250
|
+
* Adam Doligalski
|
251
|
+
* Akinori MUSHA
|
252
|
+
* Akira Yamada
|
253
|
+
* Andrew Broman
|
254
|
+
* Anthony M. Martinez
|
255
|
+
* Antonio Terceiro
|
256
|
+
* Aprotim Sanyal
|
257
|
+
* Brian Leake
|
258
|
+
* Chris Scharf
|
259
|
+
* David Campbell
|
260
|
+
* Francesco Malvezzi
|
261
|
+
* Hadmut Danisch
|
262
|
+
* Hiroki Najima
|
263
|
+
* Jan Mikkelsen
|
264
|
+
* Kouhei Sutou
|
265
|
+
* Marek Veber
|
266
|
+
* Mark Kittisopikul
|
267
|
+
* Michael Granger
|
268
|
+
* Milos Jakubicek
|
269
|
+
* Pirmin Kalberer
|
270
|
+
* Radek Hnilica
|
271
|
+
* S. Potter
|
272
|
+
* SUENAGA Hiroki
|
273
|
+
* Tilo Sloboda
|
274
|
+
* Usa Nakamura
|
275
|
+
* Yuri Arabadji
|
276
|
+
* Yuuzou Gotou
|
277
|
+
* atsu@@metallic.co.jp
|
278
|
+
* bbense
|
279
|
+
* bidon
|
data/TODO
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
-*- text -*-
|
2
|
+
|
3
|
+
To-do list
|
4
|
+
----------
|
5
|
+
|
6
|
+
- Support for more LDAPv3 controls and extensions.
|
7
|
+
|
8
|
+
- DSML support.
|
9
|
+
|
10
|
+
- (?) adding ldap_url_search_s(), ldap_url_search_st() and
|
11
|
+
ldap_is_ldap_url()
|
12
|
+
|
13
|
+
- Asynchronous functions.
|
14
|
+
|
15
|
+
- Correctly implement SASL functions.
|