From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: vc-mode-line ancient, root-specific code for buffer-read-only Date: Wed, 19 Dec 2018 13:10:35 -0500 Message-ID: References: <999b7b9b-4c91-a517-4c65-b88998fe3b6f@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1545242960 27205 195.159.176.226 (19 Dec 2018 18:09:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Dec 2018 18:09:20 +0000 (UTC) User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 19 19:09:16 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZgHT-0006ze-L5 for ged-emacs-devel@m.gmane.org; Wed, 19 Dec 2018 19:09:15 +0100 Original-Received: from localhost ([::1]:33428 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZgJa-000353-BD for ged-emacs-devel@m.gmane.org; Wed, 19 Dec 2018 13:11:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZgIx-00034p-6V for emacs-devel@gnu.org; Wed, 19 Dec 2018 13:10:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZgIv-0000T8-Ac for emacs-devel@gnu.org; Wed, 19 Dec 2018 13:10:47 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZgIn-0000OQ-2S; Wed, 19 Dec 2018 13:10:37 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1gZgIl-0005u2-65; Wed, 19 Dec 2018 13:10:35 -0500 X-Spook: Hamas ammunition PGP Aldergrove cryptographic Chemical X-Ran: >dXBms7q9H-YqGz-|('}BXc9pf9lAF61W"&bsMX{='9ZF}I#S6-oH5%$l{cmL(!e%>D~rC X-Hue: yellow X-Attribution: GM In-Reply-To: <999b7b9b-4c91-a517-4c65-b88998fe3b6f@cs.ucla.edu> (Paul Eggert's message of "Tue, 18 Dec 2018 22:16:50 -0800") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231926 Archived-At: 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.