[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master ad5cf84fa7: Add `auth-info-password' and use it instead of ad

From: Sam Steingold
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]