* Re: master ad5cf84fa7: Add `auth-info-password' and use it instead of ad hoc code [not found] ` <20220107195223.57DA2C0DA1B@vcs2.savannah.gnu.org> @ 2022-01-08 7:58 ` Michael Albinus 2022-01-08 17:40 ` Corwin Brust 2022-01-09 22:51 ` Sam Steingold 0 siblings, 2 replies; 4+ messages in thread From: Michael Albinus @ 2022-01-08 7:58 UTC (permalink / raw) To: emacs-devel; +Cc: Sam Steingold 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: master ad5cf84fa7: Add `auth-info-password' and use it instead of ad hoc code 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 1 sibling, 1 reply; 4+ messages in thread From: Corwin Brust @ 2022-01-08 17:40 UTC (permalink / raw) To: Michael Albinus; +Cc: Sam Steingold, Emacs developers Hi Michael, On Sat, Jan 8, 2022 at 2:54 AM Michael Albinus <michael.albinus@gmx.de> wrote: > > Sam Steingold <sds@gnu.org> writes: > > 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? Looking at this patch last night I had the same idea -- I don't see any reason *not* to allow cascaded functions in all cases while not allowing this for Tramp would actually be breaking. FWIW, I too wondered if there was any bug related to this or if this was simply pushed as an ad-hoc improvement across core/bundled packages. Warm regards, Corwin ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: master ad5cf84fa7: Add `auth-info-password' and use it instead of ad hoc code 2022-01-08 17:40 ` Corwin Brust @ 2022-01-08 17:48 ` Michael Albinus 0 siblings, 0 replies; 4+ messages in thread From: Michael Albinus @ 2022-01-08 17:48 UTC (permalink / raw) To: Corwin Brust; +Cc: Sam Steingold, Emacs developers Corwin Brust <corwin@bru.st> writes: > Hi Michael, Hi Corwin, > FWIW, I too wondered if there was any bug related to this or if this > was simply pushed as an ad-hoc improvement across core/bundled > packages. Today, I've scanned the Tramp mail archive, but I couldn't find any related message. Likely, this was a problem which happened through my Tramp tests, and I've just fixed it silently. > Warm regards, > Corwin Best regards, Michael. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: master ad5cf84fa7: Add `auth-info-password' and use it instead of ad hoc code 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-09 22:51 ` Sam Steingold 1 sibling, 0 replies; 4+ messages in thread From: Sam Steingold @ 2022-01-09 22:51 UTC (permalink / raw) To: emacs-devel 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-09 22:51 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [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
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.