diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/auth-source.el | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/auth-source.el b/lisp/auth-source.el index 402f2617ca8..a06c9820060 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el | |||
| @@ -376,8 +376,14 @@ soon as a function returns non-nil.") | |||
| 376 | 376 | ||
| 377 | (defmacro auth-source-backends () | 377 | (defmacro auth-source-backends () |
| 378 | "List of usable backends from `auth-sources'. | 378 | "List of usable backends from `auth-sources'. |
| 379 | Filter out backends with type `ignore'. | ||
| 379 | A fallback backend is added to ensure, that at least `read-passwd' is called." | 380 | A fallback backend is added to ensure, that at least `read-passwd' is called." |
| 380 | `(or (mapcar #'auth-source-backend-parse auth-sources) | 381 | `(or (seq-keep |
| 382 | (lambda (entry) | ||
| 383 | (and-let* ((backend (auth-source-backend-parse entry)) | ||
| 384 | ((not (eq (slot-value backend 'type) 'ignore))) | ||
| 385 | backend))) | ||
| 386 | auth-sources) | ||
| 381 | ;; Fallback. | 387 | ;; Fallback. |
| 382 | (list (auth-source-backend | 388 | (list (auth-source-backend |
| 383 | :source "" | 389 | :source "" |
| @@ -407,9 +413,9 @@ A fallback backend is added to ensure, that at least `read-passwd' is called." | |||
| 407 | If a search key is nil or t (match anything), skip it." | 413 | If a search key is nil or t (match anything), skip it." |
| 408 | `(apply #'append (mapcar | 414 | `(apply #'append (mapcar |
| 409 | (lambda (k) | 415 | (lambda (k) |
| 410 | (and-let* ((v (plist-get ,spec k)) | 416 | (when-let* ((v (plist-get ,spec k)) |
| 411 | ((not (eq t v))) | 417 | (_ (not (eq t v)))) |
| 412 | ((list k (auth-source-ensure-strings v)))))) | 418 | (list k (auth-source-ensure-strings v)))) |
| 413 | (auth-source-search-keys ,spec)))) | 419 | (auth-source-search-keys ,spec)))) |
| 414 | 420 | ||
| 415 | (defcustom auth-source-ignore-non-existing-file t | 421 | (defcustom auth-source-ignore-non-existing-file t |