From: Thomas Fitzsimmons Date: Thu, 13 Nov 2014 05:59:12 +0000 (-0500) Subject: Support new-style LDAP URIs in ldap-search-internal X-Git-Tag: emacs-25.0.90~2582^2~2^2~14 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0dee07009485caa7b39a762741e5cab3648afe6f;p=emacs.git Support new-style LDAP URIs in ldap-search-internal * net/ldap.el (ldap-search-internal): Support new-style LDAP URIs. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3a68f33044d..831e3b03a76 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-11-13 Thomas Fitzsimmons + + * net/ldap.el (ldap-search-internal): Support new-style LDAP URIs. + 2014-11-13 Thomas Fitzsimmons * net/eudc-vars.el (eudc-server): Adjust docstring to mention diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 10ce7a78d35..2b5b2fb89a5 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -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"))))