From 26b5d119f3ddf2d81592c61c9e1898c13dbad26d Mon Sep 17 00:00:00 2001 From: teranisi Date: Mon, 19 Jun 2000 07:04:02 +0000 Subject: [PATCH] (ldap-search-basic): Don't collect 'dn' value even if it is included in `attrs' argument. --- elmo/pldap.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/elmo/pldap.el b/elmo/pldap.el index b724e28..43bbf3f 100644 --- a/elmo/pldap.el +++ b/elmo/pldap.el @@ -700,13 +700,15 @@ entry according to the value of WITHDN." nil (mapcar (lambda (attr) - (if (setq value (ldap/field-body attr)) - (if attrsonly - (list attr) - (nconc (list attr) value)))) + ;; dn is not an attribute. + (unless (string= attr "dn") + (if (setq value + (ldap/field-body attr)) + (if attrsonly + (list attr) + (nconc (list attr) value))))) attrs))) - (setq attrs-result - (ldap/collect-field "dn")) + (setq attrs-result (ldap/collect-field "dn")) (if attrsonly (setq attrs-result (mapcar (lambda (x) (list (car x))) attrs-result)))) -- 1.7.10.4