From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel 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 Message-ID: <875yqu8xr8.fsf@gmx.de> References: <164158514200.7829.12726312320214416447@vcs2.savannah.gnu.org> <20220107195223.57DA2C0DA1B@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16851"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Sam Steingold To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 08 09:54:31 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n67Uc-0004BX-7A for ged-emacs-devel@m.gmane-mx.org; Sat, 08 Jan 2022 09:54:30 +0100 Original-Received: from localhost ([::1]:58488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n67Ub-0000J2-0i for ged-emacs-devel@m.gmane-mx.org; Sat, 08 Jan 2022 03:54:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n66cK-0003vY-O4 for emacs-devel@gnu.org; Sat, 08 Jan 2022 02:58:24 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:54673) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n66cI-0005wj-O7; Sat, 08 Jan 2022 02:58:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1641628700; bh=+Pde0urBWDyHwpORlJ6G7vGxk5MZxsJVq9skyoSiq/Q=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=QEVtALBPViozBsARrECxHyLkDfBcAOTECJbmvIWgMVmfvRJHihxK/PDg0QXsr9t38 rP2g+og36cZNgATUrNSPxfWnzJ/AMl4W0E0VVkstaYB9oJTHerOZyYa8Si1lxgOhMs y3SKvMb8qtZzyzZpz9fXnES4r8li6CrLDvUZBMuw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([79.140.118.105]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MZktj-1muGOx0nZv-00WlpS; Sat, 08 Jan 2022 08:58:20 +0100 In-Reply-To: <20220107195223.57DA2C0DA1B@vcs2.savannah.gnu.org> (Sam Steingold's message of "Fri, 7 Jan 2022 14:52:22 -0500 (EST)") X-Provags-ID: V03:K1:tdNJyDEf68DLqhiM/eTZF9L+EQacALzjEdEDnj38MWbJFS+Sjcu mY0arxISs9pIaD95pdELEgKzjPUBrqXZG6ooa7haMxEgJLHb5eQzDtuJax/56b+A1uL5yg8 St5XrElDowhCP19yD8EUA49U7V+XqJOP1Tt5cEQU+X4kA1wU1frutkQ/A7heX9KQmd7iKOc eFTOEQEzcnSn60uSQJuhA== X-UI-Out-Filterresults: notjunk:1;V03:K0:0KENr70BBjI=:1LYm0rMYs3M13+5+1pvuGs mwKhvBdXFicRC8TgbsiGJsxy060A4Sx0PSwPFGqmlnNpAfwaFZe5bBFbo9lJQoKT0N/gRA9Zv U/O0ZtqszrvmFfFo2DPOFmomM4uAVYRZklwmD+QnDKW9hlwfZArvWssEzG4urQx5OfdYWhOY1 hhyUz+jl+7QWGuFZSVQEwrrWQaRqONYdib05eaNK0klRn5BqlKTNaK8k1QiCM4LrrRTQUVbil QcQtjE0FKiDDO3BcFghz9EZvVGP0POYtbGtfmTJD4duvPBZ/PC2zxGL1X1l+JsvdSCt6SmO8/ +COITf7RPMQwjqfXi+ajRZkILEoiuHVUVpBLlXMzJAb2UnV5VAEdwmJTEjR9g7FRvX1HXnsG+ Y+lxMYoJ8ZAYGLaDUuY49yaZCvKQYIa1CkcpQdkfWZpfB0t/3jMVHxDGvzuUU8RPrmF/eN/H4 SyJ2jw8iFL95yZvGA2uCobB3qmwomVdIaaaVPKBdkbEQWejakljaN1ibOnWWKwploOfVoyvKY /AWodkEbhOM8BCLXxXzOJTlyhRBj5I2bj2witmkeHGLoU1LhsW2sP8d1+9tXCgIhoFSXqPmkc 0l+pA06pXbXLqBIzsgq9qFVHqKxtDqkHWdLanHNqiDT8w/VWYngvw3WTljN/OhIn7g4DSUQk/ ekGOzMV6mUUgTw4+trBig++sXujjnVOlctTxc0V3bQoCmHTXMnb9v1/4trYwUTQavsc0b4HY2 OdQUOTBA7F4OCXsBAamknlHucUXuzT6efk4P+MXtMjzs60srTkV4Rv/pwiv7gcEnUGeILc6g Received-SPF: pass client-ip=212.227.17.21; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:284450 Archived-At: Sam Steingold 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 * 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.