From: Michael Albinus <michael.albinus@gmx.de>
To: emacs-devel@gnu.org
Cc: Sam Steingold <sds@gnu.org>
Subject: Re: master ad5cf84fa7: Add `auth-info-password' and use it instead of ad hoc code
Date: Sat, 08 Jan 2022 08:58:19 +0100 [thread overview]
Message-ID: <875yqu8xr8.fsf@gmx.de> (raw)
In-Reply-To: <20220107195223.57DA2C0DA1B@vcs2.savannah.gnu.org> (Sam Steingold's message of "Fri, 7 Jan 2022 14:52:22 -0500 (EST)")
Sam Steingold <sds@gnu.org> writes:
Hi Sam,
> Add `auth-info-password' and use it instead of ad hoc code
Thanks for this! Would you mind to add also a description of this
function to auth.texi, for the benefit of other package authors? As
bonus, also a test in auth-source-tests.el?
Whether this is good for an etc/NEWS entry I don't know, but likely yes.
--8<---------------cut here---------------start------------->8---
> +(defun auth-info-password (auth-info)
> + "Return the :secret password from the AUTH-INFO."
> + (let ((secret (plist-get auth-info :secret)))
> (if (functionp secret)
> (funcall secret)
> secret)))
--8<---------------cut here---------------end--------------->8---
Tramp ought to use a different implementation:
--8<---------------cut here---------------start------------->8---
> - (while (functionp auth-passwd)
> - (setq auth-passwd (funcall auth-passwd)))
--8<---------------cut here---------------end--------------->8---
I have no reference for the problem which has triggered this, all I've
found is this ChangeLog entry:
--8<---------------cut here---------------start------------->8---
2018-05-02 Michael Albinus <michael.albinus@gmx.de>
* tramp.el: ...
(tramp-read-passwd): auth-source could return cascaded functions.
--8<---------------cut here---------------end--------------->8---
Perhaps it is better to use the loop as well in auth-info-password?
Best regards, Michael.
next parent reply other threads:[~2022-01-08 7:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <164158514200.7829.12726312320214416447@vcs2.savannah.gnu.org>
[not found] ` <20220107195223.57DA2C0DA1B@vcs2.savannah.gnu.org>
2022-01-08 7:58 ` Michael Albinus [this message]
2022-01-08 17:40 ` master ad5cf84fa7: Add `auth-info-password' and use it instead of ad hoc code Corwin Brust
2022-01-08 17:48 ` Michael Albinus
2022-01-09 22:51 ` Sam Steingold
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875yqu8xr8.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=emacs-devel@gnu.org \
--cc=sds@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).