Mercurial > hg > xemacs-beta
annotate lisp/ldap.el @ 5127:a9c41067dd88 ben-lisp-object
more cleanups, terminology clarification, lots of doc work
-------------------- ChangeLog entries follow: --------------------
man/ChangeLog addition:
2010-03-05 Ben Wing <ben@xemacs.org>
* internals/internals.texi (Introduction to Allocation):
* internals/internals.texi (Integers and Characters):
* internals/internals.texi (Allocation from Frob Blocks):
* internals/internals.texi (lrecords):
* internals/internals.texi (Low-level allocation):
Rewrite section on allocation of Lisp objects to reflect the new
reality. Remove references to nonexistent XSETINT and XSETCHAR.
modules/ChangeLog addition:
2010-03-05 Ben Wing <ben@xemacs.org>
* postgresql/postgresql.c (allocate_pgconn):
* postgresql/postgresql.c (allocate_pgresult):
* postgresql/postgresql.h (struct Lisp_PGconn):
* postgresql/postgresql.h (struct Lisp_PGresult):
* ldap/eldap.c (allocate_ldap):
* ldap/eldap.h (struct Lisp_LDAP):
Same changes as in src/ dir. See large log there in ChangeLog,
but basically:
ALLOC_LISP_OBJECT -> ALLOC_NORMAL_LISP_OBJECT
LISP_OBJECT_HEADER -> NORMAL_LISP_OBJECT_HEADER
../hlo/src/ChangeLog addition:
2010-03-05 Ben Wing <ben@xemacs.org>
* alloc.c:
* alloc.c (old_alloc_sized_lcrecord):
* alloc.c (very_old_free_lcrecord):
* alloc.c (copy_lisp_object):
* alloc.c (zero_sized_lisp_object):
* alloc.c (zero_nonsized_lisp_object):
* alloc.c (lisp_object_storage_size):
* alloc.c (free_normal_lisp_object):
* alloc.c (FREE_FIXED_TYPE_WHEN_NOT_IN_GC):
* alloc.c (ALLOC_FROB_BLOCK_LISP_OBJECT):
* alloc.c (Fcons):
* alloc.c (noseeum_cons):
* alloc.c (make_float):
* alloc.c (make_bignum):
* alloc.c (make_bignum_bg):
* alloc.c (make_ratio):
* alloc.c (make_ratio_bg):
* alloc.c (make_ratio_rt):
* alloc.c (make_bigfloat):
* alloc.c (make_bigfloat_bf):
* alloc.c (size_vector):
* alloc.c (make_compiled_function):
* alloc.c (Fmake_symbol):
* alloc.c (allocate_extent):
* alloc.c (allocate_event):
* alloc.c (make_key_data):
* alloc.c (make_button_data):
* alloc.c (make_motion_data):
* alloc.c (make_process_data):
* alloc.c (make_timeout_data):
* alloc.c (make_magic_data):
* alloc.c (make_magic_eval_data):
* alloc.c (make_eval_data):
* alloc.c (make_misc_user_data):
* alloc.c (Fmake_marker):
* alloc.c (noseeum_make_marker):
* alloc.c (size_string_direct_data):
* alloc.c (make_uninit_string):
* alloc.c (make_string_nocopy):
* alloc.c (mark_lcrecord_list):
* alloc.c (alloc_managed_lcrecord):
* alloc.c (free_managed_lcrecord):
* alloc.c (sweep_lcrecords_1):
* alloc.c (malloced_storage_size):
* buffer.c (allocate_buffer):
* buffer.c (compute_buffer_usage):
* buffer.c (DEFVAR_BUFFER_LOCAL_1):
* buffer.c (nuke_all_buffer_slots):
* buffer.c (common_init_complex_vars_of_buffer):
* buffer.h (struct buffer_text):
* buffer.h (struct buffer):
* bytecode.c:
* bytecode.c (make_compiled_function_args):
* bytecode.c (size_compiled_function_args):
* bytecode.h (struct compiled_function_args):
* casetab.c (allocate_case_table):
* casetab.h (struct Lisp_Case_Table):
* charset.h (struct Lisp_Charset):
* chartab.c (fill_char_table):
* chartab.c (Fmake_char_table):
* chartab.c (make_char_table_entry):
* chartab.c (copy_char_table_entry):
* chartab.c (Fcopy_char_table):
* chartab.c (put_char_table):
* chartab.h (struct Lisp_Char_Table_Entry):
* chartab.h (struct Lisp_Char_Table):
* console-gtk-impl.h (struct gtk_device):
* console-gtk-impl.h (struct gtk_frame):
* console-impl.h (struct console):
* console-msw-impl.h (struct Lisp_Devmode):
* console-msw-impl.h (struct mswindows_device):
* console-msw-impl.h (struct msprinter_device):
* console-msw-impl.h (struct mswindows_frame):
* console-msw-impl.h (struct mswindows_dialog_id):
* console-stream-impl.h (struct stream_console):
* console-stream.c (stream_init_console):
* console-tty-impl.h (struct tty_console):
* console-tty-impl.h (struct tty_device):
* console-tty.c (allocate_tty_console_struct):
* console-x-impl.h (struct x_device):
* console-x-impl.h (struct x_frame):
* console.c (allocate_console):
* console.c (nuke_all_console_slots):
* console.c (DEFVAR_CONSOLE_LOCAL_1):
* console.c (common_init_complex_vars_of_console):
* data.c (make_weak_list):
* data.c (make_weak_box):
* data.c (make_ephemeron):
* database.c:
* database.c (struct Lisp_Database):
* database.c (allocate_database):
* database.c (finalize_database):
* device-gtk.c (allocate_gtk_device_struct):
* device-impl.h (struct device):
* device-msw.c:
* device-msw.c (mswindows_init_device):
* device-msw.c (msprinter_init_device):
* device-msw.c (finalize_devmode):
* device-msw.c (allocate_devmode):
* device-tty.c (allocate_tty_device_struct):
* device-x.c (allocate_x_device_struct):
* device.c:
* device.c (nuke_all_device_slots):
* device.c (allocate_device):
* dialog-msw.c (handle_question_dialog_box):
* elhash.c:
* elhash.c (struct Lisp_Hash_Table):
* elhash.c (finalize_hash_table):
* elhash.c (make_general_lisp_hash_table):
* elhash.c (Fcopy_hash_table):
* elhash.h (htentry):
* emacs.c (main_1):
* eval.c:
* eval.c (size_multiple_value):
* event-stream.c (finalize_command_builder):
* event-stream.c (allocate_command_builder):
* event-stream.c (free_command_builder):
* event-stream.c (event_stream_generate_wakeup):
* event-stream.c (event_stream_resignal_wakeup):
* event-stream.c (event_stream_disable_wakeup):
* event-stream.c (event_stream_wakeup_pending_p):
* events.h (struct Lisp_Timeout):
* events.h (struct command_builder):
* extents-impl.h:
* extents-impl.h (struct extent_auxiliary):
* extents-impl.h (struct extent_info):
* extents-impl.h (set_extent_no_chase_aux_field):
* extents-impl.h (set_extent_no_chase_normal_field):
* extents.c:
* extents.c (gap_array_marker):
* extents.c (gap_array):
* extents.c (extent_list_marker):
* extents.c (extent_list):
* extents.c (stack_of_extents):
* extents.c (gap_array_make_marker):
* extents.c (extent_list_make_marker):
* extents.c (allocate_extent_list):
* extents.c (SLOT):
* extents.c (mark_extent_auxiliary):
* extents.c (allocate_extent_auxiliary):
* extents.c (attach_extent_auxiliary):
* extents.c (size_gap_array):
* extents.c (finalize_extent_info):
* extents.c (allocate_extent_info):
* extents.c (uninit_buffer_extents):
* extents.c (allocate_soe):
* extents.c (copy_extent):
* extents.c (vars_of_extents):
* extents.h:
* faces.c (allocate_face):
* faces.h (struct Lisp_Face):
* faces.h (struct face_cachel):
* file-coding.c:
* file-coding.c (finalize_coding_system):
* file-coding.c (sizeof_coding_system):
* file-coding.c (Fcopy_coding_system):
* file-coding.h (struct Lisp_Coding_System):
* file-coding.h (MARKED_SLOT):
* fns.c (size_bit_vector):
* font-mgr.c:
* font-mgr.c (finalize_fc_pattern):
* font-mgr.c (print_fc_pattern):
* font-mgr.c (Ffc_pattern_p):
* font-mgr.c (Ffc_pattern_create):
* font-mgr.c (Ffc_name_parse):
* font-mgr.c (Ffc_name_unparse):
* font-mgr.c (Ffc_pattern_duplicate):
* font-mgr.c (Ffc_pattern_add):
* font-mgr.c (Ffc_pattern_del):
* font-mgr.c (Ffc_pattern_get):
* font-mgr.c (fc_config_create_using):
* font-mgr.c (fc_strlist_to_lisp_using):
* font-mgr.c (fontset_to_list):
* font-mgr.c (Ffc_config_p):
* font-mgr.c (Ffc_config_up_to_date):
* font-mgr.c (Ffc_config_build_fonts):
* font-mgr.c (Ffc_config_get_cache):
* font-mgr.c (Ffc_config_get_fonts):
* font-mgr.c (Ffc_config_set_current):
* font-mgr.c (Ffc_config_get_blanks):
* font-mgr.c (Ffc_config_get_rescan_interval):
* font-mgr.c (Ffc_config_set_rescan_interval):
* font-mgr.c (Ffc_config_app_font_add_file):
* font-mgr.c (Ffc_config_app_font_add_dir):
* font-mgr.c (Ffc_config_app_font_clear):
* font-mgr.c (size):
* font-mgr.c (Ffc_config_substitute):
* font-mgr.c (Ffc_font_render_prepare):
* font-mgr.c (Ffc_font_match):
* font-mgr.c (Ffc_font_sort):
* font-mgr.c (finalize_fc_config):
* font-mgr.c (print_fc_config):
* font-mgr.h:
* font-mgr.h (struct fc_pattern):
* font-mgr.h (XFC_PATTERN):
* font-mgr.h (struct fc_config):
* font-mgr.h (XFC_CONFIG):
* frame-gtk.c (allocate_gtk_frame_struct):
* frame-impl.h (struct frame):
* frame-msw.c (mswindows_init_frame_1):
* frame-x.c (allocate_x_frame_struct):
* frame.c (nuke_all_frame_slots):
* frame.c (allocate_frame_core):
* gc.c:
* gc.c (GC_CHECK_NOT_FREE):
* glyphs.c (finalize_image_instance):
* glyphs.c (allocate_image_instance):
* glyphs.c (Fcolorize_image_instance):
* glyphs.c (allocate_glyph):
* glyphs.c (unmap_subwindow_instance_cache_mapper):
* glyphs.c (register_ignored_expose):
* glyphs.h (struct Lisp_Image_Instance):
* glyphs.h (struct Lisp_Glyph):
* glyphs.h (struct glyph_cachel):
* glyphs.h (struct expose_ignore):
* gui.c (allocate_gui_item):
* gui.h (struct Lisp_Gui_Item):
* keymap.c (struct Lisp_Keymap):
* keymap.c (make_keymap):
* lisp.h:
* lisp.h (struct Lisp_String_Direct_Data):
* lisp.h (struct Lisp_String_Indirect_Data):
* lisp.h (struct Lisp_Vector):
* lisp.h (struct Lisp_Bit_Vector):
* lisp.h (DECLARE_INLINE_LISP_BIT_VECTOR):
* lisp.h (struct weak_box):
* lisp.h (struct ephemeron):
* lisp.h (struct weak_list):
* lrecord.h:
* lrecord.h (struct lrecord_implementation):
* lrecord.h (MC_ALLOC_CALL_FINALIZER):
* lrecord.h (struct lcrecord_list):
* lstream.c (finalize_lstream):
* lstream.c (sizeof_lstream):
* lstream.c (Lstream_new):
* lstream.c (Lstream_delete):
* lstream.h (struct lstream):
* marker.c:
* marker.c (finalize_marker):
* marker.c (compute_buffer_marker_usage):
* mule-charset.c:
* mule-charset.c (make_charset):
* mule-charset.c (compute_charset_usage):
* objects-impl.h (struct Lisp_Color_Instance):
* objects-impl.h (struct Lisp_Font_Instance):
* objects-tty-impl.h (struct tty_color_instance_data):
* objects-tty-impl.h (struct tty_font_instance_data):
* objects-tty.c (tty_initialize_color_instance):
* objects-tty.c (tty_initialize_font_instance):
* objects.c (finalize_color_instance):
* objects.c (Fmake_color_instance):
* objects.c (finalize_font_instance):
* objects.c (Fmake_font_instance):
* objects.c (reinit_vars_of_objects):
* opaque.c:
* opaque.c (sizeof_opaque):
* opaque.c (make_opaque_ptr):
* opaque.c (free_opaque_ptr):
* opaque.h:
* opaque.h (Lisp_Opaque):
* opaque.h (Lisp_Opaque_Ptr):
* print.c (printing_unreadable_lcrecord):
* print.c (external_object_printer):
* print.c (debug_p4):
* process.c (finalize_process):
* process.c (make_process_internal):
* procimpl.h (struct Lisp_Process):
* rangetab.c (Fmake_range_table):
* rangetab.c (Fcopy_range_table):
* rangetab.h (struct Lisp_Range_Table):
* scrollbar.c:
* scrollbar.c (create_scrollbar_instance):
* scrollbar.c (compute_scrollbar_instance_usage):
* scrollbar.h (struct scrollbar_instance):
* specifier.c (finalize_specifier):
* specifier.c (sizeof_specifier):
* specifier.c (set_specifier_caching):
* specifier.h (struct Lisp_Specifier):
* specifier.h (struct specifier_caching):
* symeval.h:
* symeval.h (SYMBOL_VALUE_MAGIC_P):
* symeval.h (DEFVAR_SYMVAL_FWD):
* symsinit.h:
* syntax.c (init_buffer_syntax_cache):
* syntax.h (struct syntax_cache):
* toolbar.c:
* toolbar.c (allocate_toolbar_button):
* toolbar.c (update_toolbar_button):
* toolbar.h (struct toolbar_button):
* tooltalk.c (struct Lisp_Tooltalk_Message):
* tooltalk.c (make_tooltalk_message):
* tooltalk.c (struct Lisp_Tooltalk_Pattern):
* tooltalk.c (make_tooltalk_pattern):
* ui-gtk.c:
* ui-gtk.c (allocate_ffi_data):
* ui-gtk.c (emacs_gtk_object_finalizer):
* ui-gtk.c (allocate_emacs_gtk_object_data):
* ui-gtk.c (allocate_emacs_gtk_boxed_data):
* ui-gtk.h:
* window-impl.h (struct window):
* window-impl.h (struct window_mirror):
* window.c (finalize_window):
* window.c (allocate_window):
* window.c (new_window_mirror):
* window.c (mark_window_as_deleted):
* window.c (make_dummy_parent):
* window.c (compute_window_mirror_usage):
* window.c (compute_window_usage):
Overall point of this change and previous ones in this repository:
(1) Introduce new, clearer terminology: everything other than int
or char is a "record" object, which comes in two types: "normal
objects" and "frob-block objects". Fix up all places that
referred to frob-block objects as "simple", "basic", etc.
(2) Provide an advertised interface for doing operations on Lisp
objects, including creating new types, that is clean and
consistent in its naming, uses the above-referenced terms and
avoids referencing "lrecords", "old lcrecords", etc., which should
hide under the surface.
(3) Make the size_in_bytes and finalizer methods take a
Lisp_Object rather than a void * for consistency with other methods.
(4) Separate finalizer method into finalizer and disksaver, so
that normal finalize methods don't have to worry about disksaving.
Other specifics:
(1) Renaming:
LISP_OBJECT_HEADER -> NORMAL_LISP_OBJECT_HEADER
ALLOC_LISP_OBJECT -> ALLOC_NORMAL_LISP_OBJECT
implementation->basic_p -> implementation->frob_block_p
ALLOCATE_FIXED_TYPE_AND_SET_IMPL -> ALLOC_FROB_BLOCK_LISP_OBJECT
*FCCONFIG*, wrap_fcconfig -> *FC_CONFIG*, wrap_fc_config
*FCPATTERN*, wrap_fcpattern -> *FC_PATTERN*, wrap_fc_pattern
(the last two changes make the naming of these macros consistent
with the naming of all other macros, since the objects are named
fc-config and fc-pattern with a hyphen)
(2) Lots of documentation fixes in lrecord.h.
(3) Eliminate macros for copying, freeing, zeroing objects, getting
their storage size. Instead, new functions:
zero_sized_lisp_object()
zero_nonsized_lisp_object()
lisp_object_storage_size()
free_normal_lisp_object()
(copy_lisp_object() already exists)
LISP_OBJECT_FROB_BLOCK_P() (actually a macro)
Eliminated:
free_lrecord()
zero_lrecord()
copy_lrecord()
copy_sized_lrecord()
old_copy_lcrecord()
old_copy_sized_lcrecord()
old_zero_lcrecord()
old_zero_sized_lcrecord()
LISP_OBJECT_STORAGE_SIZE()
COPY_SIZED_LISP_OBJECT()
COPY_SIZED_LCRECORD()
COPY_LISP_OBJECT()
ZERO_LISP_OBJECT()
FREE_LISP_OBJECT()
(4) Catch the remaining places where lrecord stuff was used directly
and use the advertised interface, e.g. alloc_sized_lrecord() ->
ALLOC_SIZED_LISP_OBJECT().
(5) Make certain statically-declared pseudo-objects
(buffer_local_flags, console_local_flags) have their lheader
initialized correctly, so things like copy_lisp_object() can work
on them. Make extent_auxiliary_defaults a proper heap object
Vextent_auxiliary_defaults, and make extent auxiliaries dumpable
so that this object can be dumped. allocate_extent_auxiliary()
now just creates the object, and attach_extent_auxiliary()
creates an extent auxiliary and attaches to an extent, like the
old allocate_extent_auxiliary().
(6) Create EXTENT_AUXILIARY_SLOTS macro, similar to the foo-slots.h
files but in a macro instead of a file. The purpose is to avoid
duplication when iterating over all the slots in an extent auxiliary.
Use it.
(7) In lstream.c, don't zero out object after allocation because
allocation routines take care of this.
(8) In marker.c, fix a mistake in computing marker overhead.
(9) In print.c, clean up printing_unreadable_lcrecord(),
external_object_printer() to avoid lots of ifdef NEW_GC's.
(10) Separate toolbar-button allocation into a separate
allocate_toolbar_button() function for use in the example code
in lrecord.h.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Fri, 05 Mar 2010 04:08:17 -0600 |
parents | e29fcfd8df5f |
children | f00192e1cd49 91b3aa59f49b |
rev | line source |
---|---|
428 | 1 ;;; ldap.el --- LDAP support for Emacs |
2 | |
3 ;; Copyright (C) 1997 Free Software Foundation, Inc. | |
4 | |
5 ;; Author: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> | |
6 ;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> | |
7 ;; Created: Jan 1998 | |
502 | 8 ;; Version: $Revision: 1.12 $ |
428 | 9 ;; Keywords: help comm |
10 | |
11 ;; This file is part of XEmacs | |
12 | |
13 ;; XEmacs is free software; you can redistribute it and/or modify it | |
14 ;; under the terms of the GNU General Public License as published by | |
15 ;; the Free Software Foundation; either version 2, or (at your option) | |
16 ;; any later version. | |
17 | |
18 ;; XEmacs is distributed in the hope that it will be useful, but | |
19 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
21 ;; General Public License for more details. | |
22 | |
23 ;; You should have received a copy of the GNU General Public License | |
444 | 24 ;; along with XEmacs; see the file COPYING. If not, write to |
428 | 25 ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
26 ;; Boston, MA 02111-1307, USA. | |
27 | |
28 ;;; Commentary: | |
29 ;; This file provides mid-level and user-level functions to access directory | |
444 | 30 ;; servers using the LDAP protocol (RFC 1777). |
428 | 31 |
32 ;;; Installation: | |
33 ;; LDAP support must have been built into XEmacs. | |
34 | |
35 | |
36 ;;; Code: | |
37 | |
502 | 38 (globally-declare-fboundp '(ldapp ldap-open ldap-close ldap-add ldap-modify |
39 ldap-delete)) | |
40 | |
442 | 41 (eval-when '(load) |
42 (if (not (fboundp 'ldap-open)) | |
43 (error "No LDAP support compiled in this XEmacs"))) | |
44 | |
428 | 45 (defgroup ldap nil |
46 "Lightweight Directory Access Protocol" | |
47 :group 'comm) | |
48 | |
49 (defcustom ldap-default-host nil | |
50 "*Default LDAP server hostname. | |
444 | 51 A TCP port number can be appended to that name using a colon as |
428 | 52 a separator." |
53 :type '(choice (string :tag "Host name") | |
54 (const :tag "Use library default" nil)) | |
55 :group 'ldap) | |
56 | |
57 (defcustom ldap-default-port nil | |
58 "*Default TCP port for LDAP connections. | |
59 Initialized from the LDAP library at build time. Default value is 389." | |
60 :type '(choice (const :tag "Use library default" nil) | |
61 (integer :tag "Port number")) | |
62 :group 'ldap) | |
63 | |
64 (defcustom ldap-default-base nil | |
65 "*Default base for LDAP searches. | |
66 This is a string using the syntax of RFC 1779. | |
67 For instance, \"o=ACME, c=US\" limits the search to the | |
68 Acme organization in the United States." | |
69 :type '(choice (const :tag "Use library default" nil) | |
70 (string :tag "Search base")) | |
71 :group 'ldap) | |
72 | |
73 | |
74 (defcustom ldap-host-parameters-alist nil | |
75 "*Alist of host-specific options for LDAP transactions. | |
76 The format of each list element is: | |
77 \(HOST PROP1 VAL1 PROP2 VAL2 ...) | |
78 HOST is the hostname of an LDAP server (with an optional TCP port number | |
444 | 79 appended to it using a colon as a separator). |
428 | 80 PROPn and VALn are property/value pairs describing parameters for the server. |
81 Valid properties include: | |
444 | 82 `binddn' is the distinguished name of the user to bind as |
428 | 83 (in RFC 1779 syntax). |
84 `passwd' is the password to use for simple authentication. | |
444 | 85 `auth' is the authentication method to use. |
428 | 86 Possible values are: `simple', `krbv41' and `krbv42'. |
87 `base' is the base for the search as described in RFC 1779. | |
88 `scope' is one of the three symbols `subtree', `base' or `onelevel'. | |
89 `deref' is one of the symbols `never', `always', `search' or `find'. | |
90 `timelimit' is the timeout limit for the connection in seconds. | |
91 `sizelimit' is the maximum number of matches to return." | |
92 :type '(repeat :menu-tag "Host parameters" | |
93 :tag "Host parameters" | |
94 (list :menu-tag "Host parameters" | |
95 :tag "Host parameters" | |
96 :value nil | |
97 (string :tag "Host name") | |
98 (checklist :inline t | |
99 :greedy t | |
100 (list | |
444 | 101 :tag "Search Base" |
428 | 102 :inline t |
103 (const :tag "Search Base" base) | |
104 string) | |
105 (list | |
106 :tag "Binding DN" | |
107 :inline t | |
108 (const :tag "Binding DN" binddn) | |
109 string) | |
110 (list | |
111 :tag "Password" | |
112 :inline t | |
113 (const :tag "Password" passwd) | |
114 string) | |
115 (list | |
116 :tag "Authentication Method" | |
117 :inline t | |
118 (const :tag "Authentication Method" auth) | |
119 (choice | |
120 (const :menu-tag "None" :tag "None" nil) | |
121 (const :menu-tag "Simple" :tag "Simple" simple) | |
122 (const :menu-tag "Kerberos 4.1" :tag "Kerberos 4.1" krbv41) | |
123 (const :menu-tag "Kerberos 4.2" :tag "Kerberos 4.2" krbv42))) | |
124 (list | |
444 | 125 :tag "Search Scope" |
428 | 126 :inline t |
127 (const :tag "Search Scope" scope) | |
128 (choice | |
129 (const :menu-tag "Default" :tag "Default" nil) | |
130 (const :menu-tag "Subtree" :tag "Subtree" subtree) | |
131 (const :menu-tag "Base" :tag "Base" base) | |
132 (const :menu-tag "One Level" :tag "One Level" onelevel))) | |
133 (list | |
134 :tag "Dereferencing" | |
135 :inline t | |
136 (const :tag "Dereferencing" deref) | |
137 (choice | |
138 (const :menu-tag "Default" :tag "Default" nil) | |
139 (const :menu-tag "Never" :tag "Never" never) | |
140 (const :menu-tag "Always" :tag "Always" always) | |
141 (const :menu-tag "When searching" :tag "When searching" search) | |
142 (const :menu-tag "When locating base" :tag "When locating base" find))) | |
143 (list | |
144 :tag "Time Limit" | |
145 :inline t | |
146 (const :tag "Time Limit" timelimit) | |
147 (integer :tag "(in seconds)")) | |
148 (list | |
149 :tag "Size Limit" | |
150 :inline t | |
151 (const :tag "Size Limit" sizelimit) | |
152 (integer :tag "(number of records)"))))) | |
153 :group 'ldap) | |
154 | |
442 | 155 (defcustom ldap-verbose nil |
156 "*If non-nil, LDAP operations echo progress messages." | |
157 :type 'boolean | |
158 :group 'ldap) | |
159 | |
428 | 160 (defcustom ldap-ignore-attribute-codings nil |
161 "*If non-nil, do not perform any encoding/decoding on LDAP attribute values." | |
162 :type 'boolean | |
163 :group 'ldap) | |
164 | |
165 (defcustom ldap-default-attribute-decoder nil | |
166 "*Decoder function to use for attributes whose syntax is unknown." | |
167 :type 'symbol | |
168 :group 'ldap) | |
169 | |
170 (defcustom ldap-coding-system nil | |
171 "*Coding system of LDAP string values. | |
444 | 172 LDAP v3 specifies the coding system of strings to be UTF-8. |
428 | 173 Mule support is needed for this." |
174 :type 'symbol | |
175 :group 'ldap) | |
176 | |
177 (defvar ldap-attribute-syntax-encoders | |
444 | 178 [nil ; 1 ACI Item N |
179 nil ; 2 Access Point Y | |
180 nil ; 3 Attribute Type Description Y | |
181 nil ; 4 Audio N | |
182 nil ; 5 Binary N | |
183 nil ; 6 Bit String Y | |
184 ldap-encode-boolean ; 7 Boolean Y | |
185 nil ; 8 Certificate N | |
186 nil ; 9 Certificate List N | |
187 nil ; 10 Certificate Pair N | |
188 ldap-encode-country-string ; 11 Country String Y | |
189 ldap-encode-string ; 12 DN Y | |
190 nil ; 13 Data Quality Syntax Y | |
191 nil ; 14 Delivery Method Y | |
192 ldap-encode-string ; 15 Directory String Y | |
193 nil ; 16 DIT Content Rule Description Y | |
194 nil ; 17 DIT Structure Rule Description Y | |
195 nil ; 18 DL Submit Permission Y | |
196 nil ; 19 DSA Quality Syntax Y | |
197 nil ; 20 DSE Type Y | |
198 nil ; 21 Enhanced Guide Y | |
199 nil ; 22 Facsimile Telephone Number Y | |
200 nil ; 23 Fax N | |
201 nil ; 24 Generalized Time Y | |
202 nil ; 25 Guide Y | |
203 nil ; 26 IA5 String Y | |
204 number-to-string ; 27 INTEGER Y | |
205 nil ; 28 JPEG N | |
206 nil ; 29 Master And Shadow Access Points Y | |
207 nil ; 30 Matching Rule Description Y | |
208 nil ; 31 Matching Rule Use Description Y | |
209 nil ; 32 Mail Preference Y | |
210 nil ; 33 MHS OR Address Y | |
211 nil ; 34 Name And Optional UID Y | |
212 nil ; 35 Name Form Description Y | |
213 nil ; 36 Numeric String Y | |
214 nil ; 37 Object Class Description Y | |
215 nil ; 38 OID Y | |
216 nil ; 39 Other Mailbox Y | |
217 nil ; 40 Octet String Y | |
218 ldap-encode-address ; 41 Postal Address Y | |
219 nil ; 42 Protocol Information Y | |
220 nil ; 43 Presentation Address Y | |
221 ldap-encode-string ; 44 Printable String Y | |
222 nil ; 45 Subtree Specification Y | |
223 nil ; 46 Supplier Information Y | |
224 nil ; 47 Supplier Or Consumer Y | |
225 nil ; 48 Supplier And Consumer Y | |
226 nil ; 49 Supported Algorithm N | |
227 nil ; 50 Telephone Number Y | |
228 nil ; 51 Teletex Terminal Identifier Y | |
229 nil ; 52 Telex Number Y | |
230 nil ; 53 UTC Time Y | |
231 nil ; 54 LDAP Syntax Description Y | |
232 nil ; 55 Modify Rights Y | |
233 nil ; 56 LDAP Schema Definition Y | |
234 nil ; 57 LDAP Schema Description Y | |
235 nil ; 58 Substring Assertion Y | |
236 ] | |
428 | 237 "A vector of functions used to encode LDAP attribute values. |
238 The sequence of functions corresponds to the sequence of LDAP attribute syntax | |
444 | 239 object identifiers of the form 1.3.6.1.4.1.1466.1115.121.1.* as defined in |
428 | 240 RFC2252 section 4.3.2") |
241 | |
242 (defvar ldap-attribute-syntax-decoders | |
444 | 243 [nil ; 1 ACI Item N |
244 nil ; 2 Access Point Y | |
245 nil ; 3 Attribute Type Description Y | |
246 nil ; 4 Audio N | |
247 nil ; 5 Binary N | |
248 nil ; 6 Bit String Y | |
249 ldap-decode-boolean ; 7 Boolean Y | |
250 nil ; 8 Certificate N | |
251 nil ; 9 Certificate List N | |
252 nil ; 10 Certificate Pair N | |
253 ldap-decode-string ; 11 Country String Y | |
254 ldap-decode-string ; 12 DN Y | |
255 nil ; 13 Data Quality Syntax Y | |
256 nil ; 14 Delivery Method Y | |
257 ldap-decode-string ; 15 Directory String Y | |
258 nil ; 16 DIT Content Rule Description Y | |
259 nil ; 17 DIT Structure Rule Description Y | |
260 nil ; 18 DL Submit Permission Y | |
261 nil ; 19 DSA Quality Syntax Y | |
262 nil ; 20 DSE Type Y | |
263 nil ; 21 Enhanced Guide Y | |
264 nil ; 22 Facsimile Telephone Number Y | |
265 nil ; 23 Fax N | |
266 nil ; 24 Generalized Time Y | |
267 nil ; 25 Guide Y | |
268 nil ; 26 IA5 String Y | |
269 string-to-number ; 27 INTEGER Y | |
270 nil ; 28 JPEG N | |
271 nil ; 29 Master And Shadow Access Points Y | |
272 nil ; 30 Matching Rule Description Y | |
273 nil ; 31 Matching Rule Use Description Y | |
274 nil ; 32 Mail Preference Y | |
275 nil ; 33 MHS OR Address Y | |
276 nil ; 34 Name And Optional UID Y | |
277 nil ; 35 Name Form Description Y | |
278 nil ; 36 Numeric String Y | |
279 nil ; 37 Object Class Description Y | |
280 nil ; 38 OID Y | |
281 nil ; 39 Other Mailbox Y | |
282 nil ; 40 Octet String Y | |
283 ldap-decode-address ; 41 Postal Address Y | |
284 nil ; 42 Protocol Information Y | |
285 nil ; 43 Presentation Address Y | |
286 ldap-decode-string ; 44 Printable String Y | |
287 nil ; 45 Subtree Specification Y | |
288 nil ; 46 Supplier Information Y | |
289 nil ; 47 Supplier Or Consumer Y | |
290 nil ; 48 Supplier And Consumer Y | |
291 nil ; 49 Supported Algorithm N | |
292 nil ; 50 Telephone Number Y | |
293 nil ; 51 Teletex Terminal Identifier Y | |
294 nil ; 52 Telex Number Y | |
295 nil ; 53 UTC Time Y | |
296 nil ; 54 LDAP Syntax Description Y | |
297 nil ; 55 Modify Rights Y | |
298 nil ; 56 LDAP Schema Definition Y | |
299 nil ; 57 LDAP Schema Description Y | |
300 nil ; 58 Substring Assertion Y | |
301 ] | |
428 | 302 "A vector of functions used to decode LDAP attribute values. |
303 The sequence of functions corresponds to the sequence of LDAP attribute syntax | |
444 | 304 object identifiers of the form 1.3.6.1.4.1.1466.1115.121.1.* as defined in |
428 | 305 RFC2252 section 4.3.2") |
306 | |
307 | |
308 (defvar ldap-attribute-syntaxes-alist | |
309 '((createtimestamp . 24) | |
310 (modifytimestamp . 24) | |
311 (creatorsname . 12) | |
312 (modifiersname . 12) | |
313 (subschemasubentry . 12) | |
314 (attributetypes . 3) | |
315 (objectclasses . 37) | |
316 (matchingrules . 30) | |
317 (matchingruleuse . 31) | |
318 (namingcontexts . 12) | |
319 (altserver . 26) | |
320 (supportedextension . 38) | |
321 (supportedcontrol . 38) | |
322 (supportedsaslmechanisms . 15) | |
323 (supportedldapversion . 27) | |
324 (ldapsyntaxes . 16) | |
325 (ditstructurerules . 17) | |
326 (nameforms . 35) | |
327 (ditcontentrules . 16) | |
328 (objectclass . 38) | |
329 (aliasedobjectname . 12) | |
330 (cn . 15) | |
331 (sn . 15) | |
332 (serialnumber . 44) | |
333 (c . 15) | |
334 (l . 15) | |
335 (st . 15) | |
336 (street . 15) | |
337 (o . 15) | |
338 (ou . 15) | |
339 (title . 15) | |
340 (description . 15) | |
341 (searchguide . 25) | |
342 (businesscategory . 15) | |
343 (postaladdress . 41) | |
344 (postalcode . 15) | |
345 (postofficebox . 15) | |
346 (physicaldeliveryofficename . 15) | |
347 (telephonenumber . 50) | |
348 (telexnumber . 52) | |
349 (telexterminalidentifier . 51) | |
350 (facsimiletelephonenumber . 22) | |
351 (x121address . 36) | |
352 (internationalisdnnumber . 36) | |
353 (registeredaddress . 41) | |
354 (destinationindicator . 44) | |
355 (preferreddeliverymethod . 14) | |
356 (presentationaddress . 43) | |
357 (supportedapplicationcontext . 38) | |
358 (member . 12) | |
359 (owner . 12) | |
360 (roleoccupant . 12) | |
361 (seealso . 12) | |
362 (userpassword . 40) | |
363 (usercertificate . 8) | |
364 (cacertificate . 8) | |
365 (authorityrevocationlist . 9) | |
366 (certificaterevocationlist . 9) | |
367 (crosscertificatepair . 10) | |
368 (name . 15) | |
369 (givenname . 15) | |
370 (initials . 15) | |
371 (generationqualifier . 15) | |
372 (x500uniqueidentifier . 6) | |
373 (dnqualifier . 44) | |
374 (enhancedsearchguide . 21) | |
375 (protocolinformation . 42) | |
376 (distinguishedname . 12) | |
377 (uniquemember . 34) | |
378 (houseidentifier . 15) | |
379 (supportedalgorithms . 49) | |
380 (deltarevocationlist . 9) | |
381 (dmdname . 15)) | |
382 "A map of LDAP attribute names to their type object id minor number. | |
383 This table is built from RFC2252 Section 5 and RFC2256 Section 5") | |
384 | |
385 | |
386 ;; Coding/decoding functions | |
387 | |
388 (defun ldap-encode-boolean (bool) | |
389 (if bool | |
390 "TRUE" | |
391 "FALSE")) | |
392 | |
393 (defun ldap-decode-boolean (str) | |
394 (cond | |
395 ((string-equal str "TRUE") | |
396 t) | |
397 ((string-equal str "FALSE") | |
398 nil) | |
399 (t | |
400 (error "Wrong LDAP boolean string: %s" str)))) | |
444 | 401 |
428 | 402 (defun ldap-encode-country-string (str) |
403 ;; We should do something useful here... | |
404 (if (not (= 2 (length str))) | |
405 (error "Invalid country string: %s" str))) | |
406 | |
407 (defun ldap-decode-string (str) | |
408 (if (fboundp 'decode-coding-string) | |
409 (decode-coding-string str ldap-coding-system))) | |
410 | |
411 (defun ldap-encode-string (str) | |
412 (if (fboundp 'encode-coding-string) | |
413 (encode-coding-string str ldap-coding-system))) | |
414 | |
415 (defun ldap-decode-address (str) | |
416 (mapconcat 'ldap-decode-string | |
417 (split-string str "\\$") | |
418 "\n")) | |
419 | |
420 (defun ldap-encode-address (str) | |
421 (mapconcat 'ldap-encode-string | |
422 (split-string str "\n") | |
423 "$")) | |
424 | |
425 | |
426 ;; LDAP protocol functions | |
444 | 427 |
428 | 428 (defun ldap-get-host-parameter (host parameter) |
429 "Get the value of PARAMETER for HOST in `ldap-host-parameters-alist'." | |
430 (plist-get (cdr (assoc host ldap-host-parameters-alist)) | |
431 parameter)) | |
444 | 432 |
428 | 433 (defun ldap-decode-attribute (attr) |
434 "Decode the attribute/value pair ATTR according to LDAP rules. | |
444 | 435 The attribute name is looked up in `ldap-attribute-syntaxes-alist' |
436 and the corresponding decoder is then retrieved from | |
428 | 437 `ldap-attribute-syntax-decoders' and applied on the value(s)." |
438 (let* ((name (car attr)) | |
439 (values (cdr attr)) | |
440 (syntax-id (cdr (assq (intern (downcase name)) | |
441 ldap-attribute-syntaxes-alist))) | |
442 decoder) | |
443 (if syntax-id | |
444 (setq decoder (aref ldap-attribute-syntax-decoders | |
445 (1- syntax-id))) | |
446 (setq decoder ldap-default-attribute-decoder)) | |
447 (if decoder | |
448 (cons name (mapcar decoder values)) | |
449 attr))) | |
450 | |
442 | 451 (defun ldap-decode-entry (entry) |
452 "Decode the attributes of ENTRY according to LDAP rules." | |
453 (let (dn decoded) | |
454 (setq dn (car entry)) | |
455 (if (stringp dn) | |
456 (setq entry (cdr entry)) | |
457 (setq dn nil)) | |
458 (setq decoded (mapcar 'ldap-decode-attribute entry)) | |
459 (if dn | |
460 (cons dn decoded) | |
461 decoded))) | |
462 | |
463 (defun ldap-search (arg1 &rest args) | |
444 | 464 "Perform an LDAP search." |
442 | 465 (apply (if (ldapp arg1) |
466 'ldap-search-basic | |
467 'ldap-search-entries) arg1 args)) | |
468 | |
444 | 469 (make-obsolete 'ldap-search |
470 "Use `ldap-search-entries' instead or | |
442 | 471 `ldap-search-basic' for the low-level search API.") |
472 | |
473 (defun ldap-search-entries (filter &optional host attributes attrsonly withdn) | |
428 | 474 "Perform an LDAP search. |
475 FILTER is the search filter in RFC1558 syntax, i.e., something that | |
476 looks like \"(cn=John Smith)\". | |
477 HOST is the LDAP host on which to perform the search. | |
478 ATTRIBUTES is a list of attributes to retrieve; nil means retrieve all. | |
479 If ATTRSONLY is non nil, the attributes will be retrieved without | |
480 the associated values. | |
481 If WITHDN is non-nil each entry in the result will be prepennded with | |
482 its distinguished name DN. | |
444 | 483 Additional search parameters can be specified through |
428 | 484 `ldap-host-parameters-alist' which see. |
485 The function returns a list of matching entries. Each entry is itself | |
486 an alist of attribute/value pairs optionally preceded by the DN of the | |
487 entry according to the value of WITHDN." | |
488 (interactive "sFilter:") | |
489 (or host | |
490 (setq host ldap-default-host) | |
491 (error "No LDAP host specified")) | |
492 (let ((host-plist (cdr (assoc host ldap-host-parameters-alist))) | |
493 ldap | |
494 result) | |
442 | 495 (if ldap-verbose |
496 (message "Opening LDAP connection to %s..." host)) | |
428 | 497 (setq ldap (ldap-open host host-plist)) |
442 | 498 (if ldap-verbose |
499 (message "Searching with LDAP on %s..." host)) | |
444 | 500 (setq result (ldap-search ldap filter |
442 | 501 (plist-get host-plist 'base) |
502 (plist-get host-plist 'scope) | |
503 attributes attrsonly withdn | |
504 ldap-verbose)) | |
428 | 505 (ldap-close ldap) |
506 (if ldap-ignore-attribute-codings | |
507 result | |
442 | 508 (mapcar 'ldap-decode-entry result)))) |
509 | |
510 (defun ldap-add-entries (entries &optional host binddn passwd) | |
511 "Add entries to an LDAP directory. | |
444 | 512 ENTRIES is a list of entry specifications of |
442 | 513 the form (DN (ATTR . VALUE) (ATTR . VALUE) ...) where |
514 DN is the distinguished name of an entry to add, the following | |
515 are cons cells containing attribute/value string pairs. | |
444 | 516 HOST is the LDAP host, defaulting to `ldap-default-host'. |
517 BINDDN is the DN to bind as to the server. | |
518 PASSWD is the corresponding password." | |
442 | 519 (or host |
520 (setq host ldap-default-host) | |
521 (error "No LDAP host specified")) | |
522 (let ((host-plist (cdr (assoc host ldap-host-parameters-alist))) | |
523 ldap | |
524 (i 1)) | |
525 (if (or binddn passwd) | |
526 (setq host-plist (copy-seq host-plist))) | |
527 (if binddn | |
528 (setq host-plist (plist-put host-plist 'binddn binddn))) | |
529 (if passwd | |
530 (setq host-plist (plist-put host-plist 'passwd passwd))) | |
531 (if ldap-verbose | |
532 (message "Opening LDAP connection to %s..." host)) | |
533 (setq ldap (ldap-open host host-plist)) | |
534 (if ldap-verbose | |
535 (message "Adding LDAP entries...")) | |
4783
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
536 (mapc (function |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
537 (lambda (thisentry) |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
538 (ldap-add ldap (car thisentry) (cdr thisentry)) |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
539 (if ldap-verbose |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
540 (message "%d added" i)) |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
541 (setq i (1+ i)))) |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
542 entries) |
442 | 543 (ldap-close ldap))) |
544 | |
545 | |
546 (defun ldap-modify-entries (entry-mods &optional host binddn passwd) | |
547 "Modify entries of an LDAP directory. | |
444 | 548 ENTRY_MODS is a list of entry modifications of the form |
549 (DN MOD-SPEC1 MOD-SPEC2 ...) where DN is the distinguished name of | |
550 the entry to modify, the following are modification specifications. | |
551 A modification specification is itself a list of the form | |
4783
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
552 \(MOD-OP ATTR VALUE1 VALUE2 ...) MOD-OP and ATTR are mandatory, |
442 | 553 VALUEs are optional depending on MOD-OP. |
554 MOD-OP is the type of modification, one of the symbols `add', `delete' | |
555 or `replace'. ATTR is the LDAP attribute type to modify. | |
444 | 556 HOST is the LDAP host, defaulting to `ldap-default-host'. |
557 BINDDN is the DN to bind as to the server. | |
558 PASSWD is the corresponding password." | |
442 | 559 (or host |
560 (setq host ldap-default-host) | |
561 (error "No LDAP host specified")) | |
562 (let ((host-plist (cdr (assoc host ldap-host-parameters-alist))) | |
563 ldap | |
564 (i 1)) | |
565 (if (or binddn passwd) | |
566 (setq host-plist (copy-seq host-plist))) | |
567 (if binddn | |
568 (setq host-plist (plist-put host-plist 'binddn binddn))) | |
569 (if passwd | |
570 (setq host-plist (plist-put host-plist 'passwd passwd))) | |
571 (if ldap-verbose | |
572 (message "Opening LDAP connection to %s..." host)) | |
573 (setq ldap (ldap-open host host-plist)) | |
574 (if ldap-verbose | |
575 (message "Modifying LDAP entries...")) | |
4783
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
576 (mapc (function |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
577 (lambda (thisentry) |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
578 (ldap-modify ldap (car thisentry) (cdr thisentry)) |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
579 (if ldap-verbose |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
580 (message "%d modified" i)) |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
581 (setq i (1+ i)))) |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
582 entry-mods) |
442 | 583 (ldap-close ldap))) |
584 | |
585 | |
586 (defun ldap-delete-entries (dn &optional host binddn passwd) | |
587 "Delete an entry from an LDAP directory. | |
444 | 588 DN is the distinguished name of an entry to delete or |
442 | 589 a list of those. |
444 | 590 HOST is the LDAP host, defaulting to `ldap-default-host'. |
591 BINDDN is the DN to bind as to the server. | |
442 | 592 PASSWD is the corresponding password." |
593 (or host | |
594 (setq host ldap-default-host) | |
595 (error "No LDAP host specified")) | |
596 (let ((host-plist (cdr (assoc host ldap-host-parameters-alist))) | |
597 ldap) | |
598 (if (or binddn passwd) | |
599 (setq host-plist (copy-seq host-plist))) | |
600 (if binddn | |
601 (setq host-plist (plist-put host-plist 'binddn binddn))) | |
602 (if passwd | |
603 (setq host-plist (plist-put host-plist 'passwd passwd))) | |
604 (if ldap-verbose | |
605 (message "Opening LDAP connection to %s..." host)) | |
606 (setq ldap (ldap-open host host-plist)) | |
607 (if (consp dn) | |
608 (let ((i 1)) | |
609 (if ldap-verbose | |
610 (message "Deleting LDAP entries...")) | |
4783
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
611 (mapc (function |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
612 (lambda (thisdn) |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
613 (ldap-delete ldap thisdn) |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
614 (if ldap-verbose |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
615 (message "%d deleted" i)) |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
616 (setq i (1+ i)))) |
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
502
diff
changeset
|
617 dn)) |
442 | 618 (if ldap-verbose |
619 (message "Deleting LDAP entry...")) | |
620 (ldap-delete ldap dn)) | |
621 (ldap-close ldap))) | |
622 | |
428 | 623 |
624 (provide 'ldap) | |
444 | 625 |
428 | 626 ;;; ldap.el ends here |