From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Moving files from lisp/gnus/ to lisp/net/? Date: Fri, 29 Oct 2004 00:32:20 -0400 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <2366.81.51.30.174.1098020712.squirrel@yxa.extundo.com> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1099024417 9942 80.91.229.6 (29 Oct 2004 04:33:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Oct 2004 04:33:37 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 29 06:33:33 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CNOSD-0002Ks-00 for ; Fri, 29 Oct 2004 06:33:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CNOa2-0000KV-Il for ged-emacs-devel@m.gmane.org; Fri, 29 Oct 2004 00:41:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CNOZf-0000Bj-IK for emacs-devel@gnu.org; Fri, 29 Oct 2004 00:41:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CNOZf-0000BX-5o for emacs-devel@gnu.org; Fri, 29 Oct 2004 00:41:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CNOZf-0000BU-2h for emacs-devel@gnu.org; Fri, 29 Oct 2004 00:41:15 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CNORo-0005cw-K0 for emacs-devel@gnu.org; Fri, 29 Oct 2004 00:33:08 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1CNOR2-00066h-24; Fri, 29 Oct 2004 00:32:20 -0400 Original-To: Simon Josefsson In-reply-to: (message from Simon Josefsson on Wed, 27 Oct 2004 21:08:28 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 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.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29129 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29129 Other applications typically ask the user whether they want to remember the password in memory. If read-passwd is changed to cache passwords (however, to use the cache, callers of read-passwd must be updated, to provide the "key" into the hash table), it could ask the user this. Opinions on this welcome. Having it always ask would be too annoying, I think. So that would need to be a new argument, which means the feature is no benefit unless we change the callers. That is the wrong thing to do at present. So I think we should put read-passwd back where it was and remove the new file for now. Looking ahead to the future, > Why have both password-read and password-read-and-add? > Why not always add? Is the idea that for some purposes > it is ok to cache, but for others it is too risky? No, the reason was this: if the user entered an incorrect password, it should not be cached. If an incorrect password is cached, the code might infloop trying the incorrect password automatically over and over again. It was considered safer to first read the password, then try to use it, and if successful then it is cached. In that case, password-read-and-add makes no sense, right? Why add a shortcut that in best practice should not be used? I'm not sure my argument is good, it may be simpler to always cache, and have the calling code invoke password-cache-remove whenever there is a password failure. That is a reasonable alternative, I guess, but then password-read should add the password and we should not have password-read-and-add as a separate entry point. But it doesn't make sense to discuss this without dealing with the question of whether caching of correct passwords is desirable.