summaryrefslogtreecommitdiff
path: root/lisp/net/ldap.el
diff options
context:
space:
mode:
authorFilipp Gunbin <fgunbin@fastmail.fm>2022-04-13 23:10:35 +0300
committerFilipp Gunbin <fgunbin@fastmail.fm>2022-04-14 16:52:01 +0300
commit2a2f5530fa230e2b994be5683e63763833bb6a0a (patch)
tree90273ccef6ceb0d857375aba668469b08cc2f076 /lisp/net/ldap.el
parent36da6ceb926b684e4cee5888175924ccd79fac83 (diff)
downloademacs-2a2f5530fa230e2b994be5683e63763833bb6a0a.tar.gz
emacs-2a2f5530fa230e2b994be5683e63763833bb6a0a.tar.bz2
emacs-2a2f5530fa230e2b994be5683e63763833bb6a0a.zip
Fix eudc-get-attribute-list
* lisp/net/eudc-vars.el (eudc-ldap-no-wildcard-attributes): New defcustom. * doc/misc/eudc.texi (LDAP Configuration): Mention it. * lisp/net/eudcb-ldap.el (eudc-ldap-format-query-as-rfc1558): Use it. (eudc-ldap-get-field-list): Set scope and sizelimit, instead of overriding the whole ldap-host-parameters-alist. * lisp/net/ldap.el (ldap-search-internal): Allow "size limit exceeded" exit code. Allow empty attribute values.
Diffstat (limited to 'lisp/net/ldap.el')
-rw-r--r--lisp/net/ldap.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el
index ce6c270e0bc..94632821353 100644
--- a/lisp/net/ldap.el
+++ b/lisp/net/ldap.el
@@ -663,7 +663,7 @@ an alist of attribute/value pairs."
(while (not (memq (process-status proc) '(exit signal)))
(sit-for 0.1))
(let ((status (process-exit-status proc)))
- (when (not (eq status 0))
+ (when (not (memql status '(0 4))) ; 4 = Size limit exceeded
;; Handle invalid credentials exit status specially
;; for ldap-password-read.
(if (eq status 49)
@@ -699,7 +699,7 @@ an alist of attribute/value pairs."
(forward-line 1)
(while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\
\\|[0-9]+\\(?:\\.[0-9]+\\)*\\)\\(;[-A-Za-z0-9]+\\)*[=:\t ]+\
-\\(<[\t ]*file://\\)\\(.*\\)$")
+\\(<[\t ]*file://\\)?\\(.*\\)$")
(setq name (match-string 1)
value (match-string 4))
;; Need to handle file:///D:/... as generated by OpenLDAP