all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#34225: 27.0.50; Add passwd backups to etc-passwd-generic-mode
@ 2019-01-27 20:34 Juri Linkov
  2019-01-28 15:50 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2019-01-27 20:34 UTC (permalink / raw)
  To: 34225

[-- Attachment #1: Type: text/plain, Size: 220 bytes --]

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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: generic-x.etc-passwd-generic-mode.patch --]
[-- Type: text/x-diff, Size: 455 bytes --]

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 ()

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#34225: 27.0.50; Add passwd backups to etc-passwd-generic-mode
  2019-01-27 20:34 bug#34225: 27.0.50; Add passwd backups to etc-passwd-generic-mode Juri Linkov
@ 2019-01-28 15:50 ` Eli Zaretskii
  2019-01-28 18:01   ` Glenn Morris
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2019-01-28 15:50 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 34225

> From: Juri Linkov <juri@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?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#34225: 27.0.50; Add passwd backups to etc-passwd-generic-mode
  2019-01-28 15:50 ` Eli Zaretskii
@ 2019-01-28 18:01   ` Glenn Morris
  2019-01-28 20:19     ` Juri Linkov
  0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2019-01-28 18:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 34225, Juri Linkov

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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#34225: 27.0.50; Add passwd backups to etc-passwd-generic-mode
  2019-01-28 18:01   ` Glenn Morris
@ 2019-01-28 20:19     ` Juri Linkov
  2019-01-28 20:54       ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2019-01-28 20:19 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 34225-done

>>> 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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#34225: 27.0.50; Add passwd backups to etc-passwd-generic-mode
  2019-01-28 20:19     ` Juri Linkov
@ 2019-01-28 20:54       ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2019-01-28 20:54 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 34225

> From: Juri Linkov <juri@linkov.net>
> Cc: Eli Zaretskii <eliz@gnu.org>,  34225-done@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.






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-28 20:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-27 20:34 bug#34225: 27.0.50; Add passwd backups to etc-passwd-generic-mode Juri Linkov
2019-01-28 15:50 ` Eli Zaretskii
2019-01-28 18:01   ` Glenn Morris
2019-01-28 20:19     ` Juri Linkov
2019-01-28 20:54       ` Eli Zaretskii

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.