* bug#23374: auth-source-macos-keychain-search pass in port only if it's provided
@ 2016-04-25 15:11 Jun Hao
2016-04-25 16:02 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Jun Hao @ 2016-04-25 15:11 UTC (permalink / raw)
To: 23374
[-- Attachment #1: Type: text/plain, Size: 388 bytes --]
Hi,
When calling auth-source-search without port on OSX, current code will
bind port to "nil" and generate wrong command. E.g:
(auth-source-search :user "test") will yield command:
/usr/bin/security find-generic-password -g -a "test" -s "nil"
The correct one should be:
/usr/bin/security find-generic-password -g -a "test"
Please see attachment for this simple patch
Thanks - Jun
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Pass-in-port-only-if-provided-by-caller.patch --]
[-- Type: text/x-patch, Size: 983 bytes --]
From b643d8a8a49d273bc7f7d70339c8026008634055 Mon Sep 17 00:00:00 2001
From: Jun Hao <jun_hao@aol.com>
Date: Mon, 25 Apr 2016 22:53:24 +0800
Subject: [PATCH] Pass in port only if provided by caller
* lisp/auth-source.el (auth-source-macos-keychain-search): pass in
port only if provided
---
lisp/auth-source.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index d691b54..fe28a02 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -1735,7 +1735,7 @@ entries for git.gnus.org:
(items (catch 'match
(dolist (host hosts)
(dolist (port ports)
- (let* ((port (format "%S" port))
+ (let* ((port (if port (format "%S" port)))
(items (apply #'auth-source-macos-keychain-search-items
coll
type
--
2.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#23374: auth-source-macos-keychain-search pass in port only if it's provided
2016-04-25 15:11 bug#23374: auth-source-macos-keychain-search pass in port only if it's provided Jun Hao
@ 2016-04-25 16:02 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2016-04-25 16:02 UTC (permalink / raw)
To: Jun Hao; +Cc: 23374
"Jun Hao" <jun_hao@aol.com> writes:
> When calling auth-source-search without port on OSX, current code will
> bind port to "nil" and generate wrong command. E.g:
>
> (auth-source-search :user "test") will yield command:
Thanks; applied.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-25 16:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-25 15:11 bug#23374: auth-source-macos-keychain-search pass in port only if it's provided Jun Hao
2016-04-25 16:02 ` Lars Magne Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.