unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Sam Steingold <sds@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: master ad5cf84fa7: Add `auth-info-password' and use it instead of ad hoc code
Date: Sun, 09 Jan 2022 17:51:24 -0500	[thread overview]
Message-ID: <87r19g34lv.fsf@gnu.org> (raw)
In-Reply-To: 875yqu8xr8.fsf@gmx.de

Hi Michael,

> * Michael Albinus <zvpunry.nyovahf@tzk.qr> [2022-01-08 08:58:19 +0100]:
> Sam Steingold <sds@gnu.org> writes:
>
>>     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?

Sure, will do.

>> +(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)))
>
>
> Tramp ought to use a different implementation:
>
>> -		 (while (functionp auth-passwd)
>> -		   (setq auth-passwd (funcall auth-passwd)))
>
>
> I have no reference for the problem which has triggered this, all I've
> found is this ChangeLog entry:
>
> 2018-05-02  Michael Albinus  <michael.albinus@gmx.de>
>
> 	* tramp.el: ...
> 	(tramp-read-passwd): auth-source could return cascaded functions.
>
> Perhaps it is better to use the loop as well in auth-info-password?

Tramp is the only package that assumes "cascaded functions".
Are you sure `auth-source' _can_ return them?

Thank you.

-- 
Sam Steingold (http://sds.podval.org/) on Pop 21.10 (impish) X 11.0.12013000
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
https://www.memritv.org https://ij.org/ https://iris.org.il
Brainwashing leads to brain drain.




      parent reply	other threads:[~2022-01-09 22:51 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   ` master ad5cf84fa7: Add `auth-info-password' and use it instead of ad hoc code Michael Albinus
2022-01-08 17:40     ` Corwin Brust
2022-01-08 17:48       ` Michael Albinus
2022-01-09 22:51     ` Sam Steingold [this message]

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=87r19g34lv.fsf@gnu.org \
    --to=sds@gnu.org \
    --cc=emacs-devel@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).