aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Mastro2014-11-26 09:15:08 -0500
committerTed Zlatanov2014-11-26 09:15:08 -0500
commita10e36a5d7fe95830e3f93dc7ae6f65507738978 (patch)
treea862dde24b95f0c6feb7bf28372a4bec673f01a8
parent73cad916c8a225dac3bd0abd116a89ce52052574 (diff)
downloademacs-a10e36a5d7fe95830e3f93dc7ae6f65507738978.tar.gz
emacs-a10e36a5d7fe95830e3f93dc7ae6f65507738978.zip
auth-source: Fix Mac OS X keychain lookups.
* auth-source.el (auth-source-macos-keychain-search-items): Return result of `auth-source-macos-keychain-result-append' (bug#19074).
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/auth-source.el34
2 files changed, 22 insertions, 17 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 6713df85819..3b2a702a69e 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12014-11-26 John Mastro <john.b.mastro@gmail.com> (tiny change)
2
3 * auth-source.el (auth-source-macos-keychain-search-items): Return
4 result of `auth-source-macos-keychain-result-append' (bug#19074).
5
12014-11-10 Adam Sjøgren <asjo@koldfront.dk> 62014-11-10 Adam Sjøgren <asjo@koldfront.dk>
2 7
3 * mml2015.el (mml2015-display-key-image): New variable. 8 * mml2015.el (mml2015-display-key-image): New variable.
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el
index a50ad75063b..72ec5f4e2ca 100644
--- a/lisp/gnus/auth-source.el
+++ b/lisp/gnus/auth-source.el
@@ -1779,29 +1779,29 @@ entries for git.gnus.org:
1779 (while (not (eobp)) 1779 (while (not (eobp))
1780 (cond 1780 (cond
1781 ((looking-at "^password: \"\\(.+\\)\"$") 1781 ((looking-at "^password: \"\\(.+\\)\"$")
1782 (auth-source-macos-keychain-result-append 1782 (setq ret (auth-source-macos-keychain-result-append
1783 ret 1783 ret
1784 keychain-generic 1784 keychain-generic
1785 "secret" 1785 "secret"
1786 (lexical-let ((v (match-string 1))) 1786 (lexical-let ((v (match-string 1)))
1787 (lambda () v)))) 1787 (lambda () v)))))
1788 ;; TODO: check if this is really the label 1788 ;; TODO: check if this is really the label
1789 ;; match 0x00000007 <blob>="AppleID" 1789 ;; match 0x00000007 <blob>="AppleID"
1790 ((looking-at "^[ ]+0x00000007 <blob>=\"\\(.+\\)\"") 1790 ((looking-at "^[ ]+0x00000007 <blob>=\"\\(.+\\)\"")
1791 (auth-source-macos-keychain-result-append 1791 (setq ret (auth-source-macos-keychain-result-append
1792 ret 1792 ret
1793 keychain-generic 1793 keychain-generic
1794 "label" 1794 "label"
1795 (match-string 1))) 1795 (match-string 1))))
1796 ;; match "crtr"<uint32>="aapl" 1796 ;; match "crtr"<uint32>="aapl"
1797 ;; match "svce"<blob>="AppleID" 1797 ;; match "svce"<blob>="AppleID"
1798 ((looking-at "^[ ]+\"\\([a-z]+\\)\"[^=]+=\"\\(.+\\)\"") 1798 ((looking-at "^[ ]+\"\\([a-z]+\\)\"[^=]+=\"\\(.+\\)\"")
1799 (auth-source-macos-keychain-result-append 1799 (setq ret (auth-source-macos-keychain-result-append
1800 ret 1800 ret
1801 keychain-generic 1801 keychain-generic
1802 (match-string 1) 1802 (match-string 1)
1803 (match-string 2)))) 1803 (match-string 2)))))
1804 (forward-line))) 1804 (forward-line)))
1805 ;; return `ret' iff it has the :secret key 1805 ;; return `ret' iff it has the :secret key
1806 (and (plist-get ret :secret) (list ret)))) 1806 (and (plist-get ret :secret) (list ret))))
1807 1807