1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00

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).
This commit is contained in:
John Mastro 2014-11-26 09:15:08 -05:00 committed by Ted Zlatanov
parent 73cad916c8
commit a10e36a5d7
2 changed files with 22 additions and 17 deletions

View File

@ -1,3 +1,8 @@
2014-11-26 John Mastro <john.b.mastro@gmail.com> (tiny change)
* auth-source.el (auth-source-macos-keychain-search-items): Return
result of `auth-source-macos-keychain-result-append' (bug#19074).
2014-11-10 Adam Sjøgren <asjo@koldfront.dk>
* mml2015.el (mml2015-display-key-image): New variable.

View File

@ -1779,29 +1779,29 @@ entries for git.gnus.org:
(while (not (eobp))
(cond
((looking-at "^password: \"\\(.+\\)\"$")
(auth-source-macos-keychain-result-append
ret
keychain-generic
"secret"
(lexical-let ((v (match-string 1)))
(lambda () v))))
(setq ret (auth-source-macos-keychain-result-append
ret
keychain-generic
"secret"
(lexical-let ((v (match-string 1)))
(lambda () v)))))
;; TODO: check if this is really the label
;; match 0x00000007 <blob>="AppleID"
((looking-at "^[ ]+0x00000007 <blob>=\"\\(.+\\)\"")
(auth-source-macos-keychain-result-append
ret
keychain-generic
"label"
(match-string 1)))
(setq ret (auth-source-macos-keychain-result-append
ret
keychain-generic
"label"
(match-string 1))))
;; match "crtr"<uint32>="aapl"
;; match "svce"<blob>="AppleID"
((looking-at "^[ ]+\"\\([a-z]+\\)\"[^=]+=\"\\(.+\\)\"")
(auth-source-macos-keychain-result-append
ret
keychain-generic
(match-string 1)
(match-string 2))))
(forward-line)))
(setq ret (auth-source-macos-keychain-result-append
ret
keychain-generic
(match-string 1)
(match-string 2)))))
(forward-line)))
;; return `ret' iff it has the :secret key
(and (plist-get ret :secret) (list ret))))