X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Fldap.el;h=4f5e9a900e5b445df8005a2d1245aef0d0159206;hp=c27747a5ddaaa05f62305fd003d307e867e90d6c;hb=59eec5f21669e81977b5b1fe9bf717cab49cf7fb;hpb=032d062ebcb2344e6245cea4214bc09835da97ee diff --git a/lisp/ldap.el b/lisp/ldap.el index c27747a..4f5e9a9 100644 --- a/lisp/ldap.el +++ b/lisp/ldap.el @@ -5,7 +5,7 @@ ;; Author: Oscar Figueiredo ;; Maintainer: Oscar Figueiredo ;; Created: Jan 1998 -;; Version: $Revision: 1.7.2.7 $ +;; Version: $Revision: 1.7.2.8 $ ;; Keywords: help comm ;; This file is part of XEmacs @@ -444,7 +444,19 @@ and the corresponding decoder is then retrieved from (if decoder (cons name (mapcar decoder values)) attr))) - + +(defun ldap-decode-entry (entry) + "Decode the attributes of ENTRY according to LDAP rules." + (let (dn decoded) + (setq dn (car entry)) + (if (stringp dn) + (setq entry (cdr entry)) + (setq dn nil)) + (setq decoded (mapcar 'ldap-decode-attribute entry)) + (if dn + (cons dn decoded) + decoded))) + (defun ldap-search (arg1 &rest args) "Perform an LDAP search." (apply (if (ldapp arg1) @@ -490,10 +502,7 @@ entry according to the value of WITHDN." (ldap-close ldap) (if ldap-ignore-attribute-codings result - (mapcar (function - (lambda (record) - (mapcar 'ldap-decode-attribute record))) - result)))) + (mapcar 'ldap-decode-entry result)))) (defun ldap-add-entries (entries &optional host binddn passwd) "Add entries to an LDAP directory.