all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Mastro <jbm@jbm.io>
To: 19074@debbugs.gnu.org
Subject: bug#19074: Bug in auth-source.el's search of OS X Keychain
Date: Sun, 16 Nov 2014 21:38:32 -0800	[thread overview]
Message-ID: <m2lhnamlnr.fsf@jbm.io> (raw)
In-Reply-To: <m2h9xyzd45.fsf@jbm.io>

I accidentally copied only part of the patch in my original email. The
full thing (via `git format-patch') follows.

-- 
jbm


From 2b968a29ff2a01e316e09faa4d765aca08cf0121 Mon Sep 17 00:00:00 2001
From: John Mastro <john.b.mastro@gmail.com>
Date: Sun, 16 Nov 2014 19:41:10 -0800
Subject: [PATCH] Fix auth-source.el bug regarding the OS X Keychain

In `auth-source-macos-keychain-search-items', the return value of
`auth-source-macos-keychain-result-append' was being ignored. This
caused the intended result not to be returned.
---
 lisp/gnus/auth-source.el | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el
index a50ad75..72ec5f4 100644
--- a/lisp/gnus/auth-source.el
+++ b/lisp/gnus/auth-source.el
@@ -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))))
 
-- 
2.1.3






  reply	other threads:[~2014-11-17  5:38 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17  4:04 bug#19074: 24.4; Bug in auth-source.el's search of OS X Keychain John Mastro
2014-11-17  5:38 ` John Mastro [this message]
2014-11-26 14:17   ` bug#19074: " Ted Zlatanov
2014-11-26 15:57     ` Stefan Monnier
     [not found]       ` <87wq6hap7v.fsf@lifelogs.com>
2014-11-26 18:59         ` merging emacs-24 (was: bug#19074: Bug in auth-source.el's search of OS X Keychain) Stefan Monnier
2014-11-26 19:02           ` merging emacs-24 David Engster
2014-11-26 20:01             ` Ted Zlatanov
2014-11-26 22:16             ` Stefan Monnier
2014-11-27 17:27               ` David Engster
2014-11-27 17:55                 ` Eli Zaretskii
2014-11-27 18:31                   ` Andreas Schwab
2014-11-27 18:42                     ` Eli Zaretskii
2014-11-27 18:46                       ` David Engster
2014-11-27 18:55                         ` Eli Zaretskii
2014-11-27 19:21                           ` David Engster
2014-11-27 21:05                         ` Stefan Monnier
2014-11-27 22:24                           ` David Engster
2014-11-28  0:28                             ` Ted Zlatanov
2014-11-28  8:20                               ` Eli Zaretskii
2014-11-28 14:20                                 ` Michael Welsh Duggan
2014-11-28 14:59                                   ` Eli Zaretskii
2014-11-28 15:06                                     ` Michael Welsh Duggan
2014-11-28 14:37                                 ` David Kastrup
2014-11-28 15:14                                   ` Eli Zaretskii
2014-11-29 12:55                             ` Eli Zaretskii
2014-11-29 20:01                               ` Glenn Morris
2014-11-29 20:33                                 ` Eli Zaretskii
2014-11-27  1:54           ` Ted Zlatanov
2014-11-27  2:01             ` Óscar Fuentes
2014-11-27  2:32               ` Ted Zlatanov
2014-11-27  3:48                 ` Glenn Morris
2014-11-27  3:59                   ` Glenn Morris
2014-11-27 10:45                     ` Andreas Schwab
2014-11-27 13:02                   ` Ted Zlatanov
2014-11-27 16:23                     ` Eli Zaretskii
2014-11-27 17:11                       ` Andreas Schwab
2014-11-27 17:44                         ` Eli Zaretskii
2014-11-27 17:56                           ` Andreas Schwab
2014-11-27 18:04                             ` Eli Zaretskii
2014-11-28  8:33                               ` Andreas Schwab
2014-11-28  8:54                                 ` Eli Zaretskii
2014-11-28 15:44                                   ` Sergey Organov
2014-11-28 15:56                                     ` David Kastrup
2014-11-27 17:17                     ` Stefan Monnier
2014-11-27 17:32                     ` David Engster
2014-11-27 17:59                       ` Andreas Schwab
2014-11-28  0:30                       ` Ted Zlatanov
2014-11-28  2:55                       ` Stephen J. Turnbull
2014-11-28  3:29                         ` Stephen J. Turnbull
2014-11-28  8:27                           ` Eli Zaretskii
2014-11-28  0:31                     ` Ted Zlatanov
2014-11-29  7:20                       ` Paul Eggert
2014-11-29 21:27                         ` Glenn Morris
2014-11-29 22:28                           ` generating Chan(was: merging emacs-24) Paul Eggert
2014-11-28  0:33                     ` merging emacs-24 Ted Zlatanov
2014-11-28  8:22                       ` Andreas Schwab
2014-11-28  8:31                       ` Eli Zaretskii
2014-11-28 14:29                         ` Stefan Monnier
2014-11-29 20:02                           ` Glenn Morris
2014-11-27 16:10                   ` Eli Zaretskii
2014-11-29 20:13                     ` Glenn Morris
2014-11-26 22:30     ` bug#19074: Bug in auth-source.el's search of OS X Keychain Katsumi Yamaoka
2014-11-27  1:24       ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2lhnamlnr.fsf@jbm.io \
    --to=jbm@jbm.io \
    --cc=19074@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.