From: Glenn Morris <rgm@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel@gnu.org
Subject: Re: vc-mode-line ancient, root-specific code for buffer-read-only
Date: Wed, 19 Dec 2018 13:10:35 -0500 [thread overview]
Message-ID: <g54lb9tmjo.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <999b7b9b-4c91-a517-4c65-b88998fe3b6f@cs.ucla.edu> (Paul Eggert's message of "Tue, 18 Dec 2018 22:16:50 -0800")
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.
next prev parent reply other threads:[~2018-12-19 18:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 4:49 vc-mode-line ancient, root-specific code for buffer-read-only Glenn Morris
2018-12-19 6:16 ` Paul Eggert
2018-12-19 9:18 ` Andreas Schwab
2018-12-19 18:10 ` Glenn Morris [this message]
2018-12-19 21:23 ` Stefan Monnier
2018-12-19 22:41 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=g54lb9tmjo.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).