]> git.eshelyaron.com Git - emacs.git/commitdiff
Support new-style LDAP URIs in ldap-search-internal
authorThomas Fitzsimmons <fitzsim@fitzsim.org>
Thu, 13 Nov 2014 05:59:12 +0000 (00:59 -0500)
committerThomas Fitzsimmons <fitzsim@fitzsim.org>
Thu, 13 Nov 2014 05:59:12 +0000 (00:59 -0500)
* net/ldap.el (ldap-search-internal): Support new-style LDAP URIs.

lisp/ChangeLog
lisp/net/ldap.el

index 3a68f33044dfe9879ad10b8e10917c5244c51a69..831e3b03a76575894e27af1f88e1d66e7e14a443 100644 (file)
@@ -1,3 +1,7 @@
+2014-11-13  Thomas Fitzsimmons  <fitzsim@fitzsim.org>
+
+       * net/ldap.el (ldap-search-internal): Support new-style LDAP URIs.
+
 2014-11-13  Thomas Fitzsimmons  <fitzsim@fitzsim.org>
 
        * net/eudc-vars.el (eudc-server): Adjust docstring to mention
index 10ce7a78d358bf18d74bbfe9af9041f2ed8148b2..2b5b2fb89a5256a4cf85df63b8891fe5780f7a27 100644 (file)
@@ -559,7 +559,13 @@ an alist of attribute/value pairs."
       (erase-buffer)
       (if (and host
               (not (equal "" host)))
-         (setq arglist (nconc arglist (list (format "-h%s" host)))))
+         (setq arglist (nconc arglist
+                              (list (format
+                                     ;; Use -H if host is a new-style LDAP URI.
+                                     (if (string-match "^[a-zA-Z]+://" host)
+                                         "-H%s"
+                                       "-h%s")
+                                     host)))))
       (if (and attrsonly
               (not (equal "" attrsonly)))
          (setq arglist (nconc arglist (list "-A"))))