fakeldap 0.0.1 → 0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +7 -1
- data/lib/fakeldap.rb +133 -10
- data/lib/fakeldap/version.rb +1 -1
- metadata +50 -191
- data/vendor/ruby-ldapserver/COPYING +0 -27
- data/vendor/ruby-ldapserver/ChangeLog +0 -83
- data/vendor/ruby-ldapserver/Manifest.txt +0 -32
- data/vendor/ruby-ldapserver/README +0 -222
- data/vendor/ruby-ldapserver/Rakefile +0 -22
- data/vendor/ruby-ldapserver/doc/LDAP.html +0 -104
- data/vendor/ruby-ldapserver/doc/LDAP/Abandon.html +0 -112
- data/vendor/ruby-ldapserver/doc/LDAP/Error.html +0 -115
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError.html +0 -241
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AdminLimitExceeded.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AffectsMultipleDSAs.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AliasDereferencingProblem.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AliasProblem.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AttributeOrValueExists.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AuthMethodNotSupported.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Busy.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/CompareFalse.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/CompareTrue.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ConfidentialityRequired.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ConstraintViolation.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/EntryAlreadyExists.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InappropriateAuthentication.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InappropriateMatching.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InsufficientAccessRights.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InvalidAttributeSyntax.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InvalidCredentials.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InvalidDNSyntax.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/IsLeaf.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/LoopDetect.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NamingViolation.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NoSuchAttribute.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NoSuchObject.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NotAllowedOnNonLeaf.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NotAllowedOnRDN.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ObjectClassModsProhibited.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ObjectClassViolation.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/OperationsError.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Other.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ProtocolError.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Referral.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/SaslBindInProgress.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/SizeLimitExceeded.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/StrongAuthRequired.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Success.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/TimeLimitExceeded.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Unavailable.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/UnavailableCriticalExtension.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/UndefinedAttributeType.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/ResultError/UnwillingToPerform.html +0 -158
- data/vendor/ruby-ldapserver/doc/LDAP/Server.html +0 -1056
- data/vendor/ruby-ldapserver/doc/LDAP/Server/Connection.html +0 -1353
- data/vendor/ruby-ldapserver/doc/LDAP/Server/Filter.html +0 -634
- data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule.html +0 -1132
- data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/DefaultMatchingClass.html +0 -219
- data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/Equality.html +0 -170
- data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/IA5Downcase.html +0 -143
- data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/IA5Trim.html +0 -155
- data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/Integer.html +0 -143
- data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/Ordering.html +0 -212
- data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/StringDowncase.html +0 -143
- data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/StringTrim.html +0 -154
- data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/Substrings.html +0 -177
- data/vendor/ruby-ldapserver/doc/LDAP/Server/Operation.html +0 -2994
- data/vendor/ruby-ldapserver/doc/LDAP/Server/Schema.html +0 -2024
- data/vendor/ruby-ldapserver/doc/LDAP/Server/Schema/AttributeType.html +0 -1462
- data/vendor/ruby-ldapserver/doc/LDAP/Server/Schema/ObjectClass.html +0 -1097
- data/vendor/ruby-ldapserver/doc/LDAP/Server/Syntax.html +0 -1254
- data/vendor/ruby-ldapserver/doc/LDAP/Server/VERSION.html +0 -134
- data/vendor/ruby-ldapserver/doc/_index.html +0 -662
- data/vendor/ruby-ldapserver/doc/class_list.html +0 -36
- data/vendor/ruby-ldapserver/doc/css/common.css +0 -1
- data/vendor/ruby-ldapserver/doc/css/full_list.css +0 -50
- data/vendor/ruby-ldapserver/doc/css/style.css +0 -303
- data/vendor/ruby-ldapserver/doc/file.README.html +0 -399
- data/vendor/ruby-ldapserver/doc/file_list.html +0 -38
- data/vendor/ruby-ldapserver/doc/frames.html +0 -13
- data/vendor/ruby-ldapserver/doc/index.html +0 -399
- data/vendor/ruby-ldapserver/doc/js/app.js +0 -204
- data/vendor/ruby-ldapserver/doc/js/full_list.js +0 -112
- data/vendor/ruby-ldapserver/doc/js/jquery.js +0 -154
- data/vendor/ruby-ldapserver/doc/method_list.html +0 -1571
- data/vendor/ruby-ldapserver/doc/top-level-namespace.html +0 -88
- data/vendor/ruby-ldapserver/examples/README +0 -89
- data/vendor/ruby-ldapserver/examples/mkcert.rb +0 -31
- data/vendor/ruby-ldapserver/examples/rbslapd1.rb +0 -111
- data/vendor/ruby-ldapserver/examples/rbslapd2.rb +0 -161
- data/vendor/ruby-ldapserver/examples/rbslapd3.rb +0 -172
- data/vendor/ruby-ldapserver/examples/speedtest.rb +0 -37
- data/vendor/ruby-ldapserver/lib/ldap/server.rb +0 -4
- data/vendor/ruby-ldapserver/lib/ldap/server/connection.rb +0 -276
- data/vendor/ruby-ldapserver/lib/ldap/server/filter.rb +0 -223
- data/vendor/ruby-ldapserver/lib/ldap/server/match.rb +0 -283
- data/vendor/ruby-ldapserver/lib/ldap/server/operation.rb +0 -487
- data/vendor/ruby-ldapserver/lib/ldap/server/preforkserver.rb +0 -93
- data/vendor/ruby-ldapserver/lib/ldap/server/result.rb +0 -71
- data/vendor/ruby-ldapserver/lib/ldap/server/schema.rb +0 -592
- data/vendor/ruby-ldapserver/lib/ldap/server/server.rb +0 -89
- data/vendor/ruby-ldapserver/lib/ldap/server/syntax.rb +0 -235
- data/vendor/ruby-ldapserver/lib/ldap/server/tcpserver.rb +0 -91
- data/vendor/ruby-ldapserver/lib/ldap/server/util.rb +0 -88
- data/vendor/ruby-ldapserver/lib/ldap/server/version.rb +0 -11
- data/vendor/ruby-ldapserver/test/core.schema +0 -582
- data/vendor/ruby-ldapserver/test/encoding_test.rb +0 -279
- data/vendor/ruby-ldapserver/test/filter_test.rb +0 -107
- data/vendor/ruby-ldapserver/test/match_test.rb +0 -59
- data/vendor/ruby-ldapserver/test/schema_test.rb +0 -113
- data/vendor/ruby-ldapserver/test/syntax_test.rb +0 -40
- data/vendor/ruby-ldapserver/test/test_helper.rb +0 -2
- data/vendor/ruby-ldapserver/test/util_test.rb +0 -51
@@ -1,2994 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<meta name="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<title>Class: LDAP::Server::Operation</title>
|
7
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
-
|
10
|
-
<script type="text/javascript" charset="utf-8">
|
11
|
-
relpath = '../..';
|
12
|
-
if (relpath != '') relpath += '/';
|
13
|
-
</script>
|
14
|
-
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
16
|
-
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<script type="text/javascript" charset="utf-8">
|
20
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
21
|
-
</script>
|
22
|
-
|
23
|
-
<div id="header">
|
24
|
-
<div id="menu">
|
25
|
-
|
26
|
-
<a href="../../_index.html">Index (O)</a> »
|
27
|
-
<span class='title'><span class='object_link'><a href="../../LDAP.html" title="LDAP (module)">LDAP</a></span></span> » <span class='title'><span class='object_link'><a href="../Server.html" title="LDAP::Server (class)">Server</a></span></span>
|
28
|
-
»
|
29
|
-
<span class="title">Operation</span>
|
30
|
-
|
31
|
-
|
32
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="search">
|
36
|
-
<a id="class_list_link" href="#">Class List</a>
|
37
|
-
<a id="method_list_link" href="#">Method List</a>
|
38
|
-
<a id ="file_list_link" href="#">File List</a>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<div class="clear"></div>
|
42
|
-
</div>
|
43
|
-
|
44
|
-
<iframe id="search_frame"></iframe>
|
45
|
-
|
46
|
-
<div id="content"><h1>Class: LDAP::Server::Operation
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
</h1>
|
51
|
-
|
52
|
-
<dl class="box">
|
53
|
-
|
54
|
-
<dt class="r1">Inherits:</dt>
|
55
|
-
<dd class="r1">
|
56
|
-
<span class="inheritName">Object</span>
|
57
|
-
|
58
|
-
<ul class="fullTree">
|
59
|
-
<li>Object</li>
|
60
|
-
|
61
|
-
<li class="next">LDAP::Server::Operation</li>
|
62
|
-
|
63
|
-
</ul>
|
64
|
-
<a href="#" class="inheritanceTree">show all</a>
|
65
|
-
|
66
|
-
</dd>
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
<dt class="r2 last">Defined in:</dt>
|
77
|
-
<dd class="r2 last">lib/ldap/server/operation.rb<span class="defines">,<br />
|
78
|
-
lib/ldap/server/util.rb</span>
|
79
|
-
</dd>
|
80
|
-
|
81
|
-
</dl>
|
82
|
-
<div class="clear"></div>
|
83
|
-
|
84
|
-
<h2>Overview</h2><div class="docstring">
|
85
|
-
<div class="discussion">
|
86
|
-
<p>
|
87
|
-
Object to handle a single LDAP request. Typically you would subclass this
|
88
|
-
object and override methods ‘simple_bind’, ‘search’
|
89
|
-
etc. The do_xxx methods are internal, and handle the parsing of requests
|
90
|
-
and the sending of responses.
|
91
|
-
</p>
|
92
|
-
|
93
|
-
|
94
|
-
</div>
|
95
|
-
</div>
|
96
|
-
<div class="tags">
|
97
|
-
|
98
|
-
</div>
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
<h2>
|
103
|
-
Class Method Summary
|
104
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
105
|
-
</h2>
|
106
|
-
|
107
|
-
<ul class="summary">
|
108
|
-
|
109
|
-
<li class="public ">
|
110
|
-
<span class="summary_signature">
|
111
|
-
|
112
|
-
<a href="#join_dn-class_method" title="join_dn (class method)">+ (Object) <strong>join_dn</strong>(elements) </a>
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
</span>
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
<span class="summary_desc"><div class='inline'><p>
|
126
|
-
Reverse of split_dn.
|
127
|
-
</p>
|
128
|
-
</div></span>
|
129
|
-
|
130
|
-
</li>
|
131
|
-
|
132
|
-
|
133
|
-
<li class="public ">
|
134
|
-
<span class="summary_signature">
|
135
|
-
|
136
|
-
<a href="#split_dn-class_method" title="split_dn (class method)">+ (Object) <strong>split_dn</strong>(dn) </a>
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
</span>
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
<span class="summary_desc"><div class='inline'><p>
|
150
|
-
Split dn string into its component parts, returning.
|
151
|
-
</p>
|
152
|
-
</div></span>
|
153
|
-
|
154
|
-
</li>
|
155
|
-
|
156
|
-
|
157
|
-
</ul>
|
158
|
-
|
159
|
-
<h2>
|
160
|
-
Instance Method Summary
|
161
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
162
|
-
</h2>
|
163
|
-
|
164
|
-
<ul class="summary">
|
165
|
-
|
166
|
-
<li class="public ">
|
167
|
-
<span class="summary_signature">
|
168
|
-
|
169
|
-
<a href="#add-instance_method" title="#add (instance method)">- (Object) <strong>add</strong>(dn, av) </a>
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
</span>
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
<span class="summary_desc"><div class='inline'><p>
|
183
|
-
Handle an add request; override this.
|
184
|
-
</p>
|
185
|
-
</div></span>
|
186
|
-
|
187
|
-
</li>
|
188
|
-
|
189
|
-
|
190
|
-
<li class="public ">
|
191
|
-
<span class="summary_signature">
|
192
|
-
|
193
|
-
<a href="#anonymous%3F-instance_method" title="#anonymous? (instance method)">- (Boolean) <strong>anonymous?</strong> </a>
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
</span>
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
<span class="summary_desc"><div class='inline'><p>
|
207
|
-
Return true if connection is not authenticated.
|
208
|
-
</p>
|
209
|
-
</div></span>
|
210
|
-
|
211
|
-
</li>
|
212
|
-
|
213
|
-
|
214
|
-
<li class="public ">
|
215
|
-
<span class="summary_signature">
|
216
|
-
|
217
|
-
<a href="#attributelist-instance_method" title="#attributelist (instance method)">- (Object) <strong>attributelist</strong>(set) </a>
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
</span>
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
<span class="summary_desc"><div class='inline'><p>
|
231
|
-
reformat ASN1 into attr=>[vals].
|
232
|
-
</p>
|
233
|
-
</div></span>
|
234
|
-
|
235
|
-
</li>
|
236
|
-
|
237
|
-
|
238
|
-
<li class="public ">
|
239
|
-
<span class="summary_signature">
|
240
|
-
|
241
|
-
<a href="#compare-instance_method" title="#compare (instance method)">- (Object) <strong>compare</strong>(entry, attr, val) </a>
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
</span>
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
<span class="summary_desc"><div class='inline'><p>
|
255
|
-
Handle a compare request; override this.
|
256
|
-
</p>
|
257
|
-
</div></span>
|
258
|
-
|
259
|
-
</li>
|
260
|
-
|
261
|
-
|
262
|
-
<li class="public ">
|
263
|
-
<span class="summary_signature">
|
264
|
-
|
265
|
-
<a href="#del-instance_method" title="#del (instance method)">- (Object) <strong>del</strong>(dn) </a>
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
</span>
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
<span class="summary_desc"><div class='inline'><p>
|
279
|
-
Handle a del request; override this.
|
280
|
-
</p>
|
281
|
-
</div></span>
|
282
|
-
|
283
|
-
</li>
|
284
|
-
|
285
|
-
|
286
|
-
<li class="public ">
|
287
|
-
<span class="summary_signature">
|
288
|
-
|
289
|
-
<a href="#do_add-instance_method" title="#do_add (instance method)">- (Object) <strong>do_add</strong>(protocolOp, controls) </a>
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
</span>
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
<span class="summary_desc"><div class='inline'><p>
|
303
|
-
:nodoc:.
|
304
|
-
</p>
|
305
|
-
</div></span>
|
306
|
-
|
307
|
-
</li>
|
308
|
-
|
309
|
-
|
310
|
-
<li class="public ">
|
311
|
-
<span class="summary_signature">
|
312
|
-
|
313
|
-
<a href="#do_bind-instance_method" title="#do_bind (instance method)">- (Object) <strong>do_bind</strong>(protocolOp, controls) </a>
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
</span>
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
<span class="summary_desc"><div class='inline'><p>
|
327
|
-
######################################## # Methods to parse each request
|
328
|
-
type ### ########################################.
|
329
|
-
</p>
|
330
|
-
</div></span>
|
331
|
-
|
332
|
-
</li>
|
333
|
-
|
334
|
-
|
335
|
-
<li class="public ">
|
336
|
-
<span class="summary_signature">
|
337
|
-
|
338
|
-
<a href="#do_compare-instance_method" title="#do_compare (instance method)">- (Object) <strong>do_compare</strong>(protocolOp, controls) </a>
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
</span>
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
<span class="summary_desc"><div class='inline'><p>
|
352
|
-
:nodoc:.
|
353
|
-
</p>
|
354
|
-
</div></span>
|
355
|
-
|
356
|
-
</li>
|
357
|
-
|
358
|
-
|
359
|
-
<li class="public ">
|
360
|
-
<span class="summary_signature">
|
361
|
-
|
362
|
-
<a href="#do_del-instance_method" title="#do_del (instance method)">- (Object) <strong>do_del</strong>(protocolOp, controls) </a>
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
</span>
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
<span class="summary_desc"><div class='inline'><p>
|
376
|
-
:nodoc:.
|
377
|
-
</p>
|
378
|
-
</div></span>
|
379
|
-
|
380
|
-
</li>
|
381
|
-
|
382
|
-
|
383
|
-
<li class="public ">
|
384
|
-
<span class="summary_signature">
|
385
|
-
|
386
|
-
<a href="#do_modify-instance_method" title="#do_modify (instance method)">- (Object) <strong>do_modify</strong>(protocolOp, controls) </a>
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
</span>
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
<span class="summary_desc"><div class='inline'><p>
|
400
|
-
:nodoc:.
|
401
|
-
</p>
|
402
|
-
</div></span>
|
403
|
-
|
404
|
-
</li>
|
405
|
-
|
406
|
-
|
407
|
-
<li class="public ">
|
408
|
-
<span class="summary_signature">
|
409
|
-
|
410
|
-
<a href="#do_modifydn-instance_method" title="#do_modifydn (instance method)">- (Object) <strong>do_modifydn</strong>(protocolOp, controls) </a>
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
</span>
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
<span class="summary_desc"><div class='inline'><p>
|
424
|
-
:nodoc:.
|
425
|
-
</p>
|
426
|
-
</div></span>
|
427
|
-
|
428
|
-
</li>
|
429
|
-
|
430
|
-
|
431
|
-
<li class="public ">
|
432
|
-
<span class="summary_signature">
|
433
|
-
|
434
|
-
<a href="#do_search-instance_method" title="#do_search (instance method)">- (Object) <strong>do_search</strong>(protocolOp, controls) </a>
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
</span>
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
<span class="summary_desc"><div class='inline'><p>
|
448
|
-
:nodoc:.
|
449
|
-
</p>
|
450
|
-
</div></span>
|
451
|
-
|
452
|
-
</li>
|
453
|
-
|
454
|
-
|
455
|
-
<li class="public ">
|
456
|
-
<span class="summary_signature">
|
457
|
-
|
458
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Operation) <strong>initialize</strong>(connection, messageID) </a>
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
</span>
|
463
|
-
|
464
|
-
<span class="note title constructor">constructor</span>
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
<span class="summary_desc"><div class='inline'><p>
|
474
|
-
An instance of this object is created by the Connection object for each
|
475
|
-
operation which is requested by the client.
|
476
|
-
</p>
|
477
|
-
</div></span>
|
478
|
-
|
479
|
-
</li>
|
480
|
-
|
481
|
-
|
482
|
-
<li class="public ">
|
483
|
-
<span class="summary_signature">
|
484
|
-
|
485
|
-
<a href="#log-instance_method" title="#log (instance method)">- (Object) <strong>log</strong>(*args) </a>
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
</span>
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
<span class="summary_desc"><div class='inline'><p>
|
499
|
-
Send a log message.
|
500
|
-
</p>
|
501
|
-
</div></span>
|
502
|
-
|
503
|
-
</li>
|
504
|
-
|
505
|
-
|
506
|
-
<li class="public ">
|
507
|
-
<span class="summary_signature">
|
508
|
-
|
509
|
-
<a href="#log_exception-instance_method" title="#log_exception (instance method)">- (Object) <strong>log_exception</strong>(e) </a>
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
</span>
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
<span class="summary_desc"><div class='inline'><p>
|
523
|
-
Send an exception report to the log.
|
524
|
-
</p>
|
525
|
-
</div></span>
|
526
|
-
|
527
|
-
</li>
|
528
|
-
|
529
|
-
|
530
|
-
<li class="public ">
|
531
|
-
<span class="summary_signature">
|
532
|
-
|
533
|
-
<a href="#modify-instance_method" title="#modify (instance method)">- (Object) <strong>modify</strong>(dn, modification) </a>
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
</span>
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
<span class="summary_desc"><div class='inline'><p>
|
547
|
-
Handle a modify request; override this.
|
548
|
-
</p>
|
549
|
-
</div></span>
|
550
|
-
|
551
|
-
</li>
|
552
|
-
|
553
|
-
|
554
|
-
<li class="public ">
|
555
|
-
<span class="summary_signature">
|
556
|
-
|
557
|
-
<a href="#modifydn-instance_method" title="#modifydn (instance method)">- (Object) <strong>modifydn</strong>(entry, newrdn, deleteoldrdn, newSuperior) </a>
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
</span>
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
<span class="summary_desc"><div class='inline'><p>
|
571
|
-
Handle a modifydn request; override this.
|
572
|
-
</p>
|
573
|
-
</div></span>
|
574
|
-
|
575
|
-
</li>
|
576
|
-
|
577
|
-
|
578
|
-
<li class="public ">
|
579
|
-
<span class="summary_signature">
|
580
|
-
|
581
|
-
<a href="#search-instance_method" title="#search (instance method)">- (Object) <strong>search</strong>(basedn, scope, deref, filter, attrs) </a>
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
</span>
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
<span class="summary_desc"><div class='inline'><p>
|
595
|
-
Handle a search request; override this.
|
596
|
-
</p>
|
597
|
-
</div></span>
|
598
|
-
|
599
|
-
</li>
|
600
|
-
|
601
|
-
|
602
|
-
<li class="public ">
|
603
|
-
<span class="summary_signature">
|
604
|
-
|
605
|
-
<a href="#send_AddResponse-instance_method" title="#send_AddResponse (instance method)">- (Object) <strong>send_AddResponse</strong>(resultCode, opt = {}) </a>
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
</span>
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
619
|
-
|
620
|
-
</li>
|
621
|
-
|
622
|
-
|
623
|
-
<li class="public ">
|
624
|
-
<span class="summary_signature">
|
625
|
-
|
626
|
-
<a href="#send_BindResponse-instance_method" title="#send_BindResponse (instance method)">- (Object) <strong>send_BindResponse</strong>(resultCode, opt = {}) </a>
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
</span>
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
640
|
-
|
641
|
-
</li>
|
642
|
-
|
643
|
-
|
644
|
-
<li class="public ">
|
645
|
-
<span class="summary_signature">
|
646
|
-
|
647
|
-
<a href="#send_CompareResponse-instance_method" title="#send_CompareResponse (instance method)">- (Object) <strong>send_CompareResponse</strong>(resultCode, opt = {}) </a>
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
</span>
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
661
|
-
|
662
|
-
</li>
|
663
|
-
|
664
|
-
|
665
|
-
<li class="public ">
|
666
|
-
<span class="summary_signature">
|
667
|
-
|
668
|
-
<a href="#send_DelResponse-instance_method" title="#send_DelResponse (instance method)">- (Object) <strong>send_DelResponse</strong>(resultCode, opt = {}) </a>
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
</span>
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
682
|
-
|
683
|
-
</li>
|
684
|
-
|
685
|
-
|
686
|
-
<li class="public ">
|
687
|
-
<span class="summary_signature">
|
688
|
-
|
689
|
-
<a href="#send_ExtendedResponse-instance_method" title="#send_ExtendedResponse (instance method)">- (Object) <strong>send_ExtendedResponse</strong>(resultCode, opt = {}) </a>
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
</span>
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
703
|
-
|
704
|
-
</li>
|
705
|
-
|
706
|
-
|
707
|
-
<li class="public ">
|
708
|
-
<span class="summary_signature">
|
709
|
-
|
710
|
-
<a href="#send_LDAPMessage-instance_method" title="#send_LDAPMessage (instance method)">- (Object) <strong>send_LDAPMessage</strong>(protocolOp, opt = {}) </a>
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
</span>
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
<span class="summary_desc"><div class='inline'><p>
|
724
|
-
################################################ # Utility methods to send
|
725
|
-
protocol responses ### ################################################.
|
726
|
-
</p>
|
727
|
-
</div></span>
|
728
|
-
|
729
|
-
</li>
|
730
|
-
|
731
|
-
|
732
|
-
<li class="public ">
|
733
|
-
<span class="summary_signature">
|
734
|
-
|
735
|
-
<a href="#send_LDAPResult-instance_method" title="#send_LDAPResult (instance method)">- (Object) <strong>send_LDAPResult</strong>(tag, resultCode, opt = {}) {|seq| ... }</a>
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
</span>
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
<span class="summary_desc"><div class='inline'><p>
|
749
|
-
:nodoc:.
|
750
|
-
</p>
|
751
|
-
</div></span>
|
752
|
-
|
753
|
-
</li>
|
754
|
-
|
755
|
-
|
756
|
-
<li class="public ">
|
757
|
-
<span class="summary_signature">
|
758
|
-
|
759
|
-
<a href="#send_ModifyDNResponse-instance_method" title="#send_ModifyDNResponse (instance method)">- (Object) <strong>send_ModifyDNResponse</strong>(resultCode, opt = {}) </a>
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
</span>
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
773
|
-
|
774
|
-
</li>
|
775
|
-
|
776
|
-
|
777
|
-
<li class="public ">
|
778
|
-
<span class="summary_signature">
|
779
|
-
|
780
|
-
<a href="#send_ModifyResponse-instance_method" title="#send_ModifyResponse (instance method)">- (Object) <strong>send_ModifyResponse</strong>(resultCode, opt = {}) </a>
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
</span>
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
794
|
-
|
795
|
-
</li>
|
796
|
-
|
797
|
-
|
798
|
-
<li class="public ">
|
799
|
-
<span class="summary_signature">
|
800
|
-
|
801
|
-
<a href="#send_SearchResultDone-instance_method" title="#send_SearchResultDone (instance method)">- (Object) <strong>send_SearchResultDone</strong>(resultCode, opt = {}) </a>
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
</span>
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
815
|
-
|
816
|
-
</li>
|
817
|
-
|
818
|
-
|
819
|
-
<li class="public ">
|
820
|
-
<span class="summary_signature">
|
821
|
-
|
822
|
-
<a href="#send_SearchResultEntry-instance_method" title="#send_SearchResultEntry (instance method)">- (Object) <strong>send_SearchResultEntry</strong>(dn, avs, opt = {}) </a>
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
</span>
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
<span class="summary_desc"><div class='inline'><p>
|
836
|
-
Send a found entry.
|
837
|
-
</p>
|
838
|
-
</div></span>
|
839
|
-
|
840
|
-
</li>
|
841
|
-
|
842
|
-
|
843
|
-
<li class="public ">
|
844
|
-
<span class="summary_signature">
|
845
|
-
|
846
|
-
<a href="#send_SearchResultReference-instance_method" title="#send_SearchResultReference (instance method)">- (Object) <strong>send_SearchResultReference</strong>(urls, opt = {}) </a>
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
</span>
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
860
|
-
|
861
|
-
</li>
|
862
|
-
|
863
|
-
|
864
|
-
<li class="public ">
|
865
|
-
<span class="summary_signature">
|
866
|
-
|
867
|
-
<a href="#server_sizelimit-instance_method" title="#server_sizelimit (instance method)">- (Object) <strong>server_sizelimit</strong> </a>
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
</span>
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
<span class="summary_desc"><div class='inline'><p>
|
881
|
-
Server-set maximum size limit.
|
882
|
-
</p>
|
883
|
-
</div></span>
|
884
|
-
|
885
|
-
</li>
|
886
|
-
|
887
|
-
|
888
|
-
<li class="public ">
|
889
|
-
<span class="summary_signature">
|
890
|
-
|
891
|
-
<a href="#server_timelimit-instance_method" title="#server_timelimit (instance method)">- (Object) <strong>server_timelimit</strong> </a>
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
</span>
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
<span class="summary_desc"><div class='inline'><p>
|
905
|
-
Server-set maximum time limit.
|
906
|
-
</p>
|
907
|
-
</div></span>
|
908
|
-
|
909
|
-
</li>
|
910
|
-
|
911
|
-
|
912
|
-
<li class="public ">
|
913
|
-
<span class="summary_signature">
|
914
|
-
|
915
|
-
<a href="#simple_bind-instance_method" title="#simple_bind (instance method)">- (Object) <strong>simple_bind</strong>(version, dn, password) </a>
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
</span>
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
<span class="summary_desc"><div class='inline'><p>
|
929
|
-
Handle a simple bind request; raise an exception if the bind is not
|
930
|
-
acceptable, otherwise just return to accept the bind.
|
931
|
-
</p>
|
932
|
-
</div></span>
|
933
|
-
|
934
|
-
</li>
|
935
|
-
|
936
|
-
|
937
|
-
</ul>
|
938
|
-
|
939
|
-
|
940
|
-
<div id="constructor_details" class="method_details_list">
|
941
|
-
<h2>Constructor Details</h2>
|
942
|
-
|
943
|
-
<div class="method_details first">
|
944
|
-
<p class="signature first" id="initialize-instance_method">
|
945
|
-
|
946
|
-
- (<tt><span class='object_link'><a href="" title="LDAP::Server::Operation (class)">Operation</a></span></tt>) <strong>initialize</strong>(connection, messageID)
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
</p><div class="docstring">
|
951
|
-
<div class="discussion">
|
952
|
-
<p>
|
953
|
-
An instance of this object is created by the Connection object for each
|
954
|
-
operation which is requested by the client. If you subclass Operation, and
|
955
|
-
you override initialize, make sure you call ‘super’.
|
956
|
-
</p>
|
957
|
-
|
958
|
-
|
959
|
-
</div>
|
960
|
-
</div>
|
961
|
-
<div class="tags">
|
962
|
-
|
963
|
-
</div><table class="source_code">
|
964
|
-
<tr>
|
965
|
-
<td>
|
966
|
-
<pre class="lines">
|
967
|
-
|
968
|
-
|
969
|
-
30
|
970
|
-
31
|
971
|
-
32
|
972
|
-
33
|
973
|
-
34
|
974
|
-
35
|
975
|
-
36
|
976
|
-
37
|
977
|
-
38
|
978
|
-
39</pre>
|
979
|
-
</td>
|
980
|
-
<td>
|
981
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 30</span>
|
982
|
-
|
983
|
-
<span class='kw'>def</span> <span class='id initialize'>initialize</span><span class='lparen'>(</span><span class='id connection'>connection</span><span class='comma'>,</span> <span class='id messageID'>messageID</span><span class='rparen'>)</span>
|
984
|
-
<span class='ivar'>@connection</span> <span class='op'>=</span> <span class='id connection'>connection</span>
|
985
|
-
<span class='ivar'>@respEnvelope</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Sequence</span><span class='lparen'>(</span><span class='lbracket'>[</span>
|
986
|
-
<span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Integer</span><span class='lparen'>(</span><span class='id messageID'>messageID</span><span class='rparen'>)</span><span class='comma'>,</span>
|
987
|
-
<span class='comment'># protocolOp,
|
988
|
-
</span> <span class='comment'># controls [0] OPTIONAL,
|
989
|
-
</span> <span class='rbracket'>]</span><span class='rparen'>)</span>
|
990
|
-
<span class='ivar'>@schema</span> <span class='op'>=</span> <span class='ivar'>@connection</span><span class='period'>.</span><span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:schema</span><span class='rbracket'>]</span>
|
991
|
-
<span class='ivar'>@server</span> <span class='op'>=</span> <span class='ivar'>@connection</span><span class='period'>.</span><span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:server</span><span class='rbracket'>]</span>
|
992
|
-
<span class='kw'>end</span></pre>
|
993
|
-
</td>
|
994
|
-
</tr>
|
995
|
-
</table>
|
996
|
-
</div>
|
997
|
-
|
998
|
-
</div>
|
999
|
-
|
1000
|
-
|
1001
|
-
<div id="class_method_details" class="method_details_list">
|
1002
|
-
<h2>Class Method Details</h2>
|
1003
|
-
|
1004
|
-
|
1005
|
-
<div class="method_details first">
|
1006
|
-
<p class="signature first" id="join_dn-class_method">
|
1007
|
-
|
1008
|
-
+ (<tt>Object</tt>) <strong>join_dn</strong>(elements)
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
</p><div class="docstring">
|
1013
|
-
<div class="discussion">
|
1014
|
-
<p>
|
1015
|
-
Reverse of split_dn. Join [elements…] where each element can be
|
1016
|
-
attr=>val,&attr=>val,&#8230; or [[attr,val],…] or just [attr,val]
|
1017
|
-
</p>
|
1018
|
-
|
1019
|
-
|
1020
|
-
</div>
|
1021
|
-
</div>
|
1022
|
-
<div class="tags">
|
1023
|
-
|
1024
|
-
</div><table class="source_code">
|
1025
|
-
<tr>
|
1026
|
-
<td>
|
1027
|
-
<pre class="lines">
|
1028
|
-
|
1029
|
-
|
1030
|
-
66
|
1031
|
-
67
|
1032
|
-
68
|
1033
|
-
69
|
1034
|
-
70
|
1035
|
-
71
|
1036
|
-
72
|
1037
|
-
73
|
1038
|
-
74
|
1039
|
-
75
|
1040
|
-
76
|
1041
|
-
77
|
1042
|
-
78
|
1043
|
-
79
|
1044
|
-
80
|
1045
|
-
81
|
1046
|
-
82
|
1047
|
-
83</pre>
|
1048
|
-
</td>
|
1049
|
-
<td>
|
1050
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/util.rb', line 66</span>
|
1051
|
-
|
1052
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id join_dn'>join_dn</span><span class='lparen'>(</span><span class='id elements'>elements</span><span class='rparen'>)</span>
|
1053
|
-
<span class='id dn'>dn</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span>
|
1054
|
-
<span class='id elements'>elements</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id elem'>elem</span><span class='op'>|</span>
|
1055
|
-
<span class='id av'>av</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span>
|
1056
|
-
<span class='id elem'>elem</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id elem'>elem</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id elem'>elem</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
|
1057
|
-
<span class='id elem'>elem</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id attr'>attr</span><span class='comma'>,</span><span class='id val'>val</span><span class='op'>|</span>
|
1058
|
-
<span class='id av'>av</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>+</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id av'>av</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span>
|
1059
|
-
|
1060
|
-
<span class='id av'>av</span> <span class='op'><<</span> <span class='id attr'>attr</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span> <span class='op'><<</span>
|
1061
|
-
<span class='id val'>val</span><span class='period'>.</span><span class='id sub'>sub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^([# ])</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>\\\\\\1</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span>
|
1062
|
-
<span class='id sub'>sub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>( )$</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>\\\\\\1</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span>
|
1063
|
-
<span class='id gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>([,+"\\<>;])</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>\\\\\\1</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
1064
|
-
<span class='kw'>end</span>
|
1065
|
-
<span class='id dn'>dn</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>,</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id dn'>dn</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span>
|
1066
|
-
<span class='id dn'>dn</span> <span class='op'><<</span> <span class='id av'>av</span>
|
1067
|
-
<span class='kw'>end</span>
|
1068
|
-
<span class='id dn'>dn</span>
|
1069
|
-
<span class='kw'>end</span></pre>
|
1070
|
-
</td>
|
1071
|
-
</tr>
|
1072
|
-
</table>
|
1073
|
-
</div>
|
1074
|
-
|
1075
|
-
<div class="method_details ">
|
1076
|
-
<p class="signature " id="split_dn-class_method">
|
1077
|
-
|
1078
|
-
+ (<tt>Object</tt>) <strong>split_dn</strong>(dn)
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
</p><div class="docstring">
|
1083
|
-
<div class="discussion">
|
1084
|
-
<p>
|
1085
|
-
Split dn string into its component parts, returning
|
1086
|
-
</p>
|
1087
|
-
<pre class="code">
|
1088
|
-
[ {attr=>val}, {attr=>val}, ... ]
|
1089
|
-
</pre>
|
1090
|
-
<p>
|
1091
|
-
This is pretty horrible legacy stuff from X500; see RFC2253 for the full
|
1092
|
-
gore. It’s stupid that the LDAP protocol sends the DN in string form,
|
1093
|
-
rather than in ASN1 form (as it does with search filters, for example),
|
1094
|
-
even though the DN syntax is defined in terms of ASN1!
|
1095
|
-
</p>
|
1096
|
-
<p>
|
1097
|
-
Attribute names are downcased, but values are not. For any case-insensitive
|
1098
|
-
attributes it’s up to you to downcase them.
|
1099
|
-
</p>
|
1100
|
-
<p>
|
1101
|
-
Note that only v2 clients should add extra space around the comma. This is
|
1102
|
-
accepted, and so is semicolon instead of comma, but the full RFC1779
|
1103
|
-
backwards-compatibility rules (e.g. quoted values) are not implemented.
|
1104
|
-
</p>
|
1105
|
-
<p>
|
1106
|
-
I <b>think</b> these functions will work correctly with UTF8-encoded
|
1107
|
-
characters, given that a multibyte UTF8 character does not contain the
|
1108
|
-
bytes 00-7F and therefore we cannot confuse ’\’,
|
1109
|
-
’+’ etc
|
1110
|
-
</p>
|
1111
|
-
|
1112
|
-
|
1113
|
-
</div>
|
1114
|
-
</div>
|
1115
|
-
<div class="tags">
|
1116
|
-
|
1117
|
-
</div><table class="source_code">
|
1118
|
-
<tr>
|
1119
|
-
<td>
|
1120
|
-
<pre class="lines">
|
1121
|
-
|
1122
|
-
|
1123
|
-
34
|
1124
|
-
35
|
1125
|
-
36
|
1126
|
-
37
|
1127
|
-
38
|
1128
|
-
39
|
1129
|
-
40
|
1130
|
-
41
|
1131
|
-
42
|
1132
|
-
43
|
1133
|
-
44
|
1134
|
-
45
|
1135
|
-
46
|
1136
|
-
47
|
1137
|
-
48
|
1138
|
-
49
|
1139
|
-
50
|
1140
|
-
51
|
1141
|
-
52
|
1142
|
-
53
|
1143
|
-
54
|
1144
|
-
55
|
1145
|
-
56
|
1146
|
-
57
|
1147
|
-
58
|
1148
|
-
59
|
1149
|
-
60</pre>
|
1150
|
-
</td>
|
1151
|
-
<td>
|
1152
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/util.rb', line 34</span>
|
1153
|
-
|
1154
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id split_dn'>split_dn</span><span class='lparen'>(</span><span class='id dn'>dn</span><span class='rparen'>)</span>
|
1155
|
-
<span class='comment'># convert \\ to \5c, \+ to \2b etc
|
1156
|
-
</span> <span class='id dn2'>dn2</span> <span class='op'>=</span> <span class='id dn'>dn</span><span class='period'>.</span><span class='id gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\\([ #,+"\\<>;])</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\%02x</span><span class='tstring_end'>"</span></span> <span class='op'>%</span> <span class='backref'>$1</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
|
1157
|
-
|
1158
|
-
<span class='comment'># Now we know that \\ and \, do not exist, it's safe to split
|
1159
|
-
</span> <span class='id parts'>parts</span> <span class='op'>=</span> <span class='id dn2'>dn2</span><span class='period'>.</span><span class='id split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\s*[,;]\s*</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span>
|
1160
|
-
|
1161
|
-
<span class='id parts'>parts</span><span class='period'>.</span><span class='id collect'>collect</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id part'>part</span><span class='op'>|</span>
|
1162
|
-
<span class='id res'>res</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
1163
|
-
|
1164
|
-
<span class='comment'># Split each part into attr=val+attr=val
|
1165
|
-
</span> <span class='id avs'>avs</span> <span class='op'>=</span> <span class='id part'>part</span><span class='period'>.</span><span class='id split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\+</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span>
|
1166
|
-
|
1167
|
-
<span class='id avs'>avs</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id av'>av</span><span class='op'>|</span>
|
1168
|
-
<span class='comment'># These should all be of form attr=value
|
1169
|
-
</span> <span class='kw'>unless</span> <span class='id av'>av</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^([^=]+)=(.*)$</span><span class='regexp_end'>/</span></span>
|
1170
|
-
<span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>ProtocolError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bad DN component: </span><span class='embexpr_beg'>#{</span><span class='id av'>av</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
1171
|
-
<span class='kw'>end</span>
|
1172
|
-
<span class='id attr'>attr</span><span class='comma'>,</span> <span class='id val'>val</span> <span class='op'>=</span> <span class='backref'>$1</span><span class='period'>.</span><span class='id downcase'>downcase</span><span class='comma'>,</span> <span class='backref'>$2</span>
|
1173
|
-
<span class='comment'># Now we can decode those bits
|
1174
|
-
</span> <span class='id attr'>attr</span><span class='period'>.</span><span class='id gsub!'>gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\\([a-f0-9][a-f0-9])</span><span class='regexp_end'>/i</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='backref'>$1</span><span class='period'>.</span><span class='id hex'>hex</span><span class='period'>.</span><span class='id chr'>chr</span> <span class='rbrace'>}</span>
|
1175
|
-
<span class='id val'>val</span><span class='period'>.</span><span class='id gsub!'>gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\\([a-f0-9][a-f0-9])</span><span class='regexp_end'>/i</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='backref'>$1</span><span class='period'>.</span><span class='id hex'>hex</span><span class='period'>.</span><span class='id chr'>chr</span> <span class='rbrace'>}</span>
|
1176
|
-
<span class='id res'>res</span><span class='lbracket'>[</span><span class='id attr'>attr</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id val'>val</span>
|
1177
|
-
<span class='kw'>end</span>
|
1178
|
-
<span class='id res'>res</span>
|
1179
|
-
<span class='kw'>end</span>
|
1180
|
-
<span class='kw'>end</span></pre>
|
1181
|
-
</td>
|
1182
|
-
</tr>
|
1183
|
-
</table>
|
1184
|
-
</div>
|
1185
|
-
|
1186
|
-
</div>
|
1187
|
-
|
1188
|
-
<div id="instance_method_details" class="method_details_list">
|
1189
|
-
<h2>Instance Method Details</h2>
|
1190
|
-
|
1191
|
-
|
1192
|
-
<div class="method_details first">
|
1193
|
-
<p class="signature first" id="add-instance_method">
|
1194
|
-
|
1195
|
-
- (<tt>Object</tt>) <strong>add</strong>(dn, av)
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
</p><div class="docstring">
|
1200
|
-
<div class="discussion">
|
1201
|
-
<p>
|
1202
|
-
Handle an add request; override this
|
1203
|
-
</p>
|
1204
|
-
<p>
|
1205
|
-
Parameters are the dn of the entry to add, and a hash of
|
1206
|
-
</p>
|
1207
|
-
<pre class="code">
|
1208
|
-
attr=>[val...]
|
1209
|
-
</pre>
|
1210
|
-
<p>
|
1211
|
-
Raise an exception if there is a problem; it is up to you to check that the
|
1212
|
-
connection has sufficient authorisation using @connection.binddn
|
1213
|
-
</p>
|
1214
|
-
|
1215
|
-
|
1216
|
-
</div>
|
1217
|
-
</div>
|
1218
|
-
<div class="tags">
|
1219
|
-
<h3>Raises:</h3>
|
1220
|
-
<ul class="raise">
|
1221
|
-
|
1222
|
-
<li>
|
1223
|
-
|
1224
|
-
<span class='type'>(<tt><span class='object_link'><a href="../ResultError/UnwillingToPerform.html" title="LDAP::ResultError::UnwillingToPerform (class)">LDAP::ResultError::UnwillingToPerform</a></span></tt>)</span>
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
</li>
|
1230
|
-
|
1231
|
-
</ul>
|
1232
|
-
|
1233
|
-
</div><table class="source_code">
|
1234
|
-
<tr>
|
1235
|
-
<td>
|
1236
|
-
<pre class="lines">
|
1237
|
-
|
1238
|
-
|
1239
|
-
462
|
1240
|
-
463
|
1241
|
-
464</pre>
|
1242
|
-
</td>
|
1243
|
-
<td>
|
1244
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 462</span>
|
1245
|
-
|
1246
|
-
<span class='kw'>def</span> <span class='id add'>add</span><span class='lparen'>(</span><span class='id dn'>dn</span><span class='comma'>,</span> <span class='id av'>av</span><span class='rparen'>)</span>
|
1247
|
-
<span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>UnwillingToPerform</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>add not implemented</span><span class='tstring_end'>"</span></span>
|
1248
|
-
<span class='kw'>end</span></pre>
|
1249
|
-
</td>
|
1250
|
-
</tr>
|
1251
|
-
</table>
|
1252
|
-
</div>
|
1253
|
-
|
1254
|
-
<div class="method_details ">
|
1255
|
-
<p class="signature " id="anonymous?-instance_method">
|
1256
|
-
|
1257
|
-
- (<tt>Boolean</tt>) <strong>anonymous?</strong>
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
</p><div class="docstring">
|
1262
|
-
<div class="discussion">
|
1263
|
-
<p>
|
1264
|
-
Return true if connection is not authenticated
|
1265
|
-
</p>
|
1266
|
-
|
1267
|
-
|
1268
|
-
</div>
|
1269
|
-
</div>
|
1270
|
-
<div class="tags">
|
1271
|
-
<h3>Returns:</h3>
|
1272
|
-
<ul class="return">
|
1273
|
-
|
1274
|
-
<li>
|
1275
|
-
|
1276
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
</li>
|
1282
|
-
|
1283
|
-
</ul>
|
1284
|
-
|
1285
|
-
</div><table class="source_code">
|
1286
|
-
<tr>
|
1287
|
-
<td>
|
1288
|
-
<pre class="lines">
|
1289
|
-
|
1290
|
-
|
1291
|
-
10
|
1292
|
-
11
|
1293
|
-
12</pre>
|
1294
|
-
</td>
|
1295
|
-
<td>
|
1296
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/util.rb', line 10</span>
|
1297
|
-
|
1298
|
-
<span class='kw'>def</span> <span class='id anonymous?'>anonymous?</span>
|
1299
|
-
<span class='ivar'>@connection</span><span class='period'>.</span><span class='id binddn'>binddn</span><span class='period'>.</span><span class='id nil?'>nil?</span>
|
1300
|
-
<span class='kw'>end</span></pre>
|
1301
|
-
</td>
|
1302
|
-
</tr>
|
1303
|
-
</table>
|
1304
|
-
</div>
|
1305
|
-
|
1306
|
-
<div class="method_details ">
|
1307
|
-
<p class="signature " id="attributelist-instance_method">
|
1308
|
-
|
1309
|
-
- (<tt>Object</tt>) <strong>attributelist</strong>(set)
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
</p><div class="docstring">
|
1314
|
-
<div class="discussion">
|
1315
|
-
<p>
|
1316
|
-
reformat ASN1 into attr=>[vals]
|
1317
|
-
</p>
|
1318
|
-
<pre class="code">
|
1319
|
-
AttributeList ::= SEQUENCE OF SEQUENCE {
|
1320
|
-
type AttributeDescription,
|
1321
|
-
vals SET OF AttributeValue }</pre>
|
1322
|
-
|
1323
|
-
|
1324
|
-
</div>
|
1325
|
-
</div>
|
1326
|
-
<div class="tags">
|
1327
|
-
|
1328
|
-
</div><table class="source_code">
|
1329
|
-
<tr>
|
1330
|
-
<td>
|
1331
|
-
<pre class="lines">
|
1332
|
-
|
1333
|
-
|
1334
|
-
223
|
1335
|
-
224
|
1336
|
-
225
|
1337
|
-
226
|
1338
|
-
227
|
1339
|
-
228
|
1340
|
-
229
|
1341
|
-
230
|
1342
|
-
231
|
1343
|
-
232
|
1344
|
-
233
|
1345
|
-
234
|
1346
|
-
235
|
1347
|
-
236
|
1348
|
-
237</pre>
|
1349
|
-
</td>
|
1350
|
-
<td>
|
1351
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 223</span>
|
1352
|
-
|
1353
|
-
<span class='kw'>def</span> <span class='id attributelist'>attributelist</span><span class='lparen'>(</span><span class='id set'>set</span><span class='rparen'>)</span> <span class='comment'># :nodoc:
|
1354
|
-
</span> <span class='id av'>av</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
1355
|
-
<span class='id set'>set</span><span class='period'>.</span><span class='id value'>value</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id seq'>seq</span><span class='op'>|</span>
|
1356
|
-
<span class='id a'>a</span> <span class='op'>=</span> <span class='id seq'>seq</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1357
|
-
<span class='kw'>if</span> <span class='ivar'>@schema</span>
|
1358
|
-
<span class='id a'>a</span> <span class='op'>=</span> <span class='ivar'>@schema</span><span class='period'>.</span><span class='id find_attrtype'>find_attrtype</span><span class='lparen'>(</span><span class='id a'>a</span><span class='rparen'>)</span><span class='period'>.</span><span class='id to_s'>to_s</span>
|
1359
|
-
<span class='kw'>end</span>
|
1360
|
-
<span class='id v'>v</span> <span class='op'>=</span> <span class='id seq'>seq</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span><span class='period'>.</span><span class='id collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id asn1'>asn1</span><span class='op'>|</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span> <span class='rbrace'>}</span>
|
1361
|
-
<span class='comment'># Not clear from the spec whether the same attribute (with
|
1362
|
-
</span> <span class='comment'># distinct values) can appear more than once in AttributeList
|
1363
|
-
</span> <span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>AttributeOrValueExists</span><span class='comma'>,</span> <span class='id a'>a</span> <span class='kw'>if</span> <span class='id av'>av</span><span class='lbracket'>[</span><span class='id a'>a</span><span class='rbracket'>]</span>
|
1364
|
-
<span class='id av'>av</span><span class='lbracket'>[</span><span class='id a'>a</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id v'>v</span>
|
1365
|
-
<span class='kw'>end</span>
|
1366
|
-
<span class='kw'>return</span> <span class='id av'>av</span>
|
1367
|
-
<span class='kw'>end</span></pre>
|
1368
|
-
</td>
|
1369
|
-
</tr>
|
1370
|
-
</table>
|
1371
|
-
</div>
|
1372
|
-
|
1373
|
-
<div class="method_details ">
|
1374
|
-
<p class="signature " id="compare-instance_method">
|
1375
|
-
|
1376
|
-
- (<tt>Object</tt>) <strong>compare</strong>(entry, attr, val)
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
</p><div class="docstring">
|
1381
|
-
<div class="discussion">
|
1382
|
-
<p>
|
1383
|
-
Handle a compare request; override this. Return true or false, or raise an
|
1384
|
-
exception for errors.
|
1385
|
-
</p>
|
1386
|
-
|
1387
|
-
|
1388
|
-
</div>
|
1389
|
-
</div>
|
1390
|
-
<div class="tags">
|
1391
|
-
<h3>Raises:</h3>
|
1392
|
-
<ul class="raise">
|
1393
|
-
|
1394
|
-
<li>
|
1395
|
-
|
1396
|
-
<span class='type'>(<tt><span class='object_link'><a href="../ResultError/UnwillingToPerform.html" title="LDAP::ResultError::UnwillingToPerform (class)">LDAP::ResultError::UnwillingToPerform</a></span></tt>)</span>
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
</li>
|
1402
|
-
|
1403
|
-
</ul>
|
1404
|
-
|
1405
|
-
</div><table class="source_code">
|
1406
|
-
<tr>
|
1407
|
-
<td>
|
1408
|
-
<pre class="lines">
|
1409
|
-
|
1410
|
-
|
1411
|
-
481
|
1412
|
-
482
|
1413
|
-
483</pre>
|
1414
|
-
</td>
|
1415
|
-
<td>
|
1416
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 481</span>
|
1417
|
-
|
1418
|
-
<span class='kw'>def</span> <span class='id compare'>compare</span><span class='lparen'>(</span><span class='id entry'>entry</span><span class='comma'>,</span> <span class='id attr'>attr</span><span class='comma'>,</span> <span class='id val'>val</span><span class='rparen'>)</span>
|
1419
|
-
<span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>UnwillingToPerform</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>compare not implemented</span><span class='tstring_end'>"</span></span>
|
1420
|
-
<span class='kw'>end</span></pre>
|
1421
|
-
</td>
|
1422
|
-
</tr>
|
1423
|
-
</table>
|
1424
|
-
</div>
|
1425
|
-
|
1426
|
-
<div class="method_details ">
|
1427
|
-
<p class="signature " id="del-instance_method">
|
1428
|
-
|
1429
|
-
- (<tt>Object</tt>) <strong>del</strong>(dn)
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
</p><div class="docstring">
|
1434
|
-
<div class="discussion">
|
1435
|
-
<p>
|
1436
|
-
Handle a del request; override this
|
1437
|
-
</p>
|
1438
|
-
|
1439
|
-
|
1440
|
-
</div>
|
1441
|
-
</div>
|
1442
|
-
<div class="tags">
|
1443
|
-
<h3>Raises:</h3>
|
1444
|
-
<ul class="raise">
|
1445
|
-
|
1446
|
-
<li>
|
1447
|
-
|
1448
|
-
<span class='type'>(<tt><span class='object_link'><a href="../ResultError/UnwillingToPerform.html" title="LDAP::ResultError::UnwillingToPerform (class)">LDAP::ResultError::UnwillingToPerform</a></span></tt>)</span>
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
</li>
|
1454
|
-
|
1455
|
-
</ul>
|
1456
|
-
|
1457
|
-
</div><table class="source_code">
|
1458
|
-
<tr>
|
1459
|
-
<td>
|
1460
|
-
<pre class="lines">
|
1461
|
-
|
1462
|
-
|
1463
|
-
468
|
1464
|
-
469
|
1465
|
-
470</pre>
|
1466
|
-
</td>
|
1467
|
-
<td>
|
1468
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 468</span>
|
1469
|
-
|
1470
|
-
<span class='kw'>def</span> <span class='id del'>del</span><span class='lparen'>(</span><span class='id dn'>dn</span><span class='rparen'>)</span>
|
1471
|
-
<span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>UnwillingToPerform</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>delete not implemented</span><span class='tstring_end'>"</span></span>
|
1472
|
-
<span class='kw'>end</span></pre>
|
1473
|
-
</td>
|
1474
|
-
</tr>
|
1475
|
-
</table>
|
1476
|
-
</div>
|
1477
|
-
|
1478
|
-
<div class="method_details ">
|
1479
|
-
<p class="signature " id="do_add-instance_method">
|
1480
|
-
|
1481
|
-
- (<tt>Object</tt>) <strong>do_add</strong>(protocolOp, controls)
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1485
|
-
</p><div class="docstring">
|
1486
|
-
<div class="discussion">
|
1487
|
-
<p>
|
1488
|
-
:nodoc:
|
1489
|
-
</p>
|
1490
|
-
|
1491
|
-
|
1492
|
-
</div>
|
1493
|
-
</div>
|
1494
|
-
<div class="tags">
|
1495
|
-
|
1496
|
-
</div><table class="source_code">
|
1497
|
-
<tr>
|
1498
|
-
<td>
|
1499
|
-
<pre class="lines">
|
1500
|
-
|
1501
|
-
|
1502
|
-
325
|
1503
|
-
326
|
1504
|
-
327
|
1505
|
-
328
|
1506
|
-
329
|
1507
|
-
330
|
1508
|
-
331
|
1509
|
-
332
|
1510
|
-
333
|
1511
|
-
334
|
1512
|
-
335
|
1513
|
-
336
|
1514
|
-
337
|
1515
|
-
338</pre>
|
1516
|
-
</td>
|
1517
|
-
<td>
|
1518
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 325</span>
|
1519
|
-
|
1520
|
-
<span class='kw'>def</span> <span class='id do_add'>do_add</span><span class='lparen'>(</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span> <span class='id controls'>controls</span><span class='rparen'>)</span> <span class='comment'># :nodoc:
|
1521
|
-
</span> <span class='id dn'>dn</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1522
|
-
<span class='id av'>av</span> <span class='op'>=</span> <span class='id attributelist'>attributelist</span><span class='lparen'>(</span><span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
1523
|
-
<span class='id add'>add</span><span class='lparen'>(</span><span class='id dn'>dn</span><span class='comma'>,</span> <span class='id av'>av</span><span class='rparen'>)</span>
|
1524
|
-
<span class='id send_AddResponse'>send_AddResponse</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span>
|
1525
|
-
|
1526
|
-
<span class='kw'>rescue</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span> <span class='op'>=></span> <span class='id e'>e</span>
|
1527
|
-
<span class='id send_AddResponse'>send_AddResponse</span><span class='lparen'>(</span><span class='id e'>e</span><span class='period'>.</span><span class='id to_i'>to_i</span><span class='comma'>,</span> <span class='symbol'>:errorMessage</span><span class='op'>=></span><span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span><span class='rparen'>)</span>
|
1528
|
-
<span class='kw'>rescue</span> <span class='const'>Abandon</span>
|
1529
|
-
<span class='comment'># no response
|
1530
|
-
</span><span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=></span> <span class='id e'>e</span>
|
1531
|
-
<span class='id log_exception'>log_exception</span><span class='lparen'>(</span><span class='id e'>e</span><span class='rparen'>)</span>
|
1532
|
-
<span class='id send_AddResponse'>send_AddResponse</span><span class='lparen'>(</span><span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultCode</span><span class='op'>::</span><span class='const'>OperationsError</span><span class='period'>.</span><span class='id new'>new</span><span class='period'>.</span><span class='id to_i'>to_i</span><span class='comma'>,</span> <span class='symbol'>:errorMessage</span><span class='op'>=></span><span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span><span class='rparen'>)</span>
|
1533
|
-
<span class='kw'>end</span></pre>
|
1534
|
-
</td>
|
1535
|
-
</tr>
|
1536
|
-
</table>
|
1537
|
-
</div>
|
1538
|
-
|
1539
|
-
<div class="method_details ">
|
1540
|
-
<p class="signature " id="do_bind-instance_method">
|
1541
|
-
|
1542
|
-
- (<tt>Object</tt>) <strong>do_bind</strong>(protocolOp, controls)
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
</p><div class="docstring">
|
1547
|
-
<div class="discussion">
|
1548
|
-
<p>
|
1549
|
-
######################################## # Methods to parse each request
|
1550
|
-
type ### ########################################
|
1551
|
-
</p>
|
1552
|
-
|
1553
|
-
|
1554
|
-
</div>
|
1555
|
-
</div>
|
1556
|
-
<div class="tags">
|
1557
|
-
|
1558
|
-
</div><table class="source_code">
|
1559
|
-
<tr>
|
1560
|
-
<td>
|
1561
|
-
<pre class="lines">
|
1562
|
-
|
1563
|
-
|
1564
|
-
191
|
1565
|
-
192
|
1566
|
-
193
|
1567
|
-
194
|
1568
|
-
195
|
1569
|
-
196
|
1570
|
-
197
|
1571
|
-
198
|
1572
|
-
199
|
1573
|
-
200
|
1574
|
-
201
|
1575
|
-
202
|
1576
|
-
203
|
1577
|
-
204
|
1578
|
-
205
|
1579
|
-
206
|
1580
|
-
207
|
1581
|
-
208
|
1582
|
-
209
|
1583
|
-
210
|
1584
|
-
211
|
1585
|
-
212
|
1586
|
-
213
|
1587
|
-
214
|
1588
|
-
215</pre>
|
1589
|
-
</td>
|
1590
|
-
<td>
|
1591
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 191</span>
|
1592
|
-
|
1593
|
-
<span class='kw'>def</span> <span class='id do_bind'>do_bind</span><span class='lparen'>(</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span> <span class='id controls'>controls</span><span class='rparen'>)</span> <span class='comment'># :nodoc:
|
1594
|
-
</span> <span class='id version'>version</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1595
|
-
<span class='id dn'>dn</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1596
|
-
<span class='id dn'>dn</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id dn'>dn</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span>
|
1597
|
-
<span class='id authentication'>authentication</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span>
|
1598
|
-
|
1599
|
-
<span class='kw'>case</span> <span class='id authentication'>authentication</span><span class='period'>.</span><span class='id tag'>tag</span> <span class='comment'># tag_class == :CONTEXT_SPECIFIC (check why)
|
1600
|
-
</span> <span class='kw'>when</span> <span class='int'>0</span>
|
1601
|
-
<span class='id simple_bind'>simple_bind</span><span class='lparen'>(</span><span class='id version'>version</span><span class='comma'>,</span> <span class='id dn'>dn</span><span class='comma'>,</span> <span class='id authentication'>authentication</span><span class='period'>.</span><span class='id value'>value</span><span class='rparen'>)</span>
|
1602
|
-
<span class='kw'>when</span> <span class='int'>3</span>
|
1603
|
-
<span class='id mechanism'>mechanism</span> <span class='op'>=</span> <span class='id authentication'>authentication</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1604
|
-
<span class='id credentials'>credentials</span> <span class='op'>=</span> <span class='id authentication'>authentication</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1605
|
-
<span class='comment'># sasl_bind(version, dn, mechanism, credentials)
|
1606
|
-
</span> <span class='comment'># FIXME: needs to exchange further BindRequests
|
1607
|
-
</span> <span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>AuthMethodNotSupported</span>
|
1608
|
-
<span class='kw'>else</span>
|
1609
|
-
<span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>ProtocolError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>BindRequest bad AuthenticationChoice</span><span class='tstring_end'>"</span></span>
|
1610
|
-
<span class='kw'>end</span>
|
1611
|
-
<span class='id send_BindResponse'>send_BindResponse</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span>
|
1612
|
-
<span class='kw'>return</span> <span class='id dn'>dn</span><span class='comma'>,</span> <span class='id version'>version</span>
|
1613
|
-
|
1614
|
-
<span class='kw'>rescue</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span> <span class='op'>=></span> <span class='id e'>e</span>
|
1615
|
-
<span class='id send_BindResponse'>send_BindResponse</span><span class='lparen'>(</span><span class='id e'>e</span><span class='period'>.</span><span class='id to_i'>to_i</span><span class='comma'>,</span> <span class='symbol'>:errorMessage</span><span class='op'>=></span><span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span><span class='rparen'>)</span>
|
1616
|
-
<span class='kw'>return</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id version'>version</span>
|
1617
|
-
<span class='kw'>end</span></pre>
|
1618
|
-
</td>
|
1619
|
-
</tr>
|
1620
|
-
</table>
|
1621
|
-
</div>
|
1622
|
-
|
1623
|
-
<div class="method_details ">
|
1624
|
-
<p class="signature " id="do_compare-instance_method">
|
1625
|
-
|
1626
|
-
- (<tt>Object</tt>) <strong>do_compare</strong>(protocolOp, controls)
|
1627
|
-
|
1628
|
-
|
1629
|
-
|
1630
|
-
</p><div class="docstring">
|
1631
|
-
<div class="discussion">
|
1632
|
-
<p>
|
1633
|
-
:nodoc:
|
1634
|
-
</p>
|
1635
|
-
|
1636
|
-
|
1637
|
-
</div>
|
1638
|
-
</div>
|
1639
|
-
<div class="tags">
|
1640
|
-
|
1641
|
-
</div><table class="source_code">
|
1642
|
-
<tr>
|
1643
|
-
<td>
|
1644
|
-
<pre class="lines">
|
1645
|
-
|
1646
|
-
|
1647
|
-
373
|
1648
|
-
374
|
1649
|
-
375
|
1650
|
-
376
|
1651
|
-
377
|
1652
|
-
378
|
1653
|
-
379
|
1654
|
-
380
|
1655
|
-
381
|
1656
|
-
382
|
1657
|
-
383
|
1658
|
-
384
|
1659
|
-
385
|
1660
|
-
386
|
1661
|
-
387
|
1662
|
-
388
|
1663
|
-
389
|
1664
|
-
390
|
1665
|
-
391
|
1666
|
-
392
|
1667
|
-
393
|
1668
|
-
394</pre>
|
1669
|
-
</td>
|
1670
|
-
<td>
|
1671
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 373</span>
|
1672
|
-
|
1673
|
-
<span class='kw'>def</span> <span class='id do_compare'>do_compare</span><span class='lparen'>(</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span> <span class='id controls'>controls</span><span class='rparen'>)</span> <span class='comment'># :nodoc:
|
1674
|
-
</span> <span class='id entry'>entry</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1675
|
-
<span class='id ava'>ava</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1676
|
-
<span class='id attr'>attr</span> <span class='op'>=</span> <span class='id ava'>ava</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1677
|
-
<span class='kw'>if</span> <span class='ivar'>@schema</span>
|
1678
|
-
<span class='id attr'>attr</span> <span class='op'>=</span> <span class='ivar'>@schema</span><span class='period'>.</span><span class='id find_attrtype'>find_attrtype</span><span class='lparen'>(</span><span class='id attr'>attr</span><span class='rparen'>)</span><span class='period'>.</span><span class='id to_s'>to_s</span>
|
1679
|
-
<span class='kw'>end</span>
|
1680
|
-
<span class='id val'>val</span> <span class='op'>=</span> <span class='id ava'>ava</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1681
|
-
<span class='kw'>if</span> <span class='id compare'>compare</span><span class='lparen'>(</span><span class='id entry'>entry</span><span class='comma'>,</span> <span class='id attr'>attr</span><span class='comma'>,</span> <span class='id val'>val</span><span class='rparen'>)</span>
|
1682
|
-
<span class='id send_CompareResponse'>send_CompareResponse</span><span class='lparen'>(</span><span class='int'>6</span><span class='rparen'>)</span> <span class='comment'># compareTrue
|
1683
|
-
</span> <span class='kw'>else</span>
|
1684
|
-
<span class='id send_CompareResponse'>send_CompareResponse</span><span class='lparen'>(</span><span class='int'>5</span><span class='rparen'>)</span> <span class='comment'># compareFalse
|
1685
|
-
</span> <span class='kw'>end</span>
|
1686
|
-
|
1687
|
-
<span class='kw'>rescue</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span> <span class='op'>=></span> <span class='id e'>e</span>
|
1688
|
-
<span class='id send_CompareResponse'>send_CompareResponse</span><span class='lparen'>(</span><span class='id e'>e</span><span class='period'>.</span><span class='id to_i'>to_i</span><span class='comma'>,</span> <span class='symbol'>:errorMessage</span><span class='op'>=></span><span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span><span class='rparen'>)</span>
|
1689
|
-
<span class='kw'>rescue</span> <span class='const'>Abandon</span>
|
1690
|
-
<span class='comment'># no response
|
1691
|
-
</span><span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=></span> <span class='id e'>e</span>
|
1692
|
-
<span class='id log_exception'>log_exception</span><span class='lparen'>(</span><span class='id e'>e</span><span class='rparen'>)</span>
|
1693
|
-
<span class='id send_CompareResponse'>send_CompareResponse</span><span class='lparen'>(</span><span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultCode</span><span class='op'>::</span><span class='const'>OperationsError</span><span class='period'>.</span><span class='id new'>new</span><span class='period'>.</span><span class='id to_i'>to_i</span><span class='comma'>,</span> <span class='symbol'>:errorMessage</span><span class='op'>=></span><span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span><span class='rparen'>)</span>
|
1694
|
-
<span class='kw'>end</span></pre>
|
1695
|
-
</td>
|
1696
|
-
</tr>
|
1697
|
-
</table>
|
1698
|
-
</div>
|
1699
|
-
|
1700
|
-
<div class="method_details ">
|
1701
|
-
<p class="signature " id="do_del-instance_method">
|
1702
|
-
|
1703
|
-
- (<tt>Object</tt>) <strong>do_del</strong>(protocolOp, controls)
|
1704
|
-
|
1705
|
-
|
1706
|
-
|
1707
|
-
</p><div class="docstring">
|
1708
|
-
<div class="discussion">
|
1709
|
-
<p>
|
1710
|
-
:nodoc:
|
1711
|
-
</p>
|
1712
|
-
|
1713
|
-
|
1714
|
-
</div>
|
1715
|
-
</div>
|
1716
|
-
<div class="tags">
|
1717
|
-
|
1718
|
-
</div><table class="source_code">
|
1719
|
-
<tr>
|
1720
|
-
<td>
|
1721
|
-
<pre class="lines">
|
1722
|
-
|
1723
|
-
|
1724
|
-
340
|
1725
|
-
341
|
1726
|
-
342
|
1727
|
-
343
|
1728
|
-
344
|
1729
|
-
345
|
1730
|
-
346
|
1731
|
-
347
|
1732
|
-
348
|
1733
|
-
349
|
1734
|
-
350
|
1735
|
-
351
|
1736
|
-
352</pre>
|
1737
|
-
</td>
|
1738
|
-
<td>
|
1739
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 340</span>
|
1740
|
-
|
1741
|
-
<span class='kw'>def</span> <span class='id do_del'>do_del</span><span class='lparen'>(</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span> <span class='id controls'>controls</span><span class='rparen'>)</span> <span class='comment'># :nodoc:
|
1742
|
-
</span> <span class='id dn'>dn</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span>
|
1743
|
-
<span class='id del'>del</span><span class='lparen'>(</span><span class='id dn'>dn</span><span class='rparen'>)</span>
|
1744
|
-
<span class='id send_DelResponse'>send_DelResponse</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span>
|
1745
|
-
|
1746
|
-
<span class='kw'>rescue</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span> <span class='op'>=></span> <span class='id e'>e</span>
|
1747
|
-
<span class='id send_DelResponse'>send_DelResponse</span><span class='lparen'>(</span><span class='id e'>e</span><span class='period'>.</span><span class='id to_i'>to_i</span><span class='comma'>,</span> <span class='symbol'>:errorMessage</span><span class='op'>=></span><span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span><span class='rparen'>)</span>
|
1748
|
-
<span class='kw'>rescue</span> <span class='const'>Abandon</span>
|
1749
|
-
<span class='comment'># no response
|
1750
|
-
</span><span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=></span> <span class='id e'>e</span>
|
1751
|
-
<span class='id log_exception'>log_exception</span><span class='lparen'>(</span><span class='id e'>e</span><span class='rparen'>)</span>
|
1752
|
-
<span class='id send_DelResponse'>send_DelResponse</span><span class='lparen'>(</span><span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultCode</span><span class='op'>::</span><span class='const'>OperationsError</span><span class='period'>.</span><span class='id new'>new</span><span class='period'>.</span><span class='id to_i'>to_i</span><span class='comma'>,</span> <span class='symbol'>:errorMessage</span><span class='op'>=></span><span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span><span class='rparen'>)</span>
|
1753
|
-
<span class='kw'>end</span></pre>
|
1754
|
-
</td>
|
1755
|
-
</tr>
|
1756
|
-
</table>
|
1757
|
-
</div>
|
1758
|
-
|
1759
|
-
<div class="method_details ">
|
1760
|
-
<p class="signature " id="do_modify-instance_method">
|
1761
|
-
|
1762
|
-
- (<tt>Object</tt>) <strong>do_modify</strong>(protocolOp, controls)
|
1763
|
-
|
1764
|
-
|
1765
|
-
|
1766
|
-
</p><div class="docstring">
|
1767
|
-
<div class="discussion">
|
1768
|
-
<p>
|
1769
|
-
:nodoc:
|
1770
|
-
</p>
|
1771
|
-
|
1772
|
-
|
1773
|
-
</div>
|
1774
|
-
</div>
|
1775
|
-
<div class="tags">
|
1776
|
-
|
1777
|
-
</div><table class="source_code">
|
1778
|
-
<tr>
|
1779
|
-
<td>
|
1780
|
-
<pre class="lines">
|
1781
|
-
|
1782
|
-
|
1783
|
-
292
|
1784
|
-
293
|
1785
|
-
294
|
1786
|
-
295
|
1787
|
-
296
|
1788
|
-
297
|
1789
|
-
298
|
1790
|
-
299
|
1791
|
-
300
|
1792
|
-
301
|
1793
|
-
302
|
1794
|
-
303
|
1795
|
-
304
|
1796
|
-
305
|
1797
|
-
306
|
1798
|
-
307
|
1799
|
-
308
|
1800
|
-
309
|
1801
|
-
310
|
1802
|
-
311
|
1803
|
-
312
|
1804
|
-
313
|
1805
|
-
314
|
1806
|
-
315
|
1807
|
-
316
|
1808
|
-
317
|
1809
|
-
318
|
1810
|
-
319
|
1811
|
-
320
|
1812
|
-
321
|
1813
|
-
322
|
1814
|
-
323</pre>
|
1815
|
-
</td>
|
1816
|
-
<td>
|
1817
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 292</span>
|
1818
|
-
|
1819
|
-
<span class='kw'>def</span> <span class='id do_modify'>do_modify</span><span class='lparen'>(</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span> <span class='id controls'>controls</span><span class='rparen'>)</span> <span class='comment'># :nodoc:
|
1820
|
-
</span> <span class='id dn'>dn</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1821
|
-
<span class='id modinfo'>modinfo</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
1822
|
-
<span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id seq'>seq</span><span class='op'>|</span>
|
1823
|
-
<span class='id attr'>attr</span> <span class='op'>=</span> <span class='id seq'>seq</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1824
|
-
<span class='kw'>if</span> <span class='ivar'>@schema</span>
|
1825
|
-
<span class='id attr'>attr</span> <span class='op'>=</span> <span class='ivar'>@schema</span><span class='period'>.</span><span class='id find_attrtype'>find_attrtype</span><span class='lparen'>(</span><span class='id attr'>attr</span><span class='rparen'>)</span><span class='period'>.</span><span class='id to_s'>to_s</span>
|
1826
|
-
<span class='kw'>end</span>
|
1827
|
-
<span class='id vals'>vals</span> <span class='op'>=</span> <span class='id seq'>seq</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span><span class='period'>.</span><span class='id collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id v'>v</span><span class='op'>|</span> <span class='id v'>v</span><span class='period'>.</span><span class='id value'>value</span> <span class='rbrace'>}</span>
|
1828
|
-
<span class='kw'>case</span> <span class='id seq'>seq</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1829
|
-
<span class='kw'>when</span> <span class='int'>0</span>
|
1830
|
-
<span class='id modinfo'>modinfo</span><span class='lbracket'>[</span><span class='id attr'>attr</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:add</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='id vals'>vals</span>
|
1831
|
-
<span class='kw'>when</span> <span class='int'>1</span>
|
1832
|
-
<span class='id modinfo'>modinfo</span><span class='lbracket'>[</span><span class='id attr'>attr</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:delete</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='id vals'>vals</span>
|
1833
|
-
<span class='kw'>when</span> <span class='int'>2</span>
|
1834
|
-
<span class='id modinfo'>modinfo</span><span class='lbracket'>[</span><span class='id attr'>attr</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:replace</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='id vals'>vals</span>
|
1835
|
-
<span class='kw'>else</span>
|
1836
|
-
<span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>ProtocolError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bad modify operation </span><span class='embexpr_beg'>#{</span><span class='id seq'>seq</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
1837
|
-
<span class='kw'>end</span>
|
1838
|
-
<span class='kw'>end</span>
|
1839
|
-
|
1840
|
-
<span class='id modify'>modify</span><span class='lparen'>(</span><span class='id dn'>dn</span><span class='comma'>,</span> <span class='id modinfo'>modinfo</span><span class='rparen'>)</span>
|
1841
|
-
<span class='id send_ModifyResponse'>send_ModifyResponse</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span>
|
1842
|
-
|
1843
|
-
<span class='kw'>rescue</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span> <span class='op'>=></span> <span class='id e'>e</span>
|
1844
|
-
<span class='id send_ModifyResponse'>send_ModifyResponse</span><span class='lparen'>(</span><span class='id e'>e</span><span class='period'>.</span><span class='id to_i'>to_i</span><span class='comma'>,</span> <span class='symbol'>:errorMessage</span><span class='op'>=></span><span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span><span class='rparen'>)</span>
|
1845
|
-
<span class='kw'>rescue</span> <span class='const'>Abandon</span>
|
1846
|
-
<span class='comment'># no response
|
1847
|
-
</span><span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=></span> <span class='id e'>e</span>
|
1848
|
-
<span class='id log_exception'>log_exception</span><span class='lparen'>(</span><span class='id e'>e</span><span class='rparen'>)</span>
|
1849
|
-
<span class='id send_ModifyResponse'>send_ModifyResponse</span><span class='lparen'>(</span><span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultCode</span><span class='op'>::</span><span class='const'>OperationsError</span><span class='period'>.</span><span class='id new'>new</span><span class='period'>.</span><span class='id to_i'>to_i</span><span class='comma'>,</span> <span class='symbol'>:errorMessage</span><span class='op'>=></span><span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span><span class='rparen'>)</span>
|
1850
|
-
<span class='kw'>end</span></pre>
|
1851
|
-
</td>
|
1852
|
-
</tr>
|
1853
|
-
</table>
|
1854
|
-
</div>
|
1855
|
-
|
1856
|
-
<div class="method_details ">
|
1857
|
-
<p class="signature " id="do_modifydn-instance_method">
|
1858
|
-
|
1859
|
-
- (<tt>Object</tt>) <strong>do_modifydn</strong>(protocolOp, controls)
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
</p><div class="docstring">
|
1864
|
-
<div class="discussion">
|
1865
|
-
<p>
|
1866
|
-
:nodoc:
|
1867
|
-
</p>
|
1868
|
-
|
1869
|
-
|
1870
|
-
</div>
|
1871
|
-
</div>
|
1872
|
-
<div class="tags">
|
1873
|
-
|
1874
|
-
</div><table class="source_code">
|
1875
|
-
<tr>
|
1876
|
-
<td>
|
1877
|
-
<pre class="lines">
|
1878
|
-
|
1879
|
-
|
1880
|
-
354
|
1881
|
-
355
|
1882
|
-
356
|
1883
|
-
357
|
1884
|
-
358
|
1885
|
-
359
|
1886
|
-
360
|
1887
|
-
361
|
1888
|
-
362
|
1889
|
-
363
|
1890
|
-
364
|
1891
|
-
365
|
1892
|
-
366
|
1893
|
-
367
|
1894
|
-
368
|
1895
|
-
369
|
1896
|
-
370
|
1897
|
-
371</pre>
|
1898
|
-
</td>
|
1899
|
-
<td>
|
1900
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 354</span>
|
1901
|
-
|
1902
|
-
<span class='kw'>def</span> <span class='id do_modifydn'>do_modifydn</span><span class='lparen'>(</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span> <span class='id controls'>controls</span><span class='rparen'>)</span> <span class='comment'># :nodoc:
|
1903
|
-
</span> <span class='id entry'>entry</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1904
|
-
<span class='id newrdn'>newrdn</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1905
|
-
<span class='id deleteoldrdn'>deleteoldrdn</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1906
|
-
<span class='kw'>if</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>></span> <span class='int'>3</span> <span class='kw'>and</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>3</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id tag'>tag</span> <span class='op'>==</span> <span class='int'>0</span>
|
1907
|
-
<span class='id newSuperior'>newSuperior</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>3</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
1908
|
-
<span class='kw'>end</span>
|
1909
|
-
<span class='id modifydn'>modifydn</span><span class='lparen'>(</span><span class='id entry'>entry</span><span class='comma'>,</span> <span class='id newrdn'>newrdn</span><span class='comma'>,</span> <span class='id deleteoldrdn'>deleteoldrdn</span><span class='comma'>,</span> <span class='id newSuperior'>newSuperior</span><span class='rparen'>)</span>
|
1910
|
-
<span class='id send_ModifyDNResponse'>send_ModifyDNResponse</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span>
|
1911
|
-
|
1912
|
-
<span class='kw'>rescue</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span> <span class='op'>=></span> <span class='id e'>e</span>
|
1913
|
-
<span class='id send_ModifyDNResponse'>send_ModifyDNResponse</span><span class='lparen'>(</span><span class='id e'>e</span><span class='period'>.</span><span class='id to_i'>to_i</span><span class='comma'>,</span> <span class='symbol'>:errorMessage</span><span class='op'>=></span><span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span><span class='rparen'>)</span>
|
1914
|
-
<span class='kw'>rescue</span> <span class='const'>Abandon</span>
|
1915
|
-
<span class='comment'># no response
|
1916
|
-
</span><span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=></span> <span class='id e'>e</span>
|
1917
|
-
<span class='id log_exception'>log_exception</span><span class='lparen'>(</span><span class='id e'>e</span><span class='rparen'>)</span>
|
1918
|
-
<span class='id send_ModifyDNResponse'>send_ModifyDNResponse</span><span class='lparen'>(</span><span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultCode</span><span class='op'>::</span><span class='const'>OperationsError</span><span class='period'>.</span><span class='id new'>new</span><span class='period'>.</span><span class='id to_i'>to_i</span><span class='comma'>,</span> <span class='symbol'>:errorMessage</span><span class='op'>=></span><span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span><span class='rparen'>)</span>
|
1919
|
-
<span class='kw'>end</span></pre>
|
1920
|
-
</td>
|
1921
|
-
</tr>
|
1922
|
-
</table>
|
1923
|
-
</div>
|
1924
|
-
|
1925
|
-
<div class="method_details ">
|
1926
|
-
<p class="signature " id="do_search-instance_method">
|
1927
|
-
|
1928
|
-
- (<tt>Object</tt>) <strong>do_search</strong>(protocolOp, controls)
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
1932
|
-
</p><div class="docstring">
|
1933
|
-
<div class="discussion">
|
1934
|
-
<p>
|
1935
|
-
:nodoc:
|
1936
|
-
</p>
|
1937
|
-
|
1938
|
-
|
1939
|
-
</div>
|
1940
|
-
</div>
|
1941
|
-
<div class="tags">
|
1942
|
-
|
1943
|
-
</div><table class="source_code">
|
1944
|
-
<tr>
|
1945
|
-
<td>
|
1946
|
-
<pre class="lines">
|
1947
|
-
|
1948
|
-
|
1949
|
-
239
|
1950
|
-
240
|
1951
|
-
241
|
1952
|
-
242
|
1953
|
-
243
|
1954
|
-
244
|
1955
|
-
245
|
1956
|
-
246
|
1957
|
-
247
|
1958
|
-
248
|
1959
|
-
249
|
1960
|
-
250
|
1961
|
-
251
|
1962
|
-
252
|
1963
|
-
253
|
1964
|
-
254
|
1965
|
-
255
|
1966
|
-
256
|
1967
|
-
257
|
1968
|
-
258
|
1969
|
-
259
|
1970
|
-
260
|
1971
|
-
261
|
1972
|
-
262
|
1973
|
-
263
|
1974
|
-
264
|
1975
|
-
265
|
1976
|
-
266
|
1977
|
-
267
|
1978
|
-
268
|
1979
|
-
269
|
1980
|
-
270
|
1981
|
-
271
|
1982
|
-
272
|
1983
|
-
273
|
1984
|
-
274
|
1985
|
-
275
|
1986
|
-
276
|
1987
|
-
277
|
1988
|
-
278
|
1989
|
-
279
|
1990
|
-
280
|
1991
|
-
281
|
1992
|
-
282
|
1993
|
-
283
|
1994
|
-
284
|
1995
|
-
285
|
1996
|
-
286
|
1997
|
-
287
|
1998
|
-
288
|
1999
|
-
289
|
2000
|
-
290</pre>
|
2001
|
-
</td>
|
2002
|
-
<td>
|
2003
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 239</span>
|
2004
|
-
|
2005
|
-
<span class='kw'>def</span> <span class='id do_search'>do_search</span><span class='lparen'>(</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span> <span class='id controls'>controls</span><span class='rparen'>)</span> <span class='comment'># :nodoc:
|
2006
|
-
</span> <span class='id baseObject'>baseObject</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
2007
|
-
<span class='id scope'>scope</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
2008
|
-
<span class='id deref'>deref</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
2009
|
-
<span class='id client_sizelimit'>client_sizelimit</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>3</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
2010
|
-
<span class='id client_timelimit'>client_timelimit</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>4</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
2011
|
-
<span class='ivar'>@typesOnly</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>5</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
|
2012
|
-
<span class='id filter'>filter</span> <span class='op'>=</span> <span class='const'>Filter</span><span class='op'>::</span><span class='id parse'>parse</span><span class='lparen'>(</span><span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>6</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='ivar'>@schema</span><span class='rparen'>)</span>
|
2013
|
-
<span class='ivar'>@attributes</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>7</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span><span class='period'>.</span><span class='id collect'>collect</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id x'>x</span><span class='op'>|</span> <span class='id x'>x</span><span class='period'>.</span><span class='id value'>value</span><span class='rbrace'>}</span>
|
2014
|
-
|
2015
|
-
<span class='ivar'>@rescount</span> <span class='op'>=</span> <span class='int'>0</span>
|
2016
|
-
<span class='ivar'>@sizelimit</span> <span class='op'>=</span> <span class='id server_sizelimit'>server_sizelimit</span>
|
2017
|
-
<span class='ivar'>@sizelimit</span> <span class='op'>=</span> <span class='id client_sizelimit'>client_sizelimit</span> <span class='kw'>if</span> <span class='id client_sizelimit'>client_sizelimit</span> <span class='op'>></span> <span class='int'>0</span> <span class='kw'>and</span>
|
2018
|
-
<span class='lparen'>(</span><span class='ivar'>@sizelimit</span><span class='period'>.</span><span class='id nil?'>nil?</span> <span class='kw'>or</span> <span class='id client_sizelimit'>client_sizelimit</span> <span class='op'><</span> <span class='ivar'>@sizelimit</span><span class='rparen'>)</span>
|
2019
|
-
|
2020
|
-
<span class='kw'>if</span> <span class='id baseObject'>baseObject</span><span class='period'>.</span><span class='id empty?'>empty?</span> <span class='kw'>and</span> <span class='id scope'>scope</span> <span class='op'>==</span> <span class='const'>BaseObject</span>
|
2021
|
-
<span class='id send_SearchResultEntry'>send_SearchResultEntry</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='ivar'>@server</span><span class='period'>.</span><span class='id root_dse'>root_dse</span><span class='rparen'>)</span> <span class='kw'>if</span>
|
2022
|
-
<span class='ivar'>@server</span><span class='period'>.</span><span class='id root_dse'>root_dse</span> <span class='kw'>and</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>Server</span><span class='op'>::</span><span class='const'>Filter</span><span class='period'>.</span><span class='id run'>run</span><span class='lparen'>(</span><span class='id filter'>filter</span><span class='comma'>,</span> <span class='ivar'>@server</span><span class='period'>.</span><span class='id root_dse'>root_dse</span><span class='rparen'>)</span>
|
2023
|
-
<span class='id send_SearchResultDone'>send_SearchResultDone</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span>
|
2024
|
-
<span class='kw'>return</span>
|
2025
|
-
<span class='kw'>elsif</span> <span class='ivar'>@schema</span> <span class='kw'>and</span> <span class='id baseObject'>baseObject</span> <span class='op'>==</span> <span class='ivar'>@schema</span><span class='period'>.</span><span class='id subschema_dn'>subschema_dn</span>
|
2026
|
-
<span class='id send_SearchResultEntry'>send_SearchResultEntry</span><span class='lparen'>(</span><span class='id baseObject'>baseObject</span><span class='comma'>,</span> <span class='ivar'>@schema</span><span class='period'>.</span><span class='id subschema_subentry'>subschema_subentry</span><span class='rparen'>)</span> <span class='kw'>if</span>
|
2027
|
-
<span class='ivar'>@schema</span> <span class='kw'>and</span> <span class='ivar'>@schema</span><span class='period'>.</span><span class='id subschema_subentry'>subschema_subentry</span> <span class='kw'>and</span>
|
2028
|
-
<span class='const'>LDAP</span><span class='op'>::</span><span class='const'>Server</span><span class='op'>::</span><span class='const'>Filter</span><span class='period'>.</span><span class='id run'>run</span><span class='lparen'>(</span><span class='id filter'>filter</span><span class='comma'>,</span> <span class='ivar'>@schema</span><span class='period'>.</span><span class='id subschema_subentry'>subschema_subentry</span><span class='rparen'>)</span>
|
2029
|
-
<span class='id send_SearchResultDone'>send_SearchResultDone</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span>
|
2030
|
-
<span class='kw'>return</span>
|
2031
|
-
<span class='kw'>end</span>
|
2032
|
-
|
2033
|
-
<span class='id t'>t</span> <span class='op'>=</span> <span class='id server_timelimit'>server_timelimit</span> <span class='op'>||</span> <span class='int'>10</span>
|
2034
|
-
<span class='id t'>t</span> <span class='op'>=</span> <span class='id client_timelimit'>client_timelimit</span> <span class='kw'>if</span> <span class='id client_timelimit'>client_timelimit</span> <span class='op'>></span> <span class='int'>0</span> <span class='kw'>and</span> <span class='id client_timelimit'>client_timelimit</span> <span class='op'><</span> <span class='id t'>t</span>
|
2035
|
-
|
2036
|
-
<span class='const'>Timeout</span><span class='op'>::</span><span class='id timeout'>timeout</span><span class='lparen'>(</span><span class='id t'>t</span><span class='comma'>,</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>TimeLimitExceeded</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
2037
|
-
<span class='id search'>search</span><span class='lparen'>(</span><span class='id baseObject'>baseObject</span><span class='comma'>,</span> <span class='id scope'>scope</span><span class='comma'>,</span> <span class='id deref'>deref</span><span class='comma'>,</span> <span class='id filter'>filter</span><span class='rparen'>)</span>
|
2038
|
-
<span class='kw'>end</span>
|
2039
|
-
<span class='id send_SearchResultDone'>send_SearchResultDone</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span>
|
2040
|
-
|
2041
|
-
<span class='comment'># Note that TimeLimitExceeded is a subclass of LDAP::ResultError
|
2042
|
-
</span><span class='kw'>rescue</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span> <span class='op'>=></span> <span class='id e'>e</span>
|
2043
|
-
<span class='id send_SearchResultDone'>send_SearchResultDone</span><span class='lparen'>(</span><span class='id e'>e</span><span class='period'>.</span><span class='id to_i'>to_i</span><span class='comma'>,</span> <span class='symbol'>:errorMessage</span><span class='op'>=></span><span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span><span class='rparen'>)</span>
|
2044
|
-
|
2045
|
-
<span class='kw'>rescue</span> <span class='const'>Abandon</span>
|
2046
|
-
<span class='comment'># send no response
|
2047
|
-
</span>
|
2048
|
-
<span class='comment'># Since this Operation is running in its own thread, we have to
|
2049
|
-
</span><span class='comment'># catch all other exceptions. Otherwise, in the event of a programming
|
2050
|
-
</span><span class='comment'># error, this thread will silently terminate and the client will wait
|
2051
|
-
</span><span class='comment'># forever for a response.
|
2052
|
-
</span>
|
2053
|
-
<span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=></span> <span class='id e'>e</span>
|
2054
|
-
<span class='id log_exception'>log_exception</span><span class='lparen'>(</span><span class='id e'>e</span><span class='rparen'>)</span>
|
2055
|
-
<span class='id send_SearchResultDone'>send_SearchResultDone</span><span class='lparen'>(</span><span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>OperationsError</span><span class='period'>.</span><span class='id new'>new</span><span class='period'>.</span><span class='id to_i'>to_i</span><span class='comma'>,</span> <span class='symbol'>:errorMessage</span><span class='op'>=></span><span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span><span class='rparen'>)</span>
|
2056
|
-
<span class='kw'>end</span></pre>
|
2057
|
-
</td>
|
2058
|
-
</tr>
|
2059
|
-
</table>
|
2060
|
-
</div>
|
2061
|
-
|
2062
|
-
<div class="method_details ">
|
2063
|
-
<p class="signature " id="log-instance_method">
|
2064
|
-
|
2065
|
-
- (<tt>Object</tt>) <strong>log</strong>(*args)
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2069
|
-
</p><div class="docstring">
|
2070
|
-
<div class="discussion">
|
2071
|
-
<p>
|
2072
|
-
Send a log message
|
2073
|
-
</p>
|
2074
|
-
|
2075
|
-
|
2076
|
-
</div>
|
2077
|
-
</div>
|
2078
|
-
<div class="tags">
|
2079
|
-
|
2080
|
-
</div><table class="source_code">
|
2081
|
-
<tr>
|
2082
|
-
<td>
|
2083
|
-
<pre class="lines">
|
2084
|
-
|
2085
|
-
|
2086
|
-
43
|
2087
|
-
44
|
2088
|
-
45</pre>
|
2089
|
-
</td>
|
2090
|
-
<td>
|
2091
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 43</span>
|
2092
|
-
|
2093
|
-
<span class='kw'>def</span> <span class='id log'>log</span><span class='lparen'>(</span><span class='op'>*</span><span class='id args'>args</span><span class='rparen'>)</span>
|
2094
|
-
<span class='ivar'>@connection</span><span class='period'>.</span><span class='id log'>log</span><span class='lparen'>(</span><span class='op'>*</span><span class='id args'>args</span><span class='rparen'>)</span>
|
2095
|
-
<span class='kw'>end</span></pre>
|
2096
|
-
</td>
|
2097
|
-
</tr>
|
2098
|
-
</table>
|
2099
|
-
</div>
|
2100
|
-
|
2101
|
-
<div class="method_details ">
|
2102
|
-
<p class="signature " id="log_exception-instance_method">
|
2103
|
-
|
2104
|
-
- (<tt>Object</tt>) <strong>log_exception</strong>(e)
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2108
|
-
</p><div class="docstring">
|
2109
|
-
<div class="discussion">
|
2110
|
-
<p>
|
2111
|
-
Send an exception report to the log
|
2112
|
-
</p>
|
2113
|
-
|
2114
|
-
|
2115
|
-
</div>
|
2116
|
-
</div>
|
2117
|
-
<div class="tags">
|
2118
|
-
|
2119
|
-
</div><table class="source_code">
|
2120
|
-
<tr>
|
2121
|
-
<td>
|
2122
|
-
<pre class="lines">
|
2123
|
-
|
2124
|
-
|
2125
|
-
49
|
2126
|
-
50
|
2127
|
-
51</pre>
|
2128
|
-
</td>
|
2129
|
-
<td>
|
2130
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 49</span>
|
2131
|
-
|
2132
|
-
<span class='kw'>def</span> <span class='id log_exception'>log_exception</span><span class='lparen'>(</span><span class='id e'>e</span><span class='rparen'>)</span>
|
2133
|
-
<span class='ivar'>@connection</span><span class='period'>.</span><span class='id log'>log</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id e'>e</span><span class='rbrace'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='id e'>e</span><span class='period'>.</span><span class='id backtrace'>backtrace</span><span class='period'>.</span><span class='id join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n\tfrom </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
2134
|
-
<span class='kw'>end</span></pre>
|
2135
|
-
</td>
|
2136
|
-
</tr>
|
2137
|
-
</table>
|
2138
|
-
</div>
|
2139
|
-
|
2140
|
-
<div class="method_details ">
|
2141
|
-
<p class="signature " id="modify-instance_method">
|
2142
|
-
|
2143
|
-
- (<tt>Object</tt>) <strong>modify</strong>(dn, modification)
|
2144
|
-
|
2145
|
-
|
2146
|
-
|
2147
|
-
</p><div class="docstring">
|
2148
|
-
<div class="discussion">
|
2149
|
-
<p>
|
2150
|
-
Handle a modify request; override this
|
2151
|
-
</p>
|
2152
|
-
<p>
|
2153
|
-
dn is the object to modify; modification is a hash of
|
2154
|
-
</p>
|
2155
|
-
<pre class="code">
|
2156
|
-
attr => [:add, val, val...] -- add operation
|
2157
|
-
attr => [:replace, val, val...] -- replace operation
|
2158
|
-
attr => [:delete, val, val...] -- delete these values
|
2159
|
-
attr => [:delete] -- delete all values</pre>
|
2160
|
-
|
2161
|
-
|
2162
|
-
</div>
|
2163
|
-
</div>
|
2164
|
-
<div class="tags">
|
2165
|
-
<h3>Raises:</h3>
|
2166
|
-
<ul class="raise">
|
2167
|
-
|
2168
|
-
<li>
|
2169
|
-
|
2170
|
-
<span class='type'>(<tt><span class='object_link'><a href="../ResultError/UnwillingToPerform.html" title="LDAP::ResultError::UnwillingToPerform (class)">LDAP::ResultError::UnwillingToPerform</a></span></tt>)</span>
|
2171
|
-
|
2172
|
-
|
2173
|
-
|
2174
|
-
|
2175
|
-
</li>
|
2176
|
-
|
2177
|
-
</ul>
|
2178
|
-
|
2179
|
-
</div><table class="source_code">
|
2180
|
-
<tr>
|
2181
|
-
<td>
|
2182
|
-
<pre class="lines">
|
2183
|
-
|
2184
|
-
|
2185
|
-
451
|
2186
|
-
452
|
2187
|
-
453</pre>
|
2188
|
-
</td>
|
2189
|
-
<td>
|
2190
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 451</span>
|
2191
|
-
|
2192
|
-
<span class='kw'>def</span> <span class='id modify'>modify</span><span class='lparen'>(</span><span class='id dn'>dn</span><span class='comma'>,</span> <span class='id modification'>modification</span><span class='rparen'>)</span>
|
2193
|
-
<span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>UnwillingToPerform</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>modify not implemented</span><span class='tstring_end'>"</span></span>
|
2194
|
-
<span class='kw'>end</span></pre>
|
2195
|
-
</td>
|
2196
|
-
</tr>
|
2197
|
-
</table>
|
2198
|
-
</div>
|
2199
|
-
|
2200
|
-
<div class="method_details ">
|
2201
|
-
<p class="signature " id="modifydn-instance_method">
|
2202
|
-
|
2203
|
-
- (<tt>Object</tt>) <strong>modifydn</strong>(entry, newrdn, deleteoldrdn, newSuperior)
|
2204
|
-
|
2205
|
-
|
2206
|
-
|
2207
|
-
</p><div class="docstring">
|
2208
|
-
<div class="discussion">
|
2209
|
-
<p>
|
2210
|
-
Handle a modifydn request; override this
|
2211
|
-
</p>
|
2212
|
-
|
2213
|
-
|
2214
|
-
</div>
|
2215
|
-
</div>
|
2216
|
-
<div class="tags">
|
2217
|
-
<h3>Raises:</h3>
|
2218
|
-
<ul class="raise">
|
2219
|
-
|
2220
|
-
<li>
|
2221
|
-
|
2222
|
-
<span class='type'>(<tt><span class='object_link'><a href="../ResultError/UnwillingToPerform.html" title="LDAP::ResultError::UnwillingToPerform (class)">LDAP::ResultError::UnwillingToPerform</a></span></tt>)</span>
|
2223
|
-
|
2224
|
-
|
2225
|
-
|
2226
|
-
|
2227
|
-
</li>
|
2228
|
-
|
2229
|
-
</ul>
|
2230
|
-
|
2231
|
-
</div><table class="source_code">
|
2232
|
-
<tr>
|
2233
|
-
<td>
|
2234
|
-
<pre class="lines">
|
2235
|
-
|
2236
|
-
|
2237
|
-
474
|
2238
|
-
475
|
2239
|
-
476</pre>
|
2240
|
-
</td>
|
2241
|
-
<td>
|
2242
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 474</span>
|
2243
|
-
|
2244
|
-
<span class='kw'>def</span> <span class='id modifydn'>modifydn</span><span class='lparen'>(</span><span class='id entry'>entry</span><span class='comma'>,</span> <span class='id newrdn'>newrdn</span><span class='comma'>,</span> <span class='id deleteoldrdn'>deleteoldrdn</span><span class='comma'>,</span> <span class='id newSuperior'>newSuperior</span><span class='rparen'>)</span>
|
2245
|
-
<span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>UnwillingToPerform</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>modifydn not implemented</span><span class='tstring_end'>"</span></span>
|
2246
|
-
<span class='kw'>end</span></pre>
|
2247
|
-
</td>
|
2248
|
-
</tr>
|
2249
|
-
</table>
|
2250
|
-
</div>
|
2251
|
-
|
2252
|
-
<div class="method_details ">
|
2253
|
-
<p class="signature " id="search-instance_method">
|
2254
|
-
|
2255
|
-
- (<tt>Object</tt>) <strong>search</strong>(basedn, scope, deref, filter, attrs)
|
2256
|
-
|
2257
|
-
|
2258
|
-
|
2259
|
-
</p><div class="docstring">
|
2260
|
-
<div class="discussion">
|
2261
|
-
<p>
|
2262
|
-
Handle a search request; override this.
|
2263
|
-
</p>
|
2264
|
-
<p>
|
2265
|
-
Call send_SearchResultEntry for each result found. Raise an exception if
|
2266
|
-
there is a problem. timeLimit, sizeLimit and typesOnly are taken care of,
|
2267
|
-
but you need to perform all authorisation checks yourself, using
|
2268
|
-
@connection.binddn
|
2269
|
-
</p>
|
2270
|
-
|
2271
|
-
|
2272
|
-
</div>
|
2273
|
-
</div>
|
2274
|
-
<div class="tags">
|
2275
|
-
<h3>Raises:</h3>
|
2276
|
-
<ul class="raise">
|
2277
|
-
|
2278
|
-
<li>
|
2279
|
-
|
2280
|
-
<span class='type'>(<tt><span class='object_link'><a href="../ResultError/UnwillingToPerform.html" title="LDAP::ResultError::UnwillingToPerform (class)">LDAP::ResultError::UnwillingToPerform</a></span></tt>)</span>
|
2281
|
-
|
2282
|
-
|
2283
|
-
|
2284
|
-
|
2285
|
-
</li>
|
2286
|
-
|
2287
|
-
</ul>
|
2288
|
-
|
2289
|
-
</div><table class="source_code">
|
2290
|
-
<tr>
|
2291
|
-
<td>
|
2292
|
-
<pre class="lines">
|
2293
|
-
|
2294
|
-
|
2295
|
-
439
|
2296
|
-
440
|
2297
|
-
441</pre>
|
2298
|
-
</td>
|
2299
|
-
<td>
|
2300
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 439</span>
|
2301
|
-
|
2302
|
-
<span class='kw'>def</span> <span class='id search'>search</span><span class='lparen'>(</span><span class='id basedn'>basedn</span><span class='comma'>,</span> <span class='id scope'>scope</span><span class='comma'>,</span> <span class='id deref'>deref</span><span class='comma'>,</span> <span class='id filter'>filter</span><span class='comma'>,</span> <span class='id attrs'>attrs</span><span class='rparen'>)</span>
|
2303
|
-
<span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>UnwillingToPerform</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>search not implemented</span><span class='tstring_end'>"</span></span>
|
2304
|
-
<span class='kw'>end</span></pre>
|
2305
|
-
</td>
|
2306
|
-
</tr>
|
2307
|
-
</table>
|
2308
|
-
</div>
|
2309
|
-
|
2310
|
-
<div class="method_details ">
|
2311
|
-
<p class="signature " id="send_AddResponse-instance_method">
|
2312
|
-
|
2313
|
-
- (<tt>Object</tt>) <strong>send_AddResponse</strong>(resultCode, opt = {})
|
2314
|
-
|
2315
|
-
|
2316
|
-
|
2317
|
-
</p><table class="source_code">
|
2318
|
-
<tr>
|
2319
|
-
<td>
|
2320
|
-
<pre class="lines">
|
2321
|
-
|
2322
|
-
|
2323
|
-
160
|
2324
|
-
161
|
2325
|
-
162</pre>
|
2326
|
-
</td>
|
2327
|
-
<td>
|
2328
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 160</span>
|
2329
|
-
|
2330
|
-
<span class='kw'>def</span> <span class='id send_AddResponse'>send_AddResponse</span><span class='lparen'>(</span><span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2331
|
-
<span class='id send_LDAPResult'>send_LDAPResult</span><span class='lparen'>(</span><span class='int'>9</span><span class='comma'>,</span> <span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='rparen'>)</span>
|
2332
|
-
<span class='kw'>end</span></pre>
|
2333
|
-
</td>
|
2334
|
-
</tr>
|
2335
|
-
</table>
|
2336
|
-
</div>
|
2337
|
-
|
2338
|
-
<div class="method_details ">
|
2339
|
-
<p class="signature " id="send_BindResponse-instance_method">
|
2340
|
-
|
2341
|
-
- (<tt>Object</tt>) <strong>send_BindResponse</strong>(resultCode, opt = {})
|
2342
|
-
|
2343
|
-
|
2344
|
-
|
2345
|
-
</p><table class="source_code">
|
2346
|
-
<tr>
|
2347
|
-
<td>
|
2348
|
-
<pre class="lines">
|
2349
|
-
|
2350
|
-
|
2351
|
-
89
|
2352
|
-
90
|
2353
|
-
91
|
2354
|
-
92
|
2355
|
-
93
|
2356
|
-
94
|
2357
|
-
95</pre>
|
2358
|
-
</td>
|
2359
|
-
<td>
|
2360
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 89</span>
|
2361
|
-
|
2362
|
-
<span class='kw'>def</span> <span class='id send_BindResponse'>send_BindResponse</span><span class='lparen'>(</span><span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2363
|
-
<span class='id send_LDAPResult'>send_LDAPResult</span><span class='lparen'>(</span><span class='int'>1</span><span class='comma'>,</span> <span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id resp'>resp</span><span class='op'>|</span>
|
2364
|
-
<span class='kw'>if</span> <span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:serverSaslCreds</span><span class='rbracket'>]</span>
|
2365
|
-
<span class='id resp'>resp</span> <span class='op'><<</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:serverSaslCreds</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='int'>7</span><span class='comma'>,</span> <span class='symbol'>:IMPLICIT</span><span class='comma'>,</span> <span class='symbol'>:APPLICATION</span><span class='rparen'>)</span>
|
2366
|
-
<span class='kw'>end</span>
|
2367
|
-
<span class='kw'>end</span>
|
2368
|
-
<span class='kw'>end</span></pre>
|
2369
|
-
</td>
|
2370
|
-
</tr>
|
2371
|
-
</table>
|
2372
|
-
</div>
|
2373
|
-
|
2374
|
-
<div class="method_details ">
|
2375
|
-
<p class="signature " id="send_CompareResponse-instance_method">
|
2376
|
-
|
2377
|
-
- (<tt>Object</tt>) <strong>send_CompareResponse</strong>(resultCode, opt = {})
|
2378
|
-
|
2379
|
-
|
2380
|
-
|
2381
|
-
</p><table class="source_code">
|
2382
|
-
<tr>
|
2383
|
-
<td>
|
2384
|
-
<pre class="lines">
|
2385
|
-
|
2386
|
-
|
2387
|
-
172
|
2388
|
-
173
|
2389
|
-
174</pre>
|
2390
|
-
</td>
|
2391
|
-
<td>
|
2392
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 172</span>
|
2393
|
-
|
2394
|
-
<span class='kw'>def</span> <span class='id send_CompareResponse'>send_CompareResponse</span><span class='lparen'>(</span><span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2395
|
-
<span class='id send_LDAPResult'>send_LDAPResult</span><span class='lparen'>(</span><span class='int'>15</span><span class='comma'>,</span> <span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='rparen'>)</span>
|
2396
|
-
<span class='kw'>end</span></pre>
|
2397
|
-
</td>
|
2398
|
-
</tr>
|
2399
|
-
</table>
|
2400
|
-
</div>
|
2401
|
-
|
2402
|
-
<div class="method_details ">
|
2403
|
-
<p class="signature " id="send_DelResponse-instance_method">
|
2404
|
-
|
2405
|
-
- (<tt>Object</tt>) <strong>send_DelResponse</strong>(resultCode, opt = {})
|
2406
|
-
|
2407
|
-
|
2408
|
-
|
2409
|
-
</p><table class="source_code">
|
2410
|
-
<tr>
|
2411
|
-
<td>
|
2412
|
-
<pre class="lines">
|
2413
|
-
|
2414
|
-
|
2415
|
-
164
|
2416
|
-
165
|
2417
|
-
166</pre>
|
2418
|
-
</td>
|
2419
|
-
<td>
|
2420
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 164</span>
|
2421
|
-
|
2422
|
-
<span class='kw'>def</span> <span class='id send_DelResponse'>send_DelResponse</span><span class='lparen'>(</span><span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2423
|
-
<span class='id send_LDAPResult'>send_LDAPResult</span><span class='lparen'>(</span><span class='int'>11</span><span class='comma'>,</span> <span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='rparen'>)</span>
|
2424
|
-
<span class='kw'>end</span></pre>
|
2425
|
-
</td>
|
2426
|
-
</tr>
|
2427
|
-
</table>
|
2428
|
-
</div>
|
2429
|
-
|
2430
|
-
<div class="method_details ">
|
2431
|
-
<p class="signature " id="send_ExtendedResponse-instance_method">
|
2432
|
-
|
2433
|
-
- (<tt>Object</tt>) <strong>send_ExtendedResponse</strong>(resultCode, opt = {})
|
2434
|
-
|
2435
|
-
|
2436
|
-
|
2437
|
-
</p><table class="source_code">
|
2438
|
-
<tr>
|
2439
|
-
<td>
|
2440
|
-
<pre class="lines">
|
2441
|
-
|
2442
|
-
|
2443
|
-
176
|
2444
|
-
177
|
2445
|
-
178
|
2446
|
-
179
|
2447
|
-
180
|
2448
|
-
181
|
2449
|
-
182
|
2450
|
-
183
|
2451
|
-
184
|
2452
|
-
185</pre>
|
2453
|
-
</td>
|
2454
|
-
<td>
|
2455
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 176</span>
|
2456
|
-
|
2457
|
-
<span class='kw'>def</span> <span class='id send_ExtendedResponse'>send_ExtendedResponse</span><span class='lparen'>(</span><span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2458
|
-
<span class='id send_LDAPResult'>send_LDAPResult</span><span class='lparen'>(</span><span class='int'>24</span><span class='comma'>,</span> <span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id resp'>resp</span><span class='op'>|</span>
|
2459
|
-
<span class='kw'>if</span> <span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:responseName</span><span class='rbracket'>]</span>
|
2460
|
-
<span class='id resp'>resp</span> <span class='op'><<</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:responseName</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='int'>10</span><span class='comma'>,</span> <span class='symbol'>:IMPLICIT</span><span class='comma'>,</span> <span class='symbol'>:APPLICATION</span><span class='rparen'>)</span>
|
2461
|
-
<span class='kw'>end</span>
|
2462
|
-
<span class='kw'>if</span> <span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:response</span><span class='rbracket'>]</span>
|
2463
|
-
<span class='id resp'>resp</span> <span class='op'><<</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:response</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='int'>11</span><span class='comma'>,</span> <span class='symbol'>:IMPLICIT</span><span class='comma'>,</span> <span class='symbol'>:APPLICATION</span><span class='rparen'>)</span>
|
2464
|
-
<span class='kw'>end</span>
|
2465
|
-
<span class='kw'>end</span>
|
2466
|
-
<span class='kw'>end</span></pre>
|
2467
|
-
</td>
|
2468
|
-
</tr>
|
2469
|
-
</table>
|
2470
|
-
</div>
|
2471
|
-
|
2472
|
-
<div class="method_details ">
|
2473
|
-
<p class="signature " id="send_LDAPMessage-instance_method">
|
2474
|
-
|
2475
|
-
- (<tt>Object</tt>) <strong>send_LDAPMessage</strong>(protocolOp, opt = {})
|
2476
|
-
|
2477
|
-
|
2478
|
-
|
2479
|
-
</p><div class="docstring">
|
2480
|
-
<div class="discussion">
|
2481
|
-
<p>
|
2482
|
-
################################################ # Utility methods to send
|
2483
|
-
protocol responses ### ################################################
|
2484
|
-
</p>
|
2485
|
-
|
2486
|
-
|
2487
|
-
</div>
|
2488
|
-
</div>
|
2489
|
-
<div class="tags">
|
2490
|
-
|
2491
|
-
</div><table class="source_code">
|
2492
|
-
<tr>
|
2493
|
-
<td>
|
2494
|
-
<pre class="lines">
|
2495
|
-
|
2496
|
-
|
2497
|
-
57
|
2498
|
-
58
|
2499
|
-
59
|
2500
|
-
60
|
2501
|
-
61
|
2502
|
-
62
|
2503
|
-
63
|
2504
|
-
64
|
2505
|
-
65
|
2506
|
-
66
|
2507
|
-
67
|
2508
|
-
68
|
2509
|
-
69
|
2510
|
-
70
|
2511
|
-
71
|
2512
|
-
72</pre>
|
2513
|
-
</td>
|
2514
|
-
<td>
|
2515
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 57</span>
|
2516
|
-
|
2517
|
-
<span class='kw'>def</span> <span class='id send_LDAPMessage'>send_LDAPMessage</span><span class='lparen'>(</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='comment'># :nodoc:
|
2518
|
-
</span> <span class='ivar'>@respEnvelope</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id protocolOp'>protocolOp</span>
|
2519
|
-
<span class='kw'>if</span> <span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:controls</span><span class='rbracket'>]</span>
|
2520
|
-
<span class='ivar'>@respEnvelope</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Set</span><span class='lparen'>(</span><span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:controls</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='int'>0</span><span class='comma'>,</span> <span class='symbol'>:IMPLICIT</span><span class='comma'>,</span> <span class='const'>APPLICATION</span><span class='rparen'>)</span>
|
2521
|
-
<span class='kw'>else</span>
|
2522
|
-
<span class='ivar'>@respEnvelope</span><span class='period'>.</span><span class='id value'>value</span><span class='period'>.</span><span class='id delete_at'>delete_at</span><span class='lparen'>(</span><span class='int'>2</span><span class='rparen'>)</span>
|
2523
|
-
<span class='kw'>end</span>
|
2524
|
-
|
2525
|
-
<span class='kw'>if</span> <span class='kw'>false</span> <span class='comment'># $debug
|
2526
|
-
</span> <span class='id puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Response:</span><span class='tstring_end'>"</span></span>
|
2527
|
-
<span class='id p'>p</span> <span class='ivar'>@respEnvelope</span>
|
2528
|
-
<span class='id p'>p</span> <span class='ivar'>@respEnvelope</span><span class='period'>.</span><span class='id to_der'>to_der</span><span class='period'>.</span><span class='id unpack'>unpack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>H*</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
2529
|
-
<span class='kw'>end</span>
|
2530
|
-
|
2531
|
-
<span class='ivar'>@connection</span><span class='period'>.</span><span class='id write'>write</span><span class='lparen'>(</span><span class='ivar'>@respEnvelope</span><span class='period'>.</span><span class='id to_der'>to_der</span><span class='rparen'>)</span>
|
2532
|
-
<span class='kw'>end</span></pre>
|
2533
|
-
</td>
|
2534
|
-
</tr>
|
2535
|
-
</table>
|
2536
|
-
</div>
|
2537
|
-
|
2538
|
-
<div class="method_details ">
|
2539
|
-
<p class="signature " id="send_LDAPResult-instance_method">
|
2540
|
-
|
2541
|
-
- (<tt>Object</tt>) <strong>send_LDAPResult</strong>(tag, resultCode, opt = {}) {|seq| ... }
|
2542
|
-
|
2543
|
-
|
2544
|
-
|
2545
|
-
</p><div class="docstring">
|
2546
|
-
<div class="discussion">
|
2547
|
-
<p>
|
2548
|
-
:nodoc:
|
2549
|
-
</p>
|
2550
|
-
|
2551
|
-
|
2552
|
-
</div>
|
2553
|
-
</div>
|
2554
|
-
<div class="tags">
|
2555
|
-
<h3>Yields:</h3>
|
2556
|
-
<ul class="yield">
|
2557
|
-
|
2558
|
-
<li>
|
2559
|
-
|
2560
|
-
<span class='type'>(<tt>seq</tt>)</span>
|
2561
|
-
|
2562
|
-
|
2563
|
-
|
2564
|
-
|
2565
|
-
</li>
|
2566
|
-
|
2567
|
-
</ul>
|
2568
|
-
|
2569
|
-
</div><table class="source_code">
|
2570
|
-
<tr>
|
2571
|
-
<td>
|
2572
|
-
<pre class="lines">
|
2573
|
-
|
2574
|
-
|
2575
|
-
74
|
2576
|
-
75
|
2577
|
-
76
|
2578
|
-
77
|
2579
|
-
78
|
2580
|
-
79
|
2581
|
-
80
|
2582
|
-
81
|
2583
|
-
82
|
2584
|
-
83
|
2585
|
-
84
|
2586
|
-
85
|
2587
|
-
86
|
2588
|
-
87</pre>
|
2589
|
-
</td>
|
2590
|
-
<td>
|
2591
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 74</span>
|
2592
|
-
|
2593
|
-
<span class='kw'>def</span> <span class='id send_LDAPResult'>send_LDAPResult</span><span class='lparen'>(</span><span class='id tag'>tag</span><span class='comma'>,</span> <span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='comment'># :nodoc:
|
2594
|
-
</span> <span class='id seq'>seq</span> <span class='op'>=</span> <span class='lbracket'>[</span>
|
2595
|
-
<span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Enumerated</span><span class='lparen'>(</span><span class='id resultCode'>resultCode</span><span class='rparen'>)</span><span class='comma'>,</span>
|
2596
|
-
<span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:matchedDN</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span>
|
2597
|
-
<span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:errorMessage</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span>
|
2598
|
-
<span class='rbracket'>]</span>
|
2599
|
-
<span class='kw'>if</span> <span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:referral</span><span class='rbracket'>]</span>
|
2600
|
-
<span class='id rs'>rs</span> <span class='op'>=</span> <span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:referral</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id r'>r</span><span class='op'>|</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id r'>r</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
2601
|
-
<span class='id seq'>seq</span> <span class='op'><<</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Sequence</span><span class='lparen'>(</span><span class='id rs'>rs</span><span class='comma'>,</span> <span class='int'>3</span><span class='comma'>,</span> <span class='symbol'>:IMPLICIT</span><span class='comma'>,</span> <span class='symbol'>:APPLICATION</span><span class='rparen'>)</span>
|
2602
|
-
<span class='kw'>end</span>
|
2603
|
-
<span class='kw'>yield</span> <span class='id seq'>seq</span> <span class='kw'>if</span> <span class='id block_given?'>block_given?</span> <span class='comment'># opportunity to add more elements
|
2604
|
-
</span>
|
2605
|
-
<span class='id send_LDAPMessage'>send_LDAPMessage</span><span class='lparen'>(</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Sequence</span><span class='lparen'>(</span><span class='id seq'>seq</span><span class='comma'>,</span> <span class='id tag'>tag</span><span class='comma'>,</span> <span class='symbol'>:IMPLICIT</span><span class='comma'>,</span> <span class='symbol'>:APPLICATION</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='rparen'>)</span>
|
2606
|
-
<span class='kw'>end</span></pre>
|
2607
|
-
</td>
|
2608
|
-
</tr>
|
2609
|
-
</table>
|
2610
|
-
</div>
|
2611
|
-
|
2612
|
-
<div class="method_details ">
|
2613
|
-
<p class="signature " id="send_ModifyDNResponse-instance_method">
|
2614
|
-
|
2615
|
-
- (<tt>Object</tt>) <strong>send_ModifyDNResponse</strong>(resultCode, opt = {})
|
2616
|
-
|
2617
|
-
|
2618
|
-
|
2619
|
-
</p><table class="source_code">
|
2620
|
-
<tr>
|
2621
|
-
<td>
|
2622
|
-
<pre class="lines">
|
2623
|
-
|
2624
|
-
|
2625
|
-
168
|
2626
|
-
169
|
2627
|
-
170</pre>
|
2628
|
-
</td>
|
2629
|
-
<td>
|
2630
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 168</span>
|
2631
|
-
|
2632
|
-
<span class='kw'>def</span> <span class='id send_ModifyDNResponse'>send_ModifyDNResponse</span><span class='lparen'>(</span><span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2633
|
-
<span class='id send_LDAPResult'>send_LDAPResult</span><span class='lparen'>(</span><span class='int'>13</span><span class='comma'>,</span> <span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='rparen'>)</span>
|
2634
|
-
<span class='kw'>end</span></pre>
|
2635
|
-
</td>
|
2636
|
-
</tr>
|
2637
|
-
</table>
|
2638
|
-
</div>
|
2639
|
-
|
2640
|
-
<div class="method_details ">
|
2641
|
-
<p class="signature " id="send_ModifyResponse-instance_method">
|
2642
|
-
|
2643
|
-
- (<tt>Object</tt>) <strong>send_ModifyResponse</strong>(resultCode, opt = {})
|
2644
|
-
|
2645
|
-
|
2646
|
-
|
2647
|
-
</p><table class="source_code">
|
2648
|
-
<tr>
|
2649
|
-
<td>
|
2650
|
-
<pre class="lines">
|
2651
|
-
|
2652
|
-
|
2653
|
-
156
|
2654
|
-
157
|
2655
|
-
158</pre>
|
2656
|
-
</td>
|
2657
|
-
<td>
|
2658
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 156</span>
|
2659
|
-
|
2660
|
-
<span class='kw'>def</span> <span class='id send_ModifyResponse'>send_ModifyResponse</span><span class='lparen'>(</span><span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2661
|
-
<span class='id send_LDAPResult'>send_LDAPResult</span><span class='lparen'>(</span><span class='int'>7</span><span class='comma'>,</span> <span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='rparen'>)</span>
|
2662
|
-
<span class='kw'>end</span></pre>
|
2663
|
-
</td>
|
2664
|
-
</tr>
|
2665
|
-
</table>
|
2666
|
-
</div>
|
2667
|
-
|
2668
|
-
<div class="method_details ">
|
2669
|
-
<p class="signature " id="send_SearchResultDone-instance_method">
|
2670
|
-
|
2671
|
-
- (<tt>Object</tt>) <strong>send_SearchResultDone</strong>(resultCode, opt = {})
|
2672
|
-
|
2673
|
-
|
2674
|
-
|
2675
|
-
</p><table class="source_code">
|
2676
|
-
<tr>
|
2677
|
-
<td>
|
2678
|
-
<pre class="lines">
|
2679
|
-
|
2680
|
-
|
2681
|
-
152
|
2682
|
-
153
|
2683
|
-
154</pre>
|
2684
|
-
</td>
|
2685
|
-
<td>
|
2686
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 152</span>
|
2687
|
-
|
2688
|
-
<span class='kw'>def</span> <span class='id send_SearchResultDone'>send_SearchResultDone</span><span class='lparen'>(</span><span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2689
|
-
<span class='id send_LDAPResult'>send_LDAPResult</span><span class='lparen'>(</span><span class='int'>5</span><span class='comma'>,</span> <span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='rparen'>)</span>
|
2690
|
-
<span class='kw'>end</span></pre>
|
2691
|
-
</td>
|
2692
|
-
</tr>
|
2693
|
-
</table>
|
2694
|
-
</div>
|
2695
|
-
|
2696
|
-
<div class="method_details ">
|
2697
|
-
<p class="signature " id="send_SearchResultEntry-instance_method">
|
2698
|
-
|
2699
|
-
- (<tt>Object</tt>) <strong>send_SearchResultEntry</strong>(dn, avs, opt = {})
|
2700
|
-
|
2701
|
-
|
2702
|
-
|
2703
|
-
</p><div class="docstring">
|
2704
|
-
<div class="discussion">
|
2705
|
-
<p>
|
2706
|
-
Send a found entry. Avs are attr2=>[val2,val3] If schema
|
2707
|
-
given, return operational attributes only if explicitly requested
|
2708
|
-
</p>
|
2709
|
-
|
2710
|
-
|
2711
|
-
</div>
|
2712
|
-
</div>
|
2713
|
-
<div class="tags">
|
2714
|
-
|
2715
|
-
</div><table class="source_code">
|
2716
|
-
<tr>
|
2717
|
-
<td>
|
2718
|
-
<pre class="lines">
|
2719
|
-
|
2720
|
-
|
2721
|
-
101
|
2722
|
-
102
|
2723
|
-
103
|
2724
|
-
104
|
2725
|
-
105
|
2726
|
-
106
|
2727
|
-
107
|
2728
|
-
108
|
2729
|
-
109
|
2730
|
-
110
|
2731
|
-
111
|
2732
|
-
112
|
2733
|
-
113
|
2734
|
-
114
|
2735
|
-
115
|
2736
|
-
116
|
2737
|
-
117
|
2738
|
-
118
|
2739
|
-
119
|
2740
|
-
120
|
2741
|
-
121
|
2742
|
-
122
|
2743
|
-
123
|
2744
|
-
124
|
2745
|
-
125
|
2746
|
-
126
|
2747
|
-
127
|
2748
|
-
128
|
2749
|
-
129
|
2750
|
-
130
|
2751
|
-
131
|
2752
|
-
132
|
2753
|
-
133
|
2754
|
-
134
|
2755
|
-
135
|
2756
|
-
136
|
2757
|
-
137
|
2758
|
-
138
|
2759
|
-
139
|
2760
|
-
140
|
2761
|
-
141
|
2762
|
-
142</pre>
|
2763
|
-
</td>
|
2764
|
-
<td>
|
2765
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 101</span>
|
2766
|
-
|
2767
|
-
<span class='kw'>def</span> <span class='id send_SearchResultEntry'>send_SearchResultEntry</span><span class='lparen'>(</span><span class='id dn'>dn</span><span class='comma'>,</span> <span class='id avs'>avs</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2768
|
-
<span class='ivar'>@rescount</span> <span class='op'>+=</span> <span class='int'>1</span>
|
2769
|
-
<span class='kw'>if</span> <span class='ivar'>@sizelimit</span>
|
2770
|
-
<span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>SizeLimitExceeded</span> <span class='kw'>if</span> <span class='ivar'>@rescount</span> <span class='op'>></span> <span class='ivar'>@sizelimit</span>
|
2771
|
-
<span class='kw'>end</span>
|
2772
|
-
|
2773
|
-
<span class='kw'>if</span> <span class='ivar'>@schema</span>
|
2774
|
-
<span class='comment'># normalize the attribute names
|
2775
|
-
</span> <span class='ivar'>@attributes</span> <span class='op'>=</span> <span class='ivar'>@attributes</span><span class='period'>.</span><span class='id collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id a'>a</span><span class='op'>|</span> <span class='ivar'>@schema</span><span class='period'>.</span><span class='id find_attrtype'>find_attrtype</span><span class='lparen'>(</span><span class='id a'>a</span><span class='rparen'>)</span><span class='period'>.</span><span class='id to_s'>to_s</span> <span class='rbrace'>}</span>
|
2776
|
-
<span class='kw'>end</span>
|
2777
|
-
|
2778
|
-
<span class='id sendall'>sendall</span> <span class='op'>=</span> <span class='ivar'>@attributes</span> <span class='op'>==</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='ivar'>@attributes</span><span class='period'>.</span><span class='id include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>*</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
2779
|
-
<span class='id avseq'>avseq</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
2780
|
-
|
2781
|
-
<span class='id avs'>avs</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id attr'>attr</span><span class='comma'>,</span> <span class='id vals'>vals</span><span class='op'>|</span>
|
2782
|
-
<span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@attributes</span><span class='period'>.</span><span class='id include?'>include?</span><span class='lparen'>(</span><span class='id attr'>attr</span><span class='rparen'>)</span>
|
2783
|
-
<span class='kw'>next</span> <span class='kw'>unless</span> <span class='id sendall'>sendall</span>
|
2784
|
-
<span class='kw'>if</span> <span class='ivar'>@schema</span>
|
2785
|
-
<span class='id a'>a</span> <span class='op'>=</span> <span class='ivar'>@schema</span><span class='period'>.</span><span class='id find_attrtype'>find_attrtype</span><span class='lparen'>(</span><span class='id attr'>attr</span><span class='rparen'>)</span>
|
2786
|
-
<span class='kw'>next</span> <span class='kw'>unless</span> <span class='id a'>a</span> <span class='kw'>and</span> <span class='lparen'>(</span><span class='id a'>a</span><span class='period'>.</span><span class='id usage'>usage</span><span class='period'>.</span><span class='id nil?'>nil?</span> <span class='kw'>or</span> <span class='id a'>a</span><span class='period'>.</span><span class='id usage'>usage</span> <span class='op'>==</span> <span class='symbol'>:userApplications</span><span class='rparen'>)</span>
|
2787
|
-
<span class='kw'>end</span>
|
2788
|
-
<span class='kw'>end</span>
|
2789
|
-
|
2790
|
-
<span class='kw'>if</span> <span class='ivar'>@typesOnly</span>
|
2791
|
-
<span class='id vals'>vals</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
2792
|
-
<span class='kw'>else</span>
|
2793
|
-
<span class='id vals'>vals</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id vals'>vals</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id vals'>vals</span><span class='period'>.</span><span class='id kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
|
2794
|
-
<span class='comment'># FIXME: optionally do a value_to_s conversion here?
|
2795
|
-
</span> <span class='comment'># FIXME: handle attribute;binary
|
2796
|
-
</span> <span class='kw'>end</span>
|
2797
|
-
|
2798
|
-
<span class='id avseq'>avseq</span> <span class='op'><<</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Sequence</span><span class='lparen'>(</span><span class='lbracket'>[</span>
|
2799
|
-
<span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id attr'>attr</span><span class='rparen'>)</span><span class='comma'>,</span>
|
2800
|
-
<span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Set</span><span class='lparen'>(</span><span class='id vals'>vals</span><span class='period'>.</span><span class='id collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id v'>v</span><span class='op'>|</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id v'>v</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='rparen'>)</span>
|
2801
|
-
<span class='rbracket'>]</span><span class='rparen'>)</span>
|
2802
|
-
<span class='kw'>end</span>
|
2803
|
-
|
2804
|
-
<span class='id send_LDAPMessage'>send_LDAPMessage</span><span class='lparen'>(</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Sequence</span><span class='lparen'>(</span><span class='lbracket'>[</span>
|
2805
|
-
<span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id dn'>dn</span><span class='rparen'>)</span><span class='comma'>,</span>
|
2806
|
-
<span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Sequence</span><span class='lparen'>(</span><span class='id avseq'>avseq</span><span class='rparen'>)</span><span class='comma'>,</span>
|
2807
|
-
<span class='rbracket'>]</span><span class='comma'>,</span> <span class='int'>4</span><span class='comma'>,</span> <span class='symbol'>:IMPLICIT</span><span class='comma'>,</span> <span class='symbol'>:APPLICATION</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='rparen'>)</span>
|
2808
|
-
<span class='kw'>end</span></pre>
|
2809
|
-
</td>
|
2810
|
-
</tr>
|
2811
|
-
</table>
|
2812
|
-
</div>
|
2813
|
-
|
2814
|
-
<div class="method_details ">
|
2815
|
-
<p class="signature " id="send_SearchResultReference-instance_method">
|
2816
|
-
|
2817
|
-
- (<tt>Object</tt>) <strong>send_SearchResultReference</strong>(urls, opt = {})
|
2818
|
-
|
2819
|
-
|
2820
|
-
|
2821
|
-
</p><table class="source_code">
|
2822
|
-
<tr>
|
2823
|
-
<td>
|
2824
|
-
<pre class="lines">
|
2825
|
-
|
2826
|
-
|
2827
|
-
144
|
2828
|
-
145
|
2829
|
-
146
|
2830
|
-
147
|
2831
|
-
148
|
2832
|
-
149
|
2833
|
-
150</pre>
|
2834
|
-
</td>
|
2835
|
-
<td>
|
2836
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 144</span>
|
2837
|
-
|
2838
|
-
<span class='kw'>def</span> <span class='id send_SearchResultReference'>send_SearchResultReference</span><span class='lparen'>(</span><span class='id urls'>urls</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2839
|
-
<span class='id send_LDAPMessage'>send_LDAPMessage</span><span class='lparen'>(</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Sequence</span><span class='lparen'>(</span>
|
2840
|
-
<span class='id urls'>urls</span><span class='period'>.</span><span class='id collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id url'>url</span><span class='op'>|</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id url'>url</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
2841
|
-
<span class='rparen'>)</span><span class='comma'>,</span>
|
2842
|
-
<span class='id opt'>opt</span>
|
2843
|
-
<span class='rparen'>)</span>
|
2844
|
-
<span class='kw'>end</span></pre>
|
2845
|
-
</td>
|
2846
|
-
</tr>
|
2847
|
-
</table>
|
2848
|
-
</div>
|
2849
|
-
|
2850
|
-
<div class="method_details ">
|
2851
|
-
<p class="signature " id="server_sizelimit-instance_method">
|
2852
|
-
|
2853
|
-
- (<tt>Object</tt>) <strong>server_sizelimit</strong>
|
2854
|
-
|
2855
|
-
|
2856
|
-
|
2857
|
-
</p><div class="docstring">
|
2858
|
-
<div class="discussion">
|
2859
|
-
<p>
|
2860
|
-
Server-set maximum size limit. Override for more complex behaviour (e.g.
|
2861
|
-
limit depends on @connection.binddn). Return nil for unlimited.
|
2862
|
-
</p>
|
2863
|
-
|
2864
|
-
|
2865
|
-
</div>
|
2866
|
-
</div>
|
2867
|
-
<div class="tags">
|
2868
|
-
|
2869
|
-
</div><table class="source_code">
|
2870
|
-
<tr>
|
2871
|
-
<td>
|
2872
|
-
<pre class="lines">
|
2873
|
-
|
2874
|
-
|
2875
|
-
410
|
2876
|
-
411
|
2877
|
-
412</pre>
|
2878
|
-
</td>
|
2879
|
-
<td>
|
2880
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 410</span>
|
2881
|
-
|
2882
|
-
<span class='kw'>def</span> <span class='id server_sizelimit'>server_sizelimit</span>
|
2883
|
-
<span class='ivar'>@connection</span><span class='period'>.</span><span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:sizelimit</span><span class='rbracket'>]</span>
|
2884
|
-
<span class='kw'>end</span></pre>
|
2885
|
-
</td>
|
2886
|
-
</tr>
|
2887
|
-
</table>
|
2888
|
-
</div>
|
2889
|
-
|
2890
|
-
<div class="method_details ">
|
2891
|
-
<p class="signature " id="server_timelimit-instance_method">
|
2892
|
-
|
2893
|
-
- (<tt>Object</tt>) <strong>server_timelimit</strong>
|
2894
|
-
|
2895
|
-
|
2896
|
-
|
2897
|
-
</p><div class="docstring">
|
2898
|
-
<div class="discussion">
|
2899
|
-
<p>
|
2900
|
-
Server-set maximum time limit. Override for more complex behaviour (e.g.
|
2901
|
-
limit depends on @connection.binddn). Nil uses hardcoded default.
|
2902
|
-
</p>
|
2903
|
-
|
2904
|
-
|
2905
|
-
</div>
|
2906
|
-
</div>
|
2907
|
-
<div class="tags">
|
2908
|
-
|
2909
|
-
</div><table class="source_code">
|
2910
|
-
<tr>
|
2911
|
-
<td>
|
2912
|
-
<pre class="lines">
|
2913
|
-
|
2914
|
-
|
2915
|
-
403
|
2916
|
-
404
|
2917
|
-
405</pre>
|
2918
|
-
</td>
|
2919
|
-
<td>
|
2920
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 403</span>
|
2921
|
-
|
2922
|
-
<span class='kw'>def</span> <span class='id server_timelimit'>server_timelimit</span>
|
2923
|
-
<span class='ivar'>@connection</span><span class='period'>.</span><span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:timelimit</span><span class='rbracket'>]</span>
|
2924
|
-
<span class='kw'>end</span></pre>
|
2925
|
-
</td>
|
2926
|
-
</tr>
|
2927
|
-
</table>
|
2928
|
-
</div>
|
2929
|
-
|
2930
|
-
<div class="method_details ">
|
2931
|
-
<p class="signature " id="simple_bind-instance_method">
|
2932
|
-
|
2933
|
-
- (<tt>Object</tt>) <strong>simple_bind</strong>(version, dn, password)
|
2934
|
-
|
2935
|
-
|
2936
|
-
|
2937
|
-
</p><div class="docstring">
|
2938
|
-
<div class="discussion">
|
2939
|
-
<p>
|
2940
|
-
Handle a simple bind request; raise an exception if the bind is not
|
2941
|
-
acceptable, otherwise just return to accept the bind.
|
2942
|
-
</p>
|
2943
|
-
<p>
|
2944
|
-
Override this method in your own subclass.
|
2945
|
-
</p>
|
2946
|
-
|
2947
|
-
|
2948
|
-
</div>
|
2949
|
-
</div>
|
2950
|
-
<div class="tags">
|
2951
|
-
|
2952
|
-
</div><table class="source_code">
|
2953
|
-
<tr>
|
2954
|
-
<td>
|
2955
|
-
<pre class="lines">
|
2956
|
-
|
2957
|
-
|
2958
|
-
423
|
2959
|
-
424
|
2960
|
-
425
|
2961
|
-
426
|
2962
|
-
427
|
2963
|
-
428
|
2964
|
-
429
|
2965
|
-
430</pre>
|
2966
|
-
</td>
|
2967
|
-
<td>
|
2968
|
-
<pre class="code"><span class="info file"># File 'lib/ldap/server/operation.rb', line 423</span>
|
2969
|
-
|
2970
|
-
<span class='kw'>def</span> <span class='id simple_bind'>simple_bind</span><span class='lparen'>(</span><span class='id version'>version</span><span class='comma'>,</span> <span class='id dn'>dn</span><span class='comma'>,</span> <span class='id password'>password</span><span class='rparen'>)</span>
|
2971
|
-
<span class='kw'>if</span> <span class='id version'>version</span> <span class='op'>!=</span> <span class='int'>3</span>
|
2972
|
-
<span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>ProtocolError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>version 3 only</span><span class='tstring_end'>"</span></span>
|
2973
|
-
<span class='kw'>end</span>
|
2974
|
-
<span class='kw'>if</span> <span class='id dn'>dn</span>
|
2975
|
-
<span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>InappropriateAuthentication</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>This server only supports anonymous bind</span><span class='tstring_end'>"</span></span>
|
2976
|
-
<span class='kw'>end</span>
|
2977
|
-
<span class='kw'>end</span></pre>
|
2978
|
-
</td>
|
2979
|
-
</tr>
|
2980
|
-
</table>
|
2981
|
-
</div>
|
2982
|
-
|
2983
|
-
</div>
|
2984
|
-
|
2985
|
-
</div>
|
2986
|
-
|
2987
|
-
<div id="footer">
|
2988
|
-
Generated on Mon Sep 13 13:27:16 2010 by
|
2989
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2990
|
-
0.6.0 (ruby-1.9.2).
|
2991
|
-
</div>
|
2992
|
-
|
2993
|
-
</body>
|
2994
|
-
</html>
|