Mercurial > hg > xemacs-beta
comparison man/lispref/ldap.texi @ 444:576fb035e263 r21-2-37
Import from CVS: tag r21-2-37
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:36:19 +0200 |
parents | abe6d1db359e |
children | f43f9ca6c7d9 |
comparison
equal
deleted
inserted
replaced
443:a8296e22da4e | 444:576fb035e263 |
---|---|
1 @c -*-texinfo-*- | 1 @c -*-texinfo-*- |
2 @c This is part of the XEmacs Lisp Reference Manual. | 2 @c This is part of the XEmacs Lisp Reference Manual. |
3 @c Copyright (C) 1998 Free Software Foundation, Inc. | 3 @c Copyright (C) 1998 Free Software Foundation, Inc. |
4 @c See the file lispref.texi for copying conditions. | 4 @c See the file lispref.texi for copying conditions. |
5 @setfilename ../../info/ldap.info | 5 @setfilename ../../info/ldap.info |
6 @node LDAP Support, PostgreSQL Support, ToolTalk Support, top | 6 @node LDAP Support, PostgreSQL Support, ToolTalk Support, top |
7 @chapter LDAP Support | 7 @chapter LDAP Support |
8 @cindex LDAP | 8 @cindex LDAP |
56 and ensuring compliance with LDAP internationalization rules and formats | 56 and ensuring compliance with LDAP internationalization rules and formats |
57 (currently partly implemented only). | 57 (currently partly implemented only). |
58 | 58 |
59 @menu | 59 @menu |
60 * LDAP Variables:: Lisp variables related to LDAP | 60 * LDAP Variables:: Lisp variables related to LDAP |
61 * The High-Level LDAP API:: High-level LDAP lisp functions | 61 * The High-Level LDAP API:: High-level LDAP lisp functions |
62 * The Low-Level LDAP API:: Low-level LDAP lisp primitives | 62 * The Low-Level LDAP API:: Low-level LDAP lisp primitives |
63 * LDAP Internationalization:: I18n variables and functions | 63 * LDAP Internationalization:: I18n variables and functions |
64 @end menu | 64 @end menu |
65 | 65 |
66 | 66 |
68 @comment node-name, next, previous, up | 68 @comment node-name, next, previous, up |
69 @subsection LDAP Variables | 69 @subsection LDAP Variables |
70 | 70 |
71 @defvar ldap-default-host | 71 @defvar ldap-default-host |
72 The default LDAP server hostname. | 72 The default LDAP server hostname. |
73 A TCP port number can be appended to that name using a colon as | 73 A TCP port number can be appended to that name using a colon as |
74 a separator. | 74 a separator. |
75 @end defvar | 75 @end defvar |
76 | 76 |
77 @defvar ldap-default-port | 77 @defvar ldap-default-port |
78 Default TCP port for LDAP connections. | 78 Default TCP port for LDAP connections. |
85 For instance, "o=ACME, c=US" limits the search to the | 85 For instance, "o=ACME, c=US" limits the search to the |
86 Acme organization in the United States. | 86 Acme organization in the United States. |
87 @end defvar | 87 @end defvar |
88 | 88 |
89 @defvar ldap-host-parameters-alist | 89 @defvar ldap-host-parameters-alist |
90 An alist of per host options for LDAP transactions. | 90 An alist of per host options for LDAP transactions. |
91 The list elements look like @code{(HOST PROP1 VAL1 PROP2 VAL2 ...)} | 91 The list elements look like @code{(HOST PROP1 VAL1 PROP2 VAL2 ...)} |
92 @var{host} is the name of an LDAP server. A TCP port number can be | 92 @var{host} is the name of an LDAP server. A TCP port number can be |
93 appended to that name using a colon as a separator. | 93 appended to that name using a colon as a separator. |
94 @var{propn} and @var{valn} are | 94 @var{propn} and @var{valn} are |
95 property/value pairs describing parameters for the server. Valid | 95 property/value pairs describing parameters for the server. Valid |
103 @item auth | 103 @item auth |
104 The authentication method to use, possible values depend on the LDAP | 104 The authentication method to use, possible values depend on the LDAP |
105 library XEmacs was compiled with, they may include @code{simple}, | 105 library XEmacs was compiled with, they may include @code{simple}, |
106 @code{krbv41} and @code{krbv42}. | 106 @code{krbv41} and @code{krbv42}. |
107 @item base | 107 @item base |
108 The base for the search. This may look like @samp{cÿ, o¬me}, see | 108 The base for the search. This may look like @samp{cÿ, o¬me}, see |
109 RFC 1779 for syntax details. | 109 RFC 1779 for syntax details. |
110 @item scope | 110 @item scope |
111 One of the symbols @code{base}, @code{onelevel} or @code{subtree} | 111 One of the symbols @code{base}, @code{onelevel} or @code{subtree} |
112 indicating the scope of the search limited to a base | 112 indicating the scope of the search limited to a base |
113 object, to a single level or to the whole subtree. | 113 object, to a single level or to the whole subtree. |
114 @item deref | 114 @item deref |
115 The dereference policy is one of the symbols @code{never}, | 115 The dereference policy is one of the symbols @code{never}, |
116 @code{always}, @code{search} or @code{find} and defines how aliases are | 116 @code{always}, @code{search} or @code{find} and defines how aliases are |
117 dereferenced. | 117 dereferenced. |
118 @table @code | 118 @table @code |
144 The following functions provide the most convenient interface to perform | 144 The following functions provide the most convenient interface to perform |
145 LDAP operations. All of them open a connection to a host, perform an | 145 LDAP operations. All of them open a connection to a host, perform an |
146 operation (add/search/modify/delete) on one or several entries and | 146 operation (add/search/modify/delete) on one or several entries and |
147 cleanly close the connection thus insulating the user from all the | 147 cleanly close the connection thus insulating the user from all the |
148 details of the low-level interface such as LDAP Lisp objects @pxref{The | 148 details of the low-level interface such as LDAP Lisp objects @pxref{The |
149 Low-Level LDAP API}. | 149 Low-Level LDAP API}. |
150 | 150 |
151 Note that @code{ldap-search} which used to be the name of the high-level | 151 Note that @code{ldap-search} which used to be the name of the high-level |
152 search function in XEmacs 21.1 is now obsolete. For consistency in the | 152 search function in XEmacs 21.1 is now obsolete. For consistency in the |
153 naming as well as backward compatibility, that function now acts as a | 153 naming as well as backward compatibility, that function now acts as a |
154 wrapper that calls either @code{ldap-search-basic} (low-level search | 154 wrapper that calls either @code{ldap-search-basic} (low-level search |
155 function) or @code{ldap-search-entries} (high-level search function) | 155 function) or @code{ldap-search-entries} (high-level search function) |
156 according to the actual parameters. A direct call to one of these two | 156 according to the actual parameters. A direct call to one of these two |
157 functions is preferred since it is faster and unambiguous. | 157 functions is preferred since it is faster and unambiguous. |
158 | 158 |
159 @defun ldap-search-entries filter &optional host attributes attrsonly withdn | 159 @deffn Command ldap-search-entries filter &optional host attributes attrsonly withdn |
160 Perform an LDAP search. | 160 Perform an LDAP search. |
161 @var{filter} is the search filter @pxref{Syntax of Search Filters} | 161 @var{filter} is the search filter @pxref{Syntax of Search Filters} |
162 @var{host} is the LDAP host on which to perform the search. | 162 @var{host} is the LDAP host on which to perform the search. |
163 @var{attributes} is the specific attributes to retrieve, @code{nil} means | 163 @var{attributes} is the specific attributes to retrieve, @code{nil} means |
164 retrieve all. | 164 retrieve all. |
165 @var{attrsonly} if non-@code{nil} retrieves the attributes only without | 165 @var{attrsonly} if non-@code{nil} retrieves the attributes only without |
166 their associated values. | 166 their associated values. |
167 If @var{withdn} is non-@code{nil} each entry in the result will be prepended with | 167 If @var{withdn} is non-@code{nil} each entry in the result will be prepended with |
168 its distinguished name DN. | 168 its distinguished name DN. |
169 Additional search parameters can be specified through | 169 Additional search parameters can be specified through |
170 @code{ldap-host-parameters-alist}. | 170 @code{ldap-host-parameters-alist}. |
171 The function returns a list of matching entries. Each entry is itself | 171 The function returns a list of matching entries. Each entry is itself |
172 an alist of attribute/value pairs optionally preceded by the DN of the | 172 an alist of attribute/value pairs optionally preceded by the DN of the |
173 entry according to the value of @var{withdn}. | 173 entry according to the value of @var{withdn}. |
174 @end defun | 174 @end deffn |
175 | 175 |
176 @defun ldap-add-entries entries &optional host binddn passwd | 176 @defun ldap-add-entries entries &optional host binddn passwd |
177 Add entries to an LDAP directory. @var{entries} is a list of entry | 177 Add entries to an LDAP directory. @var{entries} is a list of entry |
178 specifications of the form @code{(DN (ATTR . VALUE) (ATTR . VALUE) ...)} | 178 specifications of the form @code{(DN (ATTR . VALUE) (ATTR . VALUE) ...)} |
179 where @var{dn} the distinguished name of an entry to add, the following | 179 where @var{dn} the distinguished name of an entry to add, the following |
180 are cons cells containing attribute/value string pairs. @var{host} is | 180 are cons cells containing attribute/value string pairs. |
181 the LDAP host, defaulting to `ldap-default-host' @var{binddn} is the DN | 181 @var{host} is the LDAP host, defaulting to @code{ldap-default-host}. |
182 to bind as to the server @var{passwd} is the corresponding password. | 182 @var{binddn} is the DN to bind as to the server. |
183 @var{passwd} is the corresponding password. | |
183 @end defun | 184 @end defun |
184 | 185 |
185 @defun ldap-modify-entries entry-mods &optional host binddn passwd | 186 @defun ldap-modify-entries entry-mods &optional host binddn passwd |
186 Modify entries of an LDAP directory. | 187 Modify entries of an LDAP directory. |
187 @var{entry_mods} is a list of entry modifications of the form | 188 @var{entry_mods} is a list of entry modifications of the form |
188 @code{(DN MOD-SPEC1 MOD-SPEC2 ...)} where @var{dn} is the distinguished name of | 189 @code{(DN MOD-SPEC1 MOD-SPEC2 ...)} where @var{dn} is the distinguished name of |
189 the entry to modify, the following are modification specifications. | 190 the entry to modify, the following are modification specifications. |
190 A modification specification is itself a list of the form | 191 A modification specification is itself a list of the form |
191 @code{(MOD-OP ATTR VALUE1 VALUE2 ...)} @var{mod-op} and @var{attr} are mandatory, | 192 @code{(MOD-OP ATTR VALUE1 VALUE2 ...)} @var{mod-op} and @var{attr} are mandatory, |
192 @var{values} are optional depending on @var{mod-op}. | 193 @var{values} are optional depending on @var{mod-op}. |
193 @var{mod-op} is the type of modification, one of the symbols @code{add}, @code{delete} | 194 @var{mod-op} is the type of modification, one of the symbols @code{add}, @code{delete} |
194 or @code{replace}. @var{attr} is the LDAP attribute type to modify. | 195 or @code{replace}. @var{attr} is the LDAP attribute type to modify. |
195 @var{host} is the LDAP host, defaulting to @code{ldap-default-host} | 196 @var{host} is the LDAP host, defaulting to @code{ldap-default-host}. |
196 @var{binddn} is the DN to bind as to the server | 197 @var{binddn} is the DN to bind as to the server. |
197 @var{passwd} is the corresponding password" | 198 @var{passwd} is the corresponding password. |
198 @end defun | 199 @end defun |
199 | 200 |
200 @defun ldap-delete-entries dn &optional host binddn passwd | 201 @defun ldap-delete-entries dn &optional host binddn passwd |
201 Delete an entry from an LDAP directory. | 202 Delete an entry from an LDAP directory. |
202 @var{dn} is the distinguished name of an entry to delete or | 203 @var{dn} is the distinguished name of an entry to delete or |
203 a list of those. | 204 a list of those. |
204 @var{host} is the LDAP host, defaulting to @code{ldap-default-host} | 205 @var{host} is the LDAP host, defaulting to @code{ldap-default-host}. |
205 @var{binddn} is the DN to bind as to the server | 206 @var{binddn} is the DN to bind as to the server. |
206 @var{passwd} is the corresponding password. | 207 @var{passwd} is the corresponding password. |
207 @end defun | 208 @end defun |
208 | 209 |
209 | 210 |
210 @node The Low-Level LDAP API, LDAP Internationalization, The High-Level LDAP API, XEmacs LDAP API | 211 @node The Low-Level LDAP API, LDAP Internationalization, The High-Level LDAP API, XEmacs LDAP API |
220 | 221 |
221 Note that the former functions @code{ldap-*-internal} functions have been | 222 Note that the former functions @code{ldap-*-internal} functions have been |
222 renamed in XEmacs 21.2 | 223 renamed in XEmacs 21.2 |
223 | 224 |
224 @menu | 225 @menu |
225 * The LDAP Lisp Object:: | 226 * The LDAP Lisp Object:: |
226 * Opening and Closing a LDAP Connection:: | 227 * Opening and Closing a LDAP Connection:: |
227 * Low-level Operations on a LDAP Server:: | 228 * Low-level Operations on a LDAP Server:: |
228 @end menu | 229 @end menu |
229 | 230 |
230 @node The LDAP Lisp Object, Opening and Closing a LDAP Connection, The Low-Level LDAP API, The Low-Level LDAP API | 231 @node The LDAP Lisp Object, Opening and Closing a LDAP Connection, The Low-Level LDAP API, The Low-Level LDAP API |
231 @comment node-name, next, previous, up | 232 @comment node-name, next, previous, up |
232 @subsubsection The LDAP Lisp Object | 233 @subsubsection The LDAP Lisp Object |
237 @defun ldapp object | 238 @defun ldapp object |
238 This function returns non-@code{nil} if @var{object} is a @code{ldap} object. | 239 This function returns non-@code{nil} if @var{object} is a @code{ldap} object. |
239 @end defun | 240 @end defun |
240 | 241 |
241 @defun ldap-host ldap | 242 @defun ldap-host ldap |
242 Return the server host of the connection represented by @var{ldap} | 243 Return the server host of the connection represented by @var{ldap}. |
243 @end defun | 244 @end defun |
244 | 245 |
245 @defun ldap-live-p ldap | 246 @defun ldap-live-p ldap |
246 Return non-@code{nil} if @var{ldap} is an active LDAP connection | 247 Return non-@code{nil} if @var{ldap} is an active LDAP connection. |
247 @end defun | 248 @end defun |
248 | 249 |
249 | 250 |
250 @node Opening and Closing a LDAP Connection, Low-level Operations on a LDAP Server, The LDAP Lisp Object, The Low-Level LDAP API | 251 @node Opening and Closing a LDAP Connection, Low-level Operations on a LDAP Server, The LDAP Lisp Object, The Low-Level LDAP API |
251 @comment node-name, next, previous, up | 252 @comment node-name, next, previous, up |
272 The dereference policy is one of the symbols @code{never}, | 273 The dereference policy is one of the symbols @code{never}, |
273 @code{always}, @code{search} or @code{find} and defines how aliases are | 274 @code{always}, @code{search} or @code{find} and defines how aliases are |
274 dereferenced. | 275 dereferenced. |
275 @table @code | 276 @table @code |
276 @item never | 277 @item never |
277 Aliases are never dereferenced | 278 Aliases are never dereferenced. |
278 @item always | 279 @item always |
279 Aliases are always dereferenced | 280 Aliases are always dereferenced. |
280 @item search | 281 @item search |
281 Aliases are dereferenced when searching | 282 Aliases are dereferenced when searching. |
282 @item find | 283 @item find |
283 Aliases are dereferenced when locating the base object for the search | 284 Aliases are dereferenced when locating the base object for the search. |
284 @end table | 285 @end table |
285 The default is @code{never}. | 286 The default is @code{never}. |
286 @item timelimit | 287 @item timelimit |
287 The timeout limit for the connection in seconds. | 288 The timeout limit for the connection in seconds. |
288 @item sizelimit | 289 @item sizelimit |
289 The maximum number of matches to return for searches performed on this connection. | 290 The maximum number of matches to return for searches performed on this connection. |
290 @end table | 291 @end table |
291 @end defun | 292 @end defun |
292 | 293 |
293 @defun ldap-close ldap | 294 @defun ldap-close ldap |
294 Close the connection represented by @var{ldap} | 295 Close the connection represented by @var{ldap}. |
295 @end defun | 296 @end defun |
296 | 297 |
297 | 298 |
298 @node Low-level Operations on a LDAP Server, , Opening and Closing a LDAP Connection, The Low-Level LDAP API | 299 @node Low-level Operations on a LDAP Server, , Opening and Closing a LDAP Connection, The Low-Level LDAP API |
299 @comment node-name, next, previous, up | 300 @comment node-name, next, previous, up |
303 search on a LDAP server. It works directly on an open LDAP connection | 304 search on a LDAP server. It works directly on an open LDAP connection |
304 thus requiring a preliminary call to @code{ldap-open}. Multiple | 305 thus requiring a preliminary call to @code{ldap-open}. Multiple |
305 searches can be made on the same connection, then the session must be | 306 searches can be made on the same connection, then the session must be |
306 closed with @code{ldap-close}. | 307 closed with @code{ldap-close}. |
307 | 308 |
308 @defun ldap-search-basic ldap filter base scope attrs attrsonly | 309 @defun ldap-search-basic ldap filter &optional base scope attrs attrsonly withdn verbose |
309 Perform a search on an open connection @var{ldap} created with @code{ldap-open}. | 310 Perform a search on an open connection @var{ldap} created with @code{ldap-open}. |
310 @var{filter} is a filter string for the search @pxref{Syntax of Search Filters} | 311 @var{filter} is a filter string for the search @pxref{Syntax of Search Filters} |
311 @var{base} is the distinguished name at which to start the search. | 312 @var{base} is the distinguished name at which to start the search. |
312 @var{scope} is one of the symbols @code{base}, @code{onelevel} or | 313 @var{scope} is one of the symbols @code{base}, @code{onelevel} or |
313 @code{subtree} indicating the scope of the search limited to a base | 314 @code{subtree} indicating the scope of the search limited to a base |
314 object, to a single level or to the whole subtree. The default is | 315 object, to a single level or to the whole subtree. The default is |
315 @code{subtree}. | 316 @code{subtree}. |
316 @code{attrs} is a list of strings indicating which attributes to retrieve | 317 @var{attrs} is a list of strings indicating which attributes to retrieve |
317 for each matching entry. If @code{nil} all available attributes are returned. | 318 for each matching entry. If @code{nil} all available attributes are returned. |
318 If @code{attrsonly} is non-@code{nil} then only the attributes are retrieved, not | 319 If @var{attrsonly} is non-@code{nil} then only the attributes are |
319 their associated values | 320 retrieved, not their associated values. |
320 If @code{withdn} is non-@code{nil} then each entry in the result is prepended with | 321 If @var{withdn} is non-@code{nil} then each entry in the result is |
321 its distinguished name DN | 322 prepended with its distinguished name DN. |
322 If @code{verbose} is non-@code{nil} then progress messages are echoed | 323 If @var{verbose} is non-@code{nil} then progress messages are echoed |
323 The function returns a list of matching entries. Each entry is itself | 324 The function returns a list of matching entries. Each entry is itself |
324 an alist of attribute/value pairs optionally preceded by the DN of the | 325 an alist of attribute/value pairs optionally preceded by the DN of the |
325 entry according to the value of @code{withdn}. | 326 entry according to the value of @var{withdn}. |
326 @end defun | 327 @end defun |
327 | 328 |
328 @defun ldap-add ldap dn entry | 329 @defun ldap-add ldap dn entry |
329 Add @var{entry} to a LDAP directory which a connection @var{ldap} has | 330 Add @var{entry} to a LDAP directory which a connection @var{ldap} has |
330 been opened to with @code{ldap-open}. | 331 been opened to with @code{ldap-open}. |
339 @var{dn} is the distinguished name of the entry to modify. | 340 @var{dn} is the distinguished name of the entry to modify. |
340 @var{mods} is a list of modifications to apply. | 341 @var{mods} is a list of modifications to apply. |
341 A modification is a list of the form @code{(MOD-OP ATTR VALUE1 VALUE2 ...)} | 342 A modification is a list of the form @code{(MOD-OP ATTR VALUE1 VALUE2 ...)} |
342 @var{mod-op} and @var{attr} are mandatory, @var{values} are optional depending on @var{mod-op}. | 343 @var{mod-op} and @var{attr} are mandatory, @var{values} are optional depending on @var{mod-op}. |
343 @var{mod-op} is the type of modification, one of the symbols @code{add}, @code{delete} | 344 @var{mod-op} is the type of modification, one of the symbols @code{add}, @code{delete} |
344 or @code{replace}. @var{attr} is the LDAP attribute type to modify | 345 or @code{replace}. @var{attr} is the LDAP attribute type to modify. |
345 @end defun | 346 @end defun |
346 | 347 |
347 @defun ldap-delete ldap dn | 348 @defun ldap-delete ldap dn |
348 Delete an entry to an LDAP directory. | 349 Delete an entry to an LDAP directory. |
349 @var{ldap} is an LDAP connection object created with @code{ldap-open}. | 350 @var{ldap} is an LDAP connection object created with @code{ldap-open}. |
350 @var{dn} is the distinguished name of the entry to delete | 351 @var{dn} is the distinguished name of the entry to delete. |
351 @end defun | 352 @end defun |
352 | 353 |
353 | 354 |
354 | 355 |
355 @node LDAP Internationalization, , The Low-Level LDAP API, XEmacs LDAP API | 356 @node LDAP Internationalization, , The Low-Level LDAP API, XEmacs LDAP API |
368 and the corresponding decoder is then retrieved from | 369 and the corresponding decoder is then retrieved from |
369 @code{ldap-attribute-syntax-decoders}' and applied on the value(s). | 370 @code{ldap-attribute-syntax-decoders}' and applied on the value(s). |
370 @end defun | 371 @end defun |
371 | 372 |
372 @menu | 373 @menu |
373 * LDAP Internationalization Variables:: | 374 * LDAP Internationalization Variables:: |
374 * Encoder/Decoder Functions:: | 375 * Encoder/Decoder Functions:: |
375 @end menu | 376 @end menu |
376 | 377 |
377 @node LDAP Internationalization Variables, Encoder/Decoder Functions, LDAP Internationalization, LDAP Internationalization | 378 @node LDAP Internationalization Variables, Encoder/Decoder Functions, LDAP Internationalization, LDAP Internationalization |
378 @comment node-name, next, previous, up | 379 @comment node-name, next, previous, up |
379 @subsubsection LDAP Internationalization Variables | 380 @subsubsection LDAP Internationalization Variables |
382 If non-@code{nil}, no encoding/decoding will be performed LDAP attribute values | 383 If non-@code{nil}, no encoding/decoding will be performed LDAP attribute values |
383 @end defvar | 384 @end defvar |
384 | 385 |
385 @defvar ldap-coding-system | 386 @defvar ldap-coding-system |
386 Coding system of LDAP string values. | 387 Coding system of LDAP string values. |
387 LDAP v3 specifies the coding system of strings to be UTF-8. | 388 LDAP v3 specifies the coding system of strings to be UTF-8. |
388 You need an XEmacs with Mule support for this. | 389 You need an XEmacs with Mule support for this. |
389 @end defvar | 390 @end defvar |
390 | 391 |
391 @defvar ldap-default-attribute-decoder | 392 @defvar ldap-default-attribute-decoder |
392 Decoder function to use for attributes whose syntax is unknown. Such a | 393 Decoder function to use for attributes whose syntax is unknown. Such a |
393 function receives an encoded attribute value as a string and should | 394 function receives an encoded attribute value as a string and should |
394 return the decoded value as a string | 395 return the decoded value as a string. |
395 @end defvar | 396 @end defvar |
396 | 397 |
397 @defvar ldap-attribute-syntax-encoders | 398 @defvar ldap-attribute-syntax-encoders |
398 A vector of functions used to encode LDAP attribute values. | 399 A vector of functions used to encode LDAP attribute values. |
399 The sequence of functions corresponds to the sequence of LDAP attribute syntax | 400 The sequence of functions corresponds to the sequence of LDAP attribute syntax |
400 object identifiers of the form 1.3.6.1.4.1.1466.1115.121.1.* as defined in | 401 object identifiers of the form 1.3.6.1.4.1.1466.1115.121.1.* as defined in |
401 RFC2252 section 4.3.2. As of this writing, only a few encoder functions | 402 RFC2252 section 4.3.2. As of this writing, only a few encoder functions |
402 are available. | 403 are available. |
403 @end defvar | 404 @end defvar |
404 | 405 |
405 @defvar ldap-attribute-syntax-decoders | 406 @defvar ldap-attribute-syntax-decoders |
406 A vector of functions used to decode LDAP attribute values. | 407 A vector of functions used to decode LDAP attribute values. |
407 The sequence of functions corresponds to the sequence of LDAP attribute syntax | 408 The sequence of functions corresponds to the sequence of LDAP attribute syntax |
408 object identifiers of the form 1.3.6.1.4.1.1466.1115.121.1.* as defined in | 409 object identifiers of the form 1.3.6.1.4.1.1466.1115.121.1.* as defined in |
409 RFC2252 section 4.3.2. As of this writing, only a few decoder functions | 410 RFC2252 section 4.3.2. As of this writing, only a few decoder functions |
410 are available. | 411 are available. |
411 @end defvar | 412 @end defvar |
412 | 413 |
413 @defvar ldap-attribute-syntaxes-alist | 414 @defvar ldap-attribute-syntaxes-alist |
414 A map of LDAP attribute names to their type object id minor number. | 415 A map of LDAP attribute names to their type object id minor number. |
415 This table is built from RFC2252 Section 5 and RFC2256 Section 5 | 416 This table is built from RFC2252 Section 5 and RFC2256 Section 5. |
416 @end defvar | 417 @end defvar |
417 | 418 |
418 @node Encoder/Decoder Functions, , LDAP Internationalization Variables, LDAP Internationalization | 419 @node Encoder/Decoder Functions, , LDAP Internationalization Variables, LDAP Internationalization |
419 @comment node-name, next, previous, up | 420 @comment node-name, next, previous, up |
420 @subsubsection Encoder/Decoder Functions | 421 @subsubsection Encoder/Decoder Functions |
421 | 422 |
422 @defun ldap-encode-boolean bool | 423 @defun ldap-encode-boolean bool |
423 A function that encodes an elisp boolean @var{bool} into a LDAP | 424 A function that encodes an elisp boolean @var{bool} into a LDAP |
424 boolean string representation | 425 boolean string representation. |
425 @end defun | 426 @end defun |
426 | 427 |
427 @defun ldap-decode-boolean str | 428 @defun ldap-decode-boolean str |
428 A function that decodes a LDAP boolean string representation | 429 A function that decodes a LDAP boolean string representation |
429 @var{str} into an elisp boolean | 430 @var{str} into an elisp boolean. |
430 @end defun | 431 @end defun |
431 | 432 |
432 @defun ldap-decode-string str | 433 @defun ldap-decode-string str |
433 Decode a string @var{str} according to `ldap-coding-system' | 434 Decode a string @var{str} according to @var{ldap-coding-system}. |
434 @end defun | 435 @end defun |
435 | 436 |
436 @defun ldap-encode-string str | 437 @defun ldap-encode-string str |
437 Encode a string @var{str} according to `ldap-coding-system' | 438 Encode a string @var{str} according to @var{ldap-coding-system}. |
438 @end defun | 439 @end defun |
439 | 440 |
440 @defun ldap-decode-address str | 441 @defun ldap-decode-address str |
441 Decode an address @var{str} according to `ldap-coding-system' and | 442 Decode an address @var{str} according to @var{ldap-coding-system} and |
442 replacing $ signs with newlines as specified by LDAP encoding rules for | 443 replacing $ signs with newlines as specified by LDAP encoding rules for |
443 addresses | 444 addresses. |
444 @end defun | 445 @end defun |
445 | 446 |
446 @defun ldap-encode-address str | 447 @defun ldap-encode-address str |
447 Encode an address @var{str} according to `ldap-coding-system' and | 448 Encode an address @var{str} according to @var{ldap-coding-system} and |
448 replacing newlines with $ signs as specified by LDAP encoding rules for | 449 replacing newlines with $ signs as specified by LDAP encoding rules for |
449 addresses | 450 addresses. |
450 @end defun | 451 @end defun |
451 | 452 |
452 | 453 |
453 | 454 |
454 @node Syntax of Search Filters, , XEmacs LDAP API, LDAP Support | 455 @node Syntax of Search Filters, , XEmacs LDAP API, LDAP Support |
466 @code{o} for Organization, etc... | 467 @code{o} for Organization, etc... |
467 | 468 |
468 @code{<value>} is the corresponding value. This is generally an exact | 469 @code{<value>} is the corresponding value. This is generally an exact |
469 string but may also contain @code{*} characters as wildcards | 470 string but may also contain @code{*} characters as wildcards |
470 | 471 |
471 @code{filtertype} is one @code{=} @code{~=}, @code{<=}, @code{>=} which | 472 @code{filtertype} is one @code{=} @code{~=}, @code{<=}, @code{>=} which |
472 respectively describe equality, approximate equality, inferiority and | 473 respectively describe equality, approximate equality, inferiority and |
473 superiority. | 474 superiority. |
474 | 475 |
475 Thus @code{(cn=John Smith)} matches all records having a canonical name | 476 Thus @code{(cn=John Smith)} matches all records having a canonical name |
476 equal to John Smith. | 477 equal to John Smith. |
477 | 478 |
478 A special case is the presence filter @code{(<attr>=*} which matches | 479 A special case is the presence filter @code{(<attr>=*} which matches |
483 @code{&}, @code{|} and @code{!} which stand for the usual and, or and | 484 @code{&}, @code{|} and @code{!} which stand for the usual and, or and |
484 not operators. | 485 not operators. |
485 | 486 |
486 @code{(&(objectClass=Person)(mail=*)(|(sn=Smith)(givenname=John)))} | 487 @code{(&(objectClass=Person)(mail=*)(|(sn=Smith)(givenname=John)))} |
487 matches records of class @code{Person} containing a @code{mail} | 488 matches records of class @code{Person} containing a @code{mail} |
488 attribute and corresponding to people whose last name is @code{Smith} or | 489 attribute and corresponding to people whose last name is @code{Smith} or |
489 whose first name is @code{John}. | 490 whose first name is @code{John}. |