diff options
author | Thomas Fitzsimmons <fitzsim@fitzsim.org> | 2014-11-13 00:59:12 -0500 |
---|---|---|
committer | Thomas Fitzsimmons <fitzsim@fitzsim.org> | 2014-11-13 00:59:12 -0500 |
commit | 0dee07009485caa7b39a762741e5cab3648afe6f (patch) | |
tree | 95acc785f4fd6adc539388ee02384bc2907ddc2a /lisp/net/ldap.el | |
parent | 090cbf9b46465ffb46430021be782a4569afd5a6 (diff) |
Support new-style LDAP URIs in ldap-search-internal
* net/ldap.el (ldap-search-internal): Support new-style LDAP URIs.
Diffstat (limited to 'lisp/net/ldap.el')
-rw-r--r-- | lisp/net/ldap.el | 8 |
1 files changed, 7 insertions, 1 deletions
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")))) |