GNU bug report logs - #66241
30.0.50; [PATCH] Use auth-info-mode for non-hidden authinfo and netrc files

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Wed, 27 Sep 2023 16:46:02 UTC

Severity: wishlist

Tags: patch

Found in version 30.0.50

Fixed in version 30.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66241 in the body.
You can then email your comments to 66241 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#66241; Package emacs. (Wed, 27 Sep 2023 16:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Augusto Stoffel <arstoffel <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 27 Sep 2023 16:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; [PATCH] Use auth-info-mode for non-hidden authinfo and
 netrc files
Date: Wed, 27 Sep 2023 18:44:58 +0200
[Message part 1 (text/plain, inline)]
See patch for the rationale.

[0001-Use-auth-info-mode-for-non-hidden-authinfo-and-netrc.patch (text/x-patch, attachment)]

Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 30 Sep 2023 23:06:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66241; Package emacs. (Sun, 01 Oct 2023 02:35:02 GMT) Full text and rfc822 format available.

Message #10 received at 66241 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 66241 <at> debbugs.gnu.org
Subject: Re: bug#66241: 30.0.50; [PATCH] Use auth-info-mode for non-hidden
 authinfo and netrc files
Date: Sat, 30 Sep 2023 19:34:31 -0700
Augusto Stoffel <arstoffel <at> gmail.com> writes:

> See patch for the rationale.

Thanks.  Could you explain why you think that this should this be the
default value, instead of merely a user customization?

>>From dc0abaff3dcaf9c7f48a8cd18dd045ae4323a030 Mon Sep 17 00:00:00 2001
> From: Augusto Stoffel <arstoffel <at> gmail.com>
> Date: Wed, 27 Sep 2023 18:35:32 +0200
> Subject: [PATCH] Use auth-info-mode for non-hidden authinfo and netrc files
>
> * files.el (auto-mode-alist): Match non-hidden authinfo and netrc
> files, since it is reasonable to store passwords in
> ~/.emacs.d/authinfo.gpg or a similarly named file.
> ---
>  lisp/files.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/files.el b/lisp/files.el
> index b67482a2f74..f2980de4810 100644
> --- a/lisp/files.el
> +++ b/lisp/files.el
> @@ -3038,7 +3038,7 @@ auto-mode-alist
>       ("\\.docbook\\'" . sgml-mode)
>       ("\\.com\\'" . dcl-mode)
>       ("/config\\.\\(?:bat\\|log\\)\\'" . fundamental-mode)
> -     ("/\\.\\(authinfo\\|netrc\\)\\'" . authinfo-mode)
> +     ("/\\.?\\(authinfo\\|netrc\\)\\'" . authinfo-mode)
>       ;; Windows candidates may be opened case sensitively on Unix
>       ("\\.\\(?:[iI][nN][iI]\\|[lL][sS][tT]\\|[rR][eE][gG]\\|[sS][yY][sS]\\)\\'" . conf-mode)
>       ("\\.la\\'" . conf-unix-mode)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66241; Package emacs. (Mon, 02 Oct 2023 08:01:01 GMT) Full text and rfc822 format available.

Message #13 received at 66241 <at> debbugs.gnu.org (full text, mbox):

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 66241 <at> debbugs.gnu.org
Subject: Re: bug#66241: 30.0.50; [PATCH] Use auth-info-mode for non-hidden
 authinfo and netrc files
Date: Mon, 02 Oct 2023 09:59:57 +0200
On Sat, 30 Sep 2023 at 19:34, Stefan Kangas wrote:

> Augusto Stoffel <arstoffel <at> gmail.com> writes:
>
>> See patch for the rationale.
>
> Thanks.  Could you explain why you think that this should this be the
> default value, instead of merely a user customization?

The user customization is indeed rather easy: one can add a "-*- mode:"
comment at the top of the file.  The main issue with that is that the
user needs to be aware of the existence of the mode.  I wasn't, until
recently.

The second point is, I see no potential for false-positives, i.e., who
would have a file name "authinfo" or "netrc" that is not a credentials
file?  (Of course this is just a theory which can be disputed.)

>>>From dc0abaff3dcaf9c7f48a8cd18dd045ae4323a030 Mon Sep 17 00:00:00 2001
>> From: Augusto Stoffel <arstoffel <at> gmail.com>
>> Date: Wed, 27 Sep 2023 18:35:32 +0200
>> Subject: [PATCH] Use auth-info-mode for non-hidden authinfo and netrc files
>>
>> * files.el (auto-mode-alist): Match non-hidden authinfo and netrc
>> files, since it is reasonable to store passwords in
>> ~/.emacs.d/authinfo.gpg or a similarly named file.
>> ---
>>  lisp/files.el | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lisp/files.el b/lisp/files.el
>> index b67482a2f74..f2980de4810 100644
>> --- a/lisp/files.el
>> +++ b/lisp/files.el
>> @@ -3038,7 +3038,7 @@ auto-mode-alist
>>       ("\\.docbook\\'" . sgml-mode)
>>       ("\\.com\\'" . dcl-mode)
>>       ("/config\\.\\(?:bat\\|log\\)\\'" . fundamental-mode)
>> -     ("/\\.\\(authinfo\\|netrc\\)\\'" . authinfo-mode)
>> +     ("/\\.?\\(authinfo\\|netrc\\)\\'" . authinfo-mode)
>>       ;; Windows candidates may be opened case sensitively on Unix
>>       ("\\.\\(?:[iI][nN][iI]\\|[lL][sS][tT]\\|[rR][eE][gG]\\|[sS][yY][sS]\\)\\'" . conf-mode)
>>       ("\\.la\\'" . conf-unix-mode)




Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Wed, 10 Jan 2024 22:09:01 GMT) Full text and rfc822 format available.

Notification sent to Augusto Stoffel <arstoffel <at> gmail.com>:
bug acknowledged by developer. (Wed, 10 Jan 2024 22:09:02 GMT) Full text and rfc822 format available.

Message #18 received at 66241-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 66241-done <at> debbugs.gnu.org
Subject: Re: bug#66241: 30.0.50; [PATCH] Use auth-info-mode for non-hidden
 authinfo and netrc files
Date: Wed, 10 Jan 2024 14:08:12 -0800
Version: 30.1

Augusto Stoffel <arstoffel <at> gmail.com> writes:

> On Sat, 30 Sep 2023 at 19:34, Stefan Kangas wrote:
>
>> Augusto Stoffel <arstoffel <at> gmail.com> writes:
>>
>>> See patch for the rationale.
>>
>> Thanks.  Could you explain why you think that this should this be the
>> default value, instead of merely a user customization?
>
> The user customization is indeed rather easy: one can add a "-*- mode:"
> comment at the top of the file.  The main issue with that is that the
> user needs to be aware of the existence of the mode.  I wasn't, until
> recently.
>
> The second point is, I see no potential for false-positives, i.e., who
> would have a file name "authinfo" or "netrc" that is not a credentials
> file?  (Of course this is just a theory which can be disputed.)

Thanks, that makes sense.  So I installed this patch on master
(c12166de380).

I'm closing this bug report.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 08 Feb 2024 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 90 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.