GNU bug report logs - #34225
27.0.50; Add passwd backups to etc-passwd-generic-mode

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 27 Jan 2019 20:44:02 UTC

Severity: normal

Tags: patch

Found in version 27.0.50

Done: Juri Linkov <juri <at> linkov.net>

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 34225 in the body.
You can then email your comments to 34225 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#34225; Package emacs. (Sun, 27 Jan 2019 20:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 27 Jan 2019 20:44:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Add passwd backups to etc-passwd-generic-mode
Date: Sun, 27 Jan 2019 22:34:03 +0200
[Message part 1 (text/plain, inline)]
Tags: patch

I don't know why backups /etc/passwd- use the suffix ‘-’ instead of ‘~’
but comparing these files with their backups I noticed the difference
in their font-lock highlighting, thus this patch:

[generic-x.etc-passwd-generic-mode.patch (text/x-diff, inline)]
diff --git a/lisp/generic-x.el b/lisp/generic-x.el
index 014379fba9..dd61402015 100644
--- a/lisp/generic-x.el
+++ b/lisp/generic-x.el
@@ -1490,7 +1490,7 @@ etc-passwd-generic-mode
      '("^\\([^:]+\\):\\([^:]*\\):\\([0-9]+\\):\\(.*\\)$"
        (1 font-lock-type-face)
        (4 font-lock-variable-name-face))))
-  '("/etc/passwd\\'" "/etc/group\\'")
+  '("/etc/passwd-?\\'" "/etc/group-?\\'" "/etc/shadow-?\\'")
   (list
    (function
     (lambda ()

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34225; Package emacs. (Mon, 28 Jan 2019 15:52:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 34225 <at> debbugs.gnu.org
Subject: Re: bug#34225: 27.0.50; Add passwd backups to etc-passwd-generic-mode
Date: Mon, 28 Jan 2019 17:50:43 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Date: Sun, 27 Jan 2019 22:34:03 +0200
> 
> I don't know why backups /etc/passwd- use the suffix ‘-’ instead of ‘~’

It does?  I seem to be unable to reproduce this:

  (make-backup-file-name "/etc/passwd")
    => "/etc/passwd~"

What am I missing?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34225; Package emacs. (Mon, 28 Jan 2019 18:03:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 34225 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#34225: 27.0.50; Add passwd backups to etc-passwd-generic-mode
Date: Mon, 28 Jan 2019 13:01:57 -0500
Eli Zaretskii wrote:

>> I don't know why backups /etc/passwd- use the suffix '-' instead of '~'
>
> It does?  I seem to be unable to reproduce this:
>
>   (make-backup-file-name "/etc/passwd")
>     => "/etc/passwd~"
>
> What am I missing?

These are non-Emacs backups. See eg "man 5 shadow".
 
    /etc/shadow-
    Backup file for /etc/shadow.
    
    Note that this file is used by the tools of the shadow toolsuite,
    but not by all user and password management tools.




Reply sent to Juri Linkov <juri <at> linkov.net>:
You have taken responsibility. (Mon, 28 Jan 2019 20:22:02 GMT) Full text and rfc822 format available.

Notification sent to Juri Linkov <juri <at> linkov.net>:
bug acknowledged by developer. (Mon, 28 Jan 2019 20:22:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 34225-done <at> debbugs.gnu.org
Subject: Re: bug#34225: 27.0.50; Add passwd backups to etc-passwd-generic-mode
Date: Mon, 28 Jan 2019 22:19:39 +0200
>>> I don't know why backups /etc/passwd- use the suffix '-' instead of '~'
>>
>> It does?  I seem to be unable to reproduce this:
>>
>>   (make-backup-file-name "/etc/passwd")
>>     => "/etc/passwd~"
>>
>> What am I missing?
>
> These are non-Emacs backups. See eg "man 5 shadow".
>
>     /etc/shadow-
>     Backup file for /etc/shadow.
>
>     Note that this file is used by the tools of the shadow toolsuite,
>     but not by all user and password management tools.

Yes, and "man 5 passwd" shows the same:

       /etc/passwd-
           Backup file for /etc/passwd.

So I installed the patch to master.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34225; Package emacs. (Mon, 28 Jan 2019 20:56:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: rgm <at> gnu.org, 34225 <at> debbugs.gnu.org
Subject: Re: bug#34225: 27.0.50; Add passwd backups to etc-passwd-generic-mode
Date: Mon, 28 Jan 2019 22:54:56 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  34225-done <at> debbugs.gnu.org
> Date: Mon, 28 Jan 2019 22:19:39 +0200
> 
> >     /etc/shadow-
> >     Backup file for /etc/shadow.
> >
> >     Note that this file is used by the tools of the shadow toolsuite,
> >     but not by all user and password management tools.
> 
> Yes, and "man 5 passwd" shows the same:
> 
>        /etc/passwd-
>            Backup file for /etc/passwd.
> 
> So I installed the patch to master.

Please add a comment there to explain why we do such a strange thing.





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

This bug report was last modified 6 years and 176 days ago.

Previous Next


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