[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vc-mode-line ancient, root-specific code for buffer-read-only
From: |
Glenn Morris |
Subject: |
Re: vc-mode-line ancient, root-specific code for buffer-read-only |
Date: |
Wed, 19 Dec 2018 13:10:35 -0500 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Paul Eggert wrote:
> On the other hand I don't follow the comment "root cannot 'write
> anything'". Traditionally, root can write any file that is writable to
> any user (and even some files that no other users can write to), so in
> that sense roote can "write anything".
This vc code is only relevant to files that are not writable by their owner.
The most normal example would be a file with mode 444.
If you visit such a file with Emacs as root, it is marked read-only anyway.
(That is what I meant by root not being able to "write anything";
obviously root can change the permissions and then do whatever.)
The vc-mode line code would only make a difference to files with odd
modes like 466. But RCS (for example) changes file modes to 444 when it
locks a file, so AFAICS the vc-mode code serves no purpose even for RCS.