emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 0dee070 02/17: Support new-style LDAP URIs in ldap-


From: Stefan Monnier
Subject: [Emacs-diffs] master 0dee070 02/17: Support new-style LDAP URIs in ldap-search-internal
Date: Fri, 23 Jan 2015 22:20:30 +0000

branch: master
commit 0dee07009485caa7b39a762741e5cab3648afe6f
Author: Thomas Fitzsimmons <address@hidden>
Commit: Thomas Fitzsimmons <address@hidden>

    Support new-style LDAP URIs in ldap-search-internal
    
    * net/ldap.el (ldap-search-internal): Support new-style LDAP URIs.
---
 lisp/ChangeLog   |    4 ++++
 lisp/net/ldap.el |    8 +++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3a68f33..831e3b0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
 2014-11-13  Thomas Fitzsimmons  <address@hidden>
 
+       * net/ldap.el (ldap-search-internal): Support new-style LDAP URIs.
+
+2014-11-13  Thomas Fitzsimmons  <address@hidden>
+
        * net/eudc-vars.el (eudc-server): Adjust docstring to mention
        eudc-server-hotlist.
        (eudc-server-hotlist): Move from eudc.el and make defcustom.
diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el
index 10ce7a7..2b5b2fb 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"))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]