From: LdBeth <andpuke@foxmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: LdBeth <andpuke@foxmail.com>,
64977@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#64977: 29.1; `auth-source-macos-keychain-search' handles :user key incorrectly
Date: Sat, 12 Aug 2023 10:40:36 -0500 [thread overview]
Message-ID: <tencent_961D362BABBF5C37D26E72C7BC1E7B8C2507@qq.com> (raw)
In-Reply-To: <87wmy0z9lp.fsf@gmx.de>
I think it is possible to use cl-left to redefine
`auth-source-macos-keychain-search-items' to avoid calling external
security command and just check the argument passed to
`call-process'.
Something like:
(cl-letf (((symbol-function 'call-process) (lambda (&rest r) (print r))))
(auth-source-search :user "ldb" :port "irc"))
("/usr/bin/security" nil t nil "find-internet-password" "-g" "-a" "ldb" "-r" "irc ")
("/usr/bin/security" nil t nil "find-generic-password" "-g" "-a" "ldb" "-s" "irc")
ldb
>>>>> In <87wmy0z9lp.fsf@gmx.de>
>>>>> Michael Albinus <michael.albinus@gmx.de> wrote:
> LdBeth <andpuke@foxmail.com> writes:
> Hi,
>> To test this function, first add password using:
>>
>> $ security add-internet-password -s irc.libera.chat -a ldb -r 'irc ' -w 'passwd'
>>
>> In emacs, use something like
>>
>> (auth-source-search :user "ldb" :port "irc")
>>
>> should about to retrieve the password.
> Thanbks.
> Do you believe it is possible to add corresponding tests to
> auth-source-tests.el, like we have for the netrc and secrets backends?
>> ldb
> Best regards, Michael.
next prev parent reply other threads:[~2023-08-12 15:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 15:46 bug#64977: 29.1; `auth-source-macos-keychain-search' handles :user key incorrectly LdBeth
2023-08-02 13:22 ` J.P.
2023-08-08 22:20 ` LdBeth
2023-08-12 6:55 ` Eli Zaretskii
2023-08-12 11:39 ` Michael Albinus
2023-08-12 12:55 ` LdBeth
2023-08-12 13:14 ` Michael Albinus
2023-08-12 15:40 ` LdBeth [this message]
2023-08-12 16:02 ` Michael Albinus
2023-08-12 19:02 ` LdBeth
2023-08-13 16:34 ` Michael Albinus
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=tencent_961D362BABBF5C37D26E72C7BC1E7B8C2507@qq.com \
--to=andpuke@foxmail.com \
--cc=64977@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=michael.albinus@gmx.de \
/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.