(ldap-search-basic): Don't collect 'dn' value even if it is included in
authorteranisi <teranisi>
Mon, 19 Jun 2000 07:04:02 +0000 (07:04 +0000)
committerteranisi <teranisi>
Mon, 19 Jun 2000 07:04:02 +0000 (07:04 +0000)
 `attrs' argument.

elmo/pldap.el

index b724e28..43bbf3f 100644 (file)
@@ -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))))